diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1ffbb3b..8c3b469 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,37 +1,126 @@ lockVersion: 2.0.0 id: c7830d5c-39eb-428e-bde1-daaba29fa325 management: - docChecksum: 8c43483effe5dc326d375dcc864b71eb + docChecksum: bbdebf403b025a98efa88d32ce032339 docVersion: 0.1.0 - speakeasyVersion: 1.349.1 - generationVersion: 2.382.1 - releaseVersion: 0.3.8 - configChecksum: bcea65b49f778ee9584de6d303adb987 + speakeasyVersion: 1.398.1 + generationVersion: 2.415.8 + releaseVersion: 0.4.1 + configChecksum: 1291192cd4f414b5a1ca9c3c789e245d features: terraform: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.4 - core: 3.24.5 - globalSecurity: 2.81.6 + core: 3.24.11 + envVarSecurityUsage: 0.1.0 + globalSecurity: 2.81.8 globalServerURLs: 2.82.1 nameOverrides: 2.81.2 + nullables: 0.0.0 retries: 2.81.1 sets: 0.1.2 - unions: 2.81.15 + unions: 2.81.16 generatedFiles: - - internal/sdk/core.go + - .gitattributes + - CONTRIBUTING.md + - USAGE.md + - examples/README.md + - examples/data-sources/lumos_app/data-source.tf + - examples/data-sources/lumos_app_store_app/data-source.tf + - examples/data-sources/lumos_app_store_app_settings/data-source.tf + - examples/data-sources/lumos_apps/data-source.tf + - examples/data-sources/lumos_group/data-source.tf + - examples/data-sources/lumos_groups/data-source.tf + - examples/data-sources/lumos_requestable_permission/data-source.tf + - examples/data-sources/lumos_requestable_permissions/data-source.tf + - examples/data-sources/lumos_user/data-source.tf + - examples/data-sources/lumos_users/data-source.tf + - examples/provider/provider.tf + - examples/resources/lumos_app/import.sh + - examples/resources/lumos_app/resource.tf + - examples/resources/lumos_app_store_app/import.sh + - examples/resources/lumos_app_store_app/resource.tf + - examples/resources/lumos_pre_approval_rule/resource.tf + - examples/resources/lumos_requestable_permission/import.sh + - go.mod + - go.sum + - internal/planmodifiers/boolplanmodifier/suppress_diff.go + - internal/planmodifiers/float64planmodifier/suppress_diff.go + - internal/planmodifiers/int64planmodifier/suppress_diff.go + - internal/planmodifiers/listplanmodifier/suppress_diff.go + - internal/planmodifiers/mapplanmodifier/suppress_diff.go + - internal/planmodifiers/numberplanmodifier/suppress_diff.go + - internal/planmodifiers/objectplanmodifier/suppress_diff.go + - internal/planmodifiers/setplanmodifier/suppress_diff.go + - internal/planmodifiers/stringplanmodifier/suppress_diff.go + - internal/planmodifiers/utils/state_check.go + - internal/provider/app_data_source.go + - internal/provider/app_data_source_sdk.go + - internal/provider/app_resource.go + - internal/provider/app_resource_sdk.go + - internal/provider/apps_data_source.go + - internal/provider/apps_data_source_sdk.go + - internal/provider/appstoreapp_data_source.go + - internal/provider/appstoreapp_data_source_sdk.go + - internal/provider/appstoreapp_resource.go + - internal/provider/appstoreapp_resource_sdk.go + - internal/provider/appstoreappsettings_data_source.go + - internal/provider/appstoreappsettings_data_source_sdk.go + - internal/provider/group_data_source.go + - internal/provider/group_data_source_sdk.go + - internal/provider/groups_data_source.go + - internal/provider/groups_data_source_sdk.go + - internal/provider/preapprovalrule_resource.go + - internal/provider/preapprovalrule_resource_sdk.go + - internal/provider/provider.go + - internal/provider/reflect/diags.go + - internal/provider/reflect/doc.go + - internal/provider/reflect/generic_attr_value.go + - internal/provider/reflect/helpers.go + - internal/provider/reflect/interfaces.go + - internal/provider/reflect/into.go + - internal/provider/reflect/map.go + - internal/provider/reflect/number.go + - internal/provider/reflect/options.go + - internal/provider/reflect/outof.go + - internal/provider/reflect/pointer.go + - internal/provider/reflect/primitive.go + - internal/provider/reflect/slice.go + - internal/provider/reflect/struct.go + - internal/provider/requestablepermission_data_source.go + - internal/provider/requestablepermission_data_source_sdk.go + - internal/provider/requestablepermission_resource.go + - internal/provider/requestablepermission_resource_sdk.go + - internal/provider/requestablepermissions_data_source.go + - internal/provider/requestablepermissions_data_source_sdk.go + - internal/provider/types/allowed_groups_config_input.go + - internal/provider/types/app.go + - internal/provider/types/app_admins_input.go + - internal/provider/types/app_approvers_input.go + - internal/provider/types/app_store_app_settings_provisioning_input.go + - internal/provider/types/app_store_app_settings_request_flow_input.go + - internal/provider/types/base_inline_webhook.go + - internal/provider/types/group.go + - internal/provider/types/request_approval_config_input.go + - internal/provider/types/request_approval_config_output.go + - internal/provider/types/request_config_input_create.go + - internal/provider/types/request_config_output.go + - internal/provider/types/request_fulfillment_config_input.go + - internal/provider/types/requestable_permission_base.go + - internal/provider/types/requestable_permission_output.go + - internal/provider/types/user.go + - internal/provider/user_data_source.go + - internal/provider/user_data_source_sdk.go + - internal/provider/users_data_source.go + - internal/provider/users_data_source_sdk.go + - internal/provider/utils.go + - internal/sdk/.gitattributes + - internal/sdk/.gitignore + - internal/sdk/CONTRIBUTING.md - internal/sdk/appstore.go - - internal/sdk/vendormanagement.go - - internal/sdk/meta.go + - internal/sdk/core.go - internal/sdk/integrationwebhooks.go - - internal/sdk/lumos.go - - internal/sdk/models/errors/sdkerror.go - - internal/sdk/retry/config.go - - internal/sdk/types/bigint.go - - internal/sdk/types/date.go - - internal/sdk/types/datetime.go - - internal/sdk/types/decimal.go - - internal/sdk/types/pointers.go + - internal/sdk/internal/hooks/hooks.go - internal/sdk/internal/utils/contenttype.go - internal/sdk/internal/utils/form.go - internal/sdk/internal/utils/headers.go @@ -42,164 +131,172 @@ generatedFiles: - internal/sdk/internal/utils/retries.go - internal/sdk/internal/utils/security.go - internal/sdk/internal/utils/utils.go - - internal/sdk/models/operations/listapps.go + - internal/sdk/lumos.go + - internal/sdk/meta.go + - internal/sdk/models/errors/sdkerror.go + - internal/sdk/models/operations/activityrecords.go + - internal/sdk/models/operations/addapptoappstore.go + - internal/sdk/models/operations/cancelaccessrequest.go + - internal/sdk/models/operations/createaccessrequest.go - internal/sdk/models/operations/createapp.go - - internal/sdk/models/operations/getappcategories.go - - internal/sdk/models/operations/getapp.go - - internal/sdk/models/operations/updateapp.go - - internal/sdk/models/operations/getappsettings.go - - internal/sdk/models/operations/updateappsettings.go + - internal/sdk/models/operations/createappstorerequestablepermissionappstorerequestablepermissionspost.go + - internal/sdk/models/operations/createfounddocumentjson.go + - internal/sdk/models/operations/createfounddocumentmultipart.go + - internal/sdk/models/operations/createorder.go + - internal/sdk/models/operations/createpreapprovalruleappstorepreapprovalrulespost.go - internal/sdk/models/operations/currentuser.go - - internal/sdk/models/operations/listusers.go - - internal/sdk/models/operations/getuser.go - - internal/sdk/models/operations/getinlinewebhooksinlinewebhooksget.go + - internal/sdk/models/operations/deleteappstorepermissionappstorerequestablepermissionspermissioniddelete.go + - internal/sdk/models/operations/deletepreapprovalruleappstorepreapprovalrulespreapprovalruleiddelete.go + - internal/sdk/models/operations/getaccessrequest.go + - internal/sdk/models/operations/getaccessrequests.go - internal/sdk/models/operations/getaccounts.go - - internal/sdk/models/operations/getgroupmembership.go - - internal/sdk/models/operations/getgroup.go - - internal/sdk/models/operations/getgroups.go - - internal/sdk/models/operations/getuploadjobstate.go - internal/sdk/models/operations/getactivitylogs.go - - internal/sdk/models/operations/postaccounts.go - - internal/sdk/models/operations/activityrecords.go - internal/sdk/models/operations/getactivityrecordsjobstate.go - - internal/sdk/models/operations/getappstorepermissionsforappappstorerequestablepermissionsget.go - - internal/sdk/models/operations/createappstorerequestablepermissionappstorerequestablepermissionspost.go + - internal/sdk/models/operations/getapp.go + - internal/sdk/models/operations/getappcategories.go + - internal/sdk/models/operations/getappsettings.go + - internal/sdk/models/operations/getappstoreapp.go + - internal/sdk/models/operations/getappstoreapps.go + - internal/sdk/models/operations/getappstoreappsettings.go - internal/sdk/models/operations/getappstorepermissionappstorerequestablepermissionspermissionidget.go - - internal/sdk/models/operations/deleteappstorepermissionappstorerequestablepermissionspermissioniddelete.go - - internal/sdk/models/operations/updateappstorepermissionappstorerequestablepermissionspermissionidpatch.go - - internal/sdk/models/operations/getappstorepreapprovalrulesforappappstorepreapprovalrulesget.go - - internal/sdk/models/operations/createpreapprovalruleappstorepreapprovalrulespost.go + - internal/sdk/models/operations/getappstorepermissionsappstorerequestablepermissionsget.go + - internal/sdk/models/operations/getappstorepermissionsforappappstoreappsappidrequestablepermissionsget.go - internal/sdk/models/operations/getappstorepreapprovalruleappstorepreapprovalrulespreapprovalruleidget.go - - internal/sdk/models/operations/deletepreapprovalruleappstorepreapprovalrulespreapprovalruleiddelete.go - - internal/sdk/models/operations/updatepreapprovalruleappstorepreapprovalrulespreapprovalruleidpatch.go - - internal/sdk/models/operations/getappstoreappsettings.go - - internal/sdk/models/operations/updateappstoreappsettings.go - - internal/sdk/models/operations/getappstoreapps.go - - internal/sdk/models/operations/addapptoappstore.go - - internal/sdk/models/operations/getappstoreapp.go - - internal/sdk/models/operations/removeappfromappstore.go - - internal/sdk/models/operations/createaccessrequest.go - - internal/sdk/models/operations/getaccessrequest.go - - internal/sdk/models/operations/getaccessrequests.go + - internal/sdk/models/operations/getappstorepreapprovalrulesforappappstorepreapprovalrulesget.go + - internal/sdk/models/operations/getgroup.go + - internal/sdk/models/operations/getgroupmembership.go + - internal/sdk/models/operations/getgroups.go + - internal/sdk/models/operations/getinlinewebhooksinlinewebhooksget.go + - internal/sdk/models/operations/getuploadjobstate.go + - internal/sdk/models/operations/getuser.go + - internal/sdk/models/operations/listapps.go + - internal/sdk/models/operations/listusers.go - internal/sdk/models/operations/listvendoragreements.go - - internal/sdk/models/operations/createfounddocumentmultipart.go - - internal/sdk/models/operations/createfounddocumentjson.go - - internal/sdk/models/operations/createorder.go - internal/sdk/models/operations/lumosart.go - internal/sdk/models/operations/lumoslivenesscheck.go + - internal/sdk/models/operations/options.go + - internal/sdk/models/operations/postaccounts.go - internal/sdk/models/operations/processairbasemilestoneevent.go - - internal/sdk/models/shared/httpvalidationerror.go - - internal/sdk/models/shared/validationerror.go - - internal/sdk/models/shared/pageapp.go + - internal/sdk/models/operations/removeappfromappstore.go + - internal/sdk/models/operations/updateapp.go + - internal/sdk/models/operations/updateappsettings.go + - internal/sdk/models/operations/updateappstoreappsettings.go + - internal/sdk/models/operations/updateappstorepermissionappstorerequestablepermissionspermissionidpatch.go + - internal/sdk/models/operations/updatepreapprovalruleappstorepreapprovalrulespreapprovalruleidpatch.go + - internal/sdk/models/shared/accessrequest.go + - internal/sdk/models/shared/account.go + - internal/sdk/models/shared/accountinput.go + - internal/sdk/models/shared/accountlifecyclestatus.go + - internal/sdk/models/shared/accountsuploadinput.go + - internal/sdk/models/shared/accounttype.go + - internal/sdk/models/shared/activitylog.go + - internal/sdk/models/shared/activityrecord.go + - internal/sdk/models/shared/activityrecordaccountinput.go + - internal/sdk/models/shared/activityrecordappinput.go + - internal/sdk/models/shared/activityrecordeventinput.go + - internal/sdk/models/shared/activityrecordeventtype.go + - internal/sdk/models/shared/activityrecordinput.go + - internal/sdk/models/shared/activityrecordoutput.go + - internal/sdk/models/shared/addapptoappstoreinput.go + - internal/sdk/models/shared/airbasepurchaserequestevent.go + - internal/sdk/models/shared/allowedgroupsconfiginput.go + - internal/sdk/models/shared/allowedgroupsconfigoutput.go - internal/sdk/models/shared/app.go - - internal/sdk/models/shared/discoverysource.go - - internal/sdk/models/shared/domainappstatus.go + - internal/sdk/models/shared/appadminsinput.go + - internal/sdk/models/shared/appapproversinput.go + - internal/sdk/models/shared/appapproversoutput.go - internal/sdk/models/shared/appinputcreate.go + - internal/sdk/models/shared/approverinput.go + - internal/sdk/models/shared/approveroutput.go + - internal/sdk/models/shared/approvertype.go + - internal/sdk/models/shared/appsettinginput.go - internal/sdk/models/shared/appsettingoutput.go - - internal/sdk/models/shared/inlinewebhooktype.go - - internal/sdk/models/shared/timebasedaccessoptions.go - - internal/sdk/models/shared/groupprovisioningoption.go - - internal/sdk/models/shared/user.go - - internal/sdk/models/shared/userlifecyclestatus.go - - internal/sdk/models/shared/group.go + - internal/sdk/models/shared/appstoreapp.go + - internal/sdk/models/shared/appstoreappsettingsinput.go + - internal/sdk/models/shared/appstoreappsettingsoutput.go + - internal/sdk/models/shared/appstoreappsettingsprovisioninginput.go + - internal/sdk/models/shared/appstoreappsettingsprovisioningoutput.go + - internal/sdk/models/shared/appstoreappsettingsrequestflowinput.go + - internal/sdk/models/shared/appstoreappsettingsrequestflowoutput.go - internal/sdk/models/shared/appstorevisibility.go - - internal/sdk/models/shared/appsettinginput.go - - internal/sdk/models/shared/baseuser.go + - internal/sdk/models/shared/appstorevisibilityoption.go + - internal/sdk/models/shared/attributeinput.go - internal/sdk/models/shared/basegroup.go - - internal/sdk/models/shared/pageuser.go + - internal/sdk/models/shared/baseinlinewebhook.go + - internal/sdk/models/shared/baseuser.go + - internal/sdk/models/shared/cost.go + - internal/sdk/models/shared/createaccessrequestinput.go + - internal/sdk/models/shared/discoverysource.go + - internal/sdk/models/shared/domainappstatus.go + - internal/sdk/models/shared/fileupload.go + - internal/sdk/models/shared/fileuploadtype.go + - internal/sdk/models/shared/flowstate.go + - internal/sdk/models/shared/founddocumentsupload.go + - internal/sdk/models/shared/group.go + - internal/sdk/models/shared/groupprovisioningoption.go + - internal/sdk/models/shared/httpvalidationerror.go - internal/sdk/models/shared/inlinewebhook.go - - internal/sdk/models/shared/pageaccount.go - - internal/sdk/models/shared/account.go - - internal/sdk/models/shared/accounttype.go - - internal/sdk/models/shared/pagegroup.go + - internal/sdk/models/shared/inlinewebhooktype.go - internal/sdk/models/shared/jobstateoutput.go - - internal/sdk/models/shared/flowstate.go + - internal/sdk/models/shared/lifecycle.go - internal/sdk/models/shared/limitoffsetpageactivitylog.go + - internal/sdk/models/shared/lineitem.go + - internal/sdk/models/shared/lineiteminput.go + - internal/sdk/models/shared/lineitemunitcost.go + - internal/sdk/models/shared/lineitemunitcostinput.go + - internal/sdk/models/shared/lineitemupload.go - internal/sdk/models/shared/links.go - - internal/sdk/models/shared/activitylog.go - - internal/sdk/models/shared/accountsuploadinput.go - - internal/sdk/models/shared/accountinput.go - - internal/sdk/models/shared/attributeinput.go - - internal/sdk/models/shared/permissioninput.go - - internal/sdk/models/shared/accountlifecyclestatus.go - - internal/sdk/models/shared/activityrecordoutput.go - - internal/sdk/models/shared/runinfostatus.go - - internal/sdk/models/shared/activityrecordinput.go - - internal/sdk/models/shared/activityrecord.go - - internal/sdk/models/shared/activityrecordeventtype.go - - internal/sdk/models/shared/synctaskoutput.go - - internal/sdk/models/shared/pagerequestablepermissionoutput.go - - internal/sdk/models/shared/requestablepermissionoutput.go - - internal/sdk/models/shared/requestapprovalstageoutput.go - - internal/sdk/models/shared/approveroutput.go - - internal/sdk/models/shared/approvertype.go - - internal/sdk/models/shared/requestablepermissioninput.go - - internal/sdk/models/shared/requestapprovalstageinput.go - - internal/sdk/models/shared/approverinput.go - - internal/sdk/models/shared/requestablepermissioninputupdate.go + - internal/sdk/models/shared/managerapprovaloption.go + - internal/sdk/models/shared/orderinput.go + - internal/sdk/models/shared/pageaccessrequest.go + - internal/sdk/models/shared/pageaccount.go + - internal/sdk/models/shared/pageapp.go + - internal/sdk/models/shared/pageappstoreapp.go + - internal/sdk/models/shared/pagegroup.go - internal/sdk/models/shared/pagepreapprovalruleoutput.go - - internal/sdk/models/shared/preapprovalruleoutput.go - - internal/sdk/models/shared/requestablepermissionbaseoutput.go + - internal/sdk/models/shared/pagerequestablepermissionoutput.go + - internal/sdk/models/shared/pageuser.go + - internal/sdk/models/shared/pagevendoragreement.go + - internal/sdk/models/shared/permissioninput.go - internal/sdk/models/shared/permissiontype.go - internal/sdk/models/shared/preapprovalruleinput.go - - internal/sdk/models/shared/baseinlinewebhook.go - - internal/sdk/models/shared/requestablepermissionbase.go + - internal/sdk/models/shared/preapprovalruleoutput.go - internal/sdk/models/shared/preapprovalruleupdateinput.go - - internal/sdk/models/shared/appstoreappsettingsoutput.go - - internal/sdk/models/shared/appstoreappsettingsinput.go - - internal/sdk/models/shared/pageappstoreapp.go - - internal/sdk/models/shared/appstoreapp.go - - internal/sdk/models/shared/addapptoappstoreinput.go - - internal/sdk/models/shared/accessrequest.go + - internal/sdk/models/shared/requestablepermissionbase.go + - internal/sdk/models/shared/requestablepermissionbaseoutput.go + - internal/sdk/models/shared/requestablepermissioninput.go + - internal/sdk/models/shared/requestablepermissioninputupdate.go + - internal/sdk/models/shared/requestablepermissionoutput.go + - internal/sdk/models/shared/requestapprovalconfiginput.go + - internal/sdk/models/shared/requestapprovalconfigoutput.go + - internal/sdk/models/shared/requestapprovalstageinput.go + - internal/sdk/models/shared/requestapprovalstageoutput.go + - internal/sdk/models/shared/requestconfiginputcreate.go + - internal/sdk/models/shared/requestconfiginputupdate.go + - internal/sdk/models/shared/requestconfigoutput.go + - internal/sdk/models/shared/requestfulfillmentconfiginput.go + - internal/sdk/models/shared/requestfulfillmentconfiginputupdate.go + - internal/sdk/models/shared/requestfulfillmentconfigoutput.go + - internal/sdk/models/shared/runinfostatus.go + - internal/sdk/models/shared/security.go - internal/sdk/models/shared/supportrequeststatus.go - - internal/sdk/models/shared/createaccessrequestinput.go - - internal/sdk/models/shared/pageaccessrequest.go - - internal/sdk/models/shared/pagevendoragreement.go + - internal/sdk/models/shared/synctaskoutput.go + - internal/sdk/models/shared/timebasedaccessoptions.go + - internal/sdk/models/shared/user.go + - internal/sdk/models/shared/userlifecyclestatus.go + - internal/sdk/models/shared/validationerror.go + - internal/sdk/models/shared/vendor.go - internal/sdk/models/shared/vendoragreement.go - - internal/sdk/models/shared/lineitem.go - - internal/sdk/models/shared/founddocumentsupload.go - - internal/sdk/models/shared/lineitemupload.go - - internal/sdk/models/shared/fileupload.go - - internal/sdk/models/shared/fileuploadtype.go - - internal/sdk/models/shared/orderinput.go - - internal/sdk/models/shared/ordercustomattribute.go - - internal/sdk/models/shared/ordercustomattributetype.go - - internal/sdk/models/shared/lineiteminput.go - - internal/sdk/models/shared/airbasepurchaserequestevent.go - - internal/sdk/models/shared/security.go - - internal/sdk/.gitignore - - internal/sdk/models/operations/options.go - - internal/sdk/.gitattributes - - internal/sdk/internal/hooks/hooks.go - - internal/sdk/CONTRIBUTING.md - - examples/README.md - - go.mod - - go.sum - - internal/planmodifiers/boolplanmodifier/suppress_diff.go - - internal/planmodifiers/float64planmodifier/suppress_diff.go - - internal/planmodifiers/int64planmodifier/suppress_diff.go - - internal/planmodifiers/listplanmodifier/suppress_diff.go - - internal/planmodifiers/mapplanmodifier/suppress_diff.go - - internal/planmodifiers/numberplanmodifier/suppress_diff.go - - internal/planmodifiers/objectplanmodifier/suppress_diff.go - - internal/planmodifiers/setplanmodifier/suppress_diff.go - - internal/planmodifiers/stringplanmodifier/suppress_diff.go - - internal/planmodifiers/utils/state_check.go - - internal/provider/reflect/diags.go - - internal/provider/reflect/doc.go - - internal/provider/reflect/generic_attr_value.go - - internal/provider/reflect/helpers.go - - internal/provider/reflect/interfaces.go - - internal/provider/reflect/into.go - - internal/provider/reflect/map.go - - internal/provider/reflect/number.go - - internal/provider/reflect/options.go - - internal/provider/reflect/outof.go - - internal/provider/reflect/pointer.go - - internal/provider/reflect/primitive.go - - internal/provider/reflect/slice.go - - internal/provider/reflect/struct.go - - internal/provider/utils.go + - internal/sdk/models/shared/vendoragreementcustomattributeinput.go + - internal/sdk/models/shared/vendoragreementcustomattributeoutput.go + - internal/sdk/models/shared/vendoragreementcustomattributetype.go + - internal/sdk/retry/config.go + - internal/sdk/types/bigint.go + - internal/sdk/types/date.go + - internal/sdk/types/datetime.go + - internal/sdk/types/decimal.go + - internal/sdk/types/pointers.go + - internal/sdk/vendormanagement.go - internal/validators/DateValidator.go - internal/validators/ExactlyOneChild.go - internal/validators/JSONParseValidator.go @@ -216,66 +313,356 @@ generatedFiles: - main.go - terraform-registry-manifest.json - tools/tools.go - - internal/provider/types/add_app_to_app_store_input_access_removal_inline_webhook.go - - internal/provider/types/add_app_to_app_store_input_provisioning.go - - internal/provider/types/group.go - - internal/provider/types/user.go - - internal/provider/types/add_app_to_app_store_input_admins.go - - internal/provider/types/add_app_to_app_store_input_allowed_groups.go - - internal/provider/types/add_app_to_app_store_input_approvers.go - - internal/provider/types/add_app_to_app_store_input_request_flow.go - - internal/provider/types/requestable_permission_base.go - - internal/provider/types/requestable_permission_input_request_approval_config.go - - internal/provider/types/requestable_permission_input_request_fulfillment_config.go - - internal/provider/types/requestable_permission_input_request_config.go - - internal/provider/types/app.go - - internal/provider/types/requestable_permission_output.go - - USAGE.md - - internal/provider/provider.go - - examples/provider/provider.tf - - examples/resources/lumos_app/import.sh - - internal/provider/app_resource.go - - internal/provider/app_resource_sdk.go - - examples/resources/lumos_app/resource.tf - - examples/resources/lumos_app_store_app/import.sh - - internal/provider/appstoreapp_resource.go - - internal/provider/appstoreapp_resource_sdk.go - - examples/resources/lumos_app_store_app/resource.tf - - internal/provider/preapprovalrule_resource.go - - internal/provider/preapprovalrule_resource_sdk.go - - examples/resources/lumos_pre_approval_rule/resource.tf - - examples/resources/lumos_requestable_permission/import.sh - - internal/provider/requestablepermission_resource.go - - internal/provider/requestablepermission_resource_sdk.go - - internal/provider/app_data_source.go - - internal/provider/app_data_source_sdk.go - - examples/data-sources/lumos_app/data-source.tf - - internal/provider/apps_data_source.go - - internal/provider/apps_data_source_sdk.go - - examples/data-sources/lumos_apps/data-source.tf - - internal/provider/appstoreapp_data_source.go - - internal/provider/appstoreapp_data_source_sdk.go - - examples/data-sources/lumos_app_store_app/data-source.tf - - internal/provider/appstoreappsettings_data_source.go - - internal/provider/appstoreappsettings_data_source_sdk.go - - examples/data-sources/lumos_app_store_app_settings/data-source.tf - - internal/provider/group_data_source.go - - internal/provider/group_data_source_sdk.go - - examples/data-sources/lumos_group/data-source.tf - - internal/provider/groups_data_source.go - - internal/provider/groups_data_source_sdk.go - - examples/data-sources/lumos_groups/data-source.tf - - internal/provider/requestablepermission_data_source.go - - internal/provider/requestablepermission_data_source_sdk.go - - examples/data-sources/lumos_requestable_permission/data-source.tf - - internal/provider/requestablepermissions_data_source.go - - internal/provider/requestablepermissions_data_source_sdk.go - - examples/data-sources/lumos_requestable_permissions/data-source.tf - - internal/provider/user_data_source.go - - internal/provider/user_data_source_sdk.go - - examples/data-sources/lumos_user/data-source.tf - - internal/provider/users_data_source.go - - internal/provider/users_data_source_sdk.go - - examples/data-sources/lumos_users/data-source.tf - - .gitattributes - - CONTRIBUTING.md +examples: + listApps: + speakeasy-default-list-apps: + responses: + "200": + application/json: {"items": [], "total": 220154, "page": 92647, "size": 133499} + "422": {} + createApp: + speakeasy-default-create-app: + requestBody: + application/json: {"name": "", "category": "", "description": "Virtual maximized help-desk"} + responses: + "200": + application/json: {"id": "", "app_class_id": "", "instance_id": "", "user_friendly_label": "", "status": "DEPRECATED", "sources": [], "allow_multiple_permission_selection": false} + "422": {} + getAppCategories: + speakeasy-default-get-app-categories: + responses: + "200": + application/json: [] + getApp: + speakeasy-default-get-app: + parameters: + path: + app_id: "" + responses: + "200": + application/json: {"id": "", "app_class_id": "", "instance_id": "", "user_friendly_label": "", "status": "DEPRECATED", "sources": [], "allow_multiple_permission_selection": false} + "422": {} + updateApp: + speakeasy-default-update-app: + parameters: + path: + app_id: "" + requestBody: + application/json: {"name": "", "category": "", "description": "Vision-oriented next generation ability"} + responses: + "200": + application/json: {"id": "", "app_class_id": "", "instance_id": "", "user_friendly_label": "", "status": "DEPRECATED", "sources": [], "allow_multiple_permission_selection": false} + "422": {} + getAppSettings: + speakeasy-default-get-app-settings: + parameters: + path: + app_id: "" + updateAppSettings: + speakeasy-default-update-app-settings: + parameters: + path: + app_id: "" + currentUser: + speakeasy-default-current-user: + responses: + "200": + application/json: {"id": ""} + listUsers: + speakeasy-default-list-users: + responses: + "200": + application/json: {"items": [], "total": 526212, "page": 540061, "size": 129084} + "422": {} + getUser: + speakeasy-default-get-user: + parameters: + path: + user_id: "" + responses: + "200": + application/json: {"id": ""} + "422": {} + get_inline_webhooks_inline_webhooks_get: + speakeasy-default-get-inline-webhooks-inline-webhooks-get: + responses: + "200": + application/json: [] + getAccounts: + speakeasy-default-get-accounts: + responses: + "200": + application/json: {"items": [], "total": 362838, "page": 205365, "size": 978666} + "422": {} + getGroupMembership: + speakeasy-default-get-group-membership: + parameters: + path: + group_id: "" + query: {} + responses: + "200": + application/json: {"items": [], "total": 666267, "page": 749293, "size": 790853} + "422": {} + getGroup: + speakeasy-default-get-group: + parameters: + path: + group_id: "" + getGroups: + speakeasy-default-get-groups: + responses: + "200": + application/json: {"items": [], "total": 288074, "page": 452984, "size": 736003} + "422": {} + getUploadJobState: + speakeasy-default-get-upload-job-state: + parameters: + path: + job_id: "" + responses: + "200": + application/json: {"job_id": ""} + "422": {} + getActivityLogs: + speakeasy-default-get-activity-logs: + responses: + "200": + application/json: {"items": [], "total": 867607, "limit": 533609, "offset": 666257, "links": {"first": "/api/v1/users?limit=1&offset1", "last": "/api/v1/users?limit=1&offset1", "self": "/api/v1/users?limit=1&offset1", "next": "/api/v1/users?limit=1&offset1", "prev": "/api/v1/users?limit=1&offset1"}} + "422": {} + postAccounts: + speakeasy-default-post-accounts: + requestBody: + application/json: {"app_id": ""} + responses: + "200": + application/json: {"job_id": ""} + "422": {} + activityRecords: + speakeasy-default-activity-records: + requestBody: + application/json: {"records": []} + responses: + "200": + application/json: {"job": {"job_id": ""}} + "422": {} + getActivityRecordsJobState: + speakeasy-default-get-activity-records-job-state: + parameters: + path: + job_id: "" + responses: + "200": + application/json: {"job_id": ""} + "422": {} + get_appstore_permissions_for_app_appstore_requestable_permissions_get: + speakeasy-default-get-appstore-permissions-for-app-appstore-requestable-permissions-get: + responses: + "200": + application/json: {"items": []} + "422": {} + create_appstore_requestable_permission_appstore_requestable_permissions_post: + speakeasy-default-create-appstore-requestable-permission-appstore-requestable-permissions-post: + requestBody: + application/json: {"app_id": "", "label": ""} + responses: + "201": + application/json: {"label": "", "app_id": "", "app_class_id": "", "app_instance_id": ""} + "422": {} + get_appstore_permission_appstore_requestable_permissions__permission_id__get: + speakeasy-default-get-appstore-permission-appstore-requestable-permissions-permission-id-get: + parameters: + path: + permission_id: "" + query: {} + responses: + "200": + application/json: {"label": "", "app_id": "", "app_class_id": "", "app_instance_id": ""} + "422": {} + "404": {} + delete_appstore_permission_appstore_requestable_permissions__permission_id__delete: + speakeasy-default-delete-appstore-permission-appstore-requestable-permissions-permission-id-delete: + parameters: + path: + permission_id: "" + update_appstore_permission_appstore_requestable_permissions__permission_id__patch: + speakeasy-default-update-appstore-permission-appstore-requestable-permissions-permission-id-patch: + parameters: + path: + permission_id: "" + query: {} + responses: + "200": + application/json: {"label": "", "app_id": "", "app_class_id": "", "app_instance_id": ""} + "422": {} + get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get: + speakeasy-default-get-appstore-pre-approval-rules-for-app-appstore-pre-approval-rules-get: + responses: + "200": + application/json: {"items": [], "total": 278110, "page": 484123, "size": 415236} + "422": {} + create_pre_approval_rule_appstore_pre_approval_rules_post: + speakeasy-default-create-pre-approval-rule-appstore-pre-approval-rules-post: + requestBody: + application/json: {"justification": "", "app_id": ""} + responses: + "201": + application/json: {"justification": "", "app_id": "", "app_class_id": "", "app_instance_id": ""} + "422": {} + get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get: + speakeasy-default-get-appstore-pre-approval-rule-appstore-pre-approval-rules-pre-approval-rule-id-get: + parameters: + path: + pre_approval_rule_id: "" + responses: + "200": + application/json: {"justification": "", "app_id": "", "app_class_id": "", "app_instance_id": ""} + "422": {} + delete_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__delete: + speakeasy-default-delete-pre-approval-rule-appstore-pre-approval-rules-pre-approval-rule-id-delete: + parameters: + path: + pre_approval_rule_id: "" + update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch: + speakeasy-default-update-pre-approval-rule-appstore-pre-approval-rules-pre-approval-rule-id-patch: + parameters: + path: + pre_approval_rule_id: "" + requestBody: + application/json: {"justification": ""} + responses: + "200": + application/json: {"justification": "", "app_id": "", "app_class_id": "", "app_instance_id": ""} + "422": {} + getAppStoreAppSettings: + speakeasy-default-get-app-store-app-settings: + parameters: + path: + app_id: "" + updateAppStoreAppSettings: + speakeasy-default-update-app-store-app-settings: + parameters: + path: + app_id: "" + getAppStoreApps: + speakeasy-default-get-app-store-apps: + responses: + "200": + application/json: {"items": [], "total": 944857, "page": 45577, "size": 713298} + "422": {} + addAppToAppStore: + speakeasy-default-add-app-to-app-store: + requestBody: + application/json: {"app_id": ""} + getAppStoreApp: + speakeasy-default-get-app-store-app: + parameters: + path: + app_id: "" + responses: + "200": + application/json: {"id": "", "app_class_id": "", "instance_id": "", "user_friendly_label": "", "status": "NEEDS_REVIEW", "sources": [], "allow_multiple_permission_selection": true} + "422": {} + removeAppFromAppStore: + speakeasy-default-remove-app-from-app-store: + parameters: + path: + app_id: "" + responses: + "200": + application/json: "" + "422": {} + createAccessRequest: + speakeasy-default-create-access-request: + requestBody: + application/json: {"app_id": ""} + responses: + "201": + application/json: [] + "422": {} + getAccessRequest: + speakeasy-default-get-access-request: + parameters: + path: + access_request_id: "" + id: "" + query: {} + responses: + "200": + application/json: {"id": "", "app_id": "", "app_name": "", "requester_user": {"id": ""}, "target_user": {"id": ""}, "status": "EXPIRED"} + "422": {} + getAccessRequests: + speakeasy-default-get-access-requests: + responses: + "200": + application/json: {"items": [], "total": 589667, "page": 350558, "size": 149113} + "422": {} + listVendorAgreements: + speakeasy-default-list-vendor-agreements: + responses: + "200": + application/json: {"items": [], "total": 577759, "page": 762505, "size": 12102} + "422": {} + createFoundDocument: + speakeasy-default-create-found-document-json: + requestBody: + application/json: {"unique_identifier": "", "files": []} + responses: + "200": + application/json: "" + "422": {} + speakeasy-default-create-found-document-multipart: + requestBody: + multipart/form-data: {"unique_identifier": "", "files": []} + responses: + "200": + application/json: "" + "422": {} + createOrder: + speakeasy-default-create-order: + requestBody: + application/json: {"unique_identifier": "", "vendor": {"name": ""}, "start_date": "2024-01-07", "end_date": "2022-01-30", "auto_renewal": false, "line_items": []} + responses: + "201": + application/json: "" + "422": {} + Lumos Art.: + speakeasy-default-lumos-art: + responses: + "200": + text/plain: "" + Lumos liveness check: + speakeasy-default-lumos-liveness-check: {} + processAirbaseMilestoneEvent: + speakeasy-default-process-airbase-milestone-event: + parameters: + path: + domain_app_uuid: "" + requestBody: + application/json: {"id": "", "object": "", "type": "", "created_date": ""} + responses: + "200": + application/json: "" + "422": {} + get_appstore_permissions_for_app_appstore_apps__app_id__requestable_permissions_get: + speakeasy-default-get-appstore-permissions-for-app-appstore-apps-app-id-requestable-permissions-get: + parameters: + path: + app_id: "" + query: {} + responses: + "200": + application/json: {"items": [], "total": 370764, "page": 712829, "size": 386135} + "422": {} + get_appstore_permissions_appstore_requestable_permissions_get: + speakeasy-default-get-appstore-permissions-appstore-requestable-permissions-get: + responses: + "200": + application/json: {"items": [], "total": 792945, "page": 403127, "size": 849864} + "422": {} + cancelAccessRequest: + speakeasy-default-cancel-access-request: + parameters: + path: + id: "" + query: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 326b65e..ea1155f 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true terraform: - version: 0.3.8 + version: 0.4.1 additionalDataSources: [] additionalDependencies: {} additionalResources: [] diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 022d677..c7e6e36 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,18 +1,17 @@ -speakeasyVersion: 1.349.1 +speakeasyVersion: 1.398.1 sources: FastAPI: sourceNamespace: fast-api - sourceRevisionDigest: sha256:8658fde83b1400f5e3db7d0ac154023835df2825052cefbacb15e274f9ffe4b5 - sourceBlobDigest: sha256:00a3332cca11ca58a96c63d25b6fe0c42bc727827fe108718e9dfecc7247a359 + sourceRevisionDigest: sha256:51780857332f7af5fca36f766869e4361bb4842cd6adf0150e7550499f99889d + sourceBlobDigest: sha256:a6c98bbff601430c4c39dbfdaabe5f0a96df21d37be349c37af43c4221d791b1 tags: - latest targets: lumos-terraform-provider-target: source: FastAPI sourceNamespace: fast-api - sourceRevisionDigest: sha256:8658fde83b1400f5e3db7d0ac154023835df2825052cefbacb15e274f9ffe4b5 - sourceBlobDigest: sha256:00a3332cca11ca58a96c63d25b6fe0c42bc727827fe108718e9dfecc7247a359 - outLocation: /Users/niamh/terraform-provider-lumos + sourceRevisionDigest: sha256:51780857332f7af5fca36f766869e4361bb4842cd6adf0150e7550499f99889d + sourceBlobDigest: sha256:a6c98bbff601430c4c39dbfdaabe5f0a96df21d37be349c37af43c4221d791b1 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 5076acf..da6b1d9 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ - -## SDK Installation + +## Installation To install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`. @@ -16,7 +16,7 @@ terraform { required_providers { lumos = { source = "teamlumos/lumos" - version = "0.3.8" + version = "0.4.1" } } } @@ -25,19 +25,17 @@ provider "lumos" { # Configuration options } ``` - + - -## SDK Example Usage + +## Testing the provider locally -### Testing the provider locally +#### Local Provider Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally. This also allows for debuggers (e.g. delve) to be attached to the provider. -### Example - ```sh go run main.go --debug # Copy the TF_REATTACH_PROVIDERS env var @@ -46,13 +44,67 @@ cd examples/your-example TF_REATTACH_PROVIDERS=... terraform init TF_REATTACH_PROVIDERS=... terraform apply ``` - - -## Available Resources and Operations +#### Compiled Provider + +Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods. + +1. Execute `go build` to construct a binary called `terraform-provider-lumos` +2. Ensure that the `.terraformrc` file is configured with a `dev_overrides` section such that your local copy of terraform can see the provider binary + +Terraform searches for the `.terraformrc` file in your home directory and applies any configuration settings you set. + +``` +provider_installation { + dev_overrides { + "registry.terraform.io/teamlumos/lumos" = "" + } - + # For all other providers, install them directly from their origin provider + # registries as normal. If you omit this, Terraform will _only_ use + # the dev_overrides block, and so no other providers will be available. + direct {} +} +``` + + + +## Available Resources and Data Sources + +### Resources + +* [lumos_app](docs/resources/app.md) +* [lumos_app_store_app](docs/resources/app_store_app.md) +* [lumos_pre_approval_rule](docs/resources/pre_approval_rule.md) +* [lumos_requestable_permission](docs/resources/requestable_permission.md) +### Data Sources + +* [lumos_app](docs/data-sources/app.md) +* [lumos_apps](docs/data-sources/apps.md) +* [lumos_app_store_app](docs/data-sources/app_store_app.md) +* [lumos_app_store_app_settings](docs/data-sources/app_store_app_settings.md) +* [lumos_group](docs/data-sources/group.md) +* [lumos_groups](docs/data-sources/groups.md) +* [lumos_requestable_permission](docs/data-sources/requestable_permission.md) +* [lumos_requestable_permissions](docs/data-sources/requestable_permissions.md) +* [lumos_user](docs/data-sources/user.md) +* [lumos_users](docs/data-sources/users.md) + + + +## Summary + +Lumos: The Lumos provider allows you to manage resources such as Apps, Permissions, and Pre-Approval Rules + + + +## Table of Contents + +* [Installation](#installation) +* [Available Resources and Data Sources](#available-resources-and-data-sources) +* [Testing the provider locally](#testing-the-provider-locally) + diff --git a/docs/data-sources/app.md b/docs/data-sources/app.md index 39bcc8f..4220b35 100644 --- a/docs/data-sources/app.md +++ b/docs/data-sources/app.md @@ -14,7 +14,7 @@ App DataSource ```terraform data "lumos_app" "my_app" { - id = "9232d259-b0ac-4589-917f-afa4f89362b5" + id = "...my_id..." } ``` @@ -30,6 +30,6 @@ data "lumos_app" "my_app" { - `logo_url` (String) The URL of the logo of this app. - `request_instructions` (String) The request instructions. - `sources` (List of String) The sources of this app. -- `status` (String) An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] +- `status` (String) The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED' - `user_friendly_label` (String) The user-friendly label of this app. - `website_url` (String) The URL of the website of this app. diff --git a/docs/data-sources/app_store_app.md b/docs/data-sources/app_store_app.md index fd9c73c..3633385 100644 --- a/docs/data-sources/app_store_app.md +++ b/docs/data-sources/app_store_app.md @@ -34,6 +34,6 @@ data "lumos_app_store_app" "my_appstoreapp" { - `logo_url` (String) The URL of the logo of this app. - `request_instructions` (String) The request instructions. - `sources` (List of String) The sources of this app. -- `status` (String) An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] +- `status` (String) The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED' - `user_friendly_label` (String) The user-friendly label of this app. - `website_url` (String) The URL of the website of this app. diff --git a/docs/data-sources/app_store_app_settings.md b/docs/data-sources/app_store_app_settings.md index 264c86f..2657759 100644 --- a/docs/data-sources/app_store_app_settings.md +++ b/docs/data-sources/app_store_app_settings.md @@ -14,7 +14,7 @@ AppStoreAppSettings DataSource ```terraform data "lumos_app_store_app_settings" "my_appstoreappsettings" { - id = "2afd9232-720d-468f-846b-d9cdb3faf8ec" + id = "...my_id..." } ``` @@ -36,7 +36,7 @@ Read-Only: - `access_removal_inline_webhook` (Attributes) A deprovisioning webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--provisioning--access_removal_inline_webhook)) - `allow_multiple_permission_selection` (Boolean) Whether the app is configured to allow users to request multiple permissions in a single request - `custom_provisioning_instructions` (String) Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. -- `groups_provisioning` (String) An enumeration. must be one of ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"] +- `groups_provisioning` (String) If enabled, Approvers must choose a group to provision the user to for access requests. - `manual_steps_needed` (Boolean) If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. - `provisioning_webhook` (Attributes) The provisioning webhook optionally associated with this config. (see [below for nested schema](#nestedatt--provisioning--provisioning_webhook)) - `time_based_access` (List of String) If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. @@ -47,7 +47,7 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. @@ -58,7 +58,7 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. @@ -74,7 +74,7 @@ Read-Only: - `approvers` (Attributes) AppStore App approvers assigned. (see [below for nested schema](#nestedatt--request_flow--approvers)) - `approvers_stage_2` (Attributes) AppStore App stage 2 approvers assigned. (see [below for nested schema](#nestedatt--request_flow--approvers_stage_2)) - `custom_approval_message` (String) After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. -- `discoverability` (String) An enumeration. must be one of ["FULL", "LIMITED", "NONE"] +- `discoverability` (String) AppStore App visibility. - `request_validation_inline_webhook` (Attributes) A request validation webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--request_flow--request_validation_inline_webhook)) - `require_additional_approval` (Boolean) Only turn on when working with sensitive permissions to ensure a smooth employee experience. - `require_manager_approval` (Boolean) When a user makes an access request, require that their manager approves the request before moving on to additional approvals. @@ -94,7 +94,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -110,7 +110,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -120,7 +120,7 @@ Read-Only: Read-Only: - `groups` (Attributes Set) The groups allowed to request this permission. (see [below for nested schema](#nestedatt--request_flow--allowed_groups--groups)) -- `type` (String) The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"] +- `type` (String) The type of this allowed groups config, can be all groups or specific. ### Nested Schema for `request_flow.allowed_groups.groups` @@ -129,7 +129,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -152,7 +152,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -168,7 +168,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -187,7 +187,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -203,7 +203,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -213,6 +213,6 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. diff --git a/docs/data-sources/apps.md b/docs/data-sources/apps.md index 4bf5b42..cb79c13 100644 --- a/docs/data-sources/apps.md +++ b/docs/data-sources/apps.md @@ -14,10 +14,10 @@ Apps DataSource ```terraform data "lumos_apps" "my_apps" { - exact_match = false + exact_match = true name_search = "...my_name_search..." - page = 1 - size = 6 + page = 3 + size = 19 } ``` @@ -28,8 +28,8 @@ data "lumos_apps" "my_apps" { - `exact_match` (Boolean) Search filter should be an exact match. - `name_search` (String) Search against name, app instance identifier, and app class ID. -- `page` (Number) -- `size` (Number) +- `page` (Number) Page number +- `size` (Number) Page size ### Read-Only @@ -49,6 +49,6 @@ Read-Only: - `logo_url` (String) The URL of the logo of this app. - `request_instructions` (String) The request instructions. - `sources` (List of String) The sources of this app. -- `status` (String) An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] +- `status` (String) The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED' - `user_friendly_label` (String) The user-friendly label of this app. - `website_url` (String) The URL of the website of this app. diff --git a/docs/data-sources/group.md b/docs/data-sources/group.md index c751856..9a834be 100644 --- a/docs/data-sources/group.md +++ b/docs/data-sources/group.md @@ -29,7 +29,7 @@ data "lumos_group" "my_group" { - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. diff --git a/docs/data-sources/groups.md b/docs/data-sources/groups.md index 1250d9a..4aea370 100644 --- a/docs/data-sources/groups.md +++ b/docs/data-sources/groups.md @@ -15,11 +15,11 @@ Groups DataSource ```terraform data "lumos_groups" "my_groups" { app_id = "...my_app_id..." - exact_match = true + exact_match = false integration_specific_id = "...my_integration_specific_id..." - name = "Wendy Bergnaum" - page = 4 - size = 7 + name = "...my_name..." + page = 1 + size = 2 } ``` @@ -32,8 +32,8 @@ data "lumos_groups" "my_groups" { - `exact_match` (Boolean) Search filter should be an exact match. - `integration_specific_id` (String) Filters groups by integration specific ID, e.g. the group's Okta ID. - `name` (String) Filters groups by name. -- `page` (Number) -- `size` (Number) +- `page` (Number) Page number +- `size` (Number) Page size ### Read-Only @@ -48,7 +48,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. diff --git a/docs/data-sources/requestable_permission.md b/docs/data-sources/requestable_permission.md index a8ea74a..e8fc555 100644 --- a/docs/data-sources/requestable_permission.md +++ b/docs/data-sources/requestable_permission.md @@ -14,22 +14,27 @@ RequestablePermission DataSource ```terraform data "lumos_requestable_permission" "my_requestablepermission" { - id = "6ba55756-13f8-4277-96ae-2047efc1ab3d" + id = "...my_id..." + include_inherited_configs = true } ``` ## Schema +### Optional + +- `include_inherited_configs` (Boolean) Include inherited configurations from parent app. + ### Read-Only - `app_class_id` (String) The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier. - `app_id` (String) The ID of the app associated with this requestable permission. -- `app_instance_id` (String) The ID of the instance associated with this requestable permission. +- `app_instance_id` (String) The ID of the instance associated with this requestable permission. This may be an empty string. - `id` (String) The ID of this resource. - `label` (String) The label of this requestable permission. - `request_config` (Attributes) The request config associated with this requestable permission. (see [below for nested schema](#nestedatt--request_config)) -- `type` (String) The type of this requestable permission. must be one of ["SYNCED", "NATIVE"] +- `type` (String) The type of this requestable permission. ### Nested Schema for `request_config` @@ -39,7 +44,7 @@ Read-Only: - `access_removal_inline_webhook` (Attributes) A deprovisioning webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--request_config--access_removal_inline_webhook)) - `allowed_groups` (Attributes) The allowed groups config associated with this config. (see [below for nested schema](#nestedatt--request_config--allowed_groups)) - `allowed_groups_override` (Boolean) Indicates if allowed groups is overriden from the app-level settings. -- `appstore_visibility` (String) The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"] +- `appstore_visibility` (String) The appstore visibility of this request config. - `request_approval_config` (Attributes) A request approval config can be optionally associated with this config (see [below for nested schema](#nestedatt--request_config--request_approval_config)) - `request_fulfillment_config` (Attributes) A request fulfillment config can be optionally associated with this config (see [below for nested schema](#nestedatt--request_config--request_fulfillment_config)) - `request_validation_inline_webhook` (Attributes) A request validation webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--request_config--request_validation_inline_webhook)) @@ -50,7 +55,7 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. @@ -61,7 +66,7 @@ Read-Only: Read-Only: - `groups` (Attributes Set) The groups allowed to request this permission. (see [below for nested schema](#nestedatt--request_config--allowed_groups--groups)) -- `type` (String) The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"] +- `type` (String) The type of this allowed groups config, can be all groups or specific. ### Nested Schema for `request_config.allowed_groups.groups` @@ -70,7 +75,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -87,7 +92,7 @@ Read-Only: - `approvers_stage_2` (Attributes) AppStore App stage 2 approvers assigned. (see [below for nested schema](#nestedatt--request_config--request_approval_config--approvers_stage_2)) - `custom_approval_message` (String) After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. - `custom_approval_message_override` (Boolean) Indicates if custom_approval_message is overridden. -- `manager_approval` (String) Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"] +- `manager_approval` (String) Manager approval can be configured as necessary to continue - `request_approval_config_override` (Boolean) Indicates if approval flow is overridden. - `require_additional_approval` (Boolean) Only turn on when working with sensitive permissions to ensure a smooth employee experience. @@ -106,7 +111,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -122,7 +127,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -141,7 +146,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -157,7 +162,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -181,7 +186,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -194,7 +199,7 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. @@ -206,6 +211,6 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. diff --git a/docs/data-sources/requestable_permissions.md b/docs/data-sources/requestable_permissions.md index 0db1e03..4ae6d21 100644 --- a/docs/data-sources/requestable_permissions.md +++ b/docs/data-sources/requestable_permissions.md @@ -14,12 +14,13 @@ RequestablePermissions DataSource ```terraform data "lumos_requestable_permissions" "my_requestablepermissions" { - app_id = "...my_app_id..." - exact_match = true - in_app_store = false - page = 7 - search_term = "...my_search_term..." - size = 10 + app_id = "...my_app_id..." + exact_match = false + in_app_store = false + include_inherited_configs = false + page = 9 + search_term = "...my_search_term..." + size = 46 } ``` @@ -31,10 +32,11 @@ data "lumos_requestable_permissions" "my_requestablepermissions" { - `app_id` (String) Filters requestable permissions by the ID of the app to which they belong. - `exact_match` (Boolean) Search filter should be an exact match. - `in_app_store` (Boolean) Filters permissions by visibility in the AppStore. -- `page` (Number) +- `include_inherited_configs` (Boolean) Include inherited configurations from parent app. +- `page` (Number) Page number - `search_term` (String) Searches permissions by the permission's group name, request configuration name, or specific integration ID. -- `size` (Number) +- `size` (Number) Page size ### Read-Only @@ -49,11 +51,11 @@ Read-Only: - `app_class_id` (String) The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier. - `app_id` (String) The ID of the app associated with this requestable permission. -- `app_instance_id` (String) The ID of the instance associated with this requestable permission. +- `app_instance_id` (String) The ID of the instance associated with this requestable permission. This may be an empty string. - `id` (String) The ID of this requestable permission. - `label` (String) The label of this requestable permission. - `request_config` (Attributes) The request config associated with this requestable permission. (see [below for nested schema](#nestedatt--items--request_config)) -- `type` (String) The type of this requestable permission. must be one of ["SYNCED", "NATIVE"] +- `type` (String) The type of this requestable permission. ### Nested Schema for `items.request_config` @@ -63,7 +65,7 @@ Read-Only: - `access_removal_inline_webhook` (Attributes) A deprovisioning webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--items--request_config--access_removal_inline_webhook)) - `allowed_groups` (Attributes) The allowed groups config associated with this config. (see [below for nested schema](#nestedatt--items--request_config--allowed_groups)) - `allowed_groups_override` (Boolean) Indicates if allowed groups is overriden from the app-level settings. -- `appstore_visibility` (String) The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"] +- `appstore_visibility` (String) The appstore visibility of this request config. - `request_approval_config` (Attributes) A request approval config can be optionally associated with this config (see [below for nested schema](#nestedatt--items--request_config--request_approval_config)) - `request_fulfillment_config` (Attributes) A request fulfillment config can be optionally associated with this config (see [below for nested schema](#nestedatt--items--request_config--request_fulfillment_config)) - `request_validation_inline_webhook` (Attributes) A request validation webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--items--request_config--request_validation_inline_webhook)) @@ -74,7 +76,7 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. @@ -85,7 +87,7 @@ Read-Only: Read-Only: - `groups` (Attributes Set) The groups allowed to request this permission. (see [below for nested schema](#nestedatt--items--request_config--allowed_groups--groups)) -- `type` (String) The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"] +- `type` (String) The type of this allowed groups config, can be all groups or specific. ### Nested Schema for `items.request_config.allowed_groups.groups` @@ -94,7 +96,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -111,7 +113,7 @@ Read-Only: - `approvers_stage_2` (Attributes) AppStore App stage 2 approvers assigned. (see [below for nested schema](#nestedatt--items--request_config--request_approval_config--approvers_stage_2)) - `custom_approval_message` (String) After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. - `custom_approval_message_override` (Boolean) Indicates if custom_approval_message is overridden. -- `manager_approval` (String) Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"] +- `manager_approval` (String) Manager approval can be configured as necessary to continue - `request_approval_config_override` (Boolean) Indicates if approval flow is overridden. - `require_additional_approval` (Boolean) Only turn on when working with sensitive permissions to ensure a smooth employee experience. @@ -130,7 +132,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -146,7 +148,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -165,7 +167,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -181,7 +183,7 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. @@ -205,7 +207,7 @@ Read-Only: - `app_id` (String) The ID of the app that sources this group. - `description` (String) The description of this group. -- `group_lifecycle` (String) The lifecycle of this group. must be one of ["SYNCED", "NATIVE"] +- `group_lifecycle` (String) The lifecycle of this group. - `id` (String) The ID of this group. - `integration_specific_id` (String) The ID of this group, specific to the integration. - `name` (String) The name of this group. @@ -218,7 +220,7 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. @@ -230,6 +232,6 @@ Read-Only: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. - `id` (String) The ID of this inline webhook. - `name` (String) The name of this inline webhook. diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md index cb27674..38c4241 100644 --- a/docs/data-sources/user.md +++ b/docs/data-sources/user.md @@ -31,4 +31,4 @@ data "lumos_user" "my_user" { - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. diff --git a/docs/data-sources/users.md b/docs/data-sources/users.md index f56cd45..e70dac5 100644 --- a/docs/data-sources/users.md +++ b/docs/data-sources/users.md @@ -14,10 +14,10 @@ Users DataSource ```terraform data "lumos_users" "my_users" { - exact_match = false + exact_match = true page = 4 search_term = "...my_search_term..." - size = 8 + size = 87 } ``` @@ -27,9 +27,9 @@ data "lumos_users" "my_users" { ### Optional - `exact_match` (Boolean) If a search_term is provided, only accept exact matches. -- `page` (Number) +- `page` (Number) Page number - `search_term` (String) Search for users by name or email. -- `size` (Number) +- `size` (Number) Page size ### Read-Only @@ -46,4 +46,4 @@ Read-Only: - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. - `id` (String) The ID of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. diff --git a/docs/index.md b/docs/index.md index 64de65b..382080b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ terraform { required_providers { lumos = { source = "teamlumos/lumos" - version = "0.3.8" + version = "0.4.1" } } } @@ -31,5 +31,6 @@ provider "lumos" { ## Schema ### Optional + - `http_bearer` (String, Sensitive) - `server_url` (String) Server URL (defaults to https://api.lumos.com) diff --git a/docs/resources/app.md b/docs/resources/app.md index 50f7543..5a8eb4b 100644 --- a/docs/resources/app.md +++ b/docs/resources/app.md @@ -17,7 +17,7 @@ resource "lumos_app" "my_app" { category = "...my_category..." description = "...my_description..." logo_url = "...my_logo_url..." - name = "Frances Collier" + name = "...my_name..." request_instructions = "...my_request_instructions..." website_url = "...my_website_url..." } @@ -45,7 +45,7 @@ resource "lumos_app" "my_app" { - `id` (String) The ID of this app. - `instance_id` (String) The non-unique ID of the instance associated with this app. This will be the Okta app id if it’s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos. - `sources` (List of String) The sources of this app. -- `status` (String) An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] +- `status` (String) The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] - `user_friendly_label` (String) The user-friendly label of this app. ## Import diff --git a/docs/resources/app_store_app.md b/docs/resources/app_store_app.md index d897203..9a37626 100644 --- a/docs/resources/app_store_app.md +++ b/docs/resources/app_store_app.md @@ -16,6 +16,82 @@ AppStoreApp Resource resource "lumos_app_store_app" "my_appstoreapp" { app_id = "...my_app_id..." custom_request_instructions = "...my_custom_request_instructions..." + provisioning = { + access_removal_inline_webhook = { + id = "...my_id..." + } + allow_multiple_permission_selection = false + custom_provisioning_instructions = "...my_custom_provisioning_instructions..." + groups_provisioning = "GROUPS_AND_VISIBLE" + manual_steps_needed = true + provisioning_webhook = { + id = "...my_id..." + } + time_based_access = [ + "90 days" + ] + } + request_flow = { + admins = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + users = [ + { + id = "...my_id..." + } + ] + } + allowed_groups = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + type = "SPECIFIED_GROUPS" + } + approvers = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + users = [ + { + id = "...my_id..." + } + ] + } + approvers_stage_2 = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + users = [ + { + id = "...my_id..." + } + ] + } + custom_approval_message = "...my_custom_approval_message..." + discoverability = "LIMITED" + request_validation_inline_webhook = { + id = "...my_id..." + } + require_additional_approval = false + require_manager_approval = false + } } ``` @@ -41,7 +117,7 @@ resource "lumos_app_store_app" "my_appstoreapp" { - `logo_url` (String) The URL of the logo of this app. - `request_instructions` (String) The request instructions. - `sources` (List of String) The sources of this app. -- `status` (String) An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] +- `status` (String) The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"] - `user_friendly_label` (String) The user-friendly label of this app. - `website_url` (String) The URL of the website of this app. @@ -53,7 +129,7 @@ Optional: - `access_removal_inline_webhook` (Attributes) A deprovisioning webhook can be optionally associated with this app. Requires replacement if changed. (see [below for nested schema](#nestedatt--provisioning--access_removal_inline_webhook)) - `allow_multiple_permission_selection` (Boolean) Whether the app is configured to allow users to request multiple permissions in a single request. Requires replacement if changed. - `custom_provisioning_instructions` (String) Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. Requires replacement if changed. -- `groups_provisioning` (String) An enumeration. Requires replacement if changed. ; must be one of ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"] +- `groups_provisioning` (String) If enabled, Approvers must choose a group to provision the user to for access requests. must be one of ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"]; Requires replacement if changed. - `manual_steps_needed` (Boolean) If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. Requires replacement if changed. - `provisioning_webhook` (Attributes) The provisioning webhook optionally associated with this app. Requires replacement if changed. (see [below for nested schema](#nestedatt--provisioning--provisioning_webhook)) - `time_based_access` (List of String) If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. Requires replacement if changed. @@ -63,12 +139,12 @@ Optional: Optional: -- `id` (String) The ID of this inline webhook. Requires replacement if changed. ; Not Null +- `id` (String) The ID of this inline webhook. Not Null; Requires replacement if changed. Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. @@ -77,12 +153,12 @@ Read-Only: Optional: -- `id` (String) The ID of this inline webhook. Requires replacement if changed. ; Not Null +- `id` (String) The ID of this inline webhook. Not Null; Requires replacement if changed. Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. @@ -97,7 +173,7 @@ Optional: - `approvers` (Attributes) AppStore App approvers assigned. Requires replacement if changed. (see [below for nested schema](#nestedatt--request_flow--approvers)) - `approvers_stage_2` (Attributes) AppStore App stage 2 approvers assigned. Requires replacement if changed. (see [below for nested schema](#nestedatt--request_flow--approvers_stage_2)) - `custom_approval_message` (String) After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. Requires replacement if changed. -- `discoverability` (String) An enumeration. Requires replacement if changed. ; must be one of ["FULL", "LIMITED", "NONE"] +- `discoverability` (String) AppStore App visibility. must be one of ["FULL", "LIMITED", "NONE"]; Requires replacement if changed. - `request_validation_inline_webhook` (Attributes) A request validation webhook can be optionally associated with this app. Requires replacement if changed. (see [below for nested schema](#nestedatt--request_flow--request_validation_inline_webhook)) - `require_additional_approval` (Boolean) Only turn on when working with sensitive permissions to ensure a smooth employee experience. Requires replacement if changed. - `require_manager_approval` (Boolean) When a user makes an access request, require that their manager approves the request before moving on to additional approvals. Requires replacement if changed. @@ -132,14 +208,14 @@ Read-Only: Optional: -- `id` (String) The ID of this user. Requires replacement if changed. ; Not Null +- `id` (String) The ID of this user. Not Null; Requires replacement if changed. Read-Only: - `email` (String) The email of this user. - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] @@ -149,7 +225,7 @@ Read-Only: Optional: - `groups` (Attributes Set) The groups allowed to request this permission. Requires replacement if changed. (see [below for nested schema](#nestedatt--request_flow--allowed_groups--groups)) -- `type` (String) The type of this allowed groups config, can be all groups or specific. Requires replacement if changed. ; must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]; Default: "ALL_GROUPS" +- `type` (String) The type of this allowed groups config, can be all groups or specific. Default: "ALL_GROUPS"; must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]; Requires replacement if changed. ### Nested Schema for `request_flow.allowed_groups.groups` @@ -199,14 +275,14 @@ Read-Only: Optional: -- `id` (String) The ID of this user. Requires replacement if changed. ; Not Null +- `id` (String) The ID of this user. Not Null; Requires replacement if changed. Read-Only: - `email` (String) The email of this user. - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] @@ -240,14 +316,14 @@ Read-Only: Optional: -- `id` (String) The ID of this user. Requires replacement if changed. ; Not Null +- `id` (String) The ID of this user. Not Null; Requires replacement if changed. Read-Only: - `email` (String) The email of this user. - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] @@ -256,12 +332,12 @@ Read-Only: Optional: -- `id` (String) The ID of this inline webhook. Requires replacement if changed. ; Not Null +- `id` (String) The ID of this inline webhook. Not Null; Requires replacement if changed. Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. ## Import diff --git a/docs/resources/pre_approval_rule.md b/docs/resources/pre_approval_rule.md index 861b957..8128bf6 100644 --- a/docs/resources/pre_approval_rule.md +++ b/docs/resources/pre_approval_rule.md @@ -16,6 +16,26 @@ PreApprovalRule Resource resource "lumos_pre_approval_rule" "my_preapprovalrule" { app_id = "...my_app_id..." justification = "...my_justification..." + preapproval_webhooks = [ + { + id = "...my_id..." + } + ] + preapproved_groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + preapproved_permissions = [ + { + id = "...my_id..." + } + ] + time_based_access = [ + "4 hours" + ] } ``` @@ -50,7 +70,7 @@ Optional: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. @@ -82,6 +102,6 @@ Read-Only: - `app_class_id` (String) The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier. - `app_id` (String) The ID of the app associated with this requestable permission. -- `app_instance_id` (String) The ID of the instance associated with this requestable permission. +- `app_instance_id` (String) The ID of the instance associated with this requestable permission. This may be an empty string. - `label` (String) The label of this requestable permission. -- `type` (String) An enumeration. must be one of ["SYNCED", "NATIVE"] +- `type` (String) The type of this requestable permission. must be one of ["SYNCED", "NATIVE"] diff --git a/docs/resources/requestable_permission.md b/docs/resources/requestable_permission.md index afee949..ace8694 100644 --- a/docs/resources/requestable_permission.md +++ b/docs/resources/requestable_permission.md @@ -72,6 +72,7 @@ resource "lumos_requestable_permission" "aws" { - `app_class_id` (String) The ID of the service associated with this requestable permission. - `app_instance_id` (String) Optionally, an app has an identifer associated with it's particular instance. +- `include_inherited_configs` (Boolean) Include inherited configurations from parent app. Default: true - `request_config` (Attributes) The request config associated with this requestable permission. (see [below for nested schema](#nestedatt--request_config)) ### Read-Only @@ -87,7 +88,7 @@ Optional: - `access_removal_inline_webhook` (Attributes) A deprovisioning webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--request_config--access_removal_inline_webhook)) - `allowed_groups` (Attributes) Refers to which group(s) can make requests to this permission. (see [below for nested schema](#nestedatt--request_config--allowed_groups)) - `allowed_groups_override` (Boolean) Indicates if allowed groups is overriden from the app-level settings. -- `appstore_visibility` (String) The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"]; Default: "HIDDEN" +- `appstore_visibility` (String) The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"] - `request_approval_config` (Attributes) A request approval config can be optionally associated with this config (see [below for nested schema](#nestedatt--request_config--request_approval_config)) - `request_fulfillment_config` (Attributes) A request fulfillment config can be optionally associated with this config (see [below for nested schema](#nestedatt--request_config--request_fulfillment_config)) - `request_validation_inline_webhook` (Attributes) A request validation webhook can be optionally associated with this config. (see [below for nested schema](#nestedatt--request_config--request_validation_inline_webhook)) @@ -102,7 +103,7 @@ Optional: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. @@ -112,7 +113,7 @@ Read-Only: Optional: - `groups` (Attributes Set) The groups allowed to request this permission. (see [below for nested schema](#nestedatt--request_config--allowed_groups--groups)) -- `type` (String) The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]; Default: "ALL_GROUPS" +- `type` (String) The type of this allowed groups config, can be all groups or specific. Default: "ALL_GROUPS"; must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"] ### Nested Schema for `request_config.allowed_groups.groups` @@ -141,7 +142,7 @@ Optional: - `approvers_stage_2` (Attributes) AppStore App stage 2 approvers assigned. (see [below for nested schema](#nestedatt--request_config--request_approval_config--approvers_stage_2)) - `custom_approval_message` (String) After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. - `custom_approval_message_override` (Boolean) Indicates if custom_approval_message is overridden. -- `manager_approval` (String) Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"]; Default: "NONE" +- `manager_approval` (String) Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"] - `request_approval_config_override` (Boolean) Indicates if approval flow is overridden. - `require_additional_approval` (Boolean) Only turn on when working with sensitive permissions to ensure a smooth employee experience. @@ -182,7 +183,7 @@ Read-Only: - `email` (String) The email of this user. - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] @@ -223,7 +224,7 @@ Read-Only: - `email` (String) The email of this user. - `family_name` (String) The family name of this user. - `given_name` (String) The given name of this user. -- `status` (String) An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] +- `status` (String) The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"] @@ -267,7 +268,7 @@ Optional: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. @@ -282,7 +283,7 @@ Optional: Read-Only: - `description` (String) The description of this inline webhook. -- `hook_type` (String) An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] +- `hook_type` (String) The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"] - `name` (String) The name of this inline webhook. ## Import diff --git a/examples/data-sources/lumos_app/data-source.tf b/examples/data-sources/lumos_app/data-source.tf index a5ee5d4..4da1667 100644 --- a/examples/data-sources/lumos_app/data-source.tf +++ b/examples/data-sources/lumos_app/data-source.tf @@ -1,3 +1,3 @@ data "lumos_app" "my_app" { - id = "9232d259-b0ac-4589-917f-afa4f89362b5" + id = "...my_id..." } \ No newline at end of file diff --git a/examples/data-sources/lumos_app_store_app_settings/data-source.tf b/examples/data-sources/lumos_app_store_app_settings/data-source.tf index edccbf7..0966f0b 100644 --- a/examples/data-sources/lumos_app_store_app_settings/data-source.tf +++ b/examples/data-sources/lumos_app_store_app_settings/data-source.tf @@ -1,3 +1,3 @@ data "lumos_app_store_app_settings" "my_appstoreappsettings" { - id = "2afd9232-720d-468f-846b-d9cdb3faf8ec" + id = "...my_id..." } \ No newline at end of file diff --git a/examples/data-sources/lumos_apps/data-source.tf b/examples/data-sources/lumos_apps/data-source.tf index d7eae39..6f8f122 100644 --- a/examples/data-sources/lumos_apps/data-source.tf +++ b/examples/data-sources/lumos_apps/data-source.tf @@ -1,6 +1,6 @@ data "lumos_apps" "my_apps" { - exact_match = false + exact_match = true name_search = "...my_name_search..." - page = 1 - size = 6 + page = 3 + size = 19 } \ No newline at end of file diff --git a/examples/data-sources/lumos_groups/data-source.tf b/examples/data-sources/lumos_groups/data-source.tf index 081e7df..d8f6764 100644 --- a/examples/data-sources/lumos_groups/data-source.tf +++ b/examples/data-sources/lumos_groups/data-source.tf @@ -1,8 +1,8 @@ data "lumos_groups" "my_groups" { app_id = "...my_app_id..." - exact_match = true + exact_match = false integration_specific_id = "...my_integration_specific_id..." - name = "Wendy Bergnaum" - page = 4 - size = 7 + name = "...my_name..." + page = 1 + size = 2 } \ No newline at end of file diff --git a/examples/data-sources/lumos_requestable_permission/data-source.tf b/examples/data-sources/lumos_requestable_permission/data-source.tf index f5ccc47..f882c75 100644 --- a/examples/data-sources/lumos_requestable_permission/data-source.tf +++ b/examples/data-sources/lumos_requestable_permission/data-source.tf @@ -1,3 +1,4 @@ data "lumos_requestable_permission" "my_requestablepermission" { - id = "6ba55756-13f8-4277-96ae-2047efc1ab3d" + id = "...my_id..." + include_inherited_configs = true } \ No newline at end of file diff --git a/examples/data-sources/lumos_requestable_permissions/data-source.tf b/examples/data-sources/lumos_requestable_permissions/data-source.tf index 678508f..1b3e078 100644 --- a/examples/data-sources/lumos_requestable_permissions/data-source.tf +++ b/examples/data-sources/lumos_requestable_permissions/data-source.tf @@ -1,8 +1,9 @@ data "lumos_requestable_permissions" "my_requestablepermissions" { - app_id = "...my_app_id..." - exact_match = true - in_app_store = false - page = 7 - search_term = "...my_search_term..." - size = 10 + app_id = "...my_app_id..." + exact_match = false + in_app_store = false + include_inherited_configs = false + page = 9 + search_term = "...my_search_term..." + size = 46 } \ No newline at end of file diff --git a/examples/data-sources/lumos_users/data-source.tf b/examples/data-sources/lumos_users/data-source.tf index a58ca37..050234a 100644 --- a/examples/data-sources/lumos_users/data-source.tf +++ b/examples/data-sources/lumos_users/data-source.tf @@ -1,6 +1,6 @@ data "lumos_users" "my_users" { - exact_match = false + exact_match = true page = 4 search_term = "...my_search_term..." - size = 8 + size = 87 } \ No newline at end of file diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 2e4f439..2c20560 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { lumos = { source = "teamlumos/lumos" - version = "0.3.8" + version = "0.4.1" } } } diff --git a/examples/resources/lumos_app/resource.tf b/examples/resources/lumos_app/resource.tf index 160cb81..0e64858 100644 --- a/examples/resources/lumos_app/resource.tf +++ b/examples/resources/lumos_app/resource.tf @@ -2,7 +2,7 @@ resource "lumos_app" "my_app" { category = "...my_category..." description = "...my_description..." logo_url = "...my_logo_url..." - name = "Frances Collier" + name = "...my_name..." request_instructions = "...my_request_instructions..." website_url = "...my_website_url..." } \ No newline at end of file diff --git a/examples/resources/lumos_app_store_app/resource.tf b/examples/resources/lumos_app_store_app/resource.tf index 8190d39..023ebc9 100644 --- a/examples/resources/lumos_app_store_app/resource.tf +++ b/examples/resources/lumos_app_store_app/resource.tf @@ -1,4 +1,80 @@ resource "lumos_app_store_app" "my_appstoreapp" { app_id = "...my_app_id..." custom_request_instructions = "...my_custom_request_instructions..." + provisioning = { + access_removal_inline_webhook = { + id = "...my_id..." + } + allow_multiple_permission_selection = false + custom_provisioning_instructions = "...my_custom_provisioning_instructions..." + groups_provisioning = "GROUPS_AND_VISIBLE" + manual_steps_needed = true + provisioning_webhook = { + id = "...my_id..." + } + time_based_access = [ + "90 days" + ] + } + request_flow = { + admins = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + users = [ + { + id = "...my_id..." + } + ] + } + allowed_groups = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + type = "SPECIFIED_GROUPS" + } + approvers = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + users = [ + { + id = "...my_id..." + } + ] + } + approvers_stage_2 = { + groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + users = [ + { + id = "...my_id..." + } + ] + } + custom_approval_message = "...my_custom_approval_message..." + discoverability = "LIMITED" + request_validation_inline_webhook = { + id = "...my_id..." + } + require_additional_approval = false + require_manager_approval = false + } } \ No newline at end of file diff --git a/examples/resources/lumos_pre_approval_rule/resource.tf b/examples/resources/lumos_pre_approval_rule/resource.tf index 38bddfa..35f669a 100644 --- a/examples/resources/lumos_pre_approval_rule/resource.tf +++ b/examples/resources/lumos_pre_approval_rule/resource.tf @@ -1,4 +1,24 @@ resource "lumos_pre_approval_rule" "my_preapprovalrule" { app_id = "...my_app_id..." justification = "...my_justification..." + preapproval_webhooks = [ + { + id = "...my_id..." + } + ] + preapproved_groups = [ + { + app_id = "...my_app_id..." + id = "...my_id..." + integration_specific_id = "...my_integration_specific_id..." + } + ] + preapproved_permissions = [ + { + id = "...my_id..." + } + ] + time_based_access = [ + "4 hours" + ] } \ No newline at end of file diff --git a/go.mod b/go.mod index 769f5fe..693c0e7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.10.0 github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 github.com/hashicorp/terraform-plugin-go v0.23.0 - github.com/hashicorp/terraform-plugin-testing v1.9.0 + github.com/hashicorp/terraform-plugin-testing v1.10.0 ) require ( @@ -37,9 +37,10 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect - github.com/hashicorp/hc-install v0.7.0 // indirect + github.com/hashicorp/hc-install v0.8.0 // indirect github.com/hashicorp/hcl/v2 v2.21.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect @@ -68,17 +69,16 @@ require ( github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/yuin/goldmark v1.7.1 // indirect github.com/yuin/goldmark-meta v1.1.0 // indirect - github.com/zclconf/go-cty v1.14.4 // indirect + github.com/zclconf/go-cty v1.15.0 // indirect go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - golang.org/x/tools/cmd/cover v0.1.0-deprecated // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.63.2 // indirect diff --git a/go.sum b/go.sum index 49d717e..48a2efb 100644 --- a/go.sum +++ b/go.sum @@ -86,13 +86,15 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.7.0 h1:Uu9edVqjKQxxuD28mR5TikkKDd/p55S8vzPC1659aBk= -github.com/hashicorp/hc-install v0.7.0/go.mod h1:ELmmzZlGnEcqoUMKUuykHaPCIR1sYLYX+KSggWSKZuA= +github.com/hashicorp/hc-install v0.8.0 h1:LdpZeXkZYMQhoKPCecJHlKvUkQFixN/nvyR1CdfOLjI= +github.com/hashicorp/hc-install v0.8.0/go.mod h1:+MwJYjDfCruSD/udvBmRB22Nlkwwkwf5sAB6uTIhSaU= github.com/hashicorp/hcl/v2 v2.21.0 h1:lve4q/o/2rqwYOgUg3y3V2YPyD1/zkCLGjIV74Jit14= github.com/hashicorp/hcl/v2 v2.21.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -113,8 +115,8 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE= github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg= -github.com/hashicorp/terraform-plugin-testing v1.9.0 h1:xOsQRqqlHKXpFq6etTxih3ubdK3HVDtfE1IY7Rpd37o= -github.com/hashicorp/terraform-plugin-testing v1.9.0/go.mod h1:fhhVx/8+XNJZTD5o3b4stfZ6+q7z9+lIWigIYdT6/44= +github.com/hashicorp/terraform-plugin-testing v1.10.0 h1:2+tmRNhvnfE4Bs8rB6v58S/VpqzGC6RCh9Y8ujdn+aw= +github.com/hashicorp/terraform-plugin-testing v1.10.0/go.mod h1:iWRW3+loP33WMch2P/TEyCxxct/ZEcCGMquSLSCVsrc= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -203,8 +205,8 @@ github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U= github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= -github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= -github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= +github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= @@ -212,13 +214,13 @@ go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -229,8 +231,8 @@ golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -244,8 +246,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -255,15 +257,13 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools/cmd/cover v0.1.0-deprecated h1:Rwy+mWYz6loAF+LnG1jHG/JWMHRMMC2/1XX3Ejkx9lA= -golang.org/x/tools/cmd/cover v0.1.0-deprecated/go.mod h1:hMDiIvlpN1NoVgmjLjUJE9tMHyxHjFX7RuQ+rW12mSA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= diff --git a/internal/provider/app_data_source.go b/internal/provider/app_data_source.go index 0fc1f5c..692347d 100644 --- a/internal/provider/app_data_source.go +++ b/internal/provider/app_data_source.go @@ -81,7 +81,7 @@ func (r *AppDataSource) Schema(ctx context.Context, req datasource.SchemaRequest }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, + Description: `The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'`, }, "user_friendly_label": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/app_resource.go b/internal/provider/app_resource.go index 05cb066..d3973ca 100644 --- a/internal/provider/app_resource.go +++ b/internal/provider/app_resource.go @@ -107,7 +107,7 @@ func (r *AppResource) Schema(ctx context.Context, req resource.SchemaRequest, re }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, + Description: `The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, Validators: []validator.String{ stringvalidator.OneOf( "DISCOVERED", diff --git a/internal/provider/apps_data_source.go b/internal/provider/apps_data_source.go index a52beaf..12d178b 100644 --- a/internal/provider/apps_data_source.go +++ b/internal/provider/apps_data_source.go @@ -89,7 +89,7 @@ func (r *AppsDataSource) Schema(ctx context.Context, req datasource.SchemaReques }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, + Description: `The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'`, }, "user_friendly_label": schema.StringAttribute{ Computed: true, @@ -107,15 +107,17 @@ func (r *AppsDataSource) Schema(ctx context.Context, req datasource.SchemaReques Description: `Search against name, app instance identifier, and app class ID.`, }, "page": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page number`, }, "pages": schema.Int64Attribute{ Computed: true, }, "size": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page size`, }, "total": schema.Int64Attribute{ Computed: true, diff --git a/internal/provider/appstoreapp_data_source.go b/internal/provider/appstoreapp_data_source.go index 8be5409..228b35c 100644 --- a/internal/provider/appstoreapp_data_source.go +++ b/internal/provider/appstoreapp_data_source.go @@ -86,7 +86,7 @@ func (r *AppStoreAppDataSource) Schema(ctx context.Context, req datasource.Schem }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, + Description: `The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'`, }, "user_friendly_label": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/appstoreapp_resource.go b/internal/provider/appstoreapp_resource.go index ceebcc2..5336200 100644 --- a/internal/provider/appstoreapp_resource.go +++ b/internal/provider/appstoreapp_resource.go @@ -27,6 +27,7 @@ import ( tfTypes "github.com/teamlumos/terraform-provider-lumos/internal/provider/types" "github.com/teamlumos/terraform-provider-lumos/internal/sdk" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/operations" + speakeasy_objectvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/objectvalidators" speakeasy_stringvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/stringvalidators" ) @@ -45,20 +46,20 @@ type AppStoreAppResource struct { // AppStoreAppResourceModel describes the resource data model. type AppStoreAppResourceModel struct { - AllowMultiplePermissionSelection types.Bool `tfsdk:"allow_multiple_permission_selection"` - AppClassID types.String `tfsdk:"app_class_id"` - AppID types.String `tfsdk:"app_id"` - CustomRequestInstructions types.String `tfsdk:"custom_request_instructions"` - ID types.String `tfsdk:"id"` - InstanceID types.String `tfsdk:"instance_id"` - LogoURL types.String `tfsdk:"logo_url"` - Provisioning *tfTypes.AddAppToAppStoreInputProvisioning `tfsdk:"provisioning"` - RequestFlow *tfTypes.AddAppToAppStoreInputRequestFlow `tfsdk:"request_flow"` - RequestInstructions types.String `tfsdk:"request_instructions"` - Sources []types.String `tfsdk:"sources"` - Status types.String `tfsdk:"status"` - UserFriendlyLabel types.String `tfsdk:"user_friendly_label"` - WebsiteURL types.String `tfsdk:"website_url"` + AllowMultiplePermissionSelection types.Bool `tfsdk:"allow_multiple_permission_selection"` + AppClassID types.String `tfsdk:"app_class_id"` + AppID types.String `tfsdk:"app_id"` + CustomRequestInstructions types.String `tfsdk:"custom_request_instructions"` + ID types.String `tfsdk:"id"` + InstanceID types.String `tfsdk:"instance_id"` + LogoURL types.String `tfsdk:"logo_url"` + Provisioning *tfTypes.AppStoreAppSettingsProvisioningInput `tfsdk:"provisioning"` + RequestFlow *tfTypes.AppStoreAppSettingsRequestFlowInput `tfsdk:"request_flow"` + RequestInstructions types.String `tfsdk:"request_instructions"` + Sources []types.String `tfsdk:"sources"` + Status types.String `tfsdk:"status"` + UserFriendlyLabel types.String `tfsdk:"user_friendly_label"` + WebsiteURL types.String `tfsdk:"website_url"` } func (r *AppStoreAppResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { @@ -78,20 +79,20 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq Description: `The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier.`, }, "app_id": schema.StringAttribute{ + Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), }, - Required: true, - Description: `The ID of the app to add to the app store. Requires replacement if changed. `, + Description: `The ID of the app to add to the app store. Requires replacement if changed.`, }, "custom_request_instructions": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `AppStore App instructions that are shown to the requester. Requires replacement if changed. `, + Description: `AppStore App instructions that are shown to the requester. Requires replacement if changed.`, }, "id": schema.StringAttribute{ Computed: true, @@ -107,19 +108,19 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "provisioning": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "access_removal_inline_webhook": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -127,7 +128,7 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -140,12 +141,12 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this inline webhook. Requires replacement if changed. ; Not Null`, + Description: `The ID of this inline webhook. Not Null; Requires replacement if changed.`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), }, @@ -155,34 +156,34 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq Description: `The name of this inline webhook.`, }, }, - Description: `A deprovisioning webhook can be optionally associated with this app. Requires replacement if changed. `, + Description: `A deprovisioning webhook can be optionally associated with this app. Requires replacement if changed.`, }, "allow_multiple_permission_selection": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ boolplanmodifier.RequiresReplaceIfConfigured(), speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `Whether the app is configured to allow users to request multiple permissions in a single request. Requires replacement if changed. `, + Description: `Whether the app is configured to allow users to request multiple permissions in a single request. Requires replacement if changed.`, }, "custom_provisioning_instructions": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. Requires replacement if changed. `, + Description: `Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. Requires replacement if changed.`, }, "groups_provisioning": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `An enumeration. Requires replacement if changed. ; must be one of ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"]`, + Description: `If enabled, Approvers must choose a group to provision the user to for access requests. must be one of ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"]; Requires replacement if changed.`, Validators: []validator.String{ stringvalidator.OneOf( "DIRECT_TO_USER", @@ -193,20 +194,20 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "manual_steps_needed": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ boolplanmodifier.RequiresReplaceIfConfigured(), speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. Requires replacement if changed. `, + Description: `If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. Requires replacement if changed.`, }, "provisioning_webhook": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -214,7 +215,7 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -227,12 +228,12 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this inline webhook. Requires replacement if changed. ; Not Null`, + Description: `The ID of this inline webhook. Not Null; Requires replacement if changed.`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), }, @@ -242,54 +243,61 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq Description: `The name of this inline webhook.`, }, }, - Description: `The provisioning webhook optionally associated with this app. Requires replacement if changed. `, + Description: `The provisioning webhook optionally associated with this app. Requires replacement if changed.`, }, "time_based_access": schema.ListAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.List{ listplanmodifier.RequiresReplaceIfConfigured(), speakeasy_listplanmodifier.SuppressDiff(speakeasy_listplanmodifier.ExplicitSuppress), }, - Optional: true, ElementType: types.StringType, - Description: `If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. Requires replacement if changed. `, + Description: `If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. Requires replacement if changed.`, }, }, - Description: `Provisioning flow configuration to request access to app. Requires replacement if changed. `, + Description: `Provisioning flow configuration to request access to app. Requires replacement if changed.`, }, "request_flow": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "admins": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.ListNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.List{ listplanmodifier.RequiresReplaceIfConfigured(), speakeasy_listplanmodifier.SuppressDiff(speakeasy_listplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of the app that sources this group. Requires replacement if changed. `, + Description: `The ID of the app that sources this group. Requires replacement if changed.`, }, "description": schema.StringAttribute{ Computed: true, @@ -307,21 +315,21 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group. Requires replacement if changed. `, + Description: `The ID of this group. Requires replacement if changed.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group, specific to the integration. Requires replacement if changed. `, + Description: `The ID of this group, specific to the integration. Requires replacement if changed.`, }, "name": schema.StringAttribute{ Computed: true, @@ -333,16 +341,23 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `Groups assigned as app admins. Requires replacement if changed. `, + Description: `Groups assigned as app admins. Requires replacement if changed.`, }, "users": schema.ListNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.List{ listplanmodifier.RequiresReplaceIfConfigured(), speakeasy_listplanmodifier.SuppressDiff(speakeasy_listplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "email": schema.StringAttribute{ Computed: true, @@ -358,19 +373,19 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this user. Requires replacement if changed. ; Not Null`, + Description: `The ID of this user. Not Null; Requires replacement if changed.`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), }, }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, Validators: []validator.String{ stringvalidator.OneOf( "STAGED", @@ -382,36 +397,43 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `Users assigned as app admins. Requires replacement if changed. `, + Description: `Users assigned as app admins. Requires replacement if changed.`, }, }, - Description: `AppStore App admins assigned. Requires replacement if changed. `, + Description: `AppStore App admins assigned. Requires replacement if changed.`, }, "allowed_groups": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplaceIfConfigured(), speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of the app that sources this group. Requires replacement if changed. `, + Description: `The ID of the app that sources this group. Requires replacement if changed.`, }, "description": schema.StringAttribute{ Computed: true, @@ -429,21 +451,21 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group. Requires replacement if changed. `, + Description: `The ID of this group. Requires replacement if changed.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group, specific to the integration. Requires replacement if changed. `, + Description: `The ID of this group, specific to the integration. Requires replacement if changed.`, }, "name": schema.StringAttribute{ Computed: true, @@ -455,17 +477,17 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `The groups allowed to request this permission. Requires replacement if changed. `, + Description: `The groups allowed to request this permission. Requires replacement if changed.`, }, "type": schema.StringAttribute{ Computed: true, + Optional: true, + Default: stringdefault.StaticString("ALL_GROUPS"), PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Default: stringdefault.StaticString("ALL_GROUPS"), - Description: `The type of this allowed groups config, can be all groups or specific. Requires replacement if changed. ; must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]; Default: "ALL_GROUPS"`, + Description: `The type of this allowed groups config, can be all groups or specific. Default: "ALL_GROUPS"; must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]; Requires replacement if changed.`, Validators: []validator.String{ stringvalidator.OneOf( "ALL_GROUPS", @@ -474,33 +496,40 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `The allowed groups associated with this config. Requires replacement if changed. `, + Description: `The allowed groups associated with this config. Requires replacement if changed.`, }, "approvers": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplaceIfConfigured(), speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of the app that sources this group. Requires replacement if changed. `, + Description: `The ID of the app that sources this group. Requires replacement if changed.`, }, "description": schema.StringAttribute{ Computed: true, @@ -518,21 +547,21 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group. Requires replacement if changed. `, + Description: `The ID of this group. Requires replacement if changed.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group, specific to the integration. Requires replacement if changed. `, + Description: `The ID of this group, specific to the integration. Requires replacement if changed.`, }, "name": schema.StringAttribute{ Computed: true, @@ -544,16 +573,23 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `Groups assigned as support request approvers. Requires replacement if changed. `, + Description: `Groups assigned as support request approvers. Requires replacement if changed.`, }, "users": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplaceIfConfigured(), speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "email": schema.StringAttribute{ Computed: true, @@ -569,19 +605,19 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this user. Requires replacement if changed. ; Not Null`, + Description: `The ID of this user. Not Null; Requires replacement if changed.`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), }, }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, Validators: []validator.String{ stringvalidator.OneOf( "STAGED", @@ -593,36 +629,43 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `Users assigned as support request approvers. Requires replacement if changed. `, + Description: `Users assigned as support request approvers. Requires replacement if changed.`, }, }, - Description: `AppStore App approvers assigned. Requires replacement if changed. `, + Description: `AppStore App approvers assigned. Requires replacement if changed.`, }, "approvers_stage_2": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplaceIfConfigured(), speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of the app that sources this group. Requires replacement if changed. `, + Description: `The ID of the app that sources this group. Requires replacement if changed.`, }, "description": schema.StringAttribute{ Computed: true, @@ -640,21 +683,21 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group. Requires replacement if changed. `, + Description: `The ID of this group. Requires replacement if changed.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group, specific to the integration. Requires replacement if changed. `, + Description: `The ID of this group, specific to the integration. Requires replacement if changed.`, }, "name": schema.StringAttribute{ Computed: true, @@ -666,16 +709,23 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `Groups assigned as support request approvers. Requires replacement if changed. `, + Description: `Groups assigned as support request approvers. Requires replacement if changed.`, }, "users": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplaceIfConfigured(), speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "email": schema.StringAttribute{ Computed: true, @@ -691,19 +741,19 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this user. Requires replacement if changed. ; Not Null`, + Description: `The ID of this user. Not Null; Requires replacement if changed.`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), }, }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, Validators: []validator.String{ stringvalidator.OneOf( "STAGED", @@ -715,28 +765,28 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, }, }, - Description: `Users assigned as support request approvers. Requires replacement if changed. `, + Description: `Users assigned as support request approvers. Requires replacement if changed.`, }, }, - Description: `AppStore App stage 2 approvers assigned. Requires replacement if changed. `, + Description: `AppStore App stage 2 approvers assigned. Requires replacement if changed.`, }, "custom_approval_message": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. Requires replacement if changed. `, + Description: `After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. Requires replacement if changed.`, }, "discoverability": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `An enumeration. Requires replacement if changed. ; must be one of ["FULL", "LIMITED", "NONE"]`, + Description: `AppStore App visibility. must be one of ["FULL", "LIMITED", "NONE"]; Requires replacement if changed.`, Validators: []validator.String{ stringvalidator.OneOf( "FULL", @@ -747,11 +797,11 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "request_validation_inline_webhook": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -759,7 +809,7 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -772,12 +822,12 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this inline webhook. Requires replacement if changed. ; Not Null`, + Description: `The ID of this inline webhook. Not Null; Requires replacement if changed.`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), }, @@ -787,28 +837,28 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq Description: `The name of this inline webhook.`, }, }, - Description: `A request validation webhook can be optionally associated with this app. Requires replacement if changed. `, + Description: `A request validation webhook can be optionally associated with this app. Requires replacement if changed.`, }, "require_additional_approval": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ boolplanmodifier.RequiresReplaceIfConfigured(), speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `Only turn on when working with sensitive permissions to ensure a smooth employee experience. Requires replacement if changed. `, + Description: `Only turn on when working with sensitive permissions to ensure a smooth employee experience. Requires replacement if changed.`, }, "require_manager_approval": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ boolplanmodifier.RequiresReplaceIfConfigured(), speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `When a user makes an access request, require that their manager approves the request before moving on to additional approvals. Requires replacement if changed. `, + Description: `When a user makes an access request, require that their manager approves the request before moving on to additional approvals. Requires replacement if changed.`, }, }, - Description: `Request flow configuration to request access to app. Requires replacement if changed. `, + Description: `Request flow configuration to request access to app. Requires replacement if changed.`, }, "request_instructions": schema.StringAttribute{ Computed: true, @@ -821,7 +871,7 @@ func (r *AppStoreAppResource) Schema(ctx context.Context, req resource.SchemaReq }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, + Description: `The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'. must be one of ["DISCOVERED", "NEEDS_REVIEW", "APPROVED", "BLOCKLISTED", "DEPRECATED"]`, Validators: []validator.String{ stringvalidator.OneOf( "DISCOVERED", diff --git a/internal/provider/appstoreapp_resource_sdk.go b/internal/provider/appstoreapp_resource_sdk.go index 94e2cc5..ad4e174 100644 --- a/internal/provider/appstoreapp_resource_sdk.go +++ b/internal/provider/appstoreapp_resource_sdk.go @@ -15,7 +15,7 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp } else { customRequestInstructions = nil } - var requestFlow *shared.AddAppToAppStoreInputRequestFlow + var requestFlow *shared.AppStoreAppSettingsRequestFlowInput if r.RequestFlow != nil { discoverability := new(shared.AppStoreVisibility) if !r.RequestFlow.Discoverability.IsUnknown() && !r.RequestFlow.Discoverability.IsNull() { @@ -41,11 +41,11 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp } else { requireAdditionalApproval = nil } - var allowedGroups *shared.AddAppToAppStoreInputAllowedGroups + var allowedGroups *shared.AllowedGroupsConfigInput if r.RequestFlow.AllowedGroups != nil { - typeVar := new(shared.AddAppToAppStoreInputAllowedGroupsConfigType) + typeVar := new(shared.AllowedGroupsConfigInputAllowedGroupsConfigType) if !r.RequestFlow.AllowedGroups.Type.IsUnknown() && !r.RequestFlow.AllowedGroups.Type.IsNull() { - *typeVar = shared.AddAppToAppStoreInputAllowedGroupsConfigType(r.RequestFlow.AllowedGroups.Type.ValueString()) + *typeVar = shared.AllowedGroupsConfigInputAllowedGroupsConfigType(r.RequestFlow.AllowedGroups.Type.ValueString()) } else { typeVar = nil } @@ -75,12 +75,12 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp IntegrationSpecificID: integrationSpecificID, }) } - allowedGroups = &shared.AddAppToAppStoreInputAllowedGroups{ + allowedGroups = &shared.AllowedGroupsConfigInput{ Type: typeVar, Groups: groups, } } - var approvers *shared.AddAppToAppStoreInputApprovers + var approvers *shared.AppApproversInput if r.RequestFlow.Approvers != nil { var groups1 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem1 := range r.RequestFlow.Approvers.Groups { @@ -117,12 +117,12 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp ID: id2, }) } - approvers = &shared.AddAppToAppStoreInputApprovers{ + approvers = &shared.AppApproversInput{ Groups: groups1, Users: users, } } - var approversStage2 *shared.AddAppToAppStoreInputApproversStage2 + var approversStage2 *shared.AppApproversInput if r.RequestFlow.ApproversStage2 != nil { var groups2 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem2 := range r.RequestFlow.ApproversStage2.Groups { @@ -159,12 +159,12 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp ID: id4, }) } - approversStage2 = &shared.AddAppToAppStoreInputApproversStage2{ + approversStage2 = &shared.AppApproversInput{ Groups: groups2, Users: users1, } } - var admins *shared.AddAppToAppStoreInputAdmins + var admins *shared.AppAdminsInput if r.RequestFlow.Admins != nil { var groups3 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem3 := range r.RequestFlow.Admins.Groups { @@ -201,21 +201,21 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp ID: id6, }) } - admins = &shared.AddAppToAppStoreInputAdmins{ + admins = &shared.AppAdminsInput{ Groups: groups3, Users: users2, } } - var requestValidationInlineWebhook *shared.AddAppToAppStoreInputRequestValidationInlineWebhook + var requestValidationInlineWebhook *shared.BaseInlineWebhook if r.RequestFlow.RequestValidationInlineWebhook != nil { var id7 string id7 = r.RequestFlow.RequestValidationInlineWebhook.ID.ValueString() - requestValidationInlineWebhook = &shared.AddAppToAppStoreInputRequestValidationInlineWebhook{ + requestValidationInlineWebhook = &shared.BaseInlineWebhook{ ID: id7, } } - requestFlow = &shared.AddAppToAppStoreInputRequestFlow{ + requestFlow = &shared.AppStoreAppSettingsRequestFlowInput{ Discoverability: discoverability, CustomApprovalMessage: customApprovalMessage, RequireManagerApproval: requireManagerApproval, @@ -227,7 +227,7 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp RequestValidationInlineWebhook: requestValidationInlineWebhook, } } - var provisioning *shared.AddAppToAppStoreInputProvisioning + var provisioning *shared.AppStoreAppSettingsProvisioningInput if r.Provisioning != nil { groupsProvisioning := new(shared.GroupProvisioningOption) if !r.Provisioning.GroupsProvisioning.IsUnknown() && !r.Provisioning.GroupsProvisioning.IsNull() { @@ -257,25 +257,25 @@ func (r *AppStoreAppResourceModel) ToSharedAddAppToAppStoreInput() *shared.AddAp } else { customProvisioningInstructions = nil } - var provisioningWebhook *shared.AddAppToAppStoreInputProvisioningWebhook + var provisioningWebhook *shared.BaseInlineWebhook if r.Provisioning.ProvisioningWebhook != nil { var id8 string id8 = r.Provisioning.ProvisioningWebhook.ID.ValueString() - provisioningWebhook = &shared.AddAppToAppStoreInputProvisioningWebhook{ + provisioningWebhook = &shared.BaseInlineWebhook{ ID: id8, } } - var accessRemovalInlineWebhook *shared.AddAppToAppStoreInputAccessRemovalInlineWebhook + var accessRemovalInlineWebhook *shared.BaseInlineWebhook if r.Provisioning.AccessRemovalInlineWebhook != nil { var id9 string id9 = r.Provisioning.AccessRemovalInlineWebhook.ID.ValueString() - accessRemovalInlineWebhook = &shared.AddAppToAppStoreInputAccessRemovalInlineWebhook{ + accessRemovalInlineWebhook = &shared.BaseInlineWebhook{ ID: id9, } } - provisioning = &shared.AddAppToAppStoreInputProvisioning{ + provisioning = &shared.AppStoreAppSettingsProvisioningInput{ GroupsProvisioning: groupsProvisioning, TimeBasedAccess: timeBasedAccess, AllowMultiplePermissionSelection: allowMultiplePermissionSelection, @@ -303,11 +303,11 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.Provisioning == nil { r.Provisioning = nil } else { - r.Provisioning = &tfTypes.AddAppToAppStoreInputProvisioning{} + r.Provisioning = &tfTypes.AppStoreAppSettingsProvisioningInput{} if resp.Provisioning.AccessRemovalInlineWebhook == nil { r.Provisioning.AccessRemovalInlineWebhook = nil } else { - r.Provisioning.AccessRemovalInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.Provisioning.AccessRemovalInlineWebhook = &tfTypes.BaseInlineWebhook{} r.Provisioning.AccessRemovalInlineWebhook.Description = types.StringPointerValue(resp.Provisioning.AccessRemovalInlineWebhook.Description) r.Provisioning.AccessRemovalInlineWebhook.HookType = types.StringValue(string(resp.Provisioning.AccessRemovalInlineWebhook.HookType)) r.Provisioning.AccessRemovalInlineWebhook.ID = types.StringValue(resp.Provisioning.AccessRemovalInlineWebhook.ID) @@ -324,7 +324,7 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.Provisioning.ProvisioningWebhook == nil { r.Provisioning.ProvisioningWebhook = nil } else { - r.Provisioning.ProvisioningWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.Provisioning.ProvisioningWebhook = &tfTypes.BaseInlineWebhook{} r.Provisioning.ProvisioningWebhook.Description = types.StringPointerValue(resp.Provisioning.ProvisioningWebhook.Description) r.Provisioning.ProvisioningWebhook.HookType = types.StringValue(string(resp.Provisioning.ProvisioningWebhook.HookType)) r.Provisioning.ProvisioningWebhook.ID = types.StringValue(resp.Provisioning.ProvisioningWebhook.ID) @@ -338,11 +338,11 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.RequestFlow == nil { r.RequestFlow = nil } else { - r.RequestFlow = &tfTypes.AddAppToAppStoreInputRequestFlow{} + r.RequestFlow = &tfTypes.AppStoreAppSettingsRequestFlowInput{} if resp.RequestFlow.Admins == nil { r.RequestFlow.Admins = nil } else { - r.RequestFlow.Admins = &tfTypes.AddAppToAppStoreInputAdmins{} + r.RequestFlow.Admins = &tfTypes.AppAdminsInput{} r.RequestFlow.Admins.Groups = []tfTypes.Group{} if len(r.RequestFlow.Admins.Groups) > len(resp.RequestFlow.Admins.Groups) { r.RequestFlow.Admins.Groups = r.RequestFlow.Admins.Groups[:len(resp.RequestFlow.Admins.Groups)] @@ -401,7 +401,7 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.RequestFlow.AllowedGroups == nil { r.RequestFlow.AllowedGroups = nil } else { - r.RequestFlow.AllowedGroups = &tfTypes.AddAppToAppStoreInputAllowedGroups{} + r.RequestFlow.AllowedGroups = &tfTypes.AllowedGroupsConfigInput{} r.RequestFlow.AllowedGroups.Groups = []tfTypes.Group{} if len(r.RequestFlow.AllowedGroups.Groups) > len(resp.RequestFlow.AllowedGroups.Groups) { r.RequestFlow.AllowedGroups.Groups = r.RequestFlow.AllowedGroups.Groups[:len(resp.RequestFlow.AllowedGroups.Groups)] @@ -440,7 +440,7 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.RequestFlow.Approvers == nil { r.RequestFlow.Approvers = nil } else { - r.RequestFlow.Approvers = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestFlow.Approvers = &tfTypes.AppApproversInput{} r.RequestFlow.Approvers.Groups = []tfTypes.Group{} if len(r.RequestFlow.Approvers.Groups) > len(resp.RequestFlow.Approvers.Groups) { r.RequestFlow.Approvers.Groups = r.RequestFlow.Approvers.Groups[:len(resp.RequestFlow.Approvers.Groups)] @@ -499,7 +499,7 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.RequestFlow.ApproversStage2 == nil { r.RequestFlow.ApproversStage2 = nil } else { - r.RequestFlow.ApproversStage2 = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestFlow.ApproversStage2 = &tfTypes.AppApproversInput{} r.RequestFlow.ApproversStage2.Groups = []tfTypes.Group{} if len(r.RequestFlow.ApproversStage2.Groups) > len(resp.RequestFlow.ApproversStage2.Groups) { r.RequestFlow.ApproversStage2.Groups = r.RequestFlow.ApproversStage2.Groups[:len(resp.RequestFlow.ApproversStage2.Groups)] @@ -564,7 +564,7 @@ func (r *AppStoreAppResourceModel) RefreshFromSharedAppStoreAppSettingsOutput(re if resp.RequestFlow.RequestValidationInlineWebhook == nil { r.RequestFlow.RequestValidationInlineWebhook = nil } else { - r.RequestFlow.RequestValidationInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestFlow.RequestValidationInlineWebhook = &tfTypes.BaseInlineWebhook{} r.RequestFlow.RequestValidationInlineWebhook.Description = types.StringPointerValue(resp.RequestFlow.RequestValidationInlineWebhook.Description) r.RequestFlow.RequestValidationInlineWebhook.HookType = types.StringValue(string(resp.RequestFlow.RequestValidationInlineWebhook.HookType)) r.RequestFlow.RequestValidationInlineWebhook.ID = types.StringValue(resp.RequestFlow.RequestValidationInlineWebhook.ID) diff --git a/internal/provider/appstoreappsettings_data_source.go b/internal/provider/appstoreappsettings_data_source.go index 360cd8a..efb2d2f 100644 --- a/internal/provider/appstoreappsettings_data_source.go +++ b/internal/provider/appstoreappsettings_data_source.go @@ -29,10 +29,10 @@ type AppStoreAppSettingsDataSource struct { // AppStoreAppSettingsDataSourceModel describes the data model. type AppStoreAppSettingsDataSourceModel struct { - CustomRequestInstructions types.String `tfsdk:"custom_request_instructions"` - ID types.String `tfsdk:"id"` - Provisioning *tfTypes.AddAppToAppStoreInputProvisioning `tfsdk:"provisioning"` - RequestFlow *tfTypes.AddAppToAppStoreInputRequestFlow `tfsdk:"request_flow"` + CustomRequestInstructions types.String `tfsdk:"custom_request_instructions"` + ID types.String `tfsdk:"id"` + Provisioning *tfTypes.AppStoreAppSettingsProvisioningInput `tfsdk:"provisioning"` + RequestFlow *tfTypes.AppStoreAppSettingsRequestFlowInput `tfsdk:"request_flow"` } // Metadata returns the data source type name. @@ -65,7 +65,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -88,7 +88,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "groups_provisioning": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"]`, + Description: `If enabled, Approvers must choose a group to provision the user to for access requests.`, }, "manual_steps_needed": schema.BoolAttribute{ Computed: true, @@ -103,7 +103,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -144,7 +144,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -188,7 +188,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -214,7 +214,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -238,7 +238,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "type": schema.StringAttribute{ Computed: true, - Description: `The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]`, + Description: `The type of this allowed groups config, can be all groups or specific.`, }, }, Description: `The allowed groups config associated with this config.`, @@ -260,7 +260,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -304,7 +304,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -330,7 +330,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -374,7 +374,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -389,7 +389,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "discoverability": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["FULL", "LIMITED", "NONE"]`, + Description: `AppStore App visibility.`, }, "request_validation_inline_webhook": schema.SingleNestedAttribute{ Computed: true, @@ -400,7 +400,7 @@ func (r *AppStoreAppSettingsDataSource) Schema(ctx context.Context, req datasour }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/appstoreappsettings_data_source_sdk.go b/internal/provider/appstoreappsettings_data_source_sdk.go index 8fe1ef6..9ab4337 100644 --- a/internal/provider/appstoreappsettings_data_source_sdk.go +++ b/internal/provider/appstoreappsettings_data_source_sdk.go @@ -14,11 +14,11 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.Provisioning == nil { r.Provisioning = nil } else { - r.Provisioning = &tfTypes.AddAppToAppStoreInputProvisioning{} + r.Provisioning = &tfTypes.AppStoreAppSettingsProvisioningInput{} if resp.Provisioning.AccessRemovalInlineWebhook == nil { r.Provisioning.AccessRemovalInlineWebhook = nil } else { - r.Provisioning.AccessRemovalInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.Provisioning.AccessRemovalInlineWebhook = &tfTypes.BaseInlineWebhook{} r.Provisioning.AccessRemovalInlineWebhook.Description = types.StringPointerValue(resp.Provisioning.AccessRemovalInlineWebhook.Description) r.Provisioning.AccessRemovalInlineWebhook.HookType = types.StringValue(string(resp.Provisioning.AccessRemovalInlineWebhook.HookType)) r.Provisioning.AccessRemovalInlineWebhook.ID = types.StringValue(resp.Provisioning.AccessRemovalInlineWebhook.ID) @@ -35,7 +35,7 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.Provisioning.ProvisioningWebhook == nil { r.Provisioning.ProvisioningWebhook = nil } else { - r.Provisioning.ProvisioningWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.Provisioning.ProvisioningWebhook = &tfTypes.BaseInlineWebhook{} r.Provisioning.ProvisioningWebhook.Description = types.StringPointerValue(resp.Provisioning.ProvisioningWebhook.Description) r.Provisioning.ProvisioningWebhook.HookType = types.StringValue(string(resp.Provisioning.ProvisioningWebhook.HookType)) r.Provisioning.ProvisioningWebhook.ID = types.StringValue(resp.Provisioning.ProvisioningWebhook.ID) @@ -49,11 +49,11 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.RequestFlow == nil { r.RequestFlow = nil } else { - r.RequestFlow = &tfTypes.AddAppToAppStoreInputRequestFlow{} + r.RequestFlow = &tfTypes.AppStoreAppSettingsRequestFlowInput{} if resp.RequestFlow.Admins == nil { r.RequestFlow.Admins = nil } else { - r.RequestFlow.Admins = &tfTypes.AddAppToAppStoreInputAdmins{} + r.RequestFlow.Admins = &tfTypes.AppAdminsInput{} r.RequestFlow.Admins.Groups = []tfTypes.Group{} if len(r.RequestFlow.Admins.Groups) > len(resp.RequestFlow.Admins.Groups) { r.RequestFlow.Admins.Groups = r.RequestFlow.Admins.Groups[:len(resp.RequestFlow.Admins.Groups)] @@ -112,7 +112,7 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.RequestFlow.AllowedGroups == nil { r.RequestFlow.AllowedGroups = nil } else { - r.RequestFlow.AllowedGroups = &tfTypes.AddAppToAppStoreInputAllowedGroups{} + r.RequestFlow.AllowedGroups = &tfTypes.AllowedGroupsConfigInput{} r.RequestFlow.AllowedGroups.Groups = []tfTypes.Group{} if len(r.RequestFlow.AllowedGroups.Groups) > len(resp.RequestFlow.AllowedGroups.Groups) { r.RequestFlow.AllowedGroups.Groups = r.RequestFlow.AllowedGroups.Groups[:len(resp.RequestFlow.AllowedGroups.Groups)] @@ -151,7 +151,7 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.RequestFlow.Approvers == nil { r.RequestFlow.Approvers = nil } else { - r.RequestFlow.Approvers = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestFlow.Approvers = &tfTypes.AppApproversInput{} r.RequestFlow.Approvers.Groups = []tfTypes.Group{} if len(r.RequestFlow.Approvers.Groups) > len(resp.RequestFlow.Approvers.Groups) { r.RequestFlow.Approvers.Groups = r.RequestFlow.Approvers.Groups[:len(resp.RequestFlow.Approvers.Groups)] @@ -210,7 +210,7 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.RequestFlow.ApproversStage2 == nil { r.RequestFlow.ApproversStage2 = nil } else { - r.RequestFlow.ApproversStage2 = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestFlow.ApproversStage2 = &tfTypes.AppApproversInput{} r.RequestFlow.ApproversStage2.Groups = []tfTypes.Group{} if len(r.RequestFlow.ApproversStage2.Groups) > len(resp.RequestFlow.ApproversStage2.Groups) { r.RequestFlow.ApproversStage2.Groups = r.RequestFlow.ApproversStage2.Groups[:len(resp.RequestFlow.ApproversStage2.Groups)] @@ -275,7 +275,7 @@ func (r *AppStoreAppSettingsDataSourceModel) RefreshFromSharedAppStoreAppSetting if resp.RequestFlow.RequestValidationInlineWebhook == nil { r.RequestFlow.RequestValidationInlineWebhook = nil } else { - r.RequestFlow.RequestValidationInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestFlow.RequestValidationInlineWebhook = &tfTypes.BaseInlineWebhook{} r.RequestFlow.RequestValidationInlineWebhook.Description = types.StringPointerValue(resp.RequestFlow.RequestValidationInlineWebhook.Description) r.RequestFlow.RequestValidationInlineWebhook.HookType = types.StringValue(string(resp.RequestFlow.RequestValidationInlineWebhook.HookType)) r.RequestFlow.RequestValidationInlineWebhook.ID = types.StringValue(resp.RequestFlow.RequestValidationInlineWebhook.ID) diff --git a/internal/provider/group_data_source.go b/internal/provider/group_data_source.go index 99ac912..a3c93aa 100644 --- a/internal/provider/group_data_source.go +++ b/internal/provider/group_data_source.go @@ -62,7 +62,7 @@ func (r *GroupDataSource) Schema(ctx context.Context, req datasource.SchemaReque }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/groups_data_source.go b/internal/provider/groups_data_source.go index 1657144..3b6bcb8 100644 --- a/internal/provider/groups_data_source.go +++ b/internal/provider/groups_data_source.go @@ -78,7 +78,7 @@ func (r *GroupsDataSource) Schema(ctx context.Context, req datasource.SchemaRequ }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -104,15 +104,17 @@ func (r *GroupsDataSource) Schema(ctx context.Context, req datasource.SchemaRequ Description: `Filters groups by name.`, }, "page": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page number`, }, "pages": schema.Int64Attribute{ Computed: true, }, "size": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page size`, }, "total": schema.Int64Attribute{ Computed: true, diff --git a/internal/provider/preapprovalrule_resource.go b/internal/provider/preapprovalrule_resource.go index 8ce09f6..3352f2b 100644 --- a/internal/provider/preapprovalrule_resource.go +++ b/internal/provider/preapprovalrule_resource.go @@ -17,6 +17,7 @@ import ( tfTypes "github.com/teamlumos/terraform-provider-lumos/internal/provider/types" "github.com/teamlumos/terraform-provider-lumos/internal/sdk" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/operations" + speakeasy_objectvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/objectvalidators" speakeasy_stringvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/stringvalidators" ) @@ -35,15 +36,15 @@ type PreApprovalRuleResource struct { // PreApprovalRuleResourceModel describes the resource data model. type PreApprovalRuleResourceModel struct { - AppClassID types.String `tfsdk:"app_class_id"` - AppID types.String `tfsdk:"app_id"` - AppInstanceID types.String `tfsdk:"app_instance_id"` - ID types.String `tfsdk:"id"` - Justification types.String `tfsdk:"justification"` - PreapprovalWebhooks []tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"preapproval_webhooks"` - PreapprovedGroups []tfTypes.Group `tfsdk:"preapproved_groups"` - PreapprovedPermissions []tfTypes.RequestablePermissionBase `tfsdk:"preapproved_permissions"` - TimeBasedAccess []types.String `tfsdk:"time_based_access"` + AppClassID types.String `tfsdk:"app_class_id"` + AppID types.String `tfsdk:"app_id"` + AppInstanceID types.String `tfsdk:"app_instance_id"` + ID types.String `tfsdk:"id"` + Justification types.String `tfsdk:"justification"` + PreapprovalWebhooks []tfTypes.BaseInlineWebhook `tfsdk:"preapproval_webhooks"` + PreapprovedGroups []tfTypes.Group `tfsdk:"preapproved_groups"` + PreapprovedPermissions []tfTypes.RequestablePermissionBase `tfsdk:"preapproved_permissions"` + TimeBasedAccess []types.String `tfsdk:"time_based_access"` } func (r *PreApprovalRuleResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { @@ -59,12 +60,12 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem Description: `The ID of the service associated with this pre-approval rule.`, }, "app_id": schema.StringAttribute{ + Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Required: true, - Description: `The ID of the app associated with this pre-approval rule. Requires replacement if changed. `, + Description: `The ID of the app associated with this pre-approval rule. Requires replacement if changed.`, }, "app_instance_id": schema.StringAttribute{ Computed: true, @@ -85,6 +86,9 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem Computed: true, Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -92,7 +96,7 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -123,6 +127,9 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem Computed: true, Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, @@ -169,6 +176,9 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem Computed: true, Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, Attributes: map[string]schema.Attribute{ "app_class_id": schema.StringAttribute{ Computed: true, @@ -180,7 +190,7 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem }, "app_instance_id": schema.StringAttribute{ Computed: true, - Description: `The ID of the instance associated with this requestable permission.`, + Description: `The ID of the instance associated with this requestable permission. This may be an empty string.`, }, "id": schema.StringAttribute{ Computed: true, @@ -193,7 +203,7 @@ func (r *PreApprovalRuleResource) Schema(ctx context.Context, req resource.Schem }, "type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["SYNCED", "NATIVE"]`, + Description: `The type of this requestable permission. must be one of ["SYNCED", "NATIVE"]`, Validators: []validator.String{ stringvalidator.OneOf( "SYNCED", diff --git a/internal/provider/preapprovalrule_resource_sdk.go b/internal/provider/preapprovalrule_resource_sdk.go index 5217ef3..518e08f 100644 --- a/internal/provider/preapprovalrule_resource_sdk.go +++ b/internal/provider/preapprovalrule_resource_sdk.go @@ -84,12 +84,12 @@ func (r *PreApprovalRuleResourceModel) RefreshFromSharedPreApprovalRuleOutput(re r.AppInstanceID = types.StringValue(resp.AppInstanceID) r.ID = types.StringPointerValue(resp.ID) r.Justification = types.StringValue(resp.Justification) - r.PreapprovalWebhooks = []tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.PreapprovalWebhooks = []tfTypes.BaseInlineWebhook{} if len(r.PreapprovalWebhooks) > len(resp.PreapprovalWebhooks) { r.PreapprovalWebhooks = r.PreapprovalWebhooks[:len(resp.PreapprovalWebhooks)] } for preapprovalWebhooksCount, preapprovalWebhooksItem := range resp.PreapprovalWebhooks { - var preapprovalWebhooks1 tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook + var preapprovalWebhooks1 tfTypes.BaseInlineWebhook preapprovalWebhooks1.Description = types.StringPointerValue(preapprovalWebhooksItem.Description) preapprovalWebhooks1.HookType = types.StringValue(string(preapprovalWebhooksItem.HookType)) preapprovalWebhooks1.ID = types.StringValue(preapprovalWebhooksItem.ID) diff --git a/internal/provider/provider.go b/internal/provider/provider.go index a0356f5..d48400a 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -45,8 +45,8 @@ func (p *LumosProvider) Schema(ctx context.Context, req provider.SchemaRequest, Required: false, }, "http_bearer": schema.StringAttribute{ - Optional: true, Sensitive: true, + Optional: true, }, }, } diff --git a/internal/provider/requestablepermission_data_source.go b/internal/provider/requestablepermission_data_source.go index da8cc91..b525678 100644 --- a/internal/provider/requestablepermission_data_source.go +++ b/internal/provider/requestablepermission_data_source.go @@ -29,13 +29,14 @@ type RequestablePermissionDataSource struct { // RequestablePermissionDataSourceModel describes the data model. type RequestablePermissionDataSourceModel struct { - AppClassID types.String `tfsdk:"app_class_id"` - AppID types.String `tfsdk:"app_id"` - AppInstanceID types.String `tfsdk:"app_instance_id"` - ID types.String `tfsdk:"id"` - Label types.String `tfsdk:"label"` - RequestConfig tfTypes.RequestablePermissionInputRequestConfig `tfsdk:"request_config"` - Type types.String `tfsdk:"type"` + AppClassID types.String `tfsdk:"app_class_id"` + AppID types.String `tfsdk:"app_id"` + AppInstanceID types.String `tfsdk:"app_instance_id"` + ID types.String `tfsdk:"id"` + IncludeInheritedConfigs types.Bool `tfsdk:"include_inherited_configs"` + Label types.String `tfsdk:"label"` + RequestConfig tfTypes.RequestConfigOutput `tfsdk:"request_config"` + Type types.String `tfsdk:"type"` } // Metadata returns the data source type name. @@ -59,11 +60,16 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "app_instance_id": schema.StringAttribute{ Computed: true, - Description: `The ID of the instance associated with this requestable permission.`, + Description: `The ID of the instance associated with this requestable permission. This may be an empty string.`, }, "id": schema.StringAttribute{ Required: true, }, + "include_inherited_configs": schema.BoolAttribute{ + Computed: true, + Optional: true, + Description: `Include inherited configurations from parent app.`, + }, "label": schema.StringAttribute{ Computed: true, Description: `The label of this requestable permission.`, @@ -80,7 +86,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -110,7 +116,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -134,7 +140,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "type": schema.StringAttribute{ Computed: true, - Description: `The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]`, + Description: `The type of this allowed groups config, can be all groups or specific.`, }, }, Description: `The allowed groups config associated with this config.`, @@ -145,7 +151,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "appstore_visibility": schema.StringAttribute{ Computed: true, - Description: `The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"]`, + Description: `The appstore visibility of this request config.`, }, "request_approval_config": schema.SingleNestedAttribute{ Computed: true, @@ -167,7 +173,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -211,7 +217,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -237,7 +243,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -281,7 +287,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -300,7 +306,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "manager_approval": schema.StringAttribute{ Computed: true, - Description: `Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"]`, + Description: `Manager approval can be configured as necessary to continue`, }, "request_approval_config_override": schema.BoolAttribute{ Computed: true, @@ -337,7 +343,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -367,7 +373,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -401,7 +407,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -419,7 +425,7 @@ func (r *RequestablePermissionDataSource) Schema(ctx context.Context, req dataso }, "type": schema.StringAttribute{ Computed: true, - Description: `The type of this requestable permission. must be one of ["SYNCED", "NATIVE"]`, + Description: `The type of this requestable permission.`, }, }, } @@ -466,8 +472,15 @@ func (r *RequestablePermissionDataSource) Read(ctx context.Context, req datasour var id string id = data.ID.ValueString() + includeInheritedConfigs := new(bool) + if !data.IncludeInheritedConfigs.IsUnknown() && !data.IncludeInheritedConfigs.IsNull() { + *includeInheritedConfigs = data.IncludeInheritedConfigs.ValueBool() + } else { + includeInheritedConfigs = nil + } request := operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest{ - ID: id, + ID: id, + IncludeInheritedConfigs: includeInheritedConfigs, } res, err := r.client.AppStore.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGet(ctx, request) if err != nil { diff --git a/internal/provider/requestablepermission_data_source_sdk.go b/internal/provider/requestablepermission_data_source_sdk.go index dabee87..7bb2f78 100644 --- a/internal/provider/requestablepermission_data_source_sdk.go +++ b/internal/provider/requestablepermission_data_source_sdk.go @@ -18,7 +18,7 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.AccessRemovalInlineWebhook == nil { r.RequestConfig.AccessRemovalInlineWebhook = nil } else { - r.RequestConfig.AccessRemovalInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestConfig.AccessRemovalInlineWebhook = &tfTypes.BaseInlineWebhook{} r.RequestConfig.AccessRemovalInlineWebhook.Description = types.StringPointerValue(resp.RequestConfig.AccessRemovalInlineWebhook.Description) r.RequestConfig.AccessRemovalInlineWebhook.HookType = types.StringValue(string(resp.RequestConfig.AccessRemovalInlineWebhook.HookType)) r.RequestConfig.AccessRemovalInlineWebhook.ID = types.StringValue(resp.RequestConfig.AccessRemovalInlineWebhook.ID) @@ -27,7 +27,7 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.AllowedGroups == nil { r.RequestConfig.AllowedGroups = nil } else { - r.RequestConfig.AllowedGroups = &tfTypes.AddAppToAppStoreInputAllowedGroups{} + r.RequestConfig.AllowedGroups = &tfTypes.AllowedGroupsConfigInput{} r.RequestConfig.AllowedGroups.Groups = []tfTypes.Group{} if len(r.RequestConfig.AllowedGroups.Groups) > len(resp.RequestConfig.AllowedGroups.Groups) { r.RequestConfig.AllowedGroups.Groups = r.RequestConfig.AllowedGroups.Groups[:len(resp.RequestConfig.AllowedGroups.Groups)] @@ -72,11 +72,11 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.RequestApprovalConfig == nil { r.RequestConfig.RequestApprovalConfig = nil } else { - r.RequestConfig.RequestApprovalConfig = &tfTypes.RequestablePermissionInputRequestApprovalConfig{} + r.RequestConfig.RequestApprovalConfig = &tfTypes.RequestApprovalConfigOutput{} if resp.RequestConfig.RequestApprovalConfig.Approvers == nil { r.RequestConfig.RequestApprovalConfig.Approvers = nil } else { - r.RequestConfig.RequestApprovalConfig.Approvers = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestConfig.RequestApprovalConfig.Approvers = &tfTypes.AppApproversInput{} r.RequestConfig.RequestApprovalConfig.Approvers.Groups = []tfTypes.Group{} if len(r.RequestConfig.RequestApprovalConfig.Approvers.Groups) > len(resp.RequestConfig.RequestApprovalConfig.Approvers.Groups) { r.RequestConfig.RequestApprovalConfig.Approvers.Groups = r.RequestConfig.RequestApprovalConfig.Approvers.Groups[:len(resp.RequestConfig.RequestApprovalConfig.Approvers.Groups)] @@ -135,7 +135,7 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.RequestApprovalConfig.ApproversStage2 == nil { r.RequestConfig.RequestApprovalConfig.ApproversStage2 = nil } else { - r.RequestConfig.RequestApprovalConfig.ApproversStage2 = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestConfig.RequestApprovalConfig.ApproversStage2 = &tfTypes.AppApproversInput{} r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups = []tfTypes.Group{} if len(r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups) > len(resp.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups) { r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups = r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups[:len(resp.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups)] @@ -204,7 +204,7 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.RequestFulfillmentConfig == nil { r.RequestConfig.RequestFulfillmentConfig = nil } else { - r.RequestConfig.RequestFulfillmentConfig = &tfTypes.RequestablePermissionInputRequestFulfillmentConfig{} + r.RequestConfig.RequestFulfillmentConfig = &tfTypes.RequestFulfillmentConfigInput{} r.RequestConfig.RequestFulfillmentConfig.ManualInstructions = types.StringPointerValue(resp.RequestConfig.RequestFulfillmentConfig.ManualInstructions) r.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded = types.BoolPointerValue(resp.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded) if resp.RequestConfig.RequestFulfillmentConfig.ProvisioningGroup == nil { @@ -226,7 +226,7 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook == nil { r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = nil } else { - r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = &tfTypes.BaseInlineWebhook{} r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.Description = types.StringPointerValue(resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.Description) r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.HookType = types.StringValue(string(resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.HookType)) r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID = types.StringValue(resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID) @@ -241,7 +241,7 @@ func (r *RequestablePermissionDataSourceModel) RefreshFromSharedRequestablePermi if resp.RequestConfig.RequestValidationInlineWebhook == nil { r.RequestConfig.RequestValidationInlineWebhook = nil } else { - r.RequestConfig.RequestValidationInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestConfig.RequestValidationInlineWebhook = &tfTypes.BaseInlineWebhook{} r.RequestConfig.RequestValidationInlineWebhook.Description = types.StringPointerValue(resp.RequestConfig.RequestValidationInlineWebhook.Description) r.RequestConfig.RequestValidationInlineWebhook.HookType = types.StringValue(string(resp.RequestConfig.RequestValidationInlineWebhook.HookType)) r.RequestConfig.RequestValidationInlineWebhook.ID = types.StringValue(resp.RequestConfig.RequestValidationInlineWebhook.ID) diff --git a/internal/provider/requestablepermission_resource.go b/internal/provider/requestablepermission_resource.go index 17c51b7..c66ad18 100644 --- a/internal/provider/requestablepermission_resource.go +++ b/internal/provider/requestablepermission_resource.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" @@ -25,6 +26,7 @@ import ( "github.com/teamlumos/terraform-provider-lumos/internal/sdk" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/operations" custom_objectvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/objectvalidators" + speakeasy_objectvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/objectvalidators" speakeasy_stringvalidators "github.com/teamlumos/terraform-provider-lumos/internal/validators/stringvalidators" ) @@ -43,13 +45,14 @@ type RequestablePermissionResource struct { // RequestablePermissionResourceModel describes the resource data model. type RequestablePermissionResourceModel struct { - AppClassID types.String `tfsdk:"app_class_id"` - AppID types.String `tfsdk:"app_id"` - AppInstanceID types.String `tfsdk:"app_instance_id"` - ID types.String `tfsdk:"id"` - Label types.String `tfsdk:"label"` - RequestConfig *tfTypes.RequestablePermissionInputRequestConfig `tfsdk:"request_config"` - Type types.String `tfsdk:"type"` + AppClassID types.String `tfsdk:"app_class_id"` + AppID types.String `tfsdk:"app_id"` + AppInstanceID types.String `tfsdk:"app_instance_id"` + ID types.String `tfsdk:"id"` + IncludeInheritedConfigs types.Bool `tfsdk:"include_inherited_configs"` + Label types.String `tfsdk:"label"` + RequestConfig *tfTypes.RequestConfigInputCreate `tfsdk:"request_config"` + Type types.String `tfsdk:"type"` } func (r *RequestablePermissionResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { @@ -62,10 +65,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource Attributes: map[string]schema.Attribute{ "app_class_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of the service associated with this requestable permission.`, }, "app_id": schema.StringAttribute{ @@ -74,10 +77,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "app_instance_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Optionally, an app has an identifer associated with it's particular instance.`, }, "id": schema.StringAttribute{ @@ -87,23 +90,29 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, Description: `The ID of this requestable permission.`, }, + "include_inherited_configs": schema.BoolAttribute{ + Computed: true, + Optional: true, + Default: booldefault.StaticBool(true), + Description: `Include inherited configurations from parent app. Default: true`, + }, "label": schema.StringAttribute{ Required: true, Description: `The label of this requestable permission.`, }, "request_config": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "access_removal_inline_webhook": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -117,7 +126,7 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -130,10 +139,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this inline webhook. Not Null`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), @@ -151,25 +160,31 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "allowed_groups": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of the app that sources this group.`, }, "description": schema.StringAttribute{ @@ -194,18 +209,18 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this group.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this group, specific to the integration.`, }, "name": schema.StringAttribute{ @@ -228,12 +243,12 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "type": schema.StringAttribute{ Computed: true, + Optional: true, + Default: stringdefault.StaticString("ALL_GROUPS"), PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Default: stringdefault.StaticString("ALL_GROUPS"), - Description: `The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]; Default: "ALL_GROUPS"`, + Description: `The type of this allowed groups config, can be all groups or specific. Default: "ALL_GROUPS"; must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]`, Validators: []validator.String{ stringvalidator.OneOf( "ALL_GROUPS", @@ -246,20 +261,19 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "allowed_groups_override": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Indicates if allowed groups is overriden from the app-level settings.`, }, "appstore_visibility": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Default: stringdefault.StaticString("HIDDEN"), - Description: `The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"]; Default: "HIDDEN"`, + Description: `The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"]`, Validators: []validator.String{ stringvalidator.OneOf( "HIDDEN", @@ -269,32 +283,38 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "request_approval_config": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "approvers": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of the app that sources this group.`, }, "description": schema.StringAttribute{ @@ -319,18 +339,18 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this group.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this group, specific to the integration.`, }, "name": schema.StringAttribute{ @@ -353,11 +373,17 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "users": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "email": schema.StringAttribute{ Computed: true, @@ -382,10 +408,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this user. Not Null`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), @@ -396,7 +422,7 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, Validators: []validator.String{ stringvalidator.OneOf( "STAGED", @@ -415,25 +441,31 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "approvers_stage_2": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "groups": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of the app that sources this group.`, }, "description": schema.StringAttribute{ @@ -458,18 +490,18 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this group.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this group, specific to the integration.`, }, "name": schema.StringAttribute{ @@ -492,11 +524,17 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "users": schema.SetNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Set{ speakeasy_setplanmodifier.SuppressDiff(speakeasy_setplanmodifier.ExplicitSuppress), }, - Optional: true, NestedObject: schema.NestedAttributeObject{ + Validators: []validator.Object{ + speakeasy_objectvalidators.NotNull(), + }, + PlanModifiers: []planmodifier.Object{ + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, Attributes: map[string]schema.Attribute{ "email": schema.StringAttribute{ Computed: true, @@ -521,10 +559,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this user. Not Null`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), @@ -535,7 +573,7 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, Validators: []validator.String{ stringvalidator.OneOf( "STAGED", @@ -554,28 +592,27 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "custom_approval_message": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported.`, }, "custom_approval_message_override": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Indicates if custom_approval_message is overridden.`, }, "manager_approval": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Default: stringdefault.StaticString("NONE"), - Description: `Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"]; Default: "NONE"`, + Description: `Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"]`, Validators: []validator.String{ stringvalidator.OneOf( "NONE", @@ -585,18 +622,18 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "request_approval_config_override": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Indicates if approval flow is overridden.`, }, "require_additional_approval": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Only turn on when working with sensitive permissions to ensure a smooth employee experience.`, }, }, @@ -604,43 +641,43 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "request_fulfillment_config": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "manual_instructions": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The manual instructions that go along.`, }, "manual_steps_needed": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Whether manual steps are needed.`, }, "provisioning_group": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplaceIfConfigured(), speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "app_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of the app that sources this group. Requires replacement if changed. `, + Description: `The ID of the app that sources this group. Requires replacement if changed.`, }, "description": schema.StringAttribute{ Computed: true, @@ -664,21 +701,21 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group. Requires replacement if changed. `, + Description: `The ID of this group. Requires replacement if changed.`, }, "integration_specific_id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplaceIfConfigured(), speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, - Description: `The ID of this group, specific to the integration. Requires replacement if changed. `, + Description: `The ID of this group, specific to the integration. Requires replacement if changed.`, }, "name": schema.StringAttribute{ Computed: true, @@ -695,14 +732,14 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource Description: `The ID of the app that sources this group.`, }, }, - Description: `The provisioning group optionally associated with this config. Requires replacement if changed. `, + Description: `The provisioning group optionally associated with this config. Requires replacement if changed.`, }, "provisioning_webhook": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -716,7 +753,7 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -729,10 +766,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this inline webhook. Not Null`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), @@ -750,19 +787,19 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "time_based_access": schema.ListAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.List{ speakeasy_listplanmodifier.SuppressDiff(speakeasy_listplanmodifier.ExplicitSuppress), }, - Optional: true, ElementType: types.StringType, Description: `If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access.`, }, "time_based_access_override": schema.BoolAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Bool{ speakeasy_boolplanmodifier.SuppressDiff(speakeasy_boolplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `Indicates if time based access is overriden.`, }, }, @@ -770,10 +807,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "request_validation_inline_webhook": schema.SingleNestedAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.Object{ speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), }, - Optional: true, Attributes: map[string]schema.Attribute{ "description": schema.StringAttribute{ Computed: true, @@ -787,7 +824,7 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, Validators: []validator.String{ stringvalidator.OneOf( "PRE_APPROVAL", @@ -800,10 +837,10 @@ func (r *RequestablePermissionResource) Schema(ctx context.Context, req resource }, "id": schema.StringAttribute{ Computed: true, + Optional: true, PlanModifiers: []planmodifier.String{ speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), }, - Optional: true, Description: `The ID of this inline webhook. Not Null`, Validators: []validator.String{ speakeasy_stringvalidators.NotNull(), @@ -880,7 +917,17 @@ func (r *RequestablePermissionResource) Create(ctx context.Context, req resource return } - request := *data.ToSharedRequestablePermissionInput() + includeInheritedConfigs := new(bool) + if !data.IncludeInheritedConfigs.IsUnknown() && !data.IncludeInheritedConfigs.IsNull() { + *includeInheritedConfigs = data.IncludeInheritedConfigs.ValueBool() + } else { + includeInheritedConfigs = nil + } + requestablePermissionInput := *data.ToSharedRequestablePermissionInput() + request := operations.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest{ + IncludeInheritedConfigs: includeInheritedConfigs, + RequestablePermissionInput: requestablePermissionInput, + } res, err := r.client.AppStore.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPost(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) @@ -929,8 +976,15 @@ func (r *RequestablePermissionResource) Read(ctx context.Context, req resource.R var id string id = data.ID.ValueString() + includeInheritedConfigs := new(bool) + if !data.IncludeInheritedConfigs.IsUnknown() && !data.IncludeInheritedConfigs.IsNull() { + *includeInheritedConfigs = data.IncludeInheritedConfigs.ValueBool() + } else { + includeInheritedConfigs = nil + } request := operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest{ - ID: id, + ID: id, + IncludeInheritedConfigs: includeInheritedConfigs, } res, err := r.client.AppStore.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGet(ctx, request) if err != nil { @@ -979,9 +1033,16 @@ func (r *RequestablePermissionResource) Update(ctx context.Context, req resource var id string id = data.ID.ValueString() + includeInheritedConfigs := new(bool) + if !data.IncludeInheritedConfigs.IsUnknown() && !data.IncludeInheritedConfigs.IsNull() { + *includeInheritedConfigs = data.IncludeInheritedConfigs.ValueBool() + } else { + includeInheritedConfigs = nil + } requestablePermissionInputUpdate := *data.ToSharedRequestablePermissionInputUpdate() request := operations.UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest{ ID: id, + IncludeInheritedConfigs: includeInheritedConfigs, RequestablePermissionInputUpdate: requestablePermissionInputUpdate, } res, err := r.client.AppStore.UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatch(ctx, request) diff --git a/internal/provider/requestablepermission_resource_sdk.go b/internal/provider/requestablepermission_resource_sdk.go index 7b8263e..7e372a2 100644 --- a/internal/provider/requestablepermission_resource_sdk.go +++ b/internal/provider/requestablepermission_resource_sdk.go @@ -27,11 +27,11 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( var label string label = r.Label.ValueString() - var requestConfig *shared.RequestablePermissionInputRequestConfig + var requestConfig *shared.RequestConfigInputCreate if r.RequestConfig != nil { - appstoreVisibility := new(shared.RequestablePermissionInputAppStoreVisibilityOption) + appstoreVisibility := new(shared.AppStoreVisibilityOption) if !r.RequestConfig.AppstoreVisibility.IsUnknown() && !r.RequestConfig.AppstoreVisibility.IsNull() { - *appstoreVisibility = shared.RequestablePermissionInputAppStoreVisibilityOption(r.RequestConfig.AppstoreVisibility.ValueString()) + *appstoreVisibility = shared.AppStoreVisibilityOption(r.RequestConfig.AppstoreVisibility.ValueString()) } else { appstoreVisibility = nil } @@ -41,11 +41,11 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( } else { allowedGroupsOverride = nil } - var allowedGroups *shared.RequestablePermissionInputAllowedGroups + var allowedGroups *shared.AllowedGroupsConfigInput if r.RequestConfig.AllowedGroups != nil { - typeVar := new(shared.RequestablePermissionInputAllowedGroupsConfigType) + typeVar := new(shared.AllowedGroupsConfigInputAllowedGroupsConfigType) if !r.RequestConfig.AllowedGroups.Type.IsUnknown() && !r.RequestConfig.AllowedGroups.Type.IsNull() { - *typeVar = shared.RequestablePermissionInputAllowedGroupsConfigType(r.RequestConfig.AllowedGroups.Type.ValueString()) + *typeVar = shared.AllowedGroupsConfigInputAllowedGroupsConfigType(r.RequestConfig.AllowedGroups.Type.ValueString()) } else { typeVar = nil } @@ -75,12 +75,12 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( IntegrationSpecificID: integrationSpecificID, }) } - allowedGroups = &shared.RequestablePermissionInputAllowedGroups{ + allowedGroups = &shared.AllowedGroupsConfigInput{ Type: typeVar, Groups: groups, } } - var requestApprovalConfig *shared.RequestablePermissionInputRequestApprovalConfig + var requestApprovalConfig *shared.RequestApprovalConfigInput if r.RequestConfig.RequestApprovalConfig != nil { requestApprovalConfigOverride := new(bool) if !r.RequestConfig.RequestApprovalConfig.RequestApprovalConfigOverride.IsUnknown() && !r.RequestConfig.RequestApprovalConfig.RequestApprovalConfigOverride.IsNull() { @@ -88,9 +88,9 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( } else { requestApprovalConfigOverride = nil } - managerApproval := new(shared.RequestablePermissionInputManagerApprovalOption) + managerApproval := new(shared.ManagerApprovalOption) if !r.RequestConfig.RequestApprovalConfig.ManagerApproval.IsUnknown() && !r.RequestConfig.RequestApprovalConfig.ManagerApproval.IsNull() { - *managerApproval = shared.RequestablePermissionInputManagerApprovalOption(r.RequestConfig.RequestApprovalConfig.ManagerApproval.ValueString()) + *managerApproval = shared.ManagerApprovalOption(r.RequestConfig.RequestApprovalConfig.ManagerApproval.ValueString()) } else { managerApproval = nil } @@ -112,7 +112,7 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( } else { customApprovalMessageOverride = nil } - var approvers *shared.RequestablePermissionInputApprovers + var approvers *shared.AppApproversInput if r.RequestConfig.RequestApprovalConfig.Approvers != nil { var groups1 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem1 := range r.RequestConfig.RequestApprovalConfig.Approvers.Groups { @@ -149,12 +149,12 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( ID: id2, }) } - approvers = &shared.RequestablePermissionInputApprovers{ + approvers = &shared.AppApproversInput{ Groups: groups1, Users: users, } } - var approversStage2 *shared.RequestablePermissionInputApproversStage2 + var approversStage2 *shared.AppApproversInput if r.RequestConfig.RequestApprovalConfig.ApproversStage2 != nil { var groups2 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem2 := range r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups { @@ -191,12 +191,12 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( ID: id4, }) } - approversStage2 = &shared.RequestablePermissionInputApproversStage2{ + approversStage2 = &shared.AppApproversInput{ Groups: groups2, Users: users1, } } - requestApprovalConfig = &shared.RequestablePermissionInputRequestApprovalConfig{ + requestApprovalConfig = &shared.RequestApprovalConfigInput{ RequestApprovalConfigOverride: requestApprovalConfigOverride, ManagerApproval: managerApproval, RequireAdditionalApproval: requireAdditionalApproval, @@ -206,25 +206,25 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( ApproversStage2: approversStage2, } } - var accessRemovalInlineWebhook *shared.RequestablePermissionInputAccessRemovalInlineWebhook + var accessRemovalInlineWebhook *shared.BaseInlineWebhook if r.RequestConfig.AccessRemovalInlineWebhook != nil { var id5 string id5 = r.RequestConfig.AccessRemovalInlineWebhook.ID.ValueString() - accessRemovalInlineWebhook = &shared.RequestablePermissionInputAccessRemovalInlineWebhook{ + accessRemovalInlineWebhook = &shared.BaseInlineWebhook{ ID: id5, } } - var requestValidationInlineWebhook *shared.RequestablePermissionInputRequestValidationInlineWebhook + var requestValidationInlineWebhook *shared.BaseInlineWebhook if r.RequestConfig.RequestValidationInlineWebhook != nil { var id6 string id6 = r.RequestConfig.RequestValidationInlineWebhook.ID.ValueString() - requestValidationInlineWebhook = &shared.RequestablePermissionInputRequestValidationInlineWebhook{ + requestValidationInlineWebhook = &shared.BaseInlineWebhook{ ID: id6, } } - var requestFulfillmentConfig *shared.RequestablePermissionInputRequestFulfillmentConfig + var requestFulfillmentConfig *shared.RequestFulfillmentConfigInput if r.RequestConfig.RequestFulfillmentConfig != nil { manualStepsNeeded := new(bool) if !r.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded.IsUnknown() && !r.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded.IsNull() { @@ -248,7 +248,7 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( } else { timeBasedAccessOverride = nil } - var provisioningGroup *shared.RequestablePermissionInputProvisioningGroup + var provisioningGroup *shared.BaseGroup if r.RequestConfig.RequestFulfillmentConfig.ProvisioningGroup != nil { id7 := new(string) if !r.RequestConfig.RequestFulfillmentConfig.ProvisioningGroup.ID.IsUnknown() && !r.RequestConfig.RequestFulfillmentConfig.ProvisioningGroup.ID.IsNull() { @@ -268,22 +268,22 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( } else { integrationSpecificId3 = nil } - provisioningGroup = &shared.RequestablePermissionInputProvisioningGroup{ + provisioningGroup = &shared.BaseGroup{ ID: id7, AppID: appId4, IntegrationSpecificID: integrationSpecificId3, } } - var provisioningWebhook *shared.RequestablePermissionInputProvisioningWebhook + var provisioningWebhook *shared.BaseInlineWebhook if r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook != nil { var id8 string id8 = r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID.ValueString() - provisioningWebhook = &shared.RequestablePermissionInputProvisioningWebhook{ + provisioningWebhook = &shared.BaseInlineWebhook{ ID: id8, } } - requestFulfillmentConfig = &shared.RequestablePermissionInputRequestFulfillmentConfig{ + requestFulfillmentConfig = &shared.RequestFulfillmentConfigInput{ ManualStepsNeeded: manualStepsNeeded, ManualInstructions: manualInstructions, TimeBasedAccess: timeBasedAccess, @@ -292,7 +292,7 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInput( ProvisioningWebhook: provisioningWebhook, } } - requestConfig = &shared.RequestablePermissionInputRequestConfig{ + requestConfig = &shared.RequestConfigInputCreate{ AppstoreVisibility: appstoreVisibility, AllowedGroupsOverride: allowedGroupsOverride, AllowedGroups: allowedGroups, @@ -320,12 +320,12 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss r.ID = types.StringPointerValue(resp.ID) r.Label = types.StringValue(resp.Label) if r.RequestConfig == nil { - r.RequestConfig = &tfTypes.RequestablePermissionInputRequestConfig{} + r.RequestConfig = &tfTypes.RequestConfigInputCreate{} } if resp.RequestConfig.AccessRemovalInlineWebhook == nil { r.RequestConfig.AccessRemovalInlineWebhook = nil } else { - r.RequestConfig.AccessRemovalInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestConfig.AccessRemovalInlineWebhook = &tfTypes.BaseInlineWebhook{} r.RequestConfig.AccessRemovalInlineWebhook.Description = types.StringPointerValue(resp.RequestConfig.AccessRemovalInlineWebhook.Description) r.RequestConfig.AccessRemovalInlineWebhook.HookType = types.StringValue(string(resp.RequestConfig.AccessRemovalInlineWebhook.HookType)) r.RequestConfig.AccessRemovalInlineWebhook.ID = types.StringValue(resp.RequestConfig.AccessRemovalInlineWebhook.ID) @@ -334,7 +334,7 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss if resp.RequestConfig.AllowedGroups == nil { r.RequestConfig.AllowedGroups = nil } else { - r.RequestConfig.AllowedGroups = &tfTypes.AddAppToAppStoreInputAllowedGroups{} + r.RequestConfig.AllowedGroups = &tfTypes.AllowedGroupsConfigInput{} r.RequestConfig.AllowedGroups.Groups = []tfTypes.Group{} if len(r.RequestConfig.AllowedGroups.Groups) > len(resp.RequestConfig.AllowedGroups.Groups) { r.RequestConfig.AllowedGroups.Groups = r.RequestConfig.AllowedGroups.Groups[:len(resp.RequestConfig.AllowedGroups.Groups)] @@ -379,11 +379,11 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss if resp.RequestConfig.RequestApprovalConfig == nil { r.RequestConfig.RequestApprovalConfig = nil } else { - r.RequestConfig.RequestApprovalConfig = &tfTypes.RequestablePermissionInputRequestApprovalConfig{} + r.RequestConfig.RequestApprovalConfig = &tfTypes.RequestApprovalConfigInput{} if resp.RequestConfig.RequestApprovalConfig.Approvers == nil { r.RequestConfig.RequestApprovalConfig.Approvers = nil } else { - r.RequestConfig.RequestApprovalConfig.Approvers = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestConfig.RequestApprovalConfig.Approvers = &tfTypes.AppApproversInput{} r.RequestConfig.RequestApprovalConfig.Approvers.Groups = []tfTypes.Group{} if len(r.RequestConfig.RequestApprovalConfig.Approvers.Groups) > len(resp.RequestConfig.RequestApprovalConfig.Approvers.Groups) { r.RequestConfig.RequestApprovalConfig.Approvers.Groups = r.RequestConfig.RequestApprovalConfig.Approvers.Groups[:len(resp.RequestConfig.RequestApprovalConfig.Approvers.Groups)] @@ -442,7 +442,7 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss if resp.RequestConfig.RequestApprovalConfig.ApproversStage2 == nil { r.RequestConfig.RequestApprovalConfig.ApproversStage2 = nil } else { - r.RequestConfig.RequestApprovalConfig.ApproversStage2 = &tfTypes.AddAppToAppStoreInputApprovers{} + r.RequestConfig.RequestApprovalConfig.ApproversStage2 = &tfTypes.AppApproversInput{} r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups = []tfTypes.Group{} if len(r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups) > len(resp.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups) { r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups = r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups[:len(resp.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups)] @@ -511,7 +511,7 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss if resp.RequestConfig.RequestFulfillmentConfig == nil { r.RequestConfig.RequestFulfillmentConfig = nil } else { - r.RequestConfig.RequestFulfillmentConfig = &tfTypes.RequestablePermissionInputRequestFulfillmentConfig{} + r.RequestConfig.RequestFulfillmentConfig = &tfTypes.RequestFulfillmentConfigInput{} r.RequestConfig.RequestFulfillmentConfig.ManualInstructions = types.StringPointerValue(resp.RequestConfig.RequestFulfillmentConfig.ManualInstructions) r.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded = types.BoolPointerValue(resp.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded) if resp.RequestConfig.RequestFulfillmentConfig.ProvisioningGroup == nil { @@ -533,7 +533,7 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss if resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook == nil { r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = nil } else { - r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = &tfTypes.BaseInlineWebhook{} r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.Description = types.StringPointerValue(resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.Description) r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.HookType = types.StringValue(string(resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.HookType)) r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID = types.StringValue(resp.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID) @@ -548,7 +548,7 @@ func (r *RequestablePermissionResourceModel) RefreshFromSharedRequestablePermiss if resp.RequestConfig.RequestValidationInlineWebhook == nil { r.RequestConfig.RequestValidationInlineWebhook = nil } else { - r.RequestConfig.RequestValidationInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + r.RequestConfig.RequestValidationInlineWebhook = &tfTypes.BaseInlineWebhook{} r.RequestConfig.RequestValidationInlineWebhook.Description = types.StringPointerValue(resp.RequestConfig.RequestValidationInlineWebhook.Description) r.RequestConfig.RequestValidationInlineWebhook.HookType = types.StringValue(string(resp.RequestConfig.RequestValidationInlineWebhook.HookType)) r.RequestConfig.RequestValidationInlineWebhook.ID = types.StringValue(resp.RequestConfig.RequestValidationInlineWebhook.ID) @@ -587,11 +587,11 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU } else { label = nil } - var requestConfig *shared.RequestablePermissionInputUpdateRequestConfig + var requestConfig *shared.RequestConfigInputUpdate if r.RequestConfig != nil { - appstoreVisibility := new(shared.RequestablePermissionInputUpdateAppStoreVisibilityOption) + appstoreVisibility := new(shared.AppStoreVisibilityOption) if !r.RequestConfig.AppstoreVisibility.IsUnknown() && !r.RequestConfig.AppstoreVisibility.IsNull() { - *appstoreVisibility = shared.RequestablePermissionInputUpdateAppStoreVisibilityOption(r.RequestConfig.AppstoreVisibility.ValueString()) + *appstoreVisibility = shared.AppStoreVisibilityOption(r.RequestConfig.AppstoreVisibility.ValueString()) } else { appstoreVisibility = nil } @@ -601,11 +601,11 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU } else { allowedGroupsOverride = nil } - var allowedGroups *shared.RequestablePermissionInputUpdateAllowedGroups + var allowedGroups *shared.AllowedGroupsConfigInput if r.RequestConfig.AllowedGroups != nil { - typeVar := new(shared.RequestablePermissionInputUpdateAllowedGroupsConfigType) + typeVar := new(shared.AllowedGroupsConfigInputAllowedGroupsConfigType) if !r.RequestConfig.AllowedGroups.Type.IsUnknown() && !r.RequestConfig.AllowedGroups.Type.IsNull() { - *typeVar = shared.RequestablePermissionInputUpdateAllowedGroupsConfigType(r.RequestConfig.AllowedGroups.Type.ValueString()) + *typeVar = shared.AllowedGroupsConfigInputAllowedGroupsConfigType(r.RequestConfig.AllowedGroups.Type.ValueString()) } else { typeVar = nil } @@ -635,12 +635,12 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU IntegrationSpecificID: integrationSpecificID, }) } - allowedGroups = &shared.RequestablePermissionInputUpdateAllowedGroups{ + allowedGroups = &shared.AllowedGroupsConfigInput{ Type: typeVar, Groups: groups, } } - var requestApprovalConfig *shared.RequestablePermissionInputUpdateRequestApprovalConfig + var requestApprovalConfig *shared.RequestApprovalConfigInput if r.RequestConfig.RequestApprovalConfig != nil { requestApprovalConfigOverride := new(bool) if !r.RequestConfig.RequestApprovalConfig.RequestApprovalConfigOverride.IsUnknown() && !r.RequestConfig.RequestApprovalConfig.RequestApprovalConfigOverride.IsNull() { @@ -648,9 +648,9 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU } else { requestApprovalConfigOverride = nil } - managerApproval := new(shared.RequestablePermissionInputUpdateManagerApprovalOption) + managerApproval := new(shared.ManagerApprovalOption) if !r.RequestConfig.RequestApprovalConfig.ManagerApproval.IsUnknown() && !r.RequestConfig.RequestApprovalConfig.ManagerApproval.IsNull() { - *managerApproval = shared.RequestablePermissionInputUpdateManagerApprovalOption(r.RequestConfig.RequestApprovalConfig.ManagerApproval.ValueString()) + *managerApproval = shared.ManagerApprovalOption(r.RequestConfig.RequestApprovalConfig.ManagerApproval.ValueString()) } else { managerApproval = nil } @@ -672,7 +672,7 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU } else { customApprovalMessageOverride = nil } - var approvers *shared.RequestablePermissionInputUpdateApprovers + var approvers *shared.AppApproversInput if r.RequestConfig.RequestApprovalConfig.Approvers != nil { var groups1 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem1 := range r.RequestConfig.RequestApprovalConfig.Approvers.Groups { @@ -709,12 +709,12 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU ID: id2, }) } - approvers = &shared.RequestablePermissionInputUpdateApprovers{ + approvers = &shared.AppApproversInput{ Groups: groups1, Users: users, } } - var approversStage2 *shared.RequestablePermissionInputUpdateApproversStage2 + var approversStage2 *shared.AppApproversInput if r.RequestConfig.RequestApprovalConfig.ApproversStage2 != nil { var groups2 []shared.BaseGroup = []shared.BaseGroup{} for _, groupsItem2 := range r.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups { @@ -751,12 +751,12 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU ID: id4, }) } - approversStage2 = &shared.RequestablePermissionInputUpdateApproversStage2{ + approversStage2 = &shared.AppApproversInput{ Groups: groups2, Users: users1, } } - requestApprovalConfig = &shared.RequestablePermissionInputUpdateRequestApprovalConfig{ + requestApprovalConfig = &shared.RequestApprovalConfigInput{ RequestApprovalConfigOverride: requestApprovalConfigOverride, ManagerApproval: managerApproval, RequireAdditionalApproval: requireAdditionalApproval, @@ -766,25 +766,25 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU ApproversStage2: approversStage2, } } - var accessRemovalInlineWebhook *shared.RequestablePermissionInputUpdateAccessRemovalInlineWebhook + var accessRemovalInlineWebhook *shared.BaseInlineWebhook if r.RequestConfig.AccessRemovalInlineWebhook != nil { var id5 string id5 = r.RequestConfig.AccessRemovalInlineWebhook.ID.ValueString() - accessRemovalInlineWebhook = &shared.RequestablePermissionInputUpdateAccessRemovalInlineWebhook{ + accessRemovalInlineWebhook = &shared.BaseInlineWebhook{ ID: id5, } } - var requestValidationInlineWebhook *shared.RequestablePermissionInputUpdateRequestValidationInlineWebhook + var requestValidationInlineWebhook *shared.BaseInlineWebhook if r.RequestConfig.RequestValidationInlineWebhook != nil { var id6 string id6 = r.RequestConfig.RequestValidationInlineWebhook.ID.ValueString() - requestValidationInlineWebhook = &shared.RequestablePermissionInputUpdateRequestValidationInlineWebhook{ + requestValidationInlineWebhook = &shared.BaseInlineWebhook{ ID: id6, } } - var requestFulfillmentConfig *shared.RequestablePermissionInputUpdateRequestFulfillmentConfig + var requestFulfillmentConfig *shared.RequestFulfillmentConfigInputUpdate if r.RequestConfig.RequestFulfillmentConfig != nil { manualStepsNeeded := new(bool) if !r.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded.IsUnknown() && !r.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded.IsNull() { @@ -808,16 +808,16 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU } else { timeBasedAccessOverride = nil } - var provisioningWebhook *shared.RequestablePermissionInputUpdateProvisioningWebhook + var provisioningWebhook *shared.BaseInlineWebhook if r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook != nil { var id7 string id7 = r.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID.ValueString() - provisioningWebhook = &shared.RequestablePermissionInputUpdateProvisioningWebhook{ + provisioningWebhook = &shared.BaseInlineWebhook{ ID: id7, } } - requestFulfillmentConfig = &shared.RequestablePermissionInputUpdateRequestFulfillmentConfig{ + requestFulfillmentConfig = &shared.RequestFulfillmentConfigInputUpdate{ ManualStepsNeeded: manualStepsNeeded, ManualInstructions: manualInstructions, TimeBasedAccess: timeBasedAccess, @@ -825,7 +825,7 @@ func (r *RequestablePermissionResourceModel) ToSharedRequestablePermissionInputU ProvisioningWebhook: provisioningWebhook, } } - requestConfig = &shared.RequestablePermissionInputUpdateRequestConfig{ + requestConfig = &shared.RequestConfigInputUpdate{ AppstoreVisibility: appstoreVisibility, AllowedGroupsOverride: allowedGroupsOverride, AllowedGroups: allowedGroups, diff --git a/internal/provider/requestablepermissions_data_source.go b/internal/provider/requestablepermissions_data_source.go index 2f635dd..f395904 100644 --- a/internal/provider/requestablepermissions_data_source.go +++ b/internal/provider/requestablepermissions_data_source.go @@ -29,15 +29,16 @@ type RequestablePermissionsDataSource struct { // RequestablePermissionsDataSourceModel describes the data model. type RequestablePermissionsDataSourceModel struct { - AppID types.String `tfsdk:"app_id"` - ExactMatch types.Bool `tfsdk:"exact_match"` - InAppStore types.Bool `tfsdk:"in_app_store"` - Items []tfTypes.RequestablePermissionOutput `tfsdk:"items"` - Page types.Int64 `tfsdk:"page"` - Pages types.Int64 `tfsdk:"pages"` - SearchTerm types.String `tfsdk:"search_term"` - Size types.Int64 `tfsdk:"size"` - Total types.Int64 `tfsdk:"total"` + AppID types.String `tfsdk:"app_id"` + ExactMatch types.Bool `tfsdk:"exact_match"` + InAppStore types.Bool `tfsdk:"in_app_store"` + IncludeInheritedConfigs types.Bool `tfsdk:"include_inherited_configs"` + Items []tfTypes.RequestablePermissionOutput `tfsdk:"items"` + Page types.Int64 `tfsdk:"page"` + Pages types.Int64 `tfsdk:"pages"` + SearchTerm types.String `tfsdk:"search_term"` + Size types.Int64 `tfsdk:"size"` + Total types.Int64 `tfsdk:"total"` } // Metadata returns the data source type name. @@ -61,10 +62,13 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas Description: `Search filter should be an exact match.`, }, "in_app_store": schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `` + "\n" + - ` Filters permissions by visibility in the AppStore.` + "\n" + - ``, + Optional: true, + Description: `Filters permissions by visibility in the AppStore.`, + }, + "include_inherited_configs": schema.BoolAttribute{ + Computed: true, + Optional: true, + Description: `Include inherited configurations from parent app.`, }, "items": schema.ListNestedAttribute{ Computed: true, @@ -80,7 +84,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "app_instance_id": schema.StringAttribute{ Computed: true, - Description: `The ID of the instance associated with this requestable permission.`, + Description: `The ID of the instance associated with this requestable permission. This may be an empty string.`, }, "id": schema.StringAttribute{ Computed: true, @@ -102,7 +106,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -132,7 +136,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -156,7 +160,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "type": schema.StringAttribute{ Computed: true, - Description: `The type of this allowed groups config, can be all groups or specific. must be one of ["ALL_GROUPS", "SPECIFIED_GROUPS"]`, + Description: `The type of this allowed groups config, can be all groups or specific.`, }, }, Description: `The allowed groups config associated with this config.`, @@ -167,7 +171,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "appstore_visibility": schema.StringAttribute{ Computed: true, - Description: `The appstore visibility of this request config. must be one of ["HIDDEN", "VISIBLE"]`, + Description: `The appstore visibility of this request config.`, }, "request_approval_config": schema.SingleNestedAttribute{ Computed: true, @@ -189,7 +193,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -233,7 +237,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -259,7 +263,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -303,7 +307,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, @@ -322,7 +326,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "manager_approval": schema.StringAttribute{ Computed: true, - Description: `Manager approval can be configured as necessary to continue. must be one of ["NONE", "INITIAL_APPROVAL"]`, + Description: `Manager approval can be configured as necessary to continue`, }, "request_approval_config_override": schema.BoolAttribute{ Computed: true, @@ -359,7 +363,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "group_lifecycle": schema.StringAttribute{ Computed: true, - Description: `The lifecycle of this group. must be one of ["SYNCED", "NATIVE"]`, + Description: `The lifecycle of this group.`, }, "id": schema.StringAttribute{ Computed: true, @@ -389,7 +393,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -423,7 +427,7 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "hook_type": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["PRE_APPROVAL", "PROVISION", "DEPROVISION", "REQUEST_VALIDATION", "SIEM"]`, + Description: `The type of this inline webhook.`, }, "id": schema.StringAttribute{ Computed: true, @@ -441,28 +445,28 @@ func (r *RequestablePermissionsDataSource) Schema(ctx context.Context, req datas }, "type": schema.StringAttribute{ Computed: true, - Description: `The type of this requestable permission. must be one of ["SYNCED", "NATIVE"]`, + Description: `The type of this requestable permission.`, }, }, }, }, "page": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page number`, }, "pages": schema.Int64Attribute{ Computed: true, }, "search_term": schema.StringAttribute{ Optional: true, - MarkdownDescription: `` + "\n" + - ` Searches permissions by the permission's group name,` + "\n" + - ` request configuration name, or specific integration ID.` + "\n" + - ``, + MarkdownDescription: `Searches permissions by the permission's group name,` + "\n" + + ` request configuration name, or specific integration ID.`, }, "size": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page size`, }, "total": schema.Int64Attribute{ Computed: true, @@ -533,6 +537,12 @@ func (r *RequestablePermissionsDataSource) Read(ctx context.Context, req datasou } else { inAppStore = nil } + includeInheritedConfigs := new(bool) + if !data.IncludeInheritedConfigs.IsUnknown() && !data.IncludeInheritedConfigs.IsNull() { + *includeInheritedConfigs = data.IncludeInheritedConfigs.ValueBool() + } else { + includeInheritedConfigs = nil + } page := new(int64) if !data.Page.IsUnknown() && !data.Page.IsNull() { *page = data.Page.ValueInt64() @@ -545,15 +555,16 @@ func (r *RequestablePermissionsDataSource) Read(ctx context.Context, req datasou } else { size = nil } - request := operations.GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest{ - AppID: appID, - SearchTerm: searchTerm, - ExactMatch: exactMatch, - InAppStore: inAppStore, - Page: page, - Size: size, + request := operations.GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest{ + AppID: appID, + SearchTerm: searchTerm, + ExactMatch: exactMatch, + InAppStore: inAppStore, + IncludeInheritedConfigs: includeInheritedConfigs, + Page: page, + Size: size, } - res, err := r.client.AppStore.GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet(ctx, request) + res, err := r.client.AppStore.GetAppstorePermissionsAppstoreRequestablePermissionsGet(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { diff --git a/internal/provider/requestablepermissions_data_source_sdk.go b/internal/provider/requestablepermissions_data_source_sdk.go index 9f4d748..ca543f7 100644 --- a/internal/provider/requestablepermissions_data_source_sdk.go +++ b/internal/provider/requestablepermissions_data_source_sdk.go @@ -24,7 +24,7 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.AccessRemovalInlineWebhook == nil { items1.RequestConfig.AccessRemovalInlineWebhook = nil } else { - items1.RequestConfig.AccessRemovalInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + items1.RequestConfig.AccessRemovalInlineWebhook = &tfTypes.BaseInlineWebhook{} items1.RequestConfig.AccessRemovalInlineWebhook.Description = types.StringPointerValue(itemsItem.RequestConfig.AccessRemovalInlineWebhook.Description) items1.RequestConfig.AccessRemovalInlineWebhook.HookType = types.StringValue(string(itemsItem.RequestConfig.AccessRemovalInlineWebhook.HookType)) items1.RequestConfig.AccessRemovalInlineWebhook.ID = types.StringValue(itemsItem.RequestConfig.AccessRemovalInlineWebhook.ID) @@ -33,7 +33,7 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.AllowedGroups == nil { items1.RequestConfig.AllowedGroups = nil } else { - items1.RequestConfig.AllowedGroups = &tfTypes.AddAppToAppStoreInputAllowedGroups{} + items1.RequestConfig.AllowedGroups = &tfTypes.AllowedGroupsConfigInput{} items1.RequestConfig.AllowedGroups.Groups = []tfTypes.Group{} for groupsCount, groupsItem := range itemsItem.RequestConfig.AllowedGroups.Groups { var groups1 tfTypes.Group @@ -75,11 +75,11 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.RequestApprovalConfig == nil { items1.RequestConfig.RequestApprovalConfig = nil } else { - items1.RequestConfig.RequestApprovalConfig = &tfTypes.RequestablePermissionInputRequestApprovalConfig{} + items1.RequestConfig.RequestApprovalConfig = &tfTypes.RequestApprovalConfigOutput{} if itemsItem.RequestConfig.RequestApprovalConfig.Approvers == nil { items1.RequestConfig.RequestApprovalConfig.Approvers = nil } else { - items1.RequestConfig.RequestApprovalConfig.Approvers = &tfTypes.AddAppToAppStoreInputApprovers{} + items1.RequestConfig.RequestApprovalConfig.Approvers = &tfTypes.AppApproversInput{} items1.RequestConfig.RequestApprovalConfig.Approvers.Groups = []tfTypes.Group{} for groupsCount1, groupsItem1 := range itemsItem.RequestConfig.RequestApprovalConfig.Approvers.Groups { var groups3 tfTypes.Group @@ -132,7 +132,7 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.RequestApprovalConfig.ApproversStage2 == nil { items1.RequestConfig.RequestApprovalConfig.ApproversStage2 = nil } else { - items1.RequestConfig.RequestApprovalConfig.ApproversStage2 = &tfTypes.AddAppToAppStoreInputApprovers{} + items1.RequestConfig.RequestApprovalConfig.ApproversStage2 = &tfTypes.AppApproversInput{} items1.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups = []tfTypes.Group{} for groupsCount2, groupsItem2 := range itemsItem.RequestConfig.RequestApprovalConfig.ApproversStage2.Groups { var groups5 tfTypes.Group @@ -195,7 +195,7 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.RequestFulfillmentConfig == nil { items1.RequestConfig.RequestFulfillmentConfig = nil } else { - items1.RequestConfig.RequestFulfillmentConfig = &tfTypes.RequestablePermissionInputRequestFulfillmentConfig{} + items1.RequestConfig.RequestFulfillmentConfig = &tfTypes.RequestFulfillmentConfigInput{} items1.RequestConfig.RequestFulfillmentConfig.ManualInstructions = types.StringPointerValue(itemsItem.RequestConfig.RequestFulfillmentConfig.ManualInstructions) items1.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded = types.BoolPointerValue(itemsItem.RequestConfig.RequestFulfillmentConfig.ManualStepsNeeded) if itemsItem.RequestConfig.RequestFulfillmentConfig.ProvisioningGroup == nil { @@ -217,7 +217,7 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook == nil { items1.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = nil } else { - items1.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + items1.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook = &tfTypes.BaseInlineWebhook{} items1.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.Description = types.StringPointerValue(itemsItem.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.Description) items1.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.HookType = types.StringValue(string(itemsItem.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.HookType)) items1.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID = types.StringValue(itemsItem.RequestConfig.RequestFulfillmentConfig.ProvisioningWebhook.ID) @@ -232,7 +232,7 @@ func (r *RequestablePermissionsDataSourceModel) RefreshFromSharedPageRequestable if itemsItem.RequestConfig.RequestValidationInlineWebhook == nil { items1.RequestConfig.RequestValidationInlineWebhook = nil } else { - items1.RequestConfig.RequestValidationInlineWebhook = &tfTypes.AddAppToAppStoreInputAccessRemovalInlineWebhook{} + items1.RequestConfig.RequestValidationInlineWebhook = &tfTypes.BaseInlineWebhook{} items1.RequestConfig.RequestValidationInlineWebhook.Description = types.StringPointerValue(itemsItem.RequestConfig.RequestValidationInlineWebhook.Description) items1.RequestConfig.RequestValidationInlineWebhook.HookType = types.StringValue(string(itemsItem.RequestConfig.RequestValidationInlineWebhook.HookType)) items1.RequestConfig.RequestValidationInlineWebhook.ID = types.StringValue(itemsItem.RequestConfig.RequestValidationInlineWebhook.ID) diff --git a/internal/provider/types/add_app_to_app_store_input_provisioning.go b/internal/provider/types/add_app_to_app_store_input_provisioning.go deleted file mode 100644 index 531747c..0000000 --- a/internal/provider/types/add_app_to_app_store_input_provisioning.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type AddAppToAppStoreInputProvisioning struct { - AccessRemovalInlineWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"access_removal_inline_webhook"` - AllowMultiplePermissionSelection types.Bool `tfsdk:"allow_multiple_permission_selection"` - CustomProvisioningInstructions types.String `tfsdk:"custom_provisioning_instructions"` - GroupsProvisioning types.String `tfsdk:"groups_provisioning"` - ManualStepsNeeded types.Bool `tfsdk:"manual_steps_needed"` - ProvisioningWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"provisioning_webhook"` - TimeBasedAccess []types.String `tfsdk:"time_based_access"` -} diff --git a/internal/provider/types/add_app_to_app_store_input_request_flow.go b/internal/provider/types/add_app_to_app_store_input_request_flow.go deleted file mode 100644 index 36c0e00..0000000 --- a/internal/provider/types/add_app_to_app_store_input_request_flow.go +++ /dev/null @@ -1,17 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type AddAppToAppStoreInputRequestFlow struct { - Admins *AddAppToAppStoreInputAdmins `tfsdk:"admins"` - AllowedGroups *AddAppToAppStoreInputAllowedGroups `tfsdk:"allowed_groups"` - Approvers *AddAppToAppStoreInputApprovers `tfsdk:"approvers"` - ApproversStage2 *AddAppToAppStoreInputApprovers `tfsdk:"approvers_stage_2"` - CustomApprovalMessage types.String `tfsdk:"custom_approval_message"` - Discoverability types.String `tfsdk:"discoverability"` - RequestValidationInlineWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"request_validation_inline_webhook"` - RequireAdditionalApproval types.Bool `tfsdk:"require_additional_approval"` - RequireManagerApproval types.Bool `tfsdk:"require_manager_approval"` -} diff --git a/internal/provider/types/add_app_to_app_store_input_allowed_groups.go b/internal/provider/types/allowed_groups_config_input.go similarity index 82% rename from internal/provider/types/add_app_to_app_store_input_allowed_groups.go rename to internal/provider/types/allowed_groups_config_input.go index 627b317..2ffb8e0 100644 --- a/internal/provider/types/add_app_to_app_store_input_allowed_groups.go +++ b/internal/provider/types/allowed_groups_config_input.go @@ -4,7 +4,7 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" -type AddAppToAppStoreInputAllowedGroups struct { +type AllowedGroupsConfigInput struct { Groups []Group `tfsdk:"groups"` Type types.String `tfsdk:"type"` } diff --git a/internal/provider/types/add_app_to_app_store_input_admins.go b/internal/provider/types/app_admins_input.go similarity index 78% rename from internal/provider/types/add_app_to_app_store_input_admins.go rename to internal/provider/types/app_admins_input.go index e3646ce..549c618 100644 --- a/internal/provider/types/add_app_to_app_store_input_admins.go +++ b/internal/provider/types/app_admins_input.go @@ -2,7 +2,7 @@ package types -type AddAppToAppStoreInputAdmins struct { +type AppAdminsInput struct { Groups []Group `tfsdk:"groups"` Users []User `tfsdk:"users"` } diff --git a/internal/provider/types/add_app_to_app_store_input_approvers.go b/internal/provider/types/app_approvers_input.go similarity index 77% rename from internal/provider/types/add_app_to_app_store_input_approvers.go rename to internal/provider/types/app_approvers_input.go index d67fabb..07b2fa4 100644 --- a/internal/provider/types/add_app_to_app_store_input_approvers.go +++ b/internal/provider/types/app_approvers_input.go @@ -2,7 +2,7 @@ package types -type AddAppToAppStoreInputApprovers struct { +type AppApproversInput struct { Groups []Group `tfsdk:"groups"` Users []User `tfsdk:"users"` } diff --git a/internal/provider/types/app_store_app_settings_provisioning_input.go b/internal/provider/types/app_store_app_settings_provisioning_input.go new file mode 100644 index 0000000..c1d85b0 --- /dev/null +++ b/internal/provider/types/app_store_app_settings_provisioning_input.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type AppStoreAppSettingsProvisioningInput struct { + AccessRemovalInlineWebhook *BaseInlineWebhook `tfsdk:"access_removal_inline_webhook"` + AllowMultiplePermissionSelection types.Bool `tfsdk:"allow_multiple_permission_selection"` + CustomProvisioningInstructions types.String `tfsdk:"custom_provisioning_instructions"` + GroupsProvisioning types.String `tfsdk:"groups_provisioning"` + ManualStepsNeeded types.Bool `tfsdk:"manual_steps_needed"` + ProvisioningWebhook *BaseInlineWebhook `tfsdk:"provisioning_webhook"` + TimeBasedAccess []types.String `tfsdk:"time_based_access"` +} diff --git a/internal/provider/types/app_store_app_settings_request_flow_input.go b/internal/provider/types/app_store_app_settings_request_flow_input.go new file mode 100644 index 0000000..f94f727 --- /dev/null +++ b/internal/provider/types/app_store_app_settings_request_flow_input.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type AppStoreAppSettingsRequestFlowInput struct { + Admins *AppAdminsInput `tfsdk:"admins"` + AllowedGroups *AllowedGroupsConfigInput `tfsdk:"allowed_groups"` + Approvers *AppApproversInput `tfsdk:"approvers"` + ApproversStage2 *AppApproversInput `tfsdk:"approvers_stage_2"` + CustomApprovalMessage types.String `tfsdk:"custom_approval_message"` + Discoverability types.String `tfsdk:"discoverability"` + RequestValidationInlineWebhook *BaseInlineWebhook `tfsdk:"request_validation_inline_webhook"` + RequireAdditionalApproval types.Bool `tfsdk:"require_additional_approval"` + RequireManagerApproval types.Bool `tfsdk:"require_manager_approval"` +} diff --git a/internal/provider/types/add_app_to_app_store_input_access_removal_inline_webhook.go b/internal/provider/types/base_inline_webhook.go similarity index 83% rename from internal/provider/types/add_app_to_app_store_input_access_removal_inline_webhook.go rename to internal/provider/types/base_inline_webhook.go index c1742d2..f1494f8 100644 --- a/internal/provider/types/add_app_to_app_store_input_access_removal_inline_webhook.go +++ b/internal/provider/types/base_inline_webhook.go @@ -4,7 +4,7 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" -type AddAppToAppStoreInputAccessRemovalInlineWebhook struct { +type BaseInlineWebhook struct { Description types.String `tfsdk:"description"` HookType types.String `tfsdk:"hook_type"` ID types.String `tfsdk:"id"` diff --git a/internal/provider/types/request_approval_config_input.go b/internal/provider/types/request_approval_config_input.go new file mode 100644 index 0000000..6a9440e --- /dev/null +++ b/internal/provider/types/request_approval_config_input.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type RequestApprovalConfigInput struct { + Approvers *AppApproversInput `tfsdk:"approvers"` + ApproversStage2 *AppApproversInput `tfsdk:"approvers_stage_2"` + CustomApprovalMessage types.String `tfsdk:"custom_approval_message"` + CustomApprovalMessageOverride types.Bool `tfsdk:"custom_approval_message_override"` + ManagerApproval types.String `tfsdk:"manager_approval"` + RequestApprovalConfigOverride types.Bool `tfsdk:"request_approval_config_override"` + RequireAdditionalApproval types.Bool `tfsdk:"require_additional_approval"` +} diff --git a/internal/provider/types/request_approval_config_output.go b/internal/provider/types/request_approval_config_output.go new file mode 100644 index 0000000..785e6b2 --- /dev/null +++ b/internal/provider/types/request_approval_config_output.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type RequestApprovalConfigOutput struct { + Approvers *AppApproversInput `tfsdk:"approvers"` + ApproversStage2 *AppApproversInput `tfsdk:"approvers_stage_2"` + CustomApprovalMessage types.String `tfsdk:"custom_approval_message"` + CustomApprovalMessageOverride types.Bool `tfsdk:"custom_approval_message_override"` + ManagerApproval types.String `tfsdk:"manager_approval"` + RequestApprovalConfigOverride types.Bool `tfsdk:"request_approval_config_override"` + RequireAdditionalApproval types.Bool `tfsdk:"require_additional_approval"` +} diff --git a/internal/provider/types/request_config_input_create.go b/internal/provider/types/request_config_input_create.go new file mode 100644 index 0000000..9b6b20a --- /dev/null +++ b/internal/provider/types/request_config_input_create.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type RequestConfigInputCreate struct { + AccessRemovalInlineWebhook *BaseInlineWebhook `tfsdk:"access_removal_inline_webhook"` + AllowedGroups *AllowedGroupsConfigInput `tfsdk:"allowed_groups"` + AllowedGroupsOverride types.Bool `tfsdk:"allowed_groups_override"` + AppstoreVisibility types.String `tfsdk:"appstore_visibility"` + RequestApprovalConfig *RequestApprovalConfigInput `tfsdk:"request_approval_config"` + RequestFulfillmentConfig *RequestFulfillmentConfigInput `tfsdk:"request_fulfillment_config"` + RequestValidationInlineWebhook *BaseInlineWebhook `tfsdk:"request_validation_inline_webhook"` +} diff --git a/internal/provider/types/request_config_output.go b/internal/provider/types/request_config_output.go new file mode 100644 index 0000000..948e1f0 --- /dev/null +++ b/internal/provider/types/request_config_output.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type RequestConfigOutput struct { + AccessRemovalInlineWebhook *BaseInlineWebhook `tfsdk:"access_removal_inline_webhook"` + AllowedGroups *AllowedGroupsConfigInput `tfsdk:"allowed_groups"` + AllowedGroupsOverride types.Bool `tfsdk:"allowed_groups_override"` + AppstoreVisibility types.String `tfsdk:"appstore_visibility"` + RequestApprovalConfig *RequestApprovalConfigOutput `tfsdk:"request_approval_config"` + RequestFulfillmentConfig *RequestFulfillmentConfigInput `tfsdk:"request_fulfillment_config"` + RequestValidationInlineWebhook *BaseInlineWebhook `tfsdk:"request_validation_inline_webhook"` +} diff --git a/internal/provider/types/request_fulfillment_config_input.go b/internal/provider/types/request_fulfillment_config_input.go new file mode 100644 index 0000000..f3a6082 --- /dev/null +++ b/internal/provider/types/request_fulfillment_config_input.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type RequestFulfillmentConfigInput struct { + ManualInstructions types.String `tfsdk:"manual_instructions"` + ManualStepsNeeded types.Bool `tfsdk:"manual_steps_needed"` + ProvisioningGroup *Group `tfsdk:"provisioning_group"` + ProvisioningWebhook *BaseInlineWebhook `tfsdk:"provisioning_webhook"` + TimeBasedAccess []types.String `tfsdk:"time_based_access"` + TimeBasedAccessOverride types.Bool `tfsdk:"time_based_access_override"` +} diff --git a/internal/provider/types/requestable_permission_input_request_approval_config.go b/internal/provider/types/requestable_permission_input_request_approval_config.go deleted file mode 100644 index cc4f945..0000000 --- a/internal/provider/types/requestable_permission_input_request_approval_config.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type RequestablePermissionInputRequestApprovalConfig struct { - Approvers *AddAppToAppStoreInputApprovers `tfsdk:"approvers"` - ApproversStage2 *AddAppToAppStoreInputApprovers `tfsdk:"approvers_stage_2"` - CustomApprovalMessage types.String `tfsdk:"custom_approval_message"` - CustomApprovalMessageOverride types.Bool `tfsdk:"custom_approval_message_override"` - ManagerApproval types.String `tfsdk:"manager_approval"` - RequestApprovalConfigOverride types.Bool `tfsdk:"request_approval_config_override"` - RequireAdditionalApproval types.Bool `tfsdk:"require_additional_approval"` -} diff --git a/internal/provider/types/requestable_permission_input_request_config.go b/internal/provider/types/requestable_permission_input_request_config.go deleted file mode 100644 index 0d4d0c8..0000000 --- a/internal/provider/types/requestable_permission_input_request_config.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type RequestablePermissionInputRequestConfig struct { - AccessRemovalInlineWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"access_removal_inline_webhook"` - AllowedGroups *AddAppToAppStoreInputAllowedGroups `tfsdk:"allowed_groups"` - AllowedGroupsOverride types.Bool `tfsdk:"allowed_groups_override"` - AppstoreVisibility types.String `tfsdk:"appstore_visibility"` - RequestApprovalConfig *RequestablePermissionInputRequestApprovalConfig `tfsdk:"request_approval_config"` - RequestFulfillmentConfig *RequestablePermissionInputRequestFulfillmentConfig `tfsdk:"request_fulfillment_config"` - RequestValidationInlineWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"request_validation_inline_webhook"` -} diff --git a/internal/provider/types/requestable_permission_input_request_fulfillment_config.go b/internal/provider/types/requestable_permission_input_request_fulfillment_config.go deleted file mode 100644 index 3c93efd..0000000 --- a/internal/provider/types/requestable_permission_input_request_fulfillment_config.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type RequestablePermissionInputRequestFulfillmentConfig struct { - ManualInstructions types.String `tfsdk:"manual_instructions"` - ManualStepsNeeded types.Bool `tfsdk:"manual_steps_needed"` - ProvisioningGroup *Group `tfsdk:"provisioning_group"` - ProvisioningWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `tfsdk:"provisioning_webhook"` - TimeBasedAccess []types.String `tfsdk:"time_based_access"` - TimeBasedAccessOverride types.Bool `tfsdk:"time_based_access_override"` -} diff --git a/internal/provider/types/requestable_permission_output.go b/internal/provider/types/requestable_permission_output.go index 2e470be..ceae0f0 100644 --- a/internal/provider/types/requestable_permission_output.go +++ b/internal/provider/types/requestable_permission_output.go @@ -5,11 +5,11 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type RequestablePermissionOutput struct { - AppClassID types.String `tfsdk:"app_class_id"` - AppID types.String `tfsdk:"app_id"` - AppInstanceID types.String `tfsdk:"app_instance_id"` - ID types.String `tfsdk:"id"` - Label types.String `tfsdk:"label"` - RequestConfig RequestablePermissionInputRequestConfig `tfsdk:"request_config"` - Type types.String `tfsdk:"type"` + AppClassID types.String `tfsdk:"app_class_id"` + AppID types.String `tfsdk:"app_id"` + AppInstanceID types.String `tfsdk:"app_instance_id"` + ID types.String `tfsdk:"id"` + Label types.String `tfsdk:"label"` + RequestConfig RequestConfigOutput `tfsdk:"request_config"` + Type types.String `tfsdk:"type"` } diff --git a/internal/provider/user_data_source.go b/internal/provider/user_data_source.go index 2124bd0..51be6b5 100644 --- a/internal/provider/user_data_source.go +++ b/internal/provider/user_data_source.go @@ -65,7 +65,7 @@ func (r *UserDataSource) Schema(ctx context.Context, req datasource.SchemaReques }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, "user_id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/users_data_source.go b/internal/provider/users_data_source.go index 68aef3d..2250807 100644 --- a/internal/provider/users_data_source.go +++ b/internal/provider/users_data_source.go @@ -76,14 +76,15 @@ func (r *UsersDataSource) Schema(ctx context.Context, req datasource.SchemaReque }, "status": schema.StringAttribute{ Computed: true, - Description: `An enumeration. must be one of ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"]`, + Description: `The status of this user.`, }, }, }, }, "page": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page number`, }, "pages": schema.Int64Attribute{ Computed: true, @@ -93,8 +94,9 @@ func (r *UsersDataSource) Schema(ctx context.Context, req datasource.SchemaReque Description: `Search for users by name or email.`, }, "size": schema.Int64Attribute{ - Computed: true, - Optional: true, + Computed: true, + Optional: true, + Description: `Page size`, }, "total": schema.Int64Attribute{ Computed: true, diff --git a/internal/sdk/appstore.go b/internal/sdk/appstore.go index 105e5e6..d54c21c 100644 --- a/internal/sdk/appstore.go +++ b/internal/sdk/appstore.go @@ -28,12 +28,12 @@ func newAppStore(sdkConfig sdkConfiguration) *AppStore { } } -// GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet - Get Appstore Permissions For App +// GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGet - Get Appstore Permissions For App // Get AppStore permissions for an application. -func (s *AppStore) GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet(ctx context.Context, request operations.GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest, opts ...operations.Option) (*operations.GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse, error) { +func (s *AppStore) GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGet(ctx context.Context, request operations.GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest, opts ...operations.Option) (*operations.GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "get_appstore_permissions_for_app_appstore_requestable_permissions_get", + OperationID: "get_appstore_permissions_for_app_appstore_apps__app_id__requestable_permissions_get", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -51,7 +51,7 @@ func (s *AppStore) GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/appstore/requestable_permissions") + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/apps/{app_id}/requestable_permissions", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -173,23 +173,31 @@ func (s *AppStore) GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet } } - res := &operations.GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse{ + res := &operations.GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageRequestablePermissionOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -197,11 +205,21 @@ func (s *AppStore) GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet res.PageRequestablePermissionOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -209,9 +227,19 @@ func (s *AppStore) GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -219,30 +247,12 @@ func (s *AppStore) GetAppstorePermissionsForAppAppstoreRequestablePermissionsGet } -// CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPost - Create Appstore Requestable Permission -// **Create a permission attached to an App in the AppStore.** -// -// *Required fields:* -// - app-identifier. The App should be identified either by app_id or app_class_id + app_instance_id. -// - label -// -// *Defaults:* -// - request_config: -// - appstore_visibility: HIDDEN -// - allowed_groups: -// - type: ALL_GROUPS -// - groups: [] -// - request_approval_config -// - manager_approval: NONE -// - request_approval_stages: [] -// - request_fulfillment_config -// - manual_steps_needed: false -// -// - All other fields will have null values by default. -func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPost(ctx context.Context, request shared.RequestablePermissionInput, opts ...operations.Option) (*operations.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostResponse, error) { +// GetAppstorePermissionsAppstoreRequestablePermissionsGet - Get Appstore Permissions +// Get AppStore permissions for an application. +func (s *AppStore) GetAppstorePermissionsAppstoreRequestablePermissionsGet(ctx context.Context, request operations.GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest, opts ...operations.Option) (*operations.GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "create_appstore_requestable_permission_appstore_requestable_permissions_post", + OperationID: "get_appstore_permissions_appstore_requestable_permissions_get", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -265,11 +275,6 @@ func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermiss return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -281,13 +286,16 @@ func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermiss defer cancel() } - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -384,35 +392,53 @@ func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermiss } } - res := &operations.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostResponse{ + res := &operations.GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 201: + case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.RequestablePermissionOutput + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.PageRequestablePermissionOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.RequestablePermissionOutput = &out + res.PageRequestablePermissionOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -420,9 +446,19 @@ func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermiss res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -430,12 +466,30 @@ func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermiss } -// GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGet - Get Appstore Permission -// Get an AppStore permission. -func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGet(ctx context.Context, request operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest, opts ...operations.Option) (*operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetResponse, error) { +// CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPost - Create Appstore Requestable Permission +// **Create a permission attached to an App in the AppStore.** +// +// *Required fields:* +// - app-identifier. The App should be identified either by app_id or app_class_id + app_instance_id. +// - label +// +// *Defaults:* +// - request_config: +// - appstore_visibility: HIDDEN +// - allowed_groups: +// - type: ALL_GROUPS +// - groups: [] +// - request_approval_config +// - manager_approval: NONE +// - request_approval_stages: [] +// - request_fulfillment_config +// - manual_steps_needed: false +// +// - All other fields will have null values by default. +func (s *AppStore) CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPost(ctx context.Context, request operations.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest, opts ...operations.Option) (*operations.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "get_appstore_permission_appstore_requestable_permissions__permission_id__get", + OperationID: "create_appstore_requestable_permission_appstore_requestable_permissions_post", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -453,11 +507,16 @@ func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermission } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/requestable_permissions/{permission_id}", request, nil) + opURL, err := url.JoinPath(baseURL, "/appstore/requestable_permissions") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "RequestablePermissionInput", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -469,12 +528,17 @@ func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermission defer cancel() } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -571,23 +635,31 @@ func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermission } } - res := &operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetResponse{ + res := &operations.CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: + case httpRes.StatusCode == 201: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.RequestablePermissionOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -595,11 +667,21 @@ func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermission res.RequestablePermissionOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -607,9 +689,19 @@ func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermission res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -617,14 +709,12 @@ func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermission } -// DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDelete - Delete Appstore Permission -// Delete a requestable permission by ID. -// -// Only permissions of type 'NATIVE' can be deleted. -func (s *AppStore) DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDelete(ctx context.Context, request operations.DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDeleteRequest, opts ...operations.Option) (*operations.DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDeleteResponse, error) { +// GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGet - Get Appstore Permission +// Get an AppStore permission. +func (s *AppStore) GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGet(ctx context.Context, request operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest, opts ...operations.Option) (*operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "delete_appstore_permission_appstore_requestable_permissions__permission_id__delete", + OperationID: "get_appstore_permission_appstore_requestable_permissions__permission_id__get", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -658,13 +748,17 @@ func (s *AppStore) DeleteAppstorePermissionAppstoreRequestablePermissionsPermiss defer cancel() } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err } @@ -760,24 +854,55 @@ func (s *AppStore) DeleteAppstorePermissionAppstoreRequestablePermissionsPermiss } } - res := &operations.DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDeleteResponse{ + res := &operations.GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 204: + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.RequestablePermissionOutput + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.RequestablePermissionOutput = &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 404: + fallthrough case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -785,9 +910,19 @@ func (s *AppStore) DeleteAppstorePermissionAppstoreRequestablePermissionsPermiss res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -853,6 +988,10 @@ func (s *AppStore) UpdateAppstorePermissionAppstoreRequestablePermissionsPermiss req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err } @@ -954,17 +1093,25 @@ func (s *AppStore) UpdateAppstorePermissionAppstoreRequestablePermissionsPermiss RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.RequestablePermissionOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -972,11 +1119,21 @@ func (s *AppStore) UpdateAppstorePermissionAppstoreRequestablePermissionsPermiss res.RequestablePermissionOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -984,9 +1141,19 @@ func (s *AppStore) UpdateAppstorePermissionAppstoreRequestablePermissionsPermiss res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -994,12 +1161,14 @@ func (s *AppStore) UpdateAppstorePermissionAppstoreRequestablePermissionsPermiss } -// GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet - Get Appstore Pre Approval Rules For App -// Get AppStore pre-approval rules for an app. -func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet(ctx context.Context, request operations.GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetRequest, opts ...operations.Option) (*operations.GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetResponse, error) { +// DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDelete - Delete Appstore Permission +// Delete a requestable permission by ID. +// +// Only permissions of type 'NATIVE' can be deleted. +func (s *AppStore) DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDelete(ctx context.Context, request operations.DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDeleteRequest, opts ...operations.Option) (*operations.DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDeleteResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get", + OperationID: "delete_appstore_permission_appstore_requestable_permissions__permission_id__delete", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1017,7 +1186,7 @@ func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet( } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/appstore/pre_approval_rules") + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/requestable_permissions/{permission_id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -1033,17 +1202,13 @@ func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet( defer cancel() } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { - return nil, fmt.Errorf("error populating query params: %w", err) - } - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err } @@ -1139,35 +1304,472 @@ func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet( } } - res := &operations.GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetResponse{ + res := &operations.DeleteAppstorePermissionAppstoreRequestablePermissionsPermissionIDDeleteResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil + } + + switch { + case httpRes.StatusCode == 204: + case httpRes.StatusCode == 422: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.HTTPValidationError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HTTPValidationError = &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet - Get Appstore Pre Approval Rules For App +// Get AppStore pre-approval rules for an app. +func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet(ctx context.Context, request operations.GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetRequest, opts ...operations.Option) (*operations.GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/appstore/pre_approval_rules") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 30000, + Exponent: 1.5, + MaxElapsedTime: 60000, + }, + RetryConnectionErrors: true, + } + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "5XX", + }, + }, func() (*http.Response, error) { + if req.Body != nil { + copyBody, err := req.GetBody() + if err != nil { + return nil, err + } + req.Body = copyBody + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, backoff.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil + } switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.PagePreApprovalRuleOutput + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.PagePreApprovalRuleOutput + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PagePreApprovalRuleOutput = &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 422: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.HTTPValidationError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HTTPValidationError = &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreatePreApprovalRuleAppstorePreApprovalRulesPost - Create Pre Approval Rule +// Create a pre-approval rule attached to an App in the AppStore. +func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context.Context, request shared.PreApprovalRuleInput, opts ...operations.Option) (*operations.CreatePreApprovalRuleAppstorePreApprovalRulesPostResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "create_pre_approval_rule_appstore_pre_approval_rules_post", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/appstore/pre_approval_rules") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 30000, + Exponent: 1.5, + MaxElapsedTime: 60000, + }, + RetryConnectionErrors: true, + } + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "5XX", + }, + }, func() (*http.Response, error) { + if req.Body != nil { + copyBody, err := req.GetBody() + if err != nil { + return nil, err + } + req.Body = copyBody + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, backoff.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.CreatePreApprovalRuleAppstorePreApprovalRulesPostResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil + } + + switch { + case httpRes.StatusCode == 201: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.PreApprovalRuleOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.PagePreApprovalRuleOutput = &out + res.PreApprovalRuleOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1175,9 +1777,19 @@ func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet( res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1185,12 +1797,12 @@ func (s *AppStore) GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGet( } -// CreatePreApprovalRuleAppstorePreApprovalRulesPost - Create Pre Approval Rule -// Create a pre-approval rule attached to an App in the AppStore. -func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context.Context, request shared.PreApprovalRuleInput, opts ...operations.Option) (*operations.CreatePreApprovalRuleAppstorePreApprovalRulesPostResponse, error) { +// GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGet - Get Appstore Pre Approval Rule +// Get an AppStore pre-approval rule. +func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGet(ctx context.Context, request operations.GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGetRequest, opts ...operations.Option) (*operations.GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "create_pre_approval_rule_appstore_pre_approval_rules_post", + OperationID: "get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1208,16 +1820,11 @@ func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/appstore/pre_approval_rules") + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/pre_approval_rules/{pre_approval_rule_id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -1229,13 +1836,12 @@ func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context defer cancel() } - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1332,23 +1938,31 @@ func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context } } - res := &operations.CreatePreApprovalRuleAppstorePreApprovalRulesPostResponse{ + res := &operations.GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGetResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 201: + case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PreApprovalRuleOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1356,11 +1970,21 @@ func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context res.PreApprovalRuleOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1368,9 +1992,19 @@ func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1378,12 +2012,15 @@ func (s *AppStore) CreatePreApprovalRuleAppstorePreApprovalRulesPost(ctx context } -// GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGet - Get Appstore Pre Approval Rule -// Get an AppStore pre-approval rule. -func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGet(ctx context.Context, request operations.GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGetRequest, opts ...operations.Option) (*operations.GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGetResponse, error) { +// UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatch - Update Pre Approval Rule +// **Update a pre-approval rule attached to an App in the AppStore.** +// +// All fields present in the payload will override the pre-approval rule's data. +// Any missing fields will be disregarded. +func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatch(ctx context.Context, request operations.UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatchRequest, opts ...operations.Option) (*operations.UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatchResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get", + OperationID: "update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1406,6 +2043,11 @@ func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApproval return nil, fmt.Errorf("error generating URL: %w", err) } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "PreApprovalRuleUpdateInput", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -1417,12 +2059,13 @@ func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApproval defer cancel() } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1519,23 +2162,31 @@ func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApproval } } - res := &operations.GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDGetResponse{ + res := &operations.UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatchResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PreApprovalRuleOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1543,11 +2194,21 @@ func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApproval res.PreApprovalRuleOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1555,9 +2216,19 @@ func (s *AppStore) GetAppstorePreApprovalRuleAppstorePreApprovalRulesPreApproval res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1712,18 +2383,26 @@ func (s *AppStore) DeletePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1731,9 +2410,19 @@ func (s *AppStore) DeletePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1741,15 +2430,12 @@ func (s *AppStore) DeletePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI } -// UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatch - Update Pre Approval Rule -// **Update a pre-approval rule attached to an App in the AppStore.** -// -// All fields present in the payload will override the pre-approval rule's data. -// Any missing fields will be disregarded. -func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatch(ctx context.Context, request operations.UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatchRequest, opts ...operations.Option) (*operations.UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatchResponse, error) { +// GetAppStoreAppSettings - Get Appstore App Settings +// Get AppStore app settings. +func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operations.GetAppStoreAppSettingsRequest, opts ...operations.Option) (*operations.GetAppStoreAppSettingsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch", + OperationID: "getAppStoreAppSettings", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1767,16 +2453,11 @@ func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/pre_approval_rules/{pre_approval_rule_id}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/apps/{app_id}/settings", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "PreApprovalRuleUpdateInput", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -1788,13 +2469,12 @@ func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI defer cancel() } - req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1891,35 +2571,53 @@ func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI } } - res := &operations.UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleIDPatchResponse{ + res := &operations.GetAppStoreAppSettingsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.PreApprovalRuleOutput + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.AppStoreAppSettingsOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.PreApprovalRuleOutput = &out + res.AppStoreAppSettingsOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1927,9 +2625,19 @@ func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1937,12 +2645,12 @@ func (s *AppStore) UpdatePreApprovalRuleAppstorePreApprovalRulesPreApprovalRuleI } -// GetAppStoreAppSettings - Get Appstore App Settings -// Get AppStore app settings. -func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operations.GetAppStoreAppSettingsRequest, opts ...operations.Option) (*operations.GetAppStoreAppSettingsResponse, error) { +// UpdateAppStoreAppSettings - Update Appstore App Settings +// Update AppStore app settings. +func (s *AppStore) UpdateAppStoreAppSettings(ctx context.Context, request operations.UpdateAppStoreAppSettingsRequest, opts ...operations.Option) (*operations.UpdateAppStoreAppSettingsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getAppStoreAppSettings", + OperationID: "updateAppStoreAppSettings", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1965,6 +2673,11 @@ func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operation return nil, fmt.Errorf("error generating URL: %w", err) } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "AppStoreAppSettingsInput", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -1976,12 +2689,13 @@ func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operation defer cancel() } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -2078,23 +2792,31 @@ func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operation } } - res := &operations.GetAppStoreAppSettingsResponse{ + res := &operations.UpdateAppStoreAppSettingsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.AppStoreAppSettingsOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2102,11 +2824,21 @@ func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operation res.AppStoreAppSettingsOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2114,9 +2846,19 @@ func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operation res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2124,12 +2866,12 @@ func (s *AppStore) GetAppStoreAppSettings(ctx context.Context, request operation } -// UpdateAppStoreAppSettings - Update Appstore App Settings -// Update AppStore app settings. -func (s *AppStore) UpdateAppStoreAppSettings(ctx context.Context, request operations.UpdateAppStoreAppSettingsRequest, opts ...operations.Option) (*operations.UpdateAppStoreAppSettingsResponse, error) { +// AddAppToAppStore - Add App To Appstore +// Add app to AppStore with given settings. +func (s *AppStore) AddAppToAppStore(ctx context.Context, request shared.AddAppToAppStoreInput, opts ...operations.Option) (*operations.AddAppToAppStoreResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "updateAppStoreAppSettings", + OperationID: "addAppToAppStore", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -2147,12 +2889,12 @@ func (s *AppStore) UpdateAppStoreAppSettings(ctx context.Context, request operat } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/apps/{app_id}/settings", request, nil) + opURL, err := url.JoinPath(baseURL, "/appstore/apps") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "AppStoreAppSettingsInput", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } @@ -2168,7 +2910,7 @@ func (s *AppStore) UpdateAppStoreAppSettings(ctx context.Context, request operat defer cancel() } - req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } @@ -2271,23 +3013,31 @@ func (s *AppStore) UpdateAppStoreAppSettings(ctx context.Context, request operat } } - res := &operations.UpdateAppStoreAppSettingsResponse{ + res := &operations.AddAppToAppStoreResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.AppStoreAppSettingsOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2295,21 +3045,41 @@ func (s *AppStore) UpdateAppStoreAppSettings(ctx context.Context, request operat res.AppStoreAppSettingsOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.HTTPValidationError = &out - default: + res.HTTPValidationError = &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2468,17 +3238,25 @@ func (s *AppStore) GetAppStoreApps(ctx context.Context, request operations.GetAp RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageAppStoreApp if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2486,11 +3264,21 @@ func (s *AppStore) GetAppStoreApps(ctx context.Context, request operations.GetAp res.PageAppStoreApp = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2498,9 +3286,19 @@ func (s *AppStore) GetAppStoreApps(ctx context.Context, request operations.GetAp res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2508,12 +3306,12 @@ func (s *AppStore) GetAppStoreApps(ctx context.Context, request operations.GetAp } -// AddAppToAppStore - Add App To Appstore -// Add app to AppStore with given settings. -func (s *AppStore) AddAppToAppStore(ctx context.Context, request shared.AddAppToAppStoreInput, opts ...operations.Option) (*operations.AddAppToAppStoreResponse, error) { +// RemoveAppFromAppStore - Remove App From Appstore +// Remove app from AppStore. +func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations.RemoveAppFromAppStoreRequest, opts ...operations.Option) (*operations.RemoveAppFromAppStoreResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "addAppToAppStore", + OperationID: "removeAppFromAppStore", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -2531,16 +3329,11 @@ func (s *AppStore) AddAppToAppStore(ctx context.Context, request shared.AddAppTo } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/appstore/apps") + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/apps/{app_id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -2552,13 +3345,12 @@ func (s *AppStore) AddAppToAppStore(ctx context.Context, request shared.AddAppTo defer cancel() } - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -2655,35 +3447,53 @@ func (s *AppStore) AddAppToAppStore(ctx context.Context, request shared.AddAppTo } } - res := &operations.AddAppToAppStoreResponse{ + res := &operations.RemoveAppFromAppStoreResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.AppStoreAppSettingsOutput + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out any if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AppStoreAppSettingsOutput = &out + res.Any = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2691,9 +3501,19 @@ func (s *AppStore) AddAppToAppStore(ctx context.Context, request shared.AddAppTo res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2848,17 +3668,25 @@ func (s *AppStore) GetAppStoreApp(ctx context.Context, request operations.GetApp RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.AppStoreApp if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2866,11 +3694,21 @@ func (s *AppStore) GetAppStoreApp(ctx context.Context, request operations.GetApp res.AppStoreApp = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2878,9 +3716,19 @@ func (s *AppStore) GetAppStoreApp(ctx context.Context, request operations.GetApp res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2888,12 +3736,12 @@ func (s *AppStore) GetAppStoreApp(ctx context.Context, request operations.GetApp } -// RemoveAppFromAppStore - Remove App From Appstore -// Remove app from AppStore. -func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations.RemoveAppFromAppStoreRequest, opts ...operations.Option) (*operations.RemoveAppFromAppStoreResponse, error) { +// GetAccessRequest - Get Access Request +// Get access request by ID. +func (s *AppStore) GetAccessRequest(ctx context.Context, request operations.GetAccessRequestRequest, opts ...operations.Option) (*operations.GetAccessRequestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "removeAppFromAppStore", + OperationID: "getAccessRequest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -2911,7 +3759,7 @@ func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/apps/{app_id}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/access_requests/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -2927,7 +3775,7 @@ func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations defer cancel() } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } @@ -3029,35 +3877,53 @@ func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations } } - res := &operations.RemoveAppFromAppStoreResponse{ + res := &operations.GetAccessRequestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out any + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out shared.AccessRequest if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Any = out + res.AccessRequest = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3065,9 +3931,19 @@ func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3075,12 +3951,12 @@ func (s *AppStore) RemoveAppFromAppStore(ctx context.Context, request operations } -// CreateAccessRequest - Create Access Request -// Create a request to access a specific permission in the appstore. -func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.CreateAccessRequestInput, opts ...operations.Option) (*operations.CreateAccessRequestResponse, error) { +// CancelAccessRequest - Cancel Access Request +// Cancel an access request. +func (s *AppStore) CancelAccessRequest(ctx context.Context, request operations.CancelAccessRequestRequest, opts ...operations.Option) (*operations.CancelAccessRequestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createAccessRequest", + OperationID: "cancelAccessRequest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -3098,16 +3974,11 @@ func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.Creat } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/appstore/access_request") + opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/access_requests/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -3119,13 +3990,16 @@ func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.Creat defer cancel() } - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -3222,35 +4096,32 @@ func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.Creat } } - res := &operations.CreateAccessRequestResponse{ + res := &operations.CancelAccessRequestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 201: + case httpRes.StatusCode == 204: + case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out []shared.AccessRequest - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + rawBody, err := getRawBody() + if err != nil { return nil, err } - res.ResponseCreateaccessrequest = out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 422: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3258,9 +4129,19 @@ func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.Creat res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3268,12 +4149,12 @@ func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.Creat } -// GetAccessRequest - Get Access Request -// Get access request by ID. -func (s *AppStore) GetAccessRequest(ctx context.Context, request operations.GetAccessRequestRequest, opts ...operations.Option) (*operations.GetAccessRequestResponse, error) { +// CreateAccessRequest - Create Access Request +// Create a request to access a specific permission in the appstore. +func (s *AppStore) CreateAccessRequest(ctx context.Context, request shared.CreateAccessRequestInput, opts ...operations.Option) (*operations.CreateAccessRequestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getAccessRequest", + OperationID: "createAccessRequest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -3291,11 +4172,16 @@ func (s *AppStore) GetAccessRequest(ctx context.Context, request operations.GetA } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/appstore/access_requests/{access_request_id}", request, nil) + opURL, err := url.JoinPath(baseURL, "/appstore/access_request") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + timeout := o.Timeout if timeout == nil { timeout = s.sdkConfiguration.Timeout @@ -3307,16 +4193,13 @@ func (s *AppStore) GetAccessRequest(ctx context.Context, request operations.GetA defer cancel() } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { - return nil, fmt.Errorf("error populating query params: %w", err) - } + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -3413,35 +4296,53 @@ func (s *AppStore) GetAccessRequest(ctx context.Context, request operations.GetA } } - res := &operations.GetAccessRequestResponse{ + res := &operations.CreateAccessRequestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: + case httpRes.StatusCode == 201: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.AccessRequest + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out []shared.AccessRequest if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AccessRequest = &out + res.ResponseCreateaccessrequest = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3449,9 +4350,19 @@ func (s *AppStore) GetAccessRequest(ctx context.Context, request operations.GetA res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3610,17 +4521,25 @@ func (s *AppStore) GetAccessRequests(ctx context.Context, request operations.Get RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageAccessRequest if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3628,11 +4547,21 @@ func (s *AppStore) GetAccessRequests(ctx context.Context, request operations.Get res.PageAccessRequest = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3640,9 +4569,19 @@ func (s *AppStore) GetAccessRequests(ctx context.Context, request operations.Get res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } diff --git a/internal/sdk/core.go b/internal/sdk/core.go index 9a94620..b149bde 100644 --- a/internal/sdk/core.go +++ b/internal/sdk/core.go @@ -179,17 +179,25 @@ func (s *Core) ListApps(ctx context.Context, request operations.ListAppsRequest, RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageApp if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -197,11 +205,21 @@ func (s *Core) ListApps(ctx context.Context, request operations.ListAppsRequest, res.PageApp = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -209,9 +227,19 @@ func (s *Core) ListApps(ctx context.Context, request operations.ListAppsRequest, res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -372,17 +400,25 @@ func (s *Core) CreateApp(ctx context.Context, request shared.AppInputCreate, opt RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.App if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -390,11 +426,21 @@ func (s *Core) CreateApp(ctx context.Context, request shared.AppInputCreate, opt res.App = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -402,9 +448,19 @@ func (s *Core) CreateApp(ctx context.Context, request shared.AppInputCreate, opt res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -559,17 +615,25 @@ func (s *Core) GetAppCategories(ctx context.Context, opts ...operations.Option) RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out []string if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -577,9 +641,19 @@ func (s *Core) GetAppCategories(ctx context.Context, opts ...operations.Option) res.ResponseGetappcategories = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -734,17 +808,25 @@ func (s *Core) GetApp(ctx context.Context, request operations.GetAppRequest, opt RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.App if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -752,11 +834,21 @@ func (s *Core) GetApp(ctx context.Context, request operations.GetAppRequest, opt res.App = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -764,9 +856,19 @@ func (s *Core) GetApp(ctx context.Context, request operations.GetAppRequest, opt res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -927,17 +1029,25 @@ func (s *Core) UpdateApp(ctx context.Context, request operations.UpdateAppReques RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.App if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -945,11 +1055,21 @@ func (s *Core) UpdateApp(ctx context.Context, request operations.UpdateAppReques res.App = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -957,9 +1077,19 @@ func (s *Core) UpdateApp(ctx context.Context, request operations.UpdateAppReques res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1114,17 +1244,25 @@ func (s *Core) GetAppSettings(ctx context.Context, request operations.GetAppSett RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.AppSettingOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1132,11 +1270,21 @@ func (s *Core) GetAppSettings(ctx context.Context, request operations.GetAppSett res.AppSettingOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1144,9 +1292,19 @@ func (s *Core) GetAppSettings(ctx context.Context, request operations.GetAppSett res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1307,17 +1465,25 @@ func (s *Core) UpdateAppSettings(ctx context.Context, request operations.UpdateA RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.AppSettingOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1325,11 +1491,21 @@ func (s *Core) UpdateAppSettings(ctx context.Context, request operations.UpdateA res.AppSettingOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1337,9 +1513,19 @@ func (s *Core) UpdateAppSettings(ctx context.Context, request operations.UpdateA res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1494,17 +1680,25 @@ func (s *Core) CurrentUser(ctx context.Context, opts ...operations.Option) (*ope RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.User if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1512,9 +1706,19 @@ func (s *Core) CurrentUser(ctx context.Context, opts ...operations.Option) (*ope res.User = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1673,17 +1877,25 @@ func (s *Core) ListUsers(ctx context.Context, request operations.ListUsersReques RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageUser if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1691,11 +1903,21 @@ func (s *Core) ListUsers(ctx context.Context, request operations.ListUsersReques res.PageUser = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1703,9 +1925,19 @@ func (s *Core) ListUsers(ctx context.Context, request operations.ListUsersReques res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -1860,17 +2092,25 @@ func (s *Core) GetUser(ctx context.Context, request operations.GetUserRequest, o RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.User if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1878,11 +2118,21 @@ func (s *Core) GetUser(ctx context.Context, request operations.GetUserRequest, o res.User = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1890,9 +2140,19 @@ func (s *Core) GetUser(ctx context.Context, request operations.GetUserRequest, o res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2047,17 +2307,25 @@ func (s *Core) GetInlineWebhooksInlineWebhooksGet(ctx context.Context, opts ...o RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out []shared.InlineWebhook if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2065,9 +2333,19 @@ func (s *Core) GetInlineWebhooksInlineWebhooksGet(ctx context.Context, opts ...o res.ResponseGetInlineWebhooksInlineWebhooksGet = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2226,17 +2504,25 @@ func (s *Core) GetAccounts(ctx context.Context, request operations.GetAccountsRe RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageAccount if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2244,11 +2530,21 @@ func (s *Core) GetAccounts(ctx context.Context, request operations.GetAccountsRe res.PageAccount = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2256,9 +2552,19 @@ func (s *Core) GetAccounts(ctx context.Context, request operations.GetAccountsRe res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2417,17 +2723,25 @@ func (s *Core) GetGroupMembership(ctx context.Context, request operations.GetGro RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageUser if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2435,11 +2749,21 @@ func (s *Core) GetGroupMembership(ctx context.Context, request operations.GetGro res.PageUser = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2447,9 +2771,19 @@ func (s *Core) GetGroupMembership(ctx context.Context, request operations.GetGro res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2604,17 +2938,25 @@ func (s *Core) GetGroup(ctx context.Context, request operations.GetGroupRequest, RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.Group if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2622,11 +2964,21 @@ func (s *Core) GetGroup(ctx context.Context, request operations.GetGroupRequest, res.Group = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2634,9 +2986,19 @@ func (s *Core) GetGroup(ctx context.Context, request operations.GetGroupRequest, res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2795,17 +3157,25 @@ func (s *Core) GetGroups(ctx context.Context, request operations.GetGroupsReques RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageGroup if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2813,11 +3183,21 @@ func (s *Core) GetGroups(ctx context.Context, request operations.GetGroupsReques res.PageGroup = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -2825,9 +3205,19 @@ func (s *Core) GetGroups(ctx context.Context, request operations.GetGroupsReques res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -2982,17 +3372,25 @@ func (s *Core) GetUploadJobState(ctx context.Context, request operations.GetUplo RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.JobStateOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3000,11 +3398,21 @@ func (s *Core) GetUploadJobState(ctx context.Context, request operations.GetUplo res.JobStateOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3012,9 +3420,19 @@ func (s *Core) GetUploadJobState(ctx context.Context, request operations.GetUplo res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3173,17 +3591,25 @@ func (s *Core) GetActivityLogs(ctx context.Context, request operations.GetActivi RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.LimitOffsetPageActivityLog if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3191,11 +3617,21 @@ func (s *Core) GetActivityLogs(ctx context.Context, request operations.GetActivi res.LimitOffsetPageActivityLog = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3203,9 +3639,19 @@ func (s *Core) GetActivityLogs(ctx context.Context, request operations.GetActivi res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3366,17 +3812,25 @@ func (s *Core) PostAccounts(ctx context.Context, request shared.AccountsUploadIn RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.JobStateOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3384,11 +3838,21 @@ func (s *Core) PostAccounts(ctx context.Context, request shared.AccountsUploadIn res.JobStateOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3396,9 +3860,19 @@ func (s *Core) PostAccounts(ctx context.Context, request shared.AccountsUploadIn res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3559,17 +4033,25 @@ func (s *Core) ActivityRecords(ctx context.Context, request shared.ActivityRecor RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.ActivityRecordOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3577,11 +4059,21 @@ func (s *Core) ActivityRecords(ctx context.Context, request shared.ActivityRecor res.ActivityRecordOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3589,9 +4081,19 @@ func (s *Core) ActivityRecords(ctx context.Context, request shared.ActivityRecor res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -3746,17 +4248,25 @@ func (s *Core) GetActivityRecordsJobState(ctx context.Context, request operation RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.SyncTaskOutput if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3764,11 +4274,21 @@ func (s *Core) GetActivityRecordsJobState(ctx context.Context, request operation res.SyncTaskOutput = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -3776,9 +4296,19 @@ func (s *Core) GetActivityRecordsJobState(ctx context.Context, request operation res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } diff --git a/internal/sdk/integrationwebhooks.go b/internal/sdk/integrationwebhooks.go index f4335fc..0555a25 100644 --- a/internal/sdk/integrationwebhooks.go +++ b/internal/sdk/integrationwebhooks.go @@ -180,17 +180,25 @@ func (s *IntegrationWebhooks) ProcessAirbaseMilestoneEvent(ctx context.Context, RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out any if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -198,11 +206,21 @@ func (s *IntegrationWebhooks) ProcessAirbaseMilestoneEvent(ctx context.Context, res.Any = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -210,9 +228,19 @@ func (s *IntegrationWebhooks) ProcessAirbaseMilestoneEvent(ctx context.Context, res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } diff --git a/internal/sdk/internal/utils/json.go b/internal/sdk/internal/utils/json.go index 30ce581..8719468 100644 --- a/internal/sdk/internal/utils/json.go +++ b/internal/sdk/internal/utils/json.go @@ -165,11 +165,17 @@ func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool if field.Tag.Get("const") != "" { if r, ok := unmarhsaled[fieldName]; ok { val := string(r) + if strings.HasPrefix(val, `"`) && strings.HasSuffix(val, `"`) { - val = val[1 : len(val)-1] + var err error + val, err = strconv.Unquote(val) + if err != nil { + return fmt.Errorf("failed to unquote const field `%s` value `%s`: %w", fieldName, val, err) + } } - if val != field.Tag.Get("const") { - return fmt.Errorf("const field %s does not match expected value %s", fieldName, field.Tag.Get("const")) + constValue := field.Tag.Get("const") + if val != constValue { + return fmt.Errorf("const field `%s` does not match expected value `%s` got `%s`", fieldName, constValue, val) } delete(unmarhsaled, fieldName) @@ -481,30 +487,29 @@ func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTa v.Set(m) return nil case reflect.Slice, reflect.Array: - if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) { - if v.CanAddr() { - return json.Unmarshal(value, v.Addr().Interface()) - } else { - return json.Unmarshal(value, v.Interface()) - } - } - - var unmarhsaled []json.RawMessage + var unmarshaled []json.RawMessage - if err := json.Unmarshal(value, &unmarhsaled); err != nil { + if err := json.Unmarshal(value, &unmarshaled); err != nil { return err } - arrVal := v + arrVal := reflect.MakeSlice(typ, len(unmarshaled), len(unmarshaled)) - for _, value := range unmarhsaled { + for index, value := range unmarshaled { itemVal := reflect.New(typ.Elem()) if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { return err } - arrVal = reflect.Append(arrVal, itemVal.Elem()) + arrVal.Index(index).Set(itemVal.Elem()) + } + + if v.Kind() == reflect.Pointer { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() } v.Set(arrVal) diff --git a/internal/sdk/internal/utils/requestbody.go b/internal/sdk/internal/utils/requestbody.go index 0fd33cf..000226e 100644 --- a/internal/sdk/internal/utils/requestbody.go +++ b/internal/sdk/internal/utils/requestbody.go @@ -66,15 +66,16 @@ func serializeRequestBody(request interface{}, nullable, optional bool, requestF if tag != nil { // request object (non-flattened) requestVal := requestValType.FieldByName(requestFieldName) + val := reflect.ValueOf(requestVal.Interface()) if isNil(requestField.Type, requestVal) { if !nullable && optional { return nil, "", nil } - return serializeContentType(requestFieldName, tag.MediaType, requestVal, string(requestField.Tag)) + return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag)) } - return serializeContentType(requestFieldName, tag.MediaType, requestVal, string(requestField.Tag)) + return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag)) } } @@ -82,7 +83,7 @@ func serializeRequestBody(request interface{}, nullable, optional bool, requestF return serializeContentType(requestFieldName, SerializationMethodToContentType[serializationMethod], reflect.ValueOf(request), tag) } -func serializeContentType(fieldName string, mediaType string, val reflect.Value, tag string) (*bytes.Buffer, string, error) { +func serializeContentType(fieldName string, mediaType string, val reflect.Value, tag string) (io.Reader, string, error) { buf := &bytes.Buffer{} if isNil(val.Type(), val) { @@ -116,6 +117,8 @@ func serializeContentType(fieldName string, mediaType string, val reflect.Value, if err := encodeFormData(fieldName, buf, val.Interface()); err != nil { return nil, "", err } + case val.Type().Implements(reflect.TypeOf((*io.Reader)(nil)).Elem()): + return val.Interface().(io.Reader), mediaType, nil default: val = reflect.Indirect(val) @@ -124,8 +127,8 @@ func serializeContentType(fieldName string, mediaType string, val reflect.Value, if _, err := buf.WriteString(valToString(val.Interface())); err != nil { return nil, "", err } - case val.Type() == reflect.TypeOf([]byte(nil)): - if _, err := buf.Write(val.Bytes()); err != nil { + case reflect.TypeOf(val.Interface()) == reflect.TypeOf([]byte(nil)): + if _, err := buf.Write(val.Interface().([]byte)); err != nil { return nil, "", err } default: @@ -215,7 +218,7 @@ func encodeMultipartFormDataFile(w *multipart.Writer, fieldType reflect.Type, va var fieldName string var fileName string - var content []byte + var reader io.Reader for i := 0; i < fieldType.NumField(); i++ { field := fieldType.Field(i) @@ -226,15 +229,19 @@ func encodeMultipartFormDataFile(w *multipart.Writer, fieldType reflect.Type, va continue } - if tag.Content { - content = val.Bytes() + if tag.Content && val.CanInterface() { + if reflect.TypeOf(val.Interface()) == reflect.TypeOf([]byte(nil)) { + reader = bytes.NewReader(val.Interface().([]byte)) + } else if reflect.TypeOf(val.Interface()).Implements(reflect.TypeOf((*io.Reader)(nil)).Elem()) { + reader = val.Interface().(io.Reader) + } } else { fieldName = tag.Name fileName = val.String() } } - if fieldName == "" || fileName == "" || content == nil { + if fieldName == "" || fileName == "" || reader == nil { return fmt.Errorf("invalid multipart/form-data file") } @@ -242,7 +249,7 @@ func encodeMultipartFormDataFile(w *multipart.Writer, fieldType reflect.Type, va if err != nil { return err } - if _, err := fw.Write(content); err != nil { + if _, err := io.Copy(fw, reader); err != nil { return err } diff --git a/internal/sdk/internal/utils/security.go b/internal/sdk/internal/utils/security.go index d2558cd..19dfa6f 100644 --- a/internal/sdk/internal/utils/security.go +++ b/internal/sdk/internal/utils/security.go @@ -21,6 +21,7 @@ type securityTag struct { Name string Type string SubType string + Env string } func PopulateSecurity(ctx context.Context, req *http.Request, securitySource func(context.Context) (interface{}, error)) error { @@ -118,9 +119,14 @@ func parseSecurityScheme(headers, queryParams map[string]string, schemeTag *secu } if schemeType.Kind() == reflect.Struct { - if schemeTag.Type == "http" && schemeTag.SubType == "basic" { - handleBasicAuthScheme(headers, schemeVal.Interface()) - return + if schemeTag.Type == "http" { + switch schemeTag.SubType { + case "basic": + handleBasicAuthScheme(headers, schemeVal.Interface()) + return + case "custom": + return + } } for i := 0; i < schemeType.NumField(); i++ { @@ -170,6 +176,7 @@ func parseSecuritySchemeValue(headers, queryParams map[string]string, schemeTag switch schemeTag.SubType { case "bearer": headers[secTag.Name] = prefixBearer(valToString(val)) + case "custom": default: panic("not supported") } @@ -227,6 +234,7 @@ func parseSecurityTag(field reflect.StructField) *securityTag { name := "" securityType := "" securitySubType := "" + env := "" options := strings.Split(tag, ",") for _, optionConf := range options { @@ -246,6 +254,8 @@ func parseSecurityTag(field reflect.StructField) *securityTag { option = true case "scheme": scheme = true + case "env": + env = parts[1] } } @@ -257,6 +267,7 @@ func parseSecurityTag(field reflect.StructField) *securityTag { Name: name, Type: securityType, SubType: securitySubType, + Env: env, } } diff --git a/internal/sdk/lumos.go b/internal/sdk/lumos.go index 47f70ad..32f2f40 100644 --- a/internal/sdk/lumos.go +++ b/internal/sdk/lumos.go @@ -41,6 +41,9 @@ func Float32(f float32) *float32 { return &f } // Float64 provides a helper function to return a pointer to a float64 func Float64(f float64) *float64 { return &f } +// Pointer provides a helper function to return a pointer to a type +func Pointer[T any](v T) *T { return &v } + type sdkConfiguration struct { Client HTTPClient Security func(context.Context) (interface{}, error) @@ -149,8 +152,8 @@ func New(opts ...SDKOption) *Lumos { Language: "go", OpenAPIDocVersion: "0.1.0", SDKVersion: "0.0.1", - GenVersion: "2.382.1", - UserAgent: "speakeasy-sdk/go 0.0.1 2.382.1 0.1.0 github.com/teamlumos/terraform-provider-lumos/internal/sdk", + GenVersion: "2.415.8", + UserAgent: "speakeasy-sdk/go 0.0.1 2.415.8 0.1.0 github.com/teamlumos/terraform-provider-lumos/internal/sdk", Hooks: hooks.New(), }, } diff --git a/internal/sdk/meta.go b/internal/sdk/meta.go index 5b25e94..40536e0 100644 --- a/internal/sdk/meta.go +++ b/internal/sdk/meta.go @@ -174,24 +174,41 @@ func (s *Meta) LumosArt(ctx context.Context, opts ...operations.Option) (*operat RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `text/plain`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } out := string(rawBody) res.Res = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -346,17 +363,25 @@ func (s *Meta) LumosLivenessCheck(ctx context.Context, opts ...operations.Option RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out operations.LumosLivenessCheckResponseLumosLivenessCheck if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -364,9 +389,19 @@ func (s *Meta) LumosLivenessCheck(ctx context.Context, opts ...operations.Option res.ResponseLumosLivenessCheck = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } diff --git a/internal/sdk/models/operations/cancelaccessrequest.go b/internal/sdk/models/operations/cancelaccessrequest.go new file mode 100644 index 0000000..cc0ae4c --- /dev/null +++ b/internal/sdk/models/operations/cancelaccessrequest.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" + "net/http" +) + +type CancelAccessRequestRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + // Reason for cancellation. + Reason *string `queryParam:"style=form,explode=true,name=reason"` +} + +func (o *CancelAccessRequestRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelAccessRequestRequest) GetReason() *string { + if o == nil { + return nil + } + return o.Reason +} + +type CancelAccessRequestResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Validation Error + HTTPValidationError *shared.HTTPValidationError +} + +func (o *CancelAccessRequestResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CancelAccessRequestResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CancelAccessRequestResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *CancelAccessRequestResponse) GetHTTPValidationError() *shared.HTTPValidationError { + if o == nil { + return nil + } + return o.HTTPValidationError +} diff --git a/internal/sdk/models/operations/createappstorerequestablepermissionappstorerequestablepermissionspost.go b/internal/sdk/models/operations/createappstorerequestablepermissionappstorerequestablepermissionspost.go index db1b900..671b456 100644 --- a/internal/sdk/models/operations/createappstorerequestablepermissionappstorerequestablepermissionspost.go +++ b/internal/sdk/models/operations/createappstorerequestablepermissionappstorerequestablepermissionspost.go @@ -3,10 +3,42 @@ package operations import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" "net/http" ) +type CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest struct { + // Include inherited configurations from parent app. + IncludeInheritedConfigs *bool `default:"true" queryParam:"style=form,explode=true,name=include_inherited_configs"` + RequestablePermissionInput shared.RequestablePermissionInput `request:"mediaType=application/json"` +} + +func (c CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest) GetIncludeInheritedConfigs() *bool { + if o == nil { + return nil + } + return o.IncludeInheritedConfigs +} + +func (o *CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostRequest) GetRequestablePermissionInput() shared.RequestablePermissionInput { + if o == nil { + return shared.RequestablePermissionInput{} + } + return o.RequestablePermissionInput +} + type CreateAppstoreRequestablePermissionAppstoreRequestablePermissionsPostResponse struct { // HTTP response content type for this operation ContentType string diff --git a/internal/sdk/models/operations/getaccessrequest.go b/internal/sdk/models/operations/getaccessrequest.go index fdfbc97..4145e7d 100644 --- a/internal/sdk/models/operations/getaccessrequest.go +++ b/internal/sdk/models/operations/getaccessrequest.go @@ -3,47 +3,19 @@ package operations import ( - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" "net/http" ) type GetAccessRequestRequest struct { - AccessRequestID string `pathParam:"style=simple,explode=false,name=access_request_id"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + ID string `pathParam:"style=simple,explode=false,name=id"` } -func (g GetAccessRequestRequest) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(g, "", false) -} - -func (g *GetAccessRequestRequest) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { - return err - } - return nil -} - -func (o *GetAccessRequestRequest) GetAccessRequestID() string { +func (o *GetAccessRequestRequest) GetID() string { if o == nil { return "" } - return o.AccessRequestID -} - -func (o *GetAccessRequestRequest) GetPage() *int64 { - if o == nil { - return nil - } - return o.Page -} - -func (o *GetAccessRequestRequest) GetSize() *int64 { - if o == nil { - return nil - } - return o.Size + return o.ID } type GetAccessRequestResponse struct { diff --git a/internal/sdk/models/operations/getaccessrequests.go b/internal/sdk/models/operations/getaccessrequests.go index 390dfd8..0c928d8 100644 --- a/internal/sdk/models/operations/getaccessrequests.go +++ b/internal/sdk/models/operations/getaccessrequests.go @@ -17,8 +17,12 @@ type GetAccessRequestsRequest struct { UserID *string `queryParam:"style=form,explode=true,name=user_id"` // Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED' Statuses []shared.SupportRequestStatus `queryParam:"style=form,explode=true,name=statuses"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + // Sort access requests ascending (ASC) or descending (DESC) by created date. + Sort *string `default:"ASC" queryParam:"style=form,explode=true,name=sort"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (g GetAccessRequestsRequest) MarshalJSON() ([]byte, error) { @@ -60,6 +64,13 @@ func (o *GetAccessRequestsRequest) GetStatuses() []shared.SupportRequestStatus { return o.Statuses } +func (o *GetAccessRequestsRequest) GetSort() *string { + if o == nil { + return nil + } + return o.Sort +} + func (o *GetAccessRequestsRequest) GetPage() *int64 { if o == nil { return nil diff --git a/internal/sdk/models/operations/getaccounts.go b/internal/sdk/models/operations/getaccounts.go index f02b82a..4129017 100644 --- a/internal/sdk/models/operations/getaccounts.go +++ b/internal/sdk/models/operations/getaccounts.go @@ -10,8 +10,10 @@ import ( type GetAccountsRequest struct { AppID *string `queryParam:"style=form,explode=true,name=app_id"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (g GetAccountsRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/getactivitylogs.go b/internal/sdk/models/operations/getactivitylogs.go index bcd14d6..28de5c2 100644 --- a/internal/sdk/models/operations/getactivitylogs.go +++ b/internal/sdk/models/operations/getactivitylogs.go @@ -6,13 +6,16 @@ import ( "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" "net/http" + "time" ) type GetActivityLogsRequest struct { - Since *string `queryParam:"style=form,explode=true,name=since"` - Until *string `queryParam:"style=form,explode=true,name=until"` - Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"` - Offset *int64 `default:"0" queryParam:"style=form,explode=true,name=offset"` + Since *time.Time `queryParam:"style=form,explode=true,name=since"` + Until *time.Time `queryParam:"style=form,explode=true,name=until"` + // Page size limit + Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"` + // Page offset + Offset *int64 `default:"0" queryParam:"style=form,explode=true,name=offset"` } func (g GetActivityLogsRequest) MarshalJSON() ([]byte, error) { @@ -26,14 +29,14 @@ func (g *GetActivityLogsRequest) UnmarshalJSON(data []byte) error { return nil } -func (o *GetActivityLogsRequest) GetSince() *string { +func (o *GetActivityLogsRequest) GetSince() *time.Time { if o == nil { return nil } return o.Since } -func (o *GetActivityLogsRequest) GetUntil() *string { +func (o *GetActivityLogsRequest) GetUntil() *time.Time { if o == nil { return nil } diff --git a/internal/sdk/models/operations/getappstoreapps.go b/internal/sdk/models/operations/getappstoreapps.go index 792218d..a5ffae9 100644 --- a/internal/sdk/models/operations/getappstoreapps.go +++ b/internal/sdk/models/operations/getappstoreapps.go @@ -16,9 +16,11 @@ type GetAppStoreAppsRequest struct { // Search filter should be an exact match. ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` // Get all apps in the AppStore regardless of visibility. Only available to admins. - AllVisibilities *bool `default:"false" queryParam:"style=form,explode=true,name=all_visibilities"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + AllVisibilities *bool `default:"false" queryParam:"style=form,explode=true,name=all_visibilities"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (g GetAppStoreAppsRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/getappstorepermissionappstorerequestablepermissionspermissionidget.go b/internal/sdk/models/operations/getappstorepermissionappstorerequestablepermissionspermissionidget.go index e5f3967..1e87e86 100644 --- a/internal/sdk/models/operations/getappstorepermissionappstorerequestablepermissionspermissionidget.go +++ b/internal/sdk/models/operations/getappstorepermissionappstorerequestablepermissionspermissionidget.go @@ -3,12 +3,26 @@ package operations import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" "net/http" ) type GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest struct { ID string `pathParam:"style=simple,explode=false,name=permission_id"` + // Include inherited configurations from parent app. + IncludeInheritedConfigs *bool `default:"true" queryParam:"style=form,explode=true,name=include_inherited_configs"` +} + +func (g GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil } func (o *GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest) GetID() string { @@ -18,6 +32,13 @@ func (o *GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetReque return o.ID } +func (o *GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetRequest) GetIncludeInheritedConfigs() *bool { + if o == nil { + return nil + } + return o.IncludeInheritedConfigs +} + type GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetResponse struct { // HTTP response content type for this operation ContentType string @@ -27,7 +48,7 @@ type GetAppstorePermissionAppstoreRequestablePermissionsPermissionIDGetResponse RawResponse *http.Response // Successful Response RequestablePermissionOutput *shared.RequestablePermissionOutput - // Validation Error + // Not found HTTPValidationError *shared.HTTPValidationError } diff --git a/internal/sdk/models/operations/getappstorepermissionsappstorerequestablepermissionsget.go b/internal/sdk/models/operations/getappstorepermissionsappstorerequestablepermissionsget.go new file mode 100644 index 0000000..e2244cb --- /dev/null +++ b/internal/sdk/models/operations/getappstorepermissionsappstorerequestablepermissionsget.go @@ -0,0 +1,137 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" + "net/http" +) + +type GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest struct { + // Filters requestable permissions by the ID of the app to which they belong. + AppID *string `queryParam:"style=form,explode=true,name=app_id"` + // Searches permissions by the permission's group name, + // request configuration name, or specific integration ID. + // + SearchTerm *string `queryParam:"style=form,explode=true,name=search_term"` + // Search filter should be an exact match. + ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` + // Filters permissions by visibility in the AppStore. + // + InAppStore *bool `queryParam:"style=form,explode=true,name=in_app_store"` + // Include inherited configurations from parent app. + IncludeInheritedConfigs *bool `default:"true" queryParam:"style=form,explode=true,name=include_inherited_configs"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` +} + +func (g GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetAppID() *string { + if o == nil { + return nil + } + return o.AppID +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetSearchTerm() *string { + if o == nil { + return nil + } + return o.SearchTerm +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetExactMatch() *bool { + if o == nil { + return nil + } + return o.ExactMatch +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetInAppStore() *bool { + if o == nil { + return nil + } + return o.InAppStore +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetIncludeInheritedConfigs() *bool { + if o == nil { + return nil + } + return o.IncludeInheritedConfigs +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetPage() *int64 { + if o == nil { + return nil + } + return o.Page +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetRequest) GetSize() *int64 { + if o == nil { + return nil + } + return o.Size +} + +type GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful Response + PageRequestablePermissionOutput *shared.PageRequestablePermissionOutput + // Validation Error + HTTPValidationError *shared.HTTPValidationError +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse) GetPageRequestablePermissionOutput() *shared.PageRequestablePermissionOutput { + if o == nil { + return nil + } + return o.PageRequestablePermissionOutput +} + +func (o *GetAppstorePermissionsAppstoreRequestablePermissionsGetResponse) GetHTTPValidationError() *shared.HTTPValidationError { + if o == nil { + return nil + } + return o.HTTPValidationError +} diff --git a/internal/sdk/models/operations/getappstorepermissionsforappappstoreappsappidrequestablepermissionsget.go b/internal/sdk/models/operations/getappstorepermissionsforappappstoreappsappidrequestablepermissionsget.go new file mode 100644 index 0000000..d8d70c9 --- /dev/null +++ b/internal/sdk/models/operations/getappstorepermissionsforappappstoreappsappidrequestablepermissionsget.go @@ -0,0 +1,137 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" + "net/http" +) + +type GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest struct { + // Filters requestable permissions by the ID of the app to which they belong. + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + // Searches permissions by the permission's group name, + // request configuration name, or specific integration ID. + // + SearchTerm *string `queryParam:"style=form,explode=true,name=search_term"` + // Search filter should be an exact match. + ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` + // Filters permissions by visibility in the AppStore. + // + InAppStore *bool `queryParam:"style=form,explode=true,name=in_app_store"` + // Include inherited configurations from parent app. + IncludeInheritedConfigs *bool `default:"true" queryParam:"style=form,explode=true,name=include_inherited_configs"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` +} + +func (g GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetAppID() string { + if o == nil { + return "" + } + return o.AppID +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetSearchTerm() *string { + if o == nil { + return nil + } + return o.SearchTerm +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetExactMatch() *bool { + if o == nil { + return nil + } + return o.ExactMatch +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetInAppStore() *bool { + if o == nil { + return nil + } + return o.InAppStore +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetIncludeInheritedConfigs() *bool { + if o == nil { + return nil + } + return o.IncludeInheritedConfigs +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetPage() *int64 { + if o == nil { + return nil + } + return o.Page +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetRequest) GetSize() *int64 { + if o == nil { + return nil + } + return o.Size +} + +type GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful Response + PageRequestablePermissionOutput *shared.PageRequestablePermissionOutput + // Validation Error + HTTPValidationError *shared.HTTPValidationError +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse) GetPageRequestablePermissionOutput() *shared.PageRequestablePermissionOutput { + if o == nil { + return nil + } + return o.PageRequestablePermissionOutput +} + +func (o *GetAppstorePermissionsForAppAppstoreAppsAppIDRequestablePermissionsGetResponse) GetHTTPValidationError() *shared.HTTPValidationError { + if o == nil { + return nil + } + return o.HTTPValidationError +} diff --git a/internal/sdk/models/operations/getappstorepermissionsforappappstorerequestablepermissionsget.go b/internal/sdk/models/operations/getappstorepermissionsforappappstorerequestablepermissionsget.go deleted file mode 100644 index ce0be53..0000000 --- a/internal/sdk/models/operations/getappstorepermissionsforappappstorerequestablepermissionsget.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package operations - -import ( - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" - "net/http" -) - -type GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest struct { - // Filters requestable permissions by the ID of the app to which they belong. - AppID *string `queryParam:"style=form,explode=true,name=app_id"` - // Searches permissions by the permission's group name, - // request configuration name, or specific integration ID. - // - SearchTerm *string `queryParam:"style=form,explode=true,name=search_term"` - // Search filter should be an exact match. - ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` - // Filters permissions by visibility in the AppStore. - // - InAppStore *bool `queryParam:"style=form,explode=true,name=in_app_store"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` -} - -func (g GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(g, "", false) -} - -func (g *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { - return err - } - return nil -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) GetAppID() *string { - if o == nil { - return nil - } - return o.AppID -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) GetSearchTerm() *string { - if o == nil { - return nil - } - return o.SearchTerm -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) GetExactMatch() *bool { - if o == nil { - return nil - } - return o.ExactMatch -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) GetInAppStore() *bool { - if o == nil { - return nil - } - return o.InAppStore -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) GetPage() *int64 { - if o == nil { - return nil - } - return o.Page -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetRequest) GetSize() *int64 { - if o == nil { - return nil - } - return o.Size -} - -type GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse struct { - // HTTP response content type for this operation - ContentType string - // HTTP response status code for this operation - StatusCode int - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response - // Successful Response - PageRequestablePermissionOutput *shared.PageRequestablePermissionOutput - // Validation Error - HTTPValidationError *shared.HTTPValidationError -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse) GetContentType() string { - if o == nil { - return "" - } - return o.ContentType -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse) GetStatusCode() int { - if o == nil { - return 0 - } - return o.StatusCode -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse) GetRawResponse() *http.Response { - if o == nil { - return nil - } - return o.RawResponse -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse) GetPageRequestablePermissionOutput() *shared.PageRequestablePermissionOutput { - if o == nil { - return nil - } - return o.PageRequestablePermissionOutput -} - -func (o *GetAppstorePermissionsForAppAppstoreRequestablePermissionsGetResponse) GetHTTPValidationError() *shared.HTTPValidationError { - if o == nil { - return nil - } - return o.HTTPValidationError -} diff --git a/internal/sdk/models/operations/getappstorepreapprovalrulesforappappstorepreapprovalrulesget.go b/internal/sdk/models/operations/getappstorepreapprovalrulesforappappstorepreapprovalrulesget.go index 87cdcbb..d8aa61b 100644 --- a/internal/sdk/models/operations/getappstorepreapprovalrulesforappappstorepreapprovalrulesget.go +++ b/internal/sdk/models/operations/getappstorepreapprovalrulesforappappstorepreapprovalrulesget.go @@ -11,8 +11,10 @@ import ( type GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetRequest struct { // Filters preapproval rules by the ID of the app to which they belong. AppID *string `queryParam:"style=form,explode=true,name=app_id"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (g GetAppstorePreApprovalRulesForAppAppstorePreApprovalRulesGetRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/getgroupmembership.go b/internal/sdk/models/operations/getgroupmembership.go index 1bd5b78..8eb3ac1 100644 --- a/internal/sdk/models/operations/getgroupmembership.go +++ b/internal/sdk/models/operations/getgroupmembership.go @@ -10,8 +10,10 @@ import ( type GetGroupMembershipRequest struct { GroupID string `pathParam:"style=simple,explode=false,name=group_id"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (g GetGroupMembershipRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/getgroups.go b/internal/sdk/models/operations/getgroups.go index e560d03..ccef9b6 100644 --- a/internal/sdk/models/operations/getgroups.go +++ b/internal/sdk/models/operations/getgroups.go @@ -17,8 +17,10 @@ type GetGroupsRequest struct { ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` // Filters groups by the ID of the app to which they belong. AppID *string `queryParam:"style=form,explode=true,name=app_id"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (g GetGroupsRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/listapps.go b/internal/sdk/models/operations/listapps.go index 9d23100..05577a4 100644 --- a/internal/sdk/models/operations/listapps.go +++ b/internal/sdk/models/operations/listapps.go @@ -12,9 +12,11 @@ type ListAppsRequest struct { // Search against name, app instance identifier, and app class ID. NameSearch *string `queryParam:"style=form,explode=true,name=name_search"` // Search filter should be an exact match. - ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (l ListAppsRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/listusers.go b/internal/sdk/models/operations/listusers.go index 8fb84f9..3d31953 100644 --- a/internal/sdk/models/operations/listusers.go +++ b/internal/sdk/models/operations/listusers.go @@ -12,9 +12,11 @@ type ListUsersRequest struct { // Search for users by name or email. SearchTerm *string `queryParam:"style=form,explode=true,name=search_term"` // If a search_term is provided, only accept exact matches. - ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` - Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` - Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` + ExactMatch *bool `default:"false" queryParam:"style=form,explode=true,name=exact_match"` + // Page number + Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size + Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } func (l ListUsersRequest) MarshalJSON() ([]byte, error) { diff --git a/internal/sdk/models/operations/listvendoragreements.go b/internal/sdk/models/operations/listvendoragreements.go index 8a33074..0d78b10 100644 --- a/internal/sdk/models/operations/listvendoragreements.go +++ b/internal/sdk/models/operations/listvendoragreements.go @@ -9,7 +9,9 @@ import ( ) type ListVendorAgreementsRequest struct { + // Page number Page *int64 `default:"1" queryParam:"style=form,explode=true,name=page"` + // Page size Size *int64 `default:"50" queryParam:"style=form,explode=true,name=size"` } diff --git a/internal/sdk/models/operations/updateappstorepermissionappstorerequestablepermissionspermissionidpatch.go b/internal/sdk/models/operations/updateappstorepermissionappstorerequestablepermissionspermissionidpatch.go index 546a1dd..85f269e 100644 --- a/internal/sdk/models/operations/updateappstorepermissionappstorerequestablepermissionspermissionidpatch.go +++ b/internal/sdk/models/operations/updateappstorepermissionappstorerequestablepermissionspermissionidpatch.go @@ -3,15 +3,29 @@ package operations import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/models/shared" "net/http" ) type UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest struct { - ID string `pathParam:"style=simple,explode=false,name=permission_id"` + ID string `pathParam:"style=simple,explode=false,name=permission_id"` + // Include inherited configurations from parent app. + IncludeInheritedConfigs *bool `default:"true" queryParam:"style=form,explode=true,name=include_inherited_configs"` RequestablePermissionInputUpdate shared.RequestablePermissionInputUpdate `request:"mediaType=application/json"` } +func (u UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(u, "", false) +} + +func (u *UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &u, "", false, false); err != nil { + return err + } + return nil +} + func (o *UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest) GetID() string { if o == nil { return "" @@ -19,6 +33,13 @@ func (o *UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatch return o.ID } +func (o *UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest) GetIncludeInheritedConfigs() *bool { + if o == nil { + return nil + } + return o.IncludeInheritedConfigs +} + func (o *UpdateAppstorePermissionAppstoreRequestablePermissionsPermissionIDPatchRequest) GetRequestablePermissionInputUpdate() shared.RequestablePermissionInputUpdate { if o == nil { return shared.RequestablePermissionInputUpdate{} diff --git a/internal/sdk/models/shared/accessrequest.go b/internal/sdk/models/shared/accessrequest.go index 0747ca3..b9f31bc 100644 --- a/internal/sdk/models/shared/accessrequest.go +++ b/internal/sdk/models/shared/accessrequest.go @@ -7,104 +7,6 @@ import ( "time" ) -// RequesterUser - The user who requested access. It's possible for one user to request access on another's behalf. -type RequesterUser struct { - // The ID of this user. - ID string `json:"id"` - // The email of this user. - Email *string `json:"email,omitempty"` - // The given name of this user. - GivenName *string `json:"given_name,omitempty"` - // The family name of this user. - FamilyName *string `json:"family_name,omitempty"` - // The status of this user. - Status *UserLifecycleStatus `json:"status,omitempty"` -} - -func (o *RequesterUser) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *RequesterUser) GetEmail() *string { - if o == nil { - return nil - } - return o.Email -} - -func (o *RequesterUser) GetGivenName() *string { - if o == nil { - return nil - } - return o.GivenName -} - -func (o *RequesterUser) GetFamilyName() *string { - if o == nil { - return nil - } - return o.FamilyName -} - -func (o *RequesterUser) GetStatus() *UserLifecycleStatus { - if o == nil { - return nil - } - return o.Status -} - -// TargetUser - The user the request is for. -type TargetUser struct { - // The ID of this user. - ID string `json:"id"` - // The email of this user. - Email *string `json:"email,omitempty"` - // The given name of this user. - GivenName *string `json:"given_name,omitempty"` - // The family name of this user. - FamilyName *string `json:"family_name,omitempty"` - // The status of this user. - Status *UserLifecycleStatus `json:"status,omitempty"` -} - -func (o *TargetUser) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *TargetUser) GetEmail() *string { - if o == nil { - return nil - } - return o.Email -} - -func (o *TargetUser) GetGivenName() *string { - if o == nil { - return nil - } - return o.GivenName -} - -func (o *TargetUser) GetFamilyName() *string { - if o == nil { - return nil - } - return o.FamilyName -} - -func (o *TargetUser) GetStatus() *UserLifecycleStatus { - if o == nil { - return nil - } - return o.Status -} - // AccessRequest - API version of DomainAppSupportRequest. type AccessRequest struct { // The ID of the access request. @@ -114,10 +16,10 @@ type AccessRequest struct { // The name of the app the request is for. AppName string `json:"app_name"` // The user who requested access. It's possible for one user to request access on another's behalf. - RequesterUser RequesterUser `json:"requester_user"` + RequesterUser User `json:"requester_user"` // The user the request is for. - TargetUser TargetUser `json:"target_user"` - SupporterUser *User `json:"supporter_user,omitempty"` + TargetUser User `json:"target_user"` + SupporterUser *User `json:"supporter_user,omitempty"` // The current status of the request. Status SupportRequestStatus `json:"status"` // The reason the user wrote for putting the access request into the given state. @@ -159,16 +61,16 @@ func (o *AccessRequest) GetAppName() string { return o.AppName } -func (o *AccessRequest) GetRequesterUser() RequesterUser { +func (o *AccessRequest) GetRequesterUser() User { if o == nil { - return RequesterUser{} + return User{} } return o.RequesterUser } -func (o *AccessRequest) GetTargetUser() TargetUser { +func (o *AccessRequest) GetTargetUser() User { if o == nil { - return TargetUser{} + return User{} } return o.TargetUser } diff --git a/internal/sdk/models/shared/accountinput.go b/internal/sdk/models/shared/accountinput.go index e552e8b..cdcfeff 100644 --- a/internal/sdk/models/shared/accountinput.go +++ b/internal/sdk/models/shared/accountinput.go @@ -3,7 +3,7 @@ package shared type AccountInput struct { - // The stable identifier of this account. + // A unique identifier for this account, such as an account ID or email. UniqueIdentifier string `json:"unique_identifier"` // The email of this account. Email *string `json:"email,omitempty"` diff --git a/internal/sdk/models/shared/accounttype.go b/internal/sdk/models/shared/accounttype.go index 7420fd3..ce2726d 100644 --- a/internal/sdk/models/shared/accounttype.go +++ b/internal/sdk/models/shared/accounttype.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// AccountType - An enumeration. type AccountType string const ( diff --git a/internal/sdk/models/shared/activitylog.go b/internal/sdk/models/shared/activitylog.go index d291414..4412e83 100644 --- a/internal/sdk/models/shared/activitylog.go +++ b/internal/sdk/models/shared/activitylog.go @@ -24,7 +24,7 @@ type ActivityLog struct { Outcome string `json:"outcome"` Targets []Targets `json:"targets"` Actor Actor `json:"actor"` - EventBeganAt time.Time `json:"event_began_at"` + EventBeganAt *time.Time `json:"event_began_at,omitempty"` EventMetadata EventMetadata `json:"event_metadata"` } @@ -81,9 +81,9 @@ func (o *ActivityLog) GetActor() Actor { return o.Actor } -func (o *ActivityLog) GetEventBeganAt() time.Time { +func (o *ActivityLog) GetEventBeganAt() *time.Time { if o == nil { - return time.Time{} + return nil } return o.EventBeganAt } diff --git a/internal/sdk/models/shared/activityrecord.go b/internal/sdk/models/shared/activityrecord.go index ff500a7..dcd4086 100644 --- a/internal/sdk/models/shared/activityrecord.go +++ b/internal/sdk/models/shared/activityrecord.go @@ -7,65 +7,17 @@ import ( "time" ) -// ActivityRecordAccount - Metadata that Lumos can use to match the activity record to a software account within Lumos. -type ActivityRecordAccount struct { - // The external app's user ID for the account. - ExternalID *string `json:"external_id,omitempty"` - // The email associated with the account - Email *string `json:"email,omitempty"` -} - -func (o *ActivityRecordAccount) GetExternalID() *string { - if o == nil { - return nil - } - return o.ExternalID -} - -func (o *ActivityRecordAccount) GetEmail() *string { - if o == nil { - return nil - } - return o.Email -} - -// Event - Metadata about the event being uploaded. -type Event struct { - // The type of event being uploaded. - Type ActivityRecordEventType `json:"type"` -} - -func (o *Event) GetType() ActivityRecordEventType { - if o == nil { - return ActivityRecordEventType("") - } - return o.Type -} - -// ActivityRecordApp - Metadata that Lumos can use to match the activity record to an application within Lumos. -type ActivityRecordApp struct { - // The ID of the app as it is identified in the source E.g. the ID that Okta uses to identify the app - InstanceIdentifier string `json:"instance_identifier"` -} - -func (o *ActivityRecordApp) GetInstanceIdentifier() string { - if o == nil { - return "" - } - return o.InstanceIdentifier -} - type ActivityRecord struct { // Metadata that Lumos can use to match the activity record to a software account within Lumos. - Account ActivityRecordAccount `json:"account"` + Account ActivityRecordAccountInput `json:"account"` // Metadata about the event being uploaded. - Event Event `json:"event"` + Event ActivityRecordEventInput `json:"event"` // The timestamp of this event, in ISO 8601 format. Timestamp time.Time `json:"timestamp"` // UUID of the application in Lumos where this activity record was sourced (e.g. the ID of Okta within Lumos found by going to Apps > Find your app in the list > Click '...' > Copy Stable Identifier) SourceAppID string `json:"source_app_id"` // Metadata that Lumos can use to match the activity record to an application within Lumos. - App *ActivityRecordApp `json:"app,omitempty"` + App *ActivityRecordAppInput `json:"app,omitempty"` } func (a ActivityRecord) MarshalJSON() ([]byte, error) { @@ -79,16 +31,16 @@ func (a *ActivityRecord) UnmarshalJSON(data []byte) error { return nil } -func (o *ActivityRecord) GetAccount() ActivityRecordAccount { +func (o *ActivityRecord) GetAccount() ActivityRecordAccountInput { if o == nil { - return ActivityRecordAccount{} + return ActivityRecordAccountInput{} } return o.Account } -func (o *ActivityRecord) GetEvent() Event { +func (o *ActivityRecord) GetEvent() ActivityRecordEventInput { if o == nil { - return Event{} + return ActivityRecordEventInput{} } return o.Event } @@ -107,7 +59,7 @@ func (o *ActivityRecord) GetSourceAppID() string { return o.SourceAppID } -func (o *ActivityRecord) GetApp() *ActivityRecordApp { +func (o *ActivityRecord) GetApp() *ActivityRecordAppInput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/activityrecordaccountinput.go b/internal/sdk/models/shared/activityrecordaccountinput.go new file mode 100644 index 0000000..5df0055 --- /dev/null +++ b/internal/sdk/models/shared/activityrecordaccountinput.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type ActivityRecordAccountInput struct { + // The external app's user ID for the account. + ExternalID *string `json:"external_id,omitempty"` + // The email associated with the account + Email *string `json:"email,omitempty"` +} + +func (o *ActivityRecordAccountInput) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *ActivityRecordAccountInput) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} diff --git a/internal/sdk/models/shared/activityrecordappinput.go b/internal/sdk/models/shared/activityrecordappinput.go new file mode 100644 index 0000000..f162c71 --- /dev/null +++ b/internal/sdk/models/shared/activityrecordappinput.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type ActivityRecordAppInput struct { + // The ID of the app as it is identified in the source E.g. the ID that Okta uses to identify the app + InstanceIdentifier string `json:"instance_identifier"` +} + +func (o *ActivityRecordAppInput) GetInstanceIdentifier() string { + if o == nil { + return "" + } + return o.InstanceIdentifier +} diff --git a/internal/sdk/models/shared/activityrecordeventinput.go b/internal/sdk/models/shared/activityrecordeventinput.go new file mode 100644 index 0000000..3318bb0 --- /dev/null +++ b/internal/sdk/models/shared/activityrecordeventinput.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type ActivityRecordEventInput struct { + // The type of event being uploaded. + Type ActivityRecordEventType `json:"type"` +} + +func (o *ActivityRecordEventInput) GetType() ActivityRecordEventType { + if o == nil { + return ActivityRecordEventType("") + } + return o.Type +} diff --git a/internal/sdk/models/shared/activityrecordeventtype.go b/internal/sdk/models/shared/activityrecordeventtype.go index 5bb83d7..733e037 100644 --- a/internal/sdk/models/shared/activityrecordeventtype.go +++ b/internal/sdk/models/shared/activityrecordeventtype.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// ActivityRecordEventType - An enumeration. type ActivityRecordEventType string const ( diff --git a/internal/sdk/models/shared/activityrecordoutput.go b/internal/sdk/models/shared/activityrecordoutput.go index 4e98bca..bb7db9c 100644 --- a/internal/sdk/models/shared/activityrecordoutput.go +++ b/internal/sdk/models/shared/activityrecordoutput.go @@ -2,36 +2,14 @@ package shared -// Job - State of the job to post-process the records. -type Job struct { - // The ID of the job. - JobID string `json:"job_id"` - // The state of the job. - State *RunInfoStatus `json:"state,omitempty"` -} - -func (o *Job) GetJobID() string { - if o == nil { - return "" - } - return o.JobID -} - -func (o *Job) GetState() *RunInfoStatus { - if o == nil { - return nil - } - return o.State -} - type ActivityRecordOutput struct { // State of the job to post-process the records. - Job Job `json:"job"` + Job SyncTaskOutput `json:"job"` } -func (o *ActivityRecordOutput) GetJob() Job { +func (o *ActivityRecordOutput) GetJob() SyncTaskOutput { if o == nil { - return Job{} + return SyncTaskOutput{} } return o.Job } diff --git a/internal/sdk/models/shared/addapptoappstoreinput.go b/internal/sdk/models/shared/addapptoappstoreinput.go index 8836a4a..43a89e3 100644 --- a/internal/sdk/models/shared/addapptoappstoreinput.go +++ b/internal/sdk/models/shared/addapptoappstoreinput.go @@ -2,336 +2,13 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// AddAppToAppStoreInputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type AddAppToAppStoreInputAllowedGroupsConfigType string - -const ( - AddAppToAppStoreInputAllowedGroupsConfigTypeAllGroups AddAppToAppStoreInputAllowedGroupsConfigType = "ALL_GROUPS" - AddAppToAppStoreInputAllowedGroupsConfigTypeSpecifiedGroups AddAppToAppStoreInputAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e AddAppToAppStoreInputAllowedGroupsConfigType) ToPointer() *AddAppToAppStoreInputAllowedGroupsConfigType { - return &e -} -func (e *AddAppToAppStoreInputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = AddAppToAppStoreInputAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for AddAppToAppStoreInputAllowedGroupsConfigType: %v", v) - } -} - -// AddAppToAppStoreInputAllowedGroups - The allowed groups associated with this config. -type AddAppToAppStoreInputAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *AddAppToAppStoreInputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []BaseGroup `json:"groups,omitempty"` -} - -func (a AddAppToAppStoreInputAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *AddAppToAppStoreInputAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { - return err - } - return nil -} - -func (o *AddAppToAppStoreInputAllowedGroups) GetType() *AddAppToAppStoreInputAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *AddAppToAppStoreInputAllowedGroups) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -// AddAppToAppStoreInputApprovers - AppStore App approvers assigned. -type AddAppToAppStoreInputApprovers struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AddAppToAppStoreInputApprovers) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AddAppToAppStoreInputApprovers) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AddAppToAppStoreInputApproversStage2 - AppStore App stage 2 approvers assigned. -type AddAppToAppStoreInputApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AddAppToAppStoreInputApproversStage2) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AddAppToAppStoreInputApproversStage2) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AddAppToAppStoreInputAdmins - AppStore App admins assigned. -type AddAppToAppStoreInputAdmins struct { - // Groups assigned as app admins. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as app admins. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AddAppToAppStoreInputAdmins) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AddAppToAppStoreInputAdmins) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AddAppToAppStoreInputRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this app. -type AddAppToAppStoreInputRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AddAppToAppStoreInputRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AddAppToAppStoreInputRequestFlow - Request flow configuration to request access to app. -type AddAppToAppStoreInputRequestFlow struct { - // AppStore App visibility. - Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` - // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. - RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // The allowed groups associated with this config. - AllowedGroups *AddAppToAppStoreInputAllowedGroups `json:"allowed_groups,omitempty"` - // AppStore App approvers assigned. - Approvers *AddAppToAppStoreInputApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *AddAppToAppStoreInputApproversStage2 `json:"approvers_stage_2,omitempty"` - // AppStore App admins assigned. - Admins *AddAppToAppStoreInputAdmins `json:"admins,omitempty"` - // A request validation webhook can be optionally associated with this app. - RequestValidationInlineWebhook *AddAppToAppStoreInputRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` -} - -func (o *AddAppToAppStoreInputRequestFlow) GetDiscoverability() *AppStoreVisibility { - if o == nil { - return nil - } - return o.Discoverability -} - -func (o *AddAppToAppStoreInputRequestFlow) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *AddAppToAppStoreInputRequestFlow) GetRequireManagerApproval() *bool { - if o == nil { - return nil - } - return o.RequireManagerApproval -} - -func (o *AddAppToAppStoreInputRequestFlow) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *AddAppToAppStoreInputRequestFlow) GetAllowedGroups() *AddAppToAppStoreInputAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *AddAppToAppStoreInputRequestFlow) GetApprovers() *AddAppToAppStoreInputApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *AddAppToAppStoreInputRequestFlow) GetApproversStage2() *AddAppToAppStoreInputApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *AddAppToAppStoreInputRequestFlow) GetAdmins() *AddAppToAppStoreInputAdmins { - if o == nil { - return nil - } - return o.Admins -} - -func (o *AddAppToAppStoreInputRequestFlow) GetRequestValidationInlineWebhook() *AddAppToAppStoreInputRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -// AddAppToAppStoreInputProvisioningWebhook - The provisioning webhook optionally associated with this app. -type AddAppToAppStoreInputProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AddAppToAppStoreInputProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AddAppToAppStoreInputAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this app. -type AddAppToAppStoreInputAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AddAppToAppStoreInputAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AddAppToAppStoreInputProvisioning - Provisioning flow configuration to request access to app. -type AddAppToAppStoreInputProvisioning struct { - // If enabled, Approvers must choose a group to provision the user to for access requests. - GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Whether the app is configured to allow users to request multiple permissions in a single request - AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` - // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. - CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` - // The provisioning webhook optionally associated with this app. - ProvisioningWebhook *AddAppToAppStoreInputProvisioningWebhook `json:"provisioning_webhook,omitempty"` - // A deprovisioning webhook can be optionally associated with this app. - AccessRemovalInlineWebhook *AddAppToAppStoreInputAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` -} - -func (o *AddAppToAppStoreInputProvisioning) GetGroupsProvisioning() *GroupProvisioningOption { - if o == nil { - return nil - } - return o.GroupsProvisioning -} - -func (o *AddAppToAppStoreInputProvisioning) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *AddAppToAppStoreInputProvisioning) GetAllowMultiplePermissionSelection() *bool { - if o == nil { - return nil - } - return o.AllowMultiplePermissionSelection -} - -func (o *AddAppToAppStoreInputProvisioning) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *AddAppToAppStoreInputProvisioning) GetCustomProvisioningInstructions() *string { - if o == nil { - return nil - } - return o.CustomProvisioningInstructions -} - -func (o *AddAppToAppStoreInputProvisioning) GetProvisioningWebhook() *AddAppToAppStoreInputProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -func (o *AddAppToAppStoreInputProvisioning) GetAccessRemovalInlineWebhook() *AddAppToAppStoreInputAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - type AddAppToAppStoreInput struct { // AppStore App instructions that are shown to the requester. CustomRequestInstructions *string `json:"custom_request_instructions,omitempty"` // Request flow configuration to request access to app. - RequestFlow *AddAppToAppStoreInputRequestFlow `json:"request_flow,omitempty"` + RequestFlow *AppStoreAppSettingsRequestFlowInput `json:"request_flow,omitempty"` // Provisioning flow configuration to request access to app. - Provisioning *AddAppToAppStoreInputProvisioning `json:"provisioning,omitempty"` + Provisioning *AppStoreAppSettingsProvisioningInput `json:"provisioning,omitempty"` // The ID of the app to add to the app store. AppID string `json:"app_id"` } @@ -343,14 +20,14 @@ func (o *AddAppToAppStoreInput) GetCustomRequestInstructions() *string { return o.CustomRequestInstructions } -func (o *AddAppToAppStoreInput) GetRequestFlow() *AddAppToAppStoreInputRequestFlow { +func (o *AddAppToAppStoreInput) GetRequestFlow() *AppStoreAppSettingsRequestFlowInput { if o == nil { return nil } return o.RequestFlow } -func (o *AddAppToAppStoreInput) GetProvisioning() *AddAppToAppStoreInputProvisioning { +func (o *AddAppToAppStoreInput) GetProvisioning() *AppStoreAppSettingsProvisioningInput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/allowedgroupsconfiginput.go b/internal/sdk/models/shared/allowedgroupsconfiginput.go new file mode 100644 index 0000000..0d5cb66 --- /dev/null +++ b/internal/sdk/models/shared/allowedgroupsconfiginput.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" +) + +// AllowedGroupsConfigInputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. +type AllowedGroupsConfigInputAllowedGroupsConfigType string + +const ( + AllowedGroupsConfigInputAllowedGroupsConfigTypeAllGroups AllowedGroupsConfigInputAllowedGroupsConfigType = "ALL_GROUPS" + AllowedGroupsConfigInputAllowedGroupsConfigTypeSpecifiedGroups AllowedGroupsConfigInputAllowedGroupsConfigType = "SPECIFIED_GROUPS" +) + +func (e AllowedGroupsConfigInputAllowedGroupsConfigType) ToPointer() *AllowedGroupsConfigInputAllowedGroupsConfigType { + return &e +} +func (e *AllowedGroupsConfigInputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ALL_GROUPS": + fallthrough + case "SPECIFIED_GROUPS": + *e = AllowedGroupsConfigInputAllowedGroupsConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for AllowedGroupsConfigInputAllowedGroupsConfigType: %v", v) + } +} + +type AllowedGroupsConfigInput struct { + // The type of this allowed groups config, can be all groups or specific. + Type *AllowedGroupsConfigInputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` + // The groups allowed to request this permission. + Groups []BaseGroup `json:"groups,omitempty"` +} + +func (a AllowedGroupsConfigInput) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AllowedGroupsConfigInput) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AllowedGroupsConfigInput) GetType() *AllowedGroupsConfigInputAllowedGroupsConfigType { + if o == nil { + return nil + } + return o.Type +} + +func (o *AllowedGroupsConfigInput) GetGroups() []BaseGroup { + if o == nil { + return nil + } + return o.Groups +} diff --git a/internal/sdk/models/shared/allowedgroupsconfigoutput.go b/internal/sdk/models/shared/allowedgroupsconfigoutput.go new file mode 100644 index 0000000..4dc5506 --- /dev/null +++ b/internal/sdk/models/shared/allowedgroupsconfigoutput.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" +) + +// AllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. +type AllowedGroupsConfigType string + +const ( + AllowedGroupsConfigTypeAllGroups AllowedGroupsConfigType = "ALL_GROUPS" + AllowedGroupsConfigTypeSpecifiedGroups AllowedGroupsConfigType = "SPECIFIED_GROUPS" +) + +func (e AllowedGroupsConfigType) ToPointer() *AllowedGroupsConfigType { + return &e +} +func (e *AllowedGroupsConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ALL_GROUPS": + fallthrough + case "SPECIFIED_GROUPS": + *e = AllowedGroupsConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for AllowedGroupsConfigType: %v", v) + } +} + +type AllowedGroupsConfigOutput struct { + // The type of this allowed groups config, can be all groups or specific. + Type *AllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` + // The groups allowed to request this permission. + Groups []Group `json:"groups,omitempty"` +} + +func (a AllowedGroupsConfigOutput) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AllowedGroupsConfigOutput) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AllowedGroupsConfigOutput) GetType() *AllowedGroupsConfigType { + if o == nil { + return nil + } + return o.Type +} + +func (o *AllowedGroupsConfigOutput) GetGroups() []Group { + if o == nil { + return nil + } + return o.Groups +} diff --git a/internal/sdk/models/shared/appadminsinput.go b/internal/sdk/models/shared/appadminsinput.go new file mode 100644 index 0000000..064fc64 --- /dev/null +++ b/internal/sdk/models/shared/appadminsinput.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type AppAdminsInput struct { + // Groups assigned as app admins. + Groups []BaseGroup `json:"groups,omitempty"` + // Users assigned as app admins. + Users []BaseUser `json:"users,omitempty"` +} + +func (o *AppAdminsInput) GetGroups() []BaseGroup { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AppAdminsInput) GetUsers() []BaseUser { + if o == nil { + return nil + } + return o.Users +} diff --git a/internal/sdk/models/shared/appapproversinput.go b/internal/sdk/models/shared/appapproversinput.go new file mode 100644 index 0000000..5fe7467 --- /dev/null +++ b/internal/sdk/models/shared/appapproversinput.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type AppApproversInput struct { + // Groups assigned as support request approvers. + Groups []BaseGroup `json:"groups,omitempty"` + // Users assigned as support request approvers. + Users []BaseUser `json:"users,omitempty"` +} + +func (o *AppApproversInput) GetGroups() []BaseGroup { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AppApproversInput) GetUsers() []BaseUser { + if o == nil { + return nil + } + return o.Users +} diff --git a/internal/sdk/models/shared/appapproversoutput.go b/internal/sdk/models/shared/appapproversoutput.go new file mode 100644 index 0000000..63749b1 --- /dev/null +++ b/internal/sdk/models/shared/appapproversoutput.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type AppApproversOutput struct { + // Groups assigned as support request approvers. + Groups []Group `json:"groups,omitempty"` + // Users assigned as support request approvers. + Users []User `json:"users,omitempty"` +} + +func (o *AppApproversOutput) GetGroups() []Group { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AppApproversOutput) GetUsers() []User { + if o == nil { + return nil + } + return o.Users +} diff --git a/internal/sdk/models/shared/approverinput.go b/internal/sdk/models/shared/approverinput.go index 15edff6..4a6ad0f 100644 --- a/internal/sdk/models/shared/approverinput.go +++ b/internal/sdk/models/shared/approverinput.go @@ -2,57 +2,13 @@ package shared -// ApproverInputUser - Optionally, the approver can be a user. -type ApproverInputUser struct { - // The ID of this user. - ID string `json:"id"` -} - -func (o *ApproverInputUser) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// ApproverInputGroup - Optionally, the approver can be a group. -type ApproverInputGroup struct { - // The ID of this group. - ID *string `json:"id,omitempty"` - // The ID of the app that sources this group. - AppID *string `json:"app_id,omitempty"` - // The ID of this group, specific to the integration. - IntegrationSpecificID *string `json:"integration_specific_id,omitempty"` -} - -func (o *ApproverInputGroup) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *ApproverInputGroup) GetAppID() *string { - if o == nil { - return nil - } - return o.AppID -} - -func (o *ApproverInputGroup) GetIntegrationSpecificID() *string { - if o == nil { - return nil - } - return o.IntegrationSpecificID -} - type ApproverInput struct { // The type of this approver. Type *ApproverType `json:"type,omitempty"` // Optionally, the approver can be a user. - User *ApproverInputUser `json:"user,omitempty"` + User *BaseUser `json:"user,omitempty"` // Optionally, the approver can be a group. - Group *ApproverInputGroup `json:"group,omitempty"` + Group *BaseGroup `json:"group,omitempty"` } func (o *ApproverInput) GetType() *ApproverType { @@ -62,14 +18,14 @@ func (o *ApproverInput) GetType() *ApproverType { return o.Type } -func (o *ApproverInput) GetUser() *ApproverInputUser { +func (o *ApproverInput) GetUser() *BaseUser { if o == nil { return nil } return o.User } -func (o *ApproverInput) GetGroup() *ApproverInputGroup { +func (o *ApproverInput) GetGroup() *BaseGroup { if o == nil { return nil } diff --git a/internal/sdk/models/shared/approveroutput.go b/internal/sdk/models/shared/approveroutput.go index 76a8ff6..bc3e429 100644 --- a/internal/sdk/models/shared/approveroutput.go +++ b/internal/sdk/models/shared/approveroutput.go @@ -2,173 +2,13 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// ApproverOutputUser - Optionally, the approver can be a user. -type ApproverOutputUser struct { - // The ID of this user. - ID string `json:"id"` - // The email of this user. - Email *string `json:"email,omitempty"` - // The given name of this user. - GivenName *string `json:"given_name,omitempty"` - // The family name of this user. - FamilyName *string `json:"family_name,omitempty"` - // The status of this user. - Status *UserLifecycleStatus `json:"status,omitempty"` -} - -func (o *ApproverOutputUser) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *ApproverOutputUser) GetEmail() *string { - if o == nil { - return nil - } - return o.Email -} - -func (o *ApproverOutputUser) GetGivenName() *string { - if o == nil { - return nil - } - return o.GivenName -} - -func (o *ApproverOutputUser) GetFamilyName() *string { - if o == nil { - return nil - } - return o.FamilyName -} - -func (o *ApproverOutputUser) GetStatus() *UserLifecycleStatus { - if o == nil { - return nil - } - return o.Status -} - -// ApproverOutputLifecycle - The lifecycle of this group. -type ApproverOutputLifecycle string - -const ( - ApproverOutputLifecycleSynced ApproverOutputLifecycle = "SYNCED" - ApproverOutputLifecycleNative ApproverOutputLifecycle = "NATIVE" -) - -func (e ApproverOutputLifecycle) ToPointer() *ApproverOutputLifecycle { - return &e -} -func (e *ApproverOutputLifecycle) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "SYNCED": - fallthrough - case "NATIVE": - *e = ApproverOutputLifecycle(v) - return nil - default: - return fmt.Errorf("invalid value for ApproverOutputLifecycle: %v", v) - } -} - -// ApproverOutputGroup - Optionally, the approver can be a group. -type ApproverOutputGroup struct { - // The ID of this group. - ID *string `json:"id,omitempty"` - // The ID of the app that sources this group. - AppID *string `json:"app_id,omitempty"` - // The ID of this group, specific to the integration. - IntegrationSpecificID *string `json:"integration_specific_id,omitempty"` - // The name of this group. - Name *string `json:"name,omitempty"` - // The description of this group. - Description *string `json:"description,omitempty"` - // The lifecycle of this group. - GroupLifecycle *ApproverOutputLifecycle `default:"SYNCED" json:"group_lifecycle"` - // The ID of the app that sources this group. - SourceAppID *string `json:"source_app_id,omitempty"` -} - -func (a ApproverOutputGroup) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *ApproverOutputGroup) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { - return err - } - return nil -} - -func (o *ApproverOutputGroup) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *ApproverOutputGroup) GetAppID() *string { - if o == nil { - return nil - } - return o.AppID -} - -func (o *ApproverOutputGroup) GetIntegrationSpecificID() *string { - if o == nil { - return nil - } - return o.IntegrationSpecificID -} - -func (o *ApproverOutputGroup) GetName() *string { - if o == nil { - return nil - } - return o.Name -} - -func (o *ApproverOutputGroup) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -func (o *ApproverOutputGroup) GetGroupLifecycle() *ApproverOutputLifecycle { - if o == nil { - return nil - } - return o.GroupLifecycle -} - -func (o *ApproverOutputGroup) GetSourceAppID() *string { - if o == nil { - return nil - } - return o.SourceAppID -} - type ApproverOutput struct { // The type of this approver. Type ApproverType `json:"type"` // Optionally, the approver can be a user. - User *ApproverOutputUser `json:"user,omitempty"` + User *User `json:"user,omitempty"` // Optionally, the approver can be a group. - Group *ApproverOutputGroup `json:"group,omitempty"` + Group *Group `json:"group,omitempty"` } func (o *ApproverOutput) GetType() ApproverType { @@ -178,14 +18,14 @@ func (o *ApproverOutput) GetType() ApproverType { return o.Type } -func (o *ApproverOutput) GetUser() *ApproverOutputUser { +func (o *ApproverOutput) GetUser() *User { if o == nil { return nil } return o.User } -func (o *ApproverOutput) GetGroup() *ApproverOutputGroup { +func (o *ApproverOutput) GetGroup() *Group { if o == nil { return nil } diff --git a/internal/sdk/models/shared/approvertype.go b/internal/sdk/models/shared/approvertype.go index eb58455..2a1a999 100644 --- a/internal/sdk/models/shared/approvertype.go +++ b/internal/sdk/models/shared/approvertype.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// ApproverType - An enumeration. type ApproverType string const ( diff --git a/internal/sdk/models/shared/appsettinginput.go b/internal/sdk/models/shared/appsettinginput.go index f5d1486..43cfbd1 100644 --- a/internal/sdk/models/shared/appsettinginput.go +++ b/internal/sdk/models/shared/appsettinginput.go @@ -3,335 +3,16 @@ package shared import ( - "encoding/json" - "fmt" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" ) -// AppSettingInputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type AppSettingInputAllowedGroupsConfigType string - -const ( - AppSettingInputAllowedGroupsConfigTypeAllGroups AppSettingInputAllowedGroupsConfigType = "ALL_GROUPS" - AppSettingInputAllowedGroupsConfigTypeSpecifiedGroups AppSettingInputAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e AppSettingInputAllowedGroupsConfigType) ToPointer() *AppSettingInputAllowedGroupsConfigType { - return &e -} -func (e *AppSettingInputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = AppSettingInputAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for AppSettingInputAllowedGroupsConfigType: %v", v) - } -} - -// AppSettingInputAllowedGroups - The allowed groups associated with this config. -type AppSettingInputAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *AppSettingInputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []BaseGroup `json:"groups,omitempty"` -} - -func (a AppSettingInputAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *AppSettingInputAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { - return err - } - return nil -} - -func (o *AppSettingInputAllowedGroups) GetType() *AppSettingInputAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *AppSettingInputAllowedGroups) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -// AppSettingInputApprovers - AppStore App approvers assigned. -type AppSettingInputApprovers struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AppSettingInputApprovers) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppSettingInputApprovers) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AppSettingInputApproversStage2 - AppStore App stage 2 approvers assigned. -type AppSettingInputApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AppSettingInputApproversStage2) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppSettingInputApproversStage2) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AppSettingInputAdmins - AppStore App admins assigned. -type AppSettingInputAdmins struct { - // Groups assigned as app admins. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as app admins. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AppSettingInputAdmins) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppSettingInputAdmins) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AppSettingInputRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this app. -type AppSettingInputRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AppSettingInputRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AppSettingInputRequestFlow - Request flow configuration to request access to app. -type AppSettingInputRequestFlow struct { - // AppStore App visibility. - Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` - // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. - RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // The allowed groups associated with this config. - AllowedGroups *AppSettingInputAllowedGroups `json:"allowed_groups,omitempty"` - // AppStore App approvers assigned. - Approvers *AppSettingInputApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *AppSettingInputApproversStage2 `json:"approvers_stage_2,omitempty"` - // AppStore App admins assigned. - Admins *AppSettingInputAdmins `json:"admins,omitempty"` - // A request validation webhook can be optionally associated with this app. - RequestValidationInlineWebhook *AppSettingInputRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` -} - -func (o *AppSettingInputRequestFlow) GetDiscoverability() *AppStoreVisibility { - if o == nil { - return nil - } - return o.Discoverability -} - -func (o *AppSettingInputRequestFlow) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *AppSettingInputRequestFlow) GetRequireManagerApproval() *bool { - if o == nil { - return nil - } - return o.RequireManagerApproval -} - -func (o *AppSettingInputRequestFlow) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *AppSettingInputRequestFlow) GetAllowedGroups() *AppSettingInputAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *AppSettingInputRequestFlow) GetApprovers() *AppSettingInputApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *AppSettingInputRequestFlow) GetApproversStage2() *AppSettingInputApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *AppSettingInputRequestFlow) GetAdmins() *AppSettingInputAdmins { - if o == nil { - return nil - } - return o.Admins -} - -func (o *AppSettingInputRequestFlow) GetRequestValidationInlineWebhook() *AppSettingInputRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -// AppSettingInputProvisioningWebhook - The provisioning webhook optionally associated with this app. -type AppSettingInputProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AppSettingInputProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AppSettingInputAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this app. -type AppSettingInputAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AppSettingInputAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AppSettingInputProvisioning - Provisioning flow configuration to request access to app. -type AppSettingInputProvisioning struct { - // If enabled, Approvers must choose a group to provision the user to for access requests. - GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Whether the app is configured to allow users to request multiple permissions in a single request - AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` - // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. - CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` - // The provisioning webhook optionally associated with this app. - ProvisioningWebhook *AppSettingInputProvisioningWebhook `json:"provisioning_webhook,omitempty"` - // A deprovisioning webhook can be optionally associated with this app. - AccessRemovalInlineWebhook *AppSettingInputAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` -} - -func (o *AppSettingInputProvisioning) GetGroupsProvisioning() *GroupProvisioningOption { - if o == nil { - return nil - } - return o.GroupsProvisioning -} - -func (o *AppSettingInputProvisioning) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *AppSettingInputProvisioning) GetAllowMultiplePermissionSelection() *bool { - if o == nil { - return nil - } - return o.AllowMultiplePermissionSelection -} - -func (o *AppSettingInputProvisioning) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *AppSettingInputProvisioning) GetCustomProvisioningInstructions() *string { - if o == nil { - return nil - } - return o.CustomProvisioningInstructions -} - -func (o *AppSettingInputProvisioning) GetProvisioningWebhook() *AppSettingInputProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -func (o *AppSettingInputProvisioning) GetAccessRemovalInlineWebhook() *AppSettingInputAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - type AppSettingInput struct { // AppStore App instructions that are shown to the requester. CustomRequestInstructions *string `json:"custom_request_instructions,omitempty"` // Request flow configuration to request access to app. - RequestFlow *AppSettingInputRequestFlow `json:"request_flow,omitempty"` + RequestFlow *AppStoreAppSettingsRequestFlowInput `json:"request_flow,omitempty"` // Provisioning flow configuration to request access to app. - Provisioning *AppSettingInputProvisioning `json:"provisioning,omitempty"` + Provisioning *AppStoreAppSettingsProvisioningInput `json:"provisioning,omitempty"` // Whether the app is in the app store. InAppStore *bool `default:"false" json:"in_app_store"` } @@ -354,14 +35,14 @@ func (o *AppSettingInput) GetCustomRequestInstructions() *string { return o.CustomRequestInstructions } -func (o *AppSettingInput) GetRequestFlow() *AppSettingInputRequestFlow { +func (o *AppSettingInput) GetRequestFlow() *AppStoreAppSettingsRequestFlowInput { if o == nil { return nil } return o.RequestFlow } -func (o *AppSettingInput) GetProvisioning() *AppSettingInputProvisioning { +func (o *AppSettingInput) GetProvisioning() *AppStoreAppSettingsProvisioningInput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/appsettingoutput.go b/internal/sdk/models/shared/appsettingoutput.go index 22bbf96..3ddf249 100644 --- a/internal/sdk/models/shared/appsettingoutput.go +++ b/internal/sdk/models/shared/appsettingoutput.go @@ -3,416 +3,16 @@ package shared import ( - "encoding/json" - "fmt" "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" ) -// AllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type AllowedGroupsConfigType string - -const ( - AllowedGroupsConfigTypeAllGroups AllowedGroupsConfigType = "ALL_GROUPS" - AllowedGroupsConfigTypeSpecifiedGroups AllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e AllowedGroupsConfigType) ToPointer() *AllowedGroupsConfigType { - return &e -} -func (e *AllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = AllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for AllowedGroupsConfigType: %v", v) - } -} - -// AllowedGroups - The allowed groups config associated with this config. -type AllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *AllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []Group `json:"groups,omitempty"` -} - -func (a AllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *AllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { - return err - } - return nil -} - -func (o *AllowedGroups) GetType() *AllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *AllowedGroups) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -// Approvers - AppStore App approvers assigned. -type Approvers struct { - // Groups assigned as support request approvers. - Groups []Group `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []User `json:"users,omitempty"` -} - -func (o *Approvers) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *Approvers) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// ApproversStage2 - AppStore App stage 2 approvers assigned. -type ApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []Group `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []User `json:"users,omitempty"` -} - -func (o *ApproversStage2) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *ApproversStage2) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// Admins - AppStore App admins assigned. -type Admins struct { - // Groups assigned as app admins. - Groups []Group `json:"groups,omitempty"` - // Users assigned as app admins. - Users []User `json:"users,omitempty"` -} - -func (o *Admins) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *Admins) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// RequestValidationInlineWebhook - A request validation webhook can be optionally associated with this config. -type RequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *RequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *RequestValidationInlineWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *RequestValidationInlineWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *RequestValidationInlineWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// RequestFlow - Request flow configuration to request access to app. -type RequestFlow struct { - // AppStore App visibility. - Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` - // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. - RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // The allowed groups config associated with this config. - AllowedGroups *AllowedGroups `json:"allowed_groups,omitempty"` - // AppStore App approvers assigned. - Approvers *Approvers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *ApproversStage2 `json:"approvers_stage_2,omitempty"` - // AppStore App admins assigned. - Admins *Admins `json:"admins,omitempty"` - // A request validation webhook can be optionally associated with this config. - RequestValidationInlineWebhook *RequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` -} - -func (o *RequestFlow) GetDiscoverability() *AppStoreVisibility { - if o == nil { - return nil - } - return o.Discoverability -} - -func (o *RequestFlow) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *RequestFlow) GetRequireManagerApproval() *bool { - if o == nil { - return nil - } - return o.RequireManagerApproval -} - -func (o *RequestFlow) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *RequestFlow) GetAllowedGroups() *AllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *RequestFlow) GetApprovers() *Approvers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *RequestFlow) GetApproversStage2() *ApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *RequestFlow) GetAdmins() *Admins { - if o == nil { - return nil - } - return o.Admins -} - -func (o *RequestFlow) GetRequestValidationInlineWebhook() *RequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -// ProvisioningWebhook - The provisioning webhook optionally associated with this config. -type ProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *ProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *ProvisioningWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *ProvisioningWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *ProvisioningWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// AccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this config. -type AccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *AccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *AccessRemovalInlineWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *AccessRemovalInlineWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *AccessRemovalInlineWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// Provisioning flow configuration to request access to app. -type Provisioning struct { - // If enabled, Approvers must choose a group to provision the user to for access requests. - GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Whether the app is configured to allow users to request multiple permissions in a single request - AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` - // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. - CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` - // The provisioning webhook optionally associated with this config. - ProvisioningWebhook *ProvisioningWebhook `json:"provisioning_webhook,omitempty"` - // A deprovisioning webhook can be optionally associated with this config. - AccessRemovalInlineWebhook *AccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` -} - -func (o *Provisioning) GetGroupsProvisioning() *GroupProvisioningOption { - if o == nil { - return nil - } - return o.GroupsProvisioning -} - -func (o *Provisioning) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *Provisioning) GetAllowMultiplePermissionSelection() *bool { - if o == nil { - return nil - } - return o.AllowMultiplePermissionSelection -} - -func (o *Provisioning) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *Provisioning) GetCustomProvisioningInstructions() *string { - if o == nil { - return nil - } - return o.CustomProvisioningInstructions -} - -func (o *Provisioning) GetProvisioningWebhook() *ProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -func (o *Provisioning) GetAccessRemovalInlineWebhook() *AccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - type AppSettingOutput struct { // AppStore App instructions that are shown to the requester. CustomRequestInstructions *string `json:"custom_request_instructions,omitempty"` // Request flow configuration to request access to app. - RequestFlow *RequestFlow `json:"request_flow,omitempty"` + RequestFlow *AppStoreAppSettingsRequestFlowOutput `json:"request_flow,omitempty"` // Provisioning flow configuration to request access to app. - Provisioning *Provisioning `json:"provisioning,omitempty"` + Provisioning *AppStoreAppSettingsProvisioningOutput `json:"provisioning,omitempty"` // Whether the app is in the app store. InAppStore *bool `default:"false" json:"in_app_store"` } @@ -435,14 +35,14 @@ func (o *AppSettingOutput) GetCustomRequestInstructions() *string { return o.CustomRequestInstructions } -func (o *AppSettingOutput) GetRequestFlow() *RequestFlow { +func (o *AppSettingOutput) GetRequestFlow() *AppStoreAppSettingsRequestFlowOutput { if o == nil { return nil } return o.RequestFlow } -func (o *AppSettingOutput) GetProvisioning() *Provisioning { +func (o *AppSettingOutput) GetProvisioning() *AppStoreAppSettingsProvisioningOutput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/appstoreappsettingsinput.go b/internal/sdk/models/shared/appstoreappsettingsinput.go index ff948fb..8e723b3 100644 --- a/internal/sdk/models/shared/appstoreappsettingsinput.go +++ b/internal/sdk/models/shared/appstoreappsettingsinput.go @@ -2,336 +2,13 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// AppStoreAppSettingsInputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type AppStoreAppSettingsInputAllowedGroupsConfigType string - -const ( - AppStoreAppSettingsInputAllowedGroupsConfigTypeAllGroups AppStoreAppSettingsInputAllowedGroupsConfigType = "ALL_GROUPS" - AppStoreAppSettingsInputAllowedGroupsConfigTypeSpecifiedGroups AppStoreAppSettingsInputAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e AppStoreAppSettingsInputAllowedGroupsConfigType) ToPointer() *AppStoreAppSettingsInputAllowedGroupsConfigType { - return &e -} -func (e *AppStoreAppSettingsInputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = AppStoreAppSettingsInputAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for AppStoreAppSettingsInputAllowedGroupsConfigType: %v", v) - } -} - -// AppStoreAppSettingsInputAllowedGroups - The allowed groups associated with this config. -type AppStoreAppSettingsInputAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *AppStoreAppSettingsInputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []BaseGroup `json:"groups,omitempty"` -} - -func (a AppStoreAppSettingsInputAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *AppStoreAppSettingsInputAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { - return err - } - return nil -} - -func (o *AppStoreAppSettingsInputAllowedGroups) GetType() *AppStoreAppSettingsInputAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *AppStoreAppSettingsInputAllowedGroups) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -// AppStoreAppSettingsInputApprovers - AppStore App approvers assigned. -type AppStoreAppSettingsInputApprovers struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AppStoreAppSettingsInputApprovers) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppStoreAppSettingsInputApprovers) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AppStoreAppSettingsInputApproversStage2 - AppStore App stage 2 approvers assigned. -type AppStoreAppSettingsInputApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AppStoreAppSettingsInputApproversStage2) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppStoreAppSettingsInputApproversStage2) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AppStoreAppSettingsInputAdmins - AppStore App admins assigned. -type AppStoreAppSettingsInputAdmins struct { - // Groups assigned as app admins. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as app admins. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *AppStoreAppSettingsInputAdmins) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppStoreAppSettingsInputAdmins) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// AppStoreAppSettingsInputRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this app. -type AppStoreAppSettingsInputRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AppStoreAppSettingsInputRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AppStoreAppSettingsInputRequestFlow - Request flow configuration to request access to app. -type AppStoreAppSettingsInputRequestFlow struct { - // AppStore App visibility. - Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` - // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. - RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // The allowed groups associated with this config. - AllowedGroups *AppStoreAppSettingsInputAllowedGroups `json:"allowed_groups,omitempty"` - // AppStore App approvers assigned. - Approvers *AppStoreAppSettingsInputApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *AppStoreAppSettingsInputApproversStage2 `json:"approvers_stage_2,omitempty"` - // AppStore App admins assigned. - Admins *AppStoreAppSettingsInputAdmins `json:"admins,omitempty"` - // A request validation webhook can be optionally associated with this app. - RequestValidationInlineWebhook *AppStoreAppSettingsInputRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetDiscoverability() *AppStoreVisibility { - if o == nil { - return nil - } - return o.Discoverability -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetRequireManagerApproval() *bool { - if o == nil { - return nil - } - return o.RequireManagerApproval -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetAllowedGroups() *AppStoreAppSettingsInputAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetApprovers() *AppStoreAppSettingsInputApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetApproversStage2() *AppStoreAppSettingsInputApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetAdmins() *AppStoreAppSettingsInputAdmins { - if o == nil { - return nil - } - return o.Admins -} - -func (o *AppStoreAppSettingsInputRequestFlow) GetRequestValidationInlineWebhook() *AppStoreAppSettingsInputRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -// AppStoreAppSettingsInputProvisioningWebhook - The provisioning webhook optionally associated with this app. -type AppStoreAppSettingsInputProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AppStoreAppSettingsInputProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AppStoreAppSettingsInputAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this app. -type AppStoreAppSettingsInputAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *AppStoreAppSettingsInputAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// AppStoreAppSettingsInputProvisioning - Provisioning flow configuration to request access to app. -type AppStoreAppSettingsInputProvisioning struct { - // If enabled, Approvers must choose a group to provision the user to for access requests. - GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Whether the app is configured to allow users to request multiple permissions in a single request - AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` - // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. - CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` - // The provisioning webhook optionally associated with this app. - ProvisioningWebhook *AppStoreAppSettingsInputProvisioningWebhook `json:"provisioning_webhook,omitempty"` - // A deprovisioning webhook can be optionally associated with this app. - AccessRemovalInlineWebhook *AppStoreAppSettingsInputAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` -} - -func (o *AppStoreAppSettingsInputProvisioning) GetGroupsProvisioning() *GroupProvisioningOption { - if o == nil { - return nil - } - return o.GroupsProvisioning -} - -func (o *AppStoreAppSettingsInputProvisioning) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *AppStoreAppSettingsInputProvisioning) GetAllowMultiplePermissionSelection() *bool { - if o == nil { - return nil - } - return o.AllowMultiplePermissionSelection -} - -func (o *AppStoreAppSettingsInputProvisioning) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *AppStoreAppSettingsInputProvisioning) GetCustomProvisioningInstructions() *string { - if o == nil { - return nil - } - return o.CustomProvisioningInstructions -} - -func (o *AppStoreAppSettingsInputProvisioning) GetProvisioningWebhook() *AppStoreAppSettingsInputProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -func (o *AppStoreAppSettingsInputProvisioning) GetAccessRemovalInlineWebhook() *AppStoreAppSettingsInputAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - type AppStoreAppSettingsInput struct { // AppStore App instructions that are shown to the requester. CustomRequestInstructions *string `json:"custom_request_instructions,omitempty"` // Request flow configuration to request access to app. - RequestFlow *AppStoreAppSettingsInputRequestFlow `json:"request_flow,omitempty"` + RequestFlow *AppStoreAppSettingsRequestFlowInput `json:"request_flow,omitempty"` // Provisioning flow configuration to request access to app. - Provisioning *AppStoreAppSettingsInputProvisioning `json:"provisioning,omitempty"` + Provisioning *AppStoreAppSettingsProvisioningInput `json:"provisioning,omitempty"` } func (o *AppStoreAppSettingsInput) GetCustomRequestInstructions() *string { @@ -341,14 +18,14 @@ func (o *AppStoreAppSettingsInput) GetCustomRequestInstructions() *string { return o.CustomRequestInstructions } -func (o *AppStoreAppSettingsInput) GetRequestFlow() *AppStoreAppSettingsInputRequestFlow { +func (o *AppStoreAppSettingsInput) GetRequestFlow() *AppStoreAppSettingsRequestFlowInput { if o == nil { return nil } return o.RequestFlow } -func (o *AppStoreAppSettingsInput) GetProvisioning() *AppStoreAppSettingsInputProvisioning { +func (o *AppStoreAppSettingsInput) GetProvisioning() *AppStoreAppSettingsProvisioningInput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/appstoreappsettingsoutput.go b/internal/sdk/models/shared/appstoreappsettingsoutput.go index 2211650..2e1f1e7 100644 --- a/internal/sdk/models/shared/appstoreappsettingsoutput.go +++ b/internal/sdk/models/shared/appstoreappsettingsoutput.go @@ -2,417 +2,13 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// AppStoreAppSettingsOutputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type AppStoreAppSettingsOutputAllowedGroupsConfigType string - -const ( - AppStoreAppSettingsOutputAllowedGroupsConfigTypeAllGroups AppStoreAppSettingsOutputAllowedGroupsConfigType = "ALL_GROUPS" - AppStoreAppSettingsOutputAllowedGroupsConfigTypeSpecifiedGroups AppStoreAppSettingsOutputAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e AppStoreAppSettingsOutputAllowedGroupsConfigType) ToPointer() *AppStoreAppSettingsOutputAllowedGroupsConfigType { - return &e -} -func (e *AppStoreAppSettingsOutputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = AppStoreAppSettingsOutputAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for AppStoreAppSettingsOutputAllowedGroupsConfigType: %v", v) - } -} - -// AppStoreAppSettingsOutputAllowedGroups - The allowed groups config associated with this config. -type AppStoreAppSettingsOutputAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *AppStoreAppSettingsOutputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []Group `json:"groups,omitempty"` -} - -func (a AppStoreAppSettingsOutputAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *AppStoreAppSettingsOutputAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { - return err - } - return nil -} - -func (o *AppStoreAppSettingsOutputAllowedGroups) GetType() *AppStoreAppSettingsOutputAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *AppStoreAppSettingsOutputAllowedGroups) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -// AppStoreAppSettingsOutputApprovers - AppStore App approvers assigned. -type AppStoreAppSettingsOutputApprovers struct { - // Groups assigned as support request approvers. - Groups []Group `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []User `json:"users,omitempty"` -} - -func (o *AppStoreAppSettingsOutputApprovers) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppStoreAppSettingsOutputApprovers) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// AppStoreAppSettingsOutputApproversStage2 - AppStore App stage 2 approvers assigned. -type AppStoreAppSettingsOutputApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []Group `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []User `json:"users,omitempty"` -} - -func (o *AppStoreAppSettingsOutputApproversStage2) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppStoreAppSettingsOutputApproversStage2) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// AppStoreAppSettingsOutputAdmins - AppStore App admins assigned. -type AppStoreAppSettingsOutputAdmins struct { - // Groups assigned as app admins. - Groups []Group `json:"groups,omitempty"` - // Users assigned as app admins. - Users []User `json:"users,omitempty"` -} - -func (o *AppStoreAppSettingsOutputAdmins) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *AppStoreAppSettingsOutputAdmins) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// AppStoreAppSettingsOutputRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this config. -type AppStoreAppSettingsOutputRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *AppStoreAppSettingsOutputRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *AppStoreAppSettingsOutputRequestValidationInlineWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *AppStoreAppSettingsOutputRequestValidationInlineWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *AppStoreAppSettingsOutputRequestValidationInlineWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// AppStoreAppSettingsOutputRequestFlow - Request flow configuration to request access to app. -type AppStoreAppSettingsOutputRequestFlow struct { - // AppStore App visibility. - Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` - // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. - RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // The allowed groups config associated with this config. - AllowedGroups *AppStoreAppSettingsOutputAllowedGroups `json:"allowed_groups,omitempty"` - // AppStore App approvers assigned. - Approvers *AppStoreAppSettingsOutputApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *AppStoreAppSettingsOutputApproversStage2 `json:"approvers_stage_2,omitempty"` - // AppStore App admins assigned. - Admins *AppStoreAppSettingsOutputAdmins `json:"admins,omitempty"` - // A request validation webhook can be optionally associated with this config. - RequestValidationInlineWebhook *AppStoreAppSettingsOutputRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetDiscoverability() *AppStoreVisibility { - if o == nil { - return nil - } - return o.Discoverability -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetRequireManagerApproval() *bool { - if o == nil { - return nil - } - return o.RequireManagerApproval -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetAllowedGroups() *AppStoreAppSettingsOutputAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetApprovers() *AppStoreAppSettingsOutputApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetApproversStage2() *AppStoreAppSettingsOutputApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetAdmins() *AppStoreAppSettingsOutputAdmins { - if o == nil { - return nil - } - return o.Admins -} - -func (o *AppStoreAppSettingsOutputRequestFlow) GetRequestValidationInlineWebhook() *AppStoreAppSettingsOutputRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -// AppStoreAppSettingsOutputProvisioningWebhook - The provisioning webhook optionally associated with this config. -type AppStoreAppSettingsOutputProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *AppStoreAppSettingsOutputProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *AppStoreAppSettingsOutputProvisioningWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *AppStoreAppSettingsOutputProvisioningWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *AppStoreAppSettingsOutputProvisioningWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// AppStoreAppSettingsOutputAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this config. -type AppStoreAppSettingsOutputAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *AppStoreAppSettingsOutputAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *AppStoreAppSettingsOutputAccessRemovalInlineWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *AppStoreAppSettingsOutputAccessRemovalInlineWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *AppStoreAppSettingsOutputAccessRemovalInlineWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// AppStoreAppSettingsOutputProvisioning - Provisioning flow configuration to request access to app. -type AppStoreAppSettingsOutputProvisioning struct { - // If enabled, Approvers must choose a group to provision the user to for access requests. - GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Whether the app is configured to allow users to request multiple permissions in a single request - AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` - // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. - CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` - // The provisioning webhook optionally associated with this config. - ProvisioningWebhook *AppStoreAppSettingsOutputProvisioningWebhook `json:"provisioning_webhook,omitempty"` - // A deprovisioning webhook can be optionally associated with this config. - AccessRemovalInlineWebhook *AppStoreAppSettingsOutputAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetGroupsProvisioning() *GroupProvisioningOption { - if o == nil { - return nil - } - return o.GroupsProvisioning -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetAllowMultiplePermissionSelection() *bool { - if o == nil { - return nil - } - return o.AllowMultiplePermissionSelection -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetCustomProvisioningInstructions() *string { - if o == nil { - return nil - } - return o.CustomProvisioningInstructions -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetProvisioningWebhook() *AppStoreAppSettingsOutputProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -func (o *AppStoreAppSettingsOutputProvisioning) GetAccessRemovalInlineWebhook() *AppStoreAppSettingsOutputAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - type AppStoreAppSettingsOutput struct { // AppStore App instructions that are shown to the requester. CustomRequestInstructions *string `json:"custom_request_instructions,omitempty"` // Request flow configuration to request access to app. - RequestFlow *AppStoreAppSettingsOutputRequestFlow `json:"request_flow,omitempty"` + RequestFlow *AppStoreAppSettingsRequestFlowOutput `json:"request_flow,omitempty"` // Provisioning flow configuration to request access to app. - Provisioning *AppStoreAppSettingsOutputProvisioning `json:"provisioning,omitempty"` + Provisioning *AppStoreAppSettingsProvisioningOutput `json:"provisioning,omitempty"` } func (o *AppStoreAppSettingsOutput) GetCustomRequestInstructions() *string { @@ -422,14 +18,14 @@ func (o *AppStoreAppSettingsOutput) GetCustomRequestInstructions() *string { return o.CustomRequestInstructions } -func (o *AppStoreAppSettingsOutput) GetRequestFlow() *AppStoreAppSettingsOutputRequestFlow { +func (o *AppStoreAppSettingsOutput) GetRequestFlow() *AppStoreAppSettingsRequestFlowOutput { if o == nil { return nil } return o.RequestFlow } -func (o *AppStoreAppSettingsOutput) GetProvisioning() *AppStoreAppSettingsOutputProvisioning { +func (o *AppStoreAppSettingsOutput) GetProvisioning() *AppStoreAppSettingsProvisioningOutput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/appstoreappsettingsprovisioninginput.go b/internal/sdk/models/shared/appstoreappsettingsprovisioninginput.go new file mode 100644 index 0000000..43d08d7 --- /dev/null +++ b/internal/sdk/models/shared/appstoreappsettingsprovisioninginput.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type AppStoreAppSettingsProvisioningInput struct { + // If enabled, Approvers must choose a group to provision the user to for access requests. + GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` + // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. + TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` + // Whether the app is configured to allow users to request multiple permissions in a single request + AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` + // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. + ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` + // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. + CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` + // The provisioning webhook optionally associated with this app. + ProvisioningWebhook *BaseInlineWebhook `json:"provisioning_webhook,omitempty"` + // A deprovisioning webhook can be optionally associated with this app. + AccessRemovalInlineWebhook *BaseInlineWebhook `json:"access_removal_inline_webhook,omitempty"` +} + +func (o *AppStoreAppSettingsProvisioningInput) GetGroupsProvisioning() *GroupProvisioningOption { + if o == nil { + return nil + } + return o.GroupsProvisioning +} + +func (o *AppStoreAppSettingsProvisioningInput) GetTimeBasedAccess() []TimeBasedAccessOptions { + if o == nil { + return nil + } + return o.TimeBasedAccess +} + +func (o *AppStoreAppSettingsProvisioningInput) GetAllowMultiplePermissionSelection() *bool { + if o == nil { + return nil + } + return o.AllowMultiplePermissionSelection +} + +func (o *AppStoreAppSettingsProvisioningInput) GetManualStepsNeeded() *bool { + if o == nil { + return nil + } + return o.ManualStepsNeeded +} + +func (o *AppStoreAppSettingsProvisioningInput) GetCustomProvisioningInstructions() *string { + if o == nil { + return nil + } + return o.CustomProvisioningInstructions +} + +func (o *AppStoreAppSettingsProvisioningInput) GetProvisioningWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.ProvisioningWebhook +} + +func (o *AppStoreAppSettingsProvisioningInput) GetAccessRemovalInlineWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.AccessRemovalInlineWebhook +} diff --git a/internal/sdk/models/shared/appstoreappsettingsprovisioningoutput.go b/internal/sdk/models/shared/appstoreappsettingsprovisioningoutput.go new file mode 100644 index 0000000..ca0a78b --- /dev/null +++ b/internal/sdk/models/shared/appstoreappsettingsprovisioningoutput.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type AppStoreAppSettingsProvisioningOutput struct { + // If enabled, Approvers must choose a group to provision the user to for access requests. + GroupsProvisioning *GroupProvisioningOption `json:"groups_provisioning,omitempty"` + // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. + TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` + // Whether the app is configured to allow users to request multiple permissions in a single request + AllowMultiplePermissionSelection *bool `json:"allow_multiple_permission_selection,omitempty"` + // If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request. + ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` + // Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported. + CustomProvisioningInstructions *string `json:"custom_provisioning_instructions,omitempty"` + // The provisioning webhook optionally associated with this config. + ProvisioningWebhook *InlineWebhook `json:"provisioning_webhook,omitempty"` + // A deprovisioning webhook can be optionally associated with this config. + AccessRemovalInlineWebhook *InlineWebhook `json:"access_removal_inline_webhook,omitempty"` +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetGroupsProvisioning() *GroupProvisioningOption { + if o == nil { + return nil + } + return o.GroupsProvisioning +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetTimeBasedAccess() []TimeBasedAccessOptions { + if o == nil { + return nil + } + return o.TimeBasedAccess +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetAllowMultiplePermissionSelection() *bool { + if o == nil { + return nil + } + return o.AllowMultiplePermissionSelection +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetManualStepsNeeded() *bool { + if o == nil { + return nil + } + return o.ManualStepsNeeded +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetCustomProvisioningInstructions() *string { + if o == nil { + return nil + } + return o.CustomProvisioningInstructions +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetProvisioningWebhook() *InlineWebhook { + if o == nil { + return nil + } + return o.ProvisioningWebhook +} + +func (o *AppStoreAppSettingsProvisioningOutput) GetAccessRemovalInlineWebhook() *InlineWebhook { + if o == nil { + return nil + } + return o.AccessRemovalInlineWebhook +} diff --git a/internal/sdk/models/shared/appstoreappsettingsrequestflowinput.go b/internal/sdk/models/shared/appstoreappsettingsrequestflowinput.go new file mode 100644 index 0000000..cdcd21f --- /dev/null +++ b/internal/sdk/models/shared/appstoreappsettingsrequestflowinput.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type AppStoreAppSettingsRequestFlowInput struct { + // AppStore App visibility. + Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` + // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. + CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` + // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. + RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` + // Only turn on when working with sensitive permissions to ensure a smooth employee experience. + RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` + // The allowed groups associated with this config. + AllowedGroups *AllowedGroupsConfigInput `json:"allowed_groups,omitempty"` + // AppStore App approvers assigned. + Approvers *AppApproversInput `json:"approvers,omitempty"` + // AppStore App stage 2 approvers assigned. + ApproversStage2 *AppApproversInput `json:"approvers_stage_2,omitempty"` + // AppStore App admins assigned. + Admins *AppAdminsInput `json:"admins,omitempty"` + // A request validation webhook can be optionally associated with this app. + RequestValidationInlineWebhook *BaseInlineWebhook `json:"request_validation_inline_webhook,omitempty"` +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetDiscoverability() *AppStoreVisibility { + if o == nil { + return nil + } + return o.Discoverability +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetCustomApprovalMessage() *string { + if o == nil { + return nil + } + return o.CustomApprovalMessage +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetRequireManagerApproval() *bool { + if o == nil { + return nil + } + return o.RequireManagerApproval +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetRequireAdditionalApproval() *bool { + if o == nil { + return nil + } + return o.RequireAdditionalApproval +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetAllowedGroups() *AllowedGroupsConfigInput { + if o == nil { + return nil + } + return o.AllowedGroups +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetApprovers() *AppApproversInput { + if o == nil { + return nil + } + return o.Approvers +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetApproversStage2() *AppApproversInput { + if o == nil { + return nil + } + return o.ApproversStage2 +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetAdmins() *AppAdminsInput { + if o == nil { + return nil + } + return o.Admins +} + +func (o *AppStoreAppSettingsRequestFlowInput) GetRequestValidationInlineWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.RequestValidationInlineWebhook +} diff --git a/internal/sdk/models/shared/appstoreappsettingsrequestflowoutput.go b/internal/sdk/models/shared/appstoreappsettingsrequestflowoutput.go new file mode 100644 index 0000000..5b6ea18 --- /dev/null +++ b/internal/sdk/models/shared/appstoreappsettingsrequestflowoutput.go @@ -0,0 +1,153 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AppStoreAppSettingsRequestFlowOutputApproversAppApproversOutput - AppStore App approvers assigned. +type AppStoreAppSettingsRequestFlowOutputApproversAppApproversOutput struct { + // Groups assigned as support request approvers. + Groups []Group `json:"groups,omitempty"` + // Users assigned as support request approvers. + Users []User `json:"users,omitempty"` +} + +func (o *AppStoreAppSettingsRequestFlowOutputApproversAppApproversOutput) GetGroups() []Group { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AppStoreAppSettingsRequestFlowOutputApproversAppApproversOutput) GetUsers() []User { + if o == nil { + return nil + } + return o.Users +} + +// AppStoreAppSettingsRequestFlowOutputAppApproversOutput - AppStore App stage 2 approvers assigned. +type AppStoreAppSettingsRequestFlowOutputAppApproversOutput struct { + // Groups assigned as support request approvers. + Groups []Group `json:"groups,omitempty"` + // Users assigned as support request approvers. + Users []User `json:"users,omitempty"` +} + +func (o *AppStoreAppSettingsRequestFlowOutputAppApproversOutput) GetGroups() []Group { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AppStoreAppSettingsRequestFlowOutputAppApproversOutput) GetUsers() []User { + if o == nil { + return nil + } + return o.Users +} + +// AppAdminsOutput - AppStore App admins assigned. +type AppAdminsOutput struct { + // Groups assigned as app admins. + Groups []Group `json:"groups,omitempty"` + // Users assigned as app admins. + Users []User `json:"users,omitempty"` +} + +func (o *AppAdminsOutput) GetGroups() []Group { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AppAdminsOutput) GetUsers() []User { + if o == nil { + return nil + } + return o.Users +} + +type AppStoreAppSettingsRequestFlowOutput struct { + // AppStore App visibility. + Discoverability *AppStoreVisibility `json:"discoverability,omitempty"` + // After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported. + CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` + // When a user makes an access request, require that their manager approves the request before moving on to additional approvals. + RequireManagerApproval *bool `json:"require_manager_approval,omitempty"` + // Only turn on when working with sensitive permissions to ensure a smooth employee experience. + RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` + // The allowed groups config associated with this config. + AllowedGroups *AllowedGroupsConfigOutput `json:"allowed_groups,omitempty"` + // AppStore App approvers assigned. + Approvers *AppStoreAppSettingsRequestFlowOutputApproversAppApproversOutput `json:"approvers,omitempty"` + // AppStore App stage 2 approvers assigned. + ApproversStage2 *AppStoreAppSettingsRequestFlowOutputAppApproversOutput `json:"approvers_stage_2,omitempty"` + // AppStore App admins assigned. + Admins *AppAdminsOutput `json:"admins,omitempty"` + // A request validation webhook can be optionally associated with this config. + RequestValidationInlineWebhook *InlineWebhook `json:"request_validation_inline_webhook,omitempty"` +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetDiscoverability() *AppStoreVisibility { + if o == nil { + return nil + } + return o.Discoverability +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetCustomApprovalMessage() *string { + if o == nil { + return nil + } + return o.CustomApprovalMessage +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetRequireManagerApproval() *bool { + if o == nil { + return nil + } + return o.RequireManagerApproval +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetRequireAdditionalApproval() *bool { + if o == nil { + return nil + } + return o.RequireAdditionalApproval +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetAllowedGroups() *AllowedGroupsConfigOutput { + if o == nil { + return nil + } + return o.AllowedGroups +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetApprovers() *AppStoreAppSettingsRequestFlowOutputApproversAppApproversOutput { + if o == nil { + return nil + } + return o.Approvers +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetApproversStage2() *AppStoreAppSettingsRequestFlowOutputAppApproversOutput { + if o == nil { + return nil + } + return o.ApproversStage2 +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetAdmins() *AppAdminsOutput { + if o == nil { + return nil + } + return o.Admins +} + +func (o *AppStoreAppSettingsRequestFlowOutput) GetRequestValidationInlineWebhook() *InlineWebhook { + if o == nil { + return nil + } + return o.RequestValidationInlineWebhook +} diff --git a/internal/sdk/models/shared/appstorevisibility.go b/internal/sdk/models/shared/appstorevisibility.go index c7a02dd..8b3c940 100644 --- a/internal/sdk/models/shared/appstorevisibility.go +++ b/internal/sdk/models/shared/appstorevisibility.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// AppStoreVisibility - An enumeration. type AppStoreVisibility string const ( diff --git a/internal/sdk/models/shared/appstorevisibilityoption.go b/internal/sdk/models/shared/appstorevisibilityoption.go new file mode 100644 index 0000000..0a91759 --- /dev/null +++ b/internal/sdk/models/shared/appstorevisibilityoption.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type AppStoreVisibilityOption string + +const ( + AppStoreVisibilityOptionHidden AppStoreVisibilityOption = "HIDDEN" + AppStoreVisibilityOptionVisible AppStoreVisibilityOption = "VISIBLE" +) + +func (e AppStoreVisibilityOption) ToPointer() *AppStoreVisibilityOption { + return &e +} +func (e *AppStoreVisibilityOption) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "HIDDEN": + fallthrough + case "VISIBLE": + *e = AppStoreVisibilityOption(v) + return nil + default: + return fmt.Errorf("invalid value for AppStoreVisibilityOption: %v", v) + } +} diff --git a/internal/sdk/models/shared/cost.go b/internal/sdk/models/shared/cost.go new file mode 100644 index 0000000..6ea2d13 --- /dev/null +++ b/internal/sdk/models/shared/cost.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type Cost struct { + // The currency in which this cost is stored + Currency *string `json:"currency,omitempty"` + // The quantity of the cost in terms of the specified currency + Value float64 `json:"value"` +} + +func (o *Cost) GetCurrency() *string { + if o == nil { + return nil + } + return o.Currency +} + +func (o *Cost) GetValue() float64 { + if o == nil { + return 0.0 + } + return o.Value +} diff --git a/internal/sdk/models/shared/createaccessrequestinput.go b/internal/sdk/models/shared/createaccessrequestinput.go index 2bbf1b4..b580c92 100644 --- a/internal/sdk/models/shared/createaccessrequestinput.go +++ b/internal/sdk/models/shared/createaccessrequestinput.go @@ -12,7 +12,7 @@ type CreateAccessRequestInput struct { BusinessJustification *string `json:"business_justification,omitempty"` // [Deprecated, use access_length] Once granted, how long the access should last. Omit for permanent access. ExpirationInSeconds *int64 `json:"expiration_in_seconds,omitempty"` - // Once granted, how long the access should last. Omit for permanent access. + // Once granted, how long the access should last. Omit for permanent access. All possible values are '2 hours', '4 hours', '8 hours', '12 hours', '1 day', '2 days', '3 days', '7 days', '14 days', '30 days', '90 days', 'Unlimited', but the exact options depend on the settings of the app and permissions. AccessLength *string `json:"access_length,omitempty"` // The IDs of the requestable permissions the user is requesting access to. Omit this to just request access to the app. RequestablePermissionIds []string `json:"requestable_permission_ids,omitempty"` diff --git a/internal/sdk/models/shared/discoverysource.go b/internal/sdk/models/shared/discoverysource.go index 6ad0507..4175e7a 100644 --- a/internal/sdk/models/shared/discoverysource.go +++ b/internal/sdk/models/shared/discoverysource.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// DiscoverySource - An enumeration. type DiscoverySource string const ( diff --git a/internal/sdk/models/shared/domainappstatus.go b/internal/sdk/models/shared/domainappstatus.go index 455b7f5..eb3dfb2 100644 --- a/internal/sdk/models/shared/domainappstatus.go +++ b/internal/sdk/models/shared/domainappstatus.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// DomainAppStatus - An enumeration. type DomainAppStatus string const ( diff --git a/internal/sdk/models/shared/fileupload.go b/internal/sdk/models/shared/fileupload.go index 3a94ea8..4005149 100644 --- a/internal/sdk/models/shared/fileupload.go +++ b/internal/sdk/models/shared/fileupload.go @@ -2,18 +2,30 @@ package shared +import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" +) + type FileUpload struct { // The type of content being uploaded. The only supported type today is 'url' - Type FileUploadType `json:"type"` + type_ FileUploadType `const:"url" json:"type"` // The data to upload. This should be a publicly accessible URL that resolves to a file Value string `json:"value"` } -func (o *FileUpload) GetType() FileUploadType { - if o == nil { - return FileUploadType("") +func (f FileUpload) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *FileUpload) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, false); err != nil { + return err } - return o.Type + return nil +} + +func (o *FileUpload) GetType() FileUploadType { + return FileUploadTypeURL } func (o *FileUpload) GetValue() string { diff --git a/internal/sdk/models/shared/fileuploadtype.go b/internal/sdk/models/shared/fileuploadtype.go index b40f887..dd8c548 100644 --- a/internal/sdk/models/shared/fileuploadtype.go +++ b/internal/sdk/models/shared/fileuploadtype.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// FileUploadType - An enumeration. type FileUploadType string const ( diff --git a/internal/sdk/models/shared/flowstate.go b/internal/sdk/models/shared/flowstate.go index aac5f03..5cffc6f 100644 --- a/internal/sdk/models/shared/flowstate.go +++ b/internal/sdk/models/shared/flowstate.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// FlowState - An enumeration. type FlowState string const ( diff --git a/internal/sdk/models/shared/founddocumentsupload.go b/internal/sdk/models/shared/founddocumentsupload.go index abab067..64bfb32 100644 --- a/internal/sdk/models/shared/founddocumentsupload.go +++ b/internal/sdk/models/shared/founddocumentsupload.go @@ -2,28 +2,6 @@ package shared -// TotalCost - The total cost of the contract. If this is a multi-year contract, this should include the cost for future years -type TotalCost struct { - // The currency in which this cost is stored - Currency *string `json:"currency,omitempty"` - // The quantity of the cost in terms of the specified currency - Value int64 `json:"value"` -} - -func (o *TotalCost) GetCurrency() *string { - if o == nil { - return nil - } - return o.Currency -} - -func (o *TotalCost) GetValue() int64 { - if o == nil { - return 0 - } - return o.Value -} - type FoundDocumentsUpload struct { // A value that can be used to uniquely identify this contract (e.g. PO number, file name, etc) UniqueIdentifier string `json:"unique_identifier"` @@ -38,7 +16,7 @@ type FoundDocumentsUpload struct { // By passing the ID of an application within Lumos, it will appear as if this Found Document was sourced from that app SourceAppID *string `json:"source_app_id,omitempty"` // The total cost of the contract. If this is a multi-year contract, this should include the cost for future years - TotalCost *TotalCost `json:"total_cost,omitempty"` + TotalCost *Cost `json:"total_cost,omitempty"` // The line items on the contract LineItems []LineItemUpload `json:"line_items,omitempty"` } @@ -85,7 +63,7 @@ func (o *FoundDocumentsUpload) GetSourceAppID() *string { return o.SourceAppID } -func (o *FoundDocumentsUpload) GetTotalCost() *TotalCost { +func (o *FoundDocumentsUpload) GetTotalCost() *Cost { if o == nil { return nil } diff --git a/internal/sdk/models/shared/group.go b/internal/sdk/models/shared/group.go index dadebdf..e07543e 100644 --- a/internal/sdk/models/shared/group.go +++ b/internal/sdk/models/shared/group.go @@ -2,39 +2,6 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// Lifecycle - The lifecycle of this group. -type Lifecycle string - -const ( - LifecycleSynced Lifecycle = "SYNCED" - LifecycleNative Lifecycle = "NATIVE" -) - -func (e Lifecycle) ToPointer() *Lifecycle { - return &e -} -func (e *Lifecycle) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "SYNCED": - fallthrough - case "NATIVE": - *e = Lifecycle(v) - return nil - default: - return fmt.Errorf("invalid value for Lifecycle: %v", v) - } -} - type Group struct { // The ID of this group. ID *string `json:"id,omitempty"` @@ -47,22 +14,11 @@ type Group struct { // The description of this group. Description *string `json:"description,omitempty"` // The lifecycle of this group. - GroupLifecycle *Lifecycle `default:"SYNCED" json:"group_lifecycle"` + GroupLifecycle *Lifecycle `json:"group_lifecycle,omitempty"` // The ID of the app that sources this group. SourceAppID *string `json:"source_app_id,omitempty"` } -func (g Group) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(g, "", false) -} - -func (g *Group) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { - return err - } - return nil -} - func (o *Group) GetID() *string { if o == nil { return nil diff --git a/internal/sdk/models/shared/groupprovisioningoption.go b/internal/sdk/models/shared/groupprovisioningoption.go index ee7abb1..215588c 100644 --- a/internal/sdk/models/shared/groupprovisioningoption.go +++ b/internal/sdk/models/shared/groupprovisioningoption.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// GroupProvisioningOption - An enumeration. type GroupProvisioningOption string const ( diff --git a/internal/sdk/models/shared/inlinewebhooktype.go b/internal/sdk/models/shared/inlinewebhooktype.go index ecd5d24..631c30d 100644 --- a/internal/sdk/models/shared/inlinewebhooktype.go +++ b/internal/sdk/models/shared/inlinewebhooktype.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// InlineWebhookType - An enumeration. type InlineWebhookType string const ( diff --git a/internal/sdk/models/shared/lifecycle.go b/internal/sdk/models/shared/lifecycle.go new file mode 100644 index 0000000..3d27656 --- /dev/null +++ b/internal/sdk/models/shared/lifecycle.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type Lifecycle string + +const ( + LifecycleSynced Lifecycle = "SYNCED" + LifecycleNative Lifecycle = "NATIVE" +) + +func (e Lifecycle) ToPointer() *Lifecycle { + return &e +} +func (e *Lifecycle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SYNCED": + fallthrough + case "NATIVE": + *e = Lifecycle(v) + return nil + default: + return fmt.Errorf("invalid value for Lifecycle: %v", v) + } +} diff --git a/internal/sdk/models/shared/limitoffsetpageactivitylog.go b/internal/sdk/models/shared/limitoffsetpageactivitylog.go index 76449fc..068e218 100644 --- a/internal/sdk/models/shared/limitoffsetpageactivitylog.go +++ b/internal/sdk/models/shared/limitoffsetpageactivitylog.go @@ -4,9 +4,9 @@ package shared type LimitOffsetPageActivityLog struct { Items []ActivityLog `json:"items"` - Total *int64 `json:"total,omitempty"` - Limit *int64 `json:"limit,omitempty"` - Offset *int64 `json:"offset,omitempty"` + Total *int64 `json:"total"` + Limit *int64 `json:"limit"` + Offset *int64 `json:"offset"` Links Links `json:"links"` } diff --git a/internal/sdk/models/shared/lineitem.go b/internal/sdk/models/shared/lineitem.go index 8ab5e00..938c625 100644 --- a/internal/sdk/models/shared/lineitem.go +++ b/internal/sdk/models/shared/lineitem.go @@ -2,40 +2,10 @@ package shared -// PerMonth - The per unit cost associated with this line item, amortized to the cost per month -type PerMonth struct { - // The currency in which this cost is stored - Currency *string `json:"currency,omitempty"` - // The quantity of the cost in terms of the specified currency - Value int64 `json:"value"` -} - -func (o *PerMonth) GetCurrency() *string { - if o == nil { - return nil - } - return o.Currency -} - -func (o *PerMonth) GetValue() int64 { - if o == nil { - return 0 - } - return o.Value -} - -// UnitCost - The unit cost of this line item -type UnitCost struct { - // The per unit cost associated with this line item, amortized to the cost per month - PerMonth PerMonth `json:"per_month"` -} - -func (o *UnitCost) GetPerMonth() PerMonth { - if o == nil { - return PerMonth{} - } - return o.PerMonth -} +import ( + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/types" +) type LineItem struct { // The name of the line item as stored in Lumos @@ -45,7 +15,22 @@ type LineItem struct { // The number of units purchased for this line item Quantity int64 `json:"quantity"` // The unit cost of this line item - UnitCost UnitCost `json:"unit_cost"` + UnitCost LineItemUnitCost `json:"unit_cost"` + // The start of the line item + StartDate *types.Date `json:"start_date"` + // The end of the line item. Null for monthly line items. + EndDate *types.Date `json:"end_date"` +} + +func (l LineItem) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *LineItem) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil } func (o *LineItem) GetName() string { @@ -69,9 +54,23 @@ func (o *LineItem) GetQuantity() int64 { return o.Quantity } -func (o *LineItem) GetUnitCost() UnitCost { +func (o *LineItem) GetUnitCost() LineItemUnitCost { if o == nil { - return UnitCost{} + return LineItemUnitCost{} } return o.UnitCost } + +func (o *LineItem) GetStartDate() *types.Date { + if o == nil { + return nil + } + return o.StartDate +} + +func (o *LineItem) GetEndDate() *types.Date { + if o == nil { + return nil + } + return o.EndDate +} diff --git a/internal/sdk/models/shared/lineiteminput.go b/internal/sdk/models/shared/lineiteminput.go index 735c864..209196f 100644 --- a/internal/sdk/models/shared/lineiteminput.go +++ b/internal/sdk/models/shared/lineiteminput.go @@ -2,28 +2,6 @@ package shared -// LineItemInputUnitCost - The per-unit cost of the line item -type LineItemInputUnitCost struct { - // The period which this cost covers. Available options are per_month or per_year - Period string `json:"period"` - // The cost in terms of the specified currency (4 decimal places supported) - Value float64 `json:"value"` -} - -func (o *LineItemInputUnitCost) GetPeriod() string { - if o == nil { - return "" - } - return o.Period -} - -func (o *LineItemInputUnitCost) GetValue() float64 { - if o == nil { - return 0.0 - } - return o.Value -} - type LineItemInput struct { // The name of the line item as stored in Lumos Name string `json:"name"` @@ -32,7 +10,7 @@ type LineItemInput struct { // The number of units purchased for this line item Quantity int64 `json:"quantity"` // The per-unit cost of the line item - UnitCost LineItemInputUnitCost `json:"unit_cost"` + UnitCost LineItemUnitCostInput `json:"unit_cost"` } func (o *LineItemInput) GetName() string { @@ -56,9 +34,9 @@ func (o *LineItemInput) GetQuantity() int64 { return o.Quantity } -func (o *LineItemInput) GetUnitCost() LineItemInputUnitCost { +func (o *LineItemInput) GetUnitCost() LineItemUnitCostInput { if o == nil { - return LineItemInputUnitCost{} + return LineItemUnitCostInput{} } return o.UnitCost } diff --git a/internal/sdk/models/shared/lineitemunitcost.go b/internal/sdk/models/shared/lineitemunitcost.go new file mode 100644 index 0000000..d11f9ce --- /dev/null +++ b/internal/sdk/models/shared/lineitemunitcost.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type LineItemUnitCost struct { + // The per unit cost associated with this line item, amortized to the cost per month + PerMonth Cost `json:"per_month"` +} + +func (o *LineItemUnitCost) GetPerMonth() Cost { + if o == nil { + return Cost{} + } + return o.PerMonth +} diff --git a/internal/sdk/models/shared/lineitemunitcostinput.go b/internal/sdk/models/shared/lineitemunitcostinput.go new file mode 100644 index 0000000..92c2630 --- /dev/null +++ b/internal/sdk/models/shared/lineitemunitcostinput.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" +) + +type LineItemUnitCostInputValueType string + +const ( + LineItemUnitCostInputValueTypeNumber LineItemUnitCostInputValueType = "number" + LineItemUnitCostInputValueTypeStr LineItemUnitCostInputValueType = "str" +) + +// LineItemUnitCostInputValue - The cost in terms of the specified currency (4 decimal places supported) +type LineItemUnitCostInputValue struct { + Number *float64 + Str *string + + Type LineItemUnitCostInputValueType +} + +func CreateLineItemUnitCostInputValueNumber(number float64) LineItemUnitCostInputValue { + typ := LineItemUnitCostInputValueTypeNumber + + return LineItemUnitCostInputValue{ + Number: &number, + Type: typ, + } +} + +func CreateLineItemUnitCostInputValueStr(str string) LineItemUnitCostInputValue { + typ := LineItemUnitCostInputValueTypeStr + + return LineItemUnitCostInputValue{ + Str: &str, + Type: typ, + } +} + +func (u *LineItemUnitCostInputValue) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = LineItemUnitCostInputValueTypeNumber + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = LineItemUnitCostInputValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for LineItemUnitCostInputValue", string(data)) +} + +func (u LineItemUnitCostInputValue) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + return nil, errors.New("could not marshal union type LineItemUnitCostInputValue: all fields are null") +} + +type LineItemUnitCostInput struct { + // The period which this cost covers. Available options are per_month or per_year + Period string `json:"period"` + // The cost in terms of the specified currency (4 decimal places supported) + Value LineItemUnitCostInputValue `json:"value"` +} + +func (o *LineItemUnitCostInput) GetPeriod() string { + if o == nil { + return "" + } + return o.Period +} + +func (o *LineItemUnitCostInput) GetValue() LineItemUnitCostInputValue { + if o == nil { + return LineItemUnitCostInputValue{} + } + return o.Value +} diff --git a/internal/sdk/models/shared/lineitemupload.go b/internal/sdk/models/shared/lineitemupload.go index f46edcd..073e0b0 100644 --- a/internal/sdk/models/shared/lineitemupload.go +++ b/internal/sdk/models/shared/lineitemupload.go @@ -2,35 +2,13 @@ package shared -// LineItemUploadUnitCost - The unit cost of this line item -type LineItemUploadUnitCost struct { - // The currency in which this cost is stored - Currency *string `json:"currency,omitempty"` - // The quantity of the cost in terms of the specified currency - Value int64 `json:"value"` -} - -func (o *LineItemUploadUnitCost) GetCurrency() *string { - if o == nil { - return nil - } - return o.Currency -} - -func (o *LineItemUploadUnitCost) GetValue() int64 { - if o == nil { - return 0 - } - return o.Value -} - type LineItemUpload struct { // The name of the line item as stored in Lumos Name string `json:"name"` // The number of units purchased for this line item Quantity int64 `json:"quantity"` // The unit cost of this line item - UnitCost LineItemUploadUnitCost `json:"unit_cost"` + UnitCost Cost `json:"unit_cost"` } func (o *LineItemUpload) GetName() string { @@ -47,9 +25,9 @@ func (o *LineItemUpload) GetQuantity() int64 { return o.Quantity } -func (o *LineItemUpload) GetUnitCost() LineItemUploadUnitCost { +func (o *LineItemUpload) GetUnitCost() Cost { if o == nil { - return LineItemUploadUnitCost{} + return Cost{} } return o.UnitCost } diff --git a/internal/sdk/models/shared/links.go b/internal/sdk/models/shared/links.go index 03edfbb..dfd0aa6 100644 --- a/internal/sdk/models/shared/links.go +++ b/internal/sdk/models/shared/links.go @@ -3,11 +3,11 @@ package shared type Links struct { - First *string `json:"first,omitempty"` - Last *string `json:"last,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Prev *string `json:"prev,omitempty"` + First *string `json:"first"` + Last *string `json:"last"` + Self *string `json:"self"` + Next *string `json:"next"` + Prev *string `json:"prev"` } func (o *Links) GetFirst() *string { diff --git a/internal/sdk/models/shared/managerapprovaloption.go b/internal/sdk/models/shared/managerapprovaloption.go new file mode 100644 index 0000000..be2b05f --- /dev/null +++ b/internal/sdk/models/shared/managerapprovaloption.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type ManagerApprovalOption string + +const ( + ManagerApprovalOptionNone ManagerApprovalOption = "NONE" + ManagerApprovalOptionInitialApproval ManagerApprovalOption = "INITIAL_APPROVAL" +) + +func (e ManagerApprovalOption) ToPointer() *ManagerApprovalOption { + return &e +} +func (e *ManagerApprovalOption) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "INITIAL_APPROVAL": + *e = ManagerApprovalOption(v) + return nil + default: + return fmt.Errorf("invalid value for ManagerApprovalOption: %v", v) + } +} diff --git a/internal/sdk/models/shared/ordercustomattribute.go b/internal/sdk/models/shared/ordercustomattribute.go deleted file mode 100644 index dfef142..0000000 --- a/internal/sdk/models/shared/ordercustomattribute.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -type OrderCustomAttribute struct { - // The type of custom attribute. Only text and user options are available today - Type OrderCustomAttributeType `json:"type"` - // The value of the attribute for an individual Order - Value *string `json:"value,omitempty"` -} - -func (o *OrderCustomAttribute) GetType() OrderCustomAttributeType { - if o == nil { - return OrderCustomAttributeType("") - } - return o.Type -} - -func (o *OrderCustomAttribute) GetValue() *string { - if o == nil { - return nil - } - return o.Value -} diff --git a/internal/sdk/models/shared/ordercustomattributetype.go b/internal/sdk/models/shared/ordercustomattributetype.go deleted file mode 100644 index e312c88..0000000 --- a/internal/sdk/models/shared/ordercustomattributetype.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "encoding/json" - "fmt" -) - -// OrderCustomAttributeType - An enumeration. -type OrderCustomAttributeType string - -const ( - OrderCustomAttributeTypeText OrderCustomAttributeType = "TEXT" - OrderCustomAttributeTypeUser OrderCustomAttributeType = "USER" -) - -func (e OrderCustomAttributeType) ToPointer() *OrderCustomAttributeType { - return &e -} -func (e *OrderCustomAttributeType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "TEXT": - fallthrough - case "USER": - *e = OrderCustomAttributeType(v) - return nil - default: - return fmt.Errorf("invalid value for OrderCustomAttributeType: %v", v) - } -} diff --git a/internal/sdk/models/shared/orderinput.go b/internal/sdk/models/shared/orderinput.go index defd03f..689ce05 100644 --- a/internal/sdk/models/shared/orderinput.go +++ b/internal/sdk/models/shared/orderinput.go @@ -7,24 +7,11 @@ import ( "github.com/teamlumos/terraform-provider-lumos/internal/sdk/types" ) -// OrderInputVendor - Information about the vendor associated with this contract. Currently, we will only support a name field. -type OrderInputVendor struct { - // A user friendly name for the vendor - Name string `json:"name"` -} - -func (o *OrderInputVendor) GetName() string { - if o == nil { - return "" - } - return o.Name -} - type OrderInput struct { // A unique ID for the contract being uploaded. This can be an ID from an external system like Ironclad, an internal ID such as a PO number, or simply the name of the vendor + date of the contract. UniqueIdentifier string `json:"unique_identifier"` // Information about the vendor associated with this contract. Currently, we will only support a name field. - Vendor OrderInputVendor `json:"vendor"` + Vendor Vendor `json:"vendor"` // The start date of the attached contract StartDate types.Date `json:"start_date"` // The end date of the attached contract @@ -38,7 +25,7 @@ type OrderInput struct { // The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned. LineItems []LineItemInput `json:"line_items"` // Any additional attributes that you would like to save on the Order. The set of available options must be configured in advance in Lumos. - CustomAttributes map[string]OrderCustomAttribute `json:"custom_attributes,omitempty"` + CustomAttributes map[string]VendorAgreementCustomAttributeInput `json:"custom_attributes,omitempty"` // UUID of the application in Lumos where this order was sourced (e.g. the ID of Ironclad within Lumos) SourceAppID *string `json:"source_app_id,omitempty"` } @@ -61,9 +48,9 @@ func (o *OrderInput) GetUniqueIdentifier() string { return o.UniqueIdentifier } -func (o *OrderInput) GetVendor() OrderInputVendor { +func (o *OrderInput) GetVendor() Vendor { if o == nil { - return OrderInputVendor{} + return Vendor{} } return o.Vendor } @@ -110,7 +97,7 @@ func (o *OrderInput) GetLineItems() []LineItemInput { return o.LineItems } -func (o *OrderInput) GetCustomAttributes() map[string]OrderCustomAttribute { +func (o *OrderInput) GetCustomAttributes() map[string]VendorAgreementCustomAttributeInput { if o == nil { return nil } diff --git a/internal/sdk/models/shared/pageaccessrequest.go b/internal/sdk/models/shared/pageaccessrequest.go index 3ba653f..9726a33 100644 --- a/internal/sdk/models/shared/pageaccessrequest.go +++ b/internal/sdk/models/shared/pageaccessrequest.go @@ -4,9 +4,9 @@ package shared type PageAccessRequest struct { Items []AccessRequest `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pageaccount.go b/internal/sdk/models/shared/pageaccount.go index ef36fe6..f56ae31 100644 --- a/internal/sdk/models/shared/pageaccount.go +++ b/internal/sdk/models/shared/pageaccount.go @@ -4,9 +4,9 @@ package shared type PageAccount struct { Items []Account `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pageapp.go b/internal/sdk/models/shared/pageapp.go index ed0b23d..6aa64e4 100644 --- a/internal/sdk/models/shared/pageapp.go +++ b/internal/sdk/models/shared/pageapp.go @@ -4,9 +4,9 @@ package shared type PageApp struct { Items []App `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pageappstoreapp.go b/internal/sdk/models/shared/pageappstoreapp.go index cfd0a13..0c32550 100644 --- a/internal/sdk/models/shared/pageappstoreapp.go +++ b/internal/sdk/models/shared/pageappstoreapp.go @@ -4,9 +4,9 @@ package shared type PageAppStoreApp struct { Items []AppStoreApp `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pagegroup.go b/internal/sdk/models/shared/pagegroup.go index 6834a9e..bd75f36 100644 --- a/internal/sdk/models/shared/pagegroup.go +++ b/internal/sdk/models/shared/pagegroup.go @@ -4,9 +4,9 @@ package shared type PageGroup struct { Items []Group `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pagepreapprovalruleoutput.go b/internal/sdk/models/shared/pagepreapprovalruleoutput.go index c648c10..01ef16d 100644 --- a/internal/sdk/models/shared/pagepreapprovalruleoutput.go +++ b/internal/sdk/models/shared/pagepreapprovalruleoutput.go @@ -4,9 +4,9 @@ package shared type PagePreApprovalRuleOutput struct { Items []PreApprovalRuleOutput `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pagerequestablepermissionoutput.go b/internal/sdk/models/shared/pagerequestablepermissionoutput.go index 147e063..933aac9 100644 --- a/internal/sdk/models/shared/pagerequestablepermissionoutput.go +++ b/internal/sdk/models/shared/pagerequestablepermissionoutput.go @@ -4,9 +4,9 @@ package shared type PageRequestablePermissionOutput struct { Items []RequestablePermissionOutput `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pageuser.go b/internal/sdk/models/shared/pageuser.go index 98be03a..b8bc090 100644 --- a/internal/sdk/models/shared/pageuser.go +++ b/internal/sdk/models/shared/pageuser.go @@ -4,9 +4,9 @@ package shared type PageUser struct { Items []User `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/pagevendoragreement.go b/internal/sdk/models/shared/pagevendoragreement.go index d114861..87abc85 100644 --- a/internal/sdk/models/shared/pagevendoragreement.go +++ b/internal/sdk/models/shared/pagevendoragreement.go @@ -4,9 +4,9 @@ package shared type PageVendorAgreement struct { Items []VendorAgreement `json:"items"` - Total *int64 `json:"total,omitempty"` - Page *int64 `json:"page,omitempty"` - Size *int64 `json:"size,omitempty"` + Total *int64 `json:"total"` + Page *int64 `json:"page"` + Size *int64 `json:"size"` Pages *int64 `json:"pages,omitempty"` } diff --git a/internal/sdk/models/shared/permissiontype.go b/internal/sdk/models/shared/permissiontype.go index 9c27aaf..92f0cd8 100644 --- a/internal/sdk/models/shared/permissiontype.go +++ b/internal/sdk/models/shared/permissiontype.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// PermissionType - An enumeration. type PermissionType string const ( diff --git a/internal/sdk/models/shared/requestablepermissionbaseoutput.go b/internal/sdk/models/shared/requestablepermissionbaseoutput.go index c447f3c..8f2b22a 100644 --- a/internal/sdk/models/shared/requestablepermissionbaseoutput.go +++ b/internal/sdk/models/shared/requestablepermissionbaseoutput.go @@ -13,7 +13,7 @@ type RequestablePermissionBaseOutput struct { AppID string `json:"app_id"` // The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier. AppClassID string `json:"app_class_id"` - // The ID of the instance associated with this requestable permission. + // The ID of the instance associated with this requestable permission. This may be an empty string. AppInstanceID string `json:"app_instance_id"` } diff --git a/internal/sdk/models/shared/requestablepermissioninput.go b/internal/sdk/models/shared/requestablepermissioninput.go index 7bfb4ca..2392269 100644 --- a/internal/sdk/models/shared/requestablepermissioninput.go +++ b/internal/sdk/models/shared/requestablepermissioninput.go @@ -2,463 +2,6 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// RequestablePermissionInputAppStoreVisibilityOption - The appstore visibility of this request config. -type RequestablePermissionInputAppStoreVisibilityOption string - -const ( - RequestablePermissionInputAppStoreVisibilityOptionHidden RequestablePermissionInputAppStoreVisibilityOption = "HIDDEN" - RequestablePermissionInputAppStoreVisibilityOptionVisible RequestablePermissionInputAppStoreVisibilityOption = "VISIBLE" -) - -func (e RequestablePermissionInputAppStoreVisibilityOption) ToPointer() *RequestablePermissionInputAppStoreVisibilityOption { - return &e -} -func (e *RequestablePermissionInputAppStoreVisibilityOption) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "HIDDEN": - fallthrough - case "VISIBLE": - *e = RequestablePermissionInputAppStoreVisibilityOption(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionInputAppStoreVisibilityOption: %v", v) - } -} - -// RequestablePermissionInputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type RequestablePermissionInputAllowedGroupsConfigType string - -const ( - RequestablePermissionInputAllowedGroupsConfigTypeAllGroups RequestablePermissionInputAllowedGroupsConfigType = "ALL_GROUPS" - RequestablePermissionInputAllowedGroupsConfigTypeSpecifiedGroups RequestablePermissionInputAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e RequestablePermissionInputAllowedGroupsConfigType) ToPointer() *RequestablePermissionInputAllowedGroupsConfigType { - return &e -} -func (e *RequestablePermissionInputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = RequestablePermissionInputAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionInputAllowedGroupsConfigType: %v", v) - } -} - -// RequestablePermissionInputAllowedGroups - Refers to which group(s) can make requests to this permission. -type RequestablePermissionInputAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *RequestablePermissionInputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []BaseGroup `json:"groups,omitempty"` -} - -func (r RequestablePermissionInputAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionInputAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionInputAllowedGroups) GetType() *RequestablePermissionInputAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *RequestablePermissionInputAllowedGroups) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -// RequestablePermissionInputManagerApprovalOption - Manager approval can be configured as necessary to continue -type RequestablePermissionInputManagerApprovalOption string - -const ( - RequestablePermissionInputManagerApprovalOptionNone RequestablePermissionInputManagerApprovalOption = "NONE" - RequestablePermissionInputManagerApprovalOptionInitialApproval RequestablePermissionInputManagerApprovalOption = "INITIAL_APPROVAL" -) - -func (e RequestablePermissionInputManagerApprovalOption) ToPointer() *RequestablePermissionInputManagerApprovalOption { - return &e -} -func (e *RequestablePermissionInputManagerApprovalOption) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "NONE": - fallthrough - case "INITIAL_APPROVAL": - *e = RequestablePermissionInputManagerApprovalOption(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionInputManagerApprovalOption: %v", v) - } -} - -// RequestablePermissionInputApprovers - AppStore App approvers assigned. -type RequestablePermissionInputApprovers struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *RequestablePermissionInputApprovers) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *RequestablePermissionInputApprovers) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// RequestablePermissionInputApproversStage2 - AppStore App stage 2 approvers assigned. -type RequestablePermissionInputApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *RequestablePermissionInputApproversStage2) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *RequestablePermissionInputApproversStage2) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// RequestablePermissionInputRequestApprovalConfig - A request approval config can be optionally associated with this config -type RequestablePermissionInputRequestApprovalConfig struct { - // Indicates if approval flow is overridden. - RequestApprovalConfigOverride *bool `json:"request_approval_config_override,omitempty"` - // Manager approval can be configured as necessary to continue - ManagerApproval *RequestablePermissionInputManagerApprovalOption `default:"NONE" json:"manager_approval"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // Indicates if custom_approval_message is overridden. - CustomApprovalMessageOverride *bool `json:"custom_approval_message_override,omitempty"` - // AppStore App approvers assigned. - Approvers *RequestablePermissionInputApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *RequestablePermissionInputApproversStage2 `json:"approvers_stage_2,omitempty"` - // The stages of this request approval. - RequestApprovalStages []RequestApprovalStageInput `json:"request_approval_stages,omitempty"` -} - -func (r RequestablePermissionInputRequestApprovalConfig) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionInputRequestApprovalConfig) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetRequestApprovalConfigOverride() *bool { - if o == nil { - return nil - } - return o.RequestApprovalConfigOverride -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetManagerApproval() *RequestablePermissionInputManagerApprovalOption { - if o == nil { - return nil - } - return o.ManagerApproval -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetCustomApprovalMessageOverride() *bool { - if o == nil { - return nil - } - return o.CustomApprovalMessageOverride -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetApprovers() *RequestablePermissionInputApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetApproversStage2() *RequestablePermissionInputApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *RequestablePermissionInputRequestApprovalConfig) GetRequestApprovalStages() []RequestApprovalStageInput { - if o == nil { - return nil - } - return o.RequestApprovalStages -} - -// RequestablePermissionInputAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this config. -type RequestablePermissionInputAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *RequestablePermissionInputAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// RequestablePermissionInputRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this config. -type RequestablePermissionInputRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *RequestablePermissionInputRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// RequestablePermissionInputProvisioningGroup - The provisioning group optionally associated with this config. -type RequestablePermissionInputProvisioningGroup struct { - // The ID of this group. - ID *string `json:"id,omitempty"` - // The ID of the app that sources this group. - AppID *string `json:"app_id,omitempty"` - // The ID of this group, specific to the integration. - IntegrationSpecificID *string `json:"integration_specific_id,omitempty"` -} - -func (o *RequestablePermissionInputProvisioningGroup) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *RequestablePermissionInputProvisioningGroup) GetAppID() *string { - if o == nil { - return nil - } - return o.AppID -} - -func (o *RequestablePermissionInputProvisioningGroup) GetIntegrationSpecificID() *string { - if o == nil { - return nil - } - return o.IntegrationSpecificID -} - -// RequestablePermissionInputProvisioningWebhook - The provisioning webhook optionally associated with this config. -type RequestablePermissionInputProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *RequestablePermissionInputProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// RequestablePermissionInputRequestFulfillmentConfig - A request fulfillment config can be optionally associated with this config -type RequestablePermissionInputRequestFulfillmentConfig struct { - // Whether manual steps are needed. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // The manual instructions that go along. - ManualInstructions *string `json:"manual_instructions,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Indicates if time based access is overriden. - TimeBasedAccessOverride *bool `json:"time_based_access_override,omitempty"` - // The provisioning group optionally associated with this config. - ProvisioningGroup *RequestablePermissionInputProvisioningGroup `json:"provisioning_group,omitempty"` - // The provisioning webhook optionally associated with this config. - ProvisioningWebhook *RequestablePermissionInputProvisioningWebhook `json:"provisioning_webhook,omitempty"` -} - -func (o *RequestablePermissionInputRequestFulfillmentConfig) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *RequestablePermissionInputRequestFulfillmentConfig) GetManualInstructions() *string { - if o == nil { - return nil - } - return o.ManualInstructions -} - -func (o *RequestablePermissionInputRequestFulfillmentConfig) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *RequestablePermissionInputRequestFulfillmentConfig) GetTimeBasedAccessOverride() *bool { - if o == nil { - return nil - } - return o.TimeBasedAccessOverride -} - -func (o *RequestablePermissionInputRequestFulfillmentConfig) GetProvisioningGroup() *RequestablePermissionInputProvisioningGroup { - if o == nil { - return nil - } - return o.ProvisioningGroup -} - -func (o *RequestablePermissionInputRequestFulfillmentConfig) GetProvisioningWebhook() *RequestablePermissionInputProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -// RequestablePermissionInputRequestConfig - The request config associated with this requestable permission. -type RequestablePermissionInputRequestConfig struct { - // The appstore visibility of this request config. - AppstoreVisibility *RequestablePermissionInputAppStoreVisibilityOption `default:"HIDDEN" json:"appstore_visibility"` - // Indicates if allowed groups is overriden from the app-level settings. - AllowedGroupsOverride *bool `json:"allowed_groups_override,omitempty"` - // Refers to which group(s) can make requests to this permission. - AllowedGroups *RequestablePermissionInputAllowedGroups `json:"allowed_groups,omitempty"` - // A request approval config can be optionally associated with this config - RequestApprovalConfig *RequestablePermissionInputRequestApprovalConfig `json:"request_approval_config,omitempty"` - // A deprovisioning webhook can be optionally associated with this config. - AccessRemovalInlineWebhook *RequestablePermissionInputAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` - // A request validation webhook can be optionally associated with this config. - RequestValidationInlineWebhook *RequestablePermissionInputRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` - // A request fulfillment config can be optionally associated with this config - RequestFulfillmentConfig *RequestablePermissionInputRequestFulfillmentConfig `json:"request_fulfillment_config,omitempty"` -} - -func (r RequestablePermissionInputRequestConfig) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionInputRequestConfig) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionInputRequestConfig) GetAppstoreVisibility() *RequestablePermissionInputAppStoreVisibilityOption { - if o == nil { - return nil - } - return o.AppstoreVisibility -} - -func (o *RequestablePermissionInputRequestConfig) GetAllowedGroupsOverride() *bool { - if o == nil { - return nil - } - return o.AllowedGroupsOverride -} - -func (o *RequestablePermissionInputRequestConfig) GetAllowedGroups() *RequestablePermissionInputAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *RequestablePermissionInputRequestConfig) GetRequestApprovalConfig() *RequestablePermissionInputRequestApprovalConfig { - if o == nil { - return nil - } - return o.RequestApprovalConfig -} - -func (o *RequestablePermissionInputRequestConfig) GetAccessRemovalInlineWebhook() *RequestablePermissionInputAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - -func (o *RequestablePermissionInputRequestConfig) GetRequestValidationInlineWebhook() *RequestablePermissionInputRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -func (o *RequestablePermissionInputRequestConfig) GetRequestFulfillmentConfig() *RequestablePermissionInputRequestFulfillmentConfig { - if o == nil { - return nil - } - return o.RequestFulfillmentConfig -} - type RequestablePermissionInput struct { // The ID of the app associated with this requestable permission. AppID string `json:"app_id"` @@ -469,7 +12,7 @@ type RequestablePermissionInput struct { // The label of this requestable permission. Label string `json:"label"` // The request config associated with this requestable permission. - RequestConfig *RequestablePermissionInputRequestConfig `json:"request_config,omitempty"` + RequestConfig *RequestConfigInputCreate `json:"request_config,omitempty"` } func (o *RequestablePermissionInput) GetAppID() string { @@ -500,7 +43,7 @@ func (o *RequestablePermissionInput) GetLabel() string { return o.Label } -func (o *RequestablePermissionInput) GetRequestConfig() *RequestablePermissionInputRequestConfig { +func (o *RequestablePermissionInput) GetRequestConfig() *RequestConfigInputCreate { if o == nil { return nil } diff --git a/internal/sdk/models/shared/requestablepermissioninputupdate.go b/internal/sdk/models/shared/requestablepermissioninputupdate.go index 7d53f6a..2d7e6b6 100644 --- a/internal/sdk/models/shared/requestablepermissioninputupdate.go +++ b/internal/sdk/models/shared/requestablepermissioninputupdate.go @@ -2,423 +2,6 @@ package shared -import ( - "encoding/json" - "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" -) - -// RequestablePermissionInputUpdateAppStoreVisibilityOption - The appstore visibility of this request config. -type RequestablePermissionInputUpdateAppStoreVisibilityOption string - -const ( - RequestablePermissionInputUpdateAppStoreVisibilityOptionHidden RequestablePermissionInputUpdateAppStoreVisibilityOption = "HIDDEN" - RequestablePermissionInputUpdateAppStoreVisibilityOptionVisible RequestablePermissionInputUpdateAppStoreVisibilityOption = "VISIBLE" -) - -func (e RequestablePermissionInputUpdateAppStoreVisibilityOption) ToPointer() *RequestablePermissionInputUpdateAppStoreVisibilityOption { - return &e -} -func (e *RequestablePermissionInputUpdateAppStoreVisibilityOption) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "HIDDEN": - fallthrough - case "VISIBLE": - *e = RequestablePermissionInputUpdateAppStoreVisibilityOption(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionInputUpdateAppStoreVisibilityOption: %v", v) - } -} - -// RequestablePermissionInputUpdateAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type RequestablePermissionInputUpdateAllowedGroupsConfigType string - -const ( - RequestablePermissionInputUpdateAllowedGroupsConfigTypeAllGroups RequestablePermissionInputUpdateAllowedGroupsConfigType = "ALL_GROUPS" - RequestablePermissionInputUpdateAllowedGroupsConfigTypeSpecifiedGroups RequestablePermissionInputUpdateAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e RequestablePermissionInputUpdateAllowedGroupsConfigType) ToPointer() *RequestablePermissionInputUpdateAllowedGroupsConfigType { - return &e -} -func (e *RequestablePermissionInputUpdateAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = RequestablePermissionInputUpdateAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionInputUpdateAllowedGroupsConfigType: %v", v) - } -} - -// RequestablePermissionInputUpdateAllowedGroups - Refers to which group(s) can make requests to this permission. -type RequestablePermissionInputUpdateAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *RequestablePermissionInputUpdateAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []BaseGroup `json:"groups,omitempty"` -} - -func (r RequestablePermissionInputUpdateAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionInputUpdateAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionInputUpdateAllowedGroups) GetType() *RequestablePermissionInputUpdateAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *RequestablePermissionInputUpdateAllowedGroups) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -// RequestablePermissionInputUpdateManagerApprovalOption - Manager approval can be configured as necessary to continue -type RequestablePermissionInputUpdateManagerApprovalOption string - -const ( - RequestablePermissionInputUpdateManagerApprovalOptionNone RequestablePermissionInputUpdateManagerApprovalOption = "NONE" - RequestablePermissionInputUpdateManagerApprovalOptionInitialApproval RequestablePermissionInputUpdateManagerApprovalOption = "INITIAL_APPROVAL" -) - -func (e RequestablePermissionInputUpdateManagerApprovalOption) ToPointer() *RequestablePermissionInputUpdateManagerApprovalOption { - return &e -} -func (e *RequestablePermissionInputUpdateManagerApprovalOption) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "NONE": - fallthrough - case "INITIAL_APPROVAL": - *e = RequestablePermissionInputUpdateManagerApprovalOption(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionInputUpdateManagerApprovalOption: %v", v) - } -} - -// RequestablePermissionInputUpdateApprovers - AppStore App approvers assigned. -type RequestablePermissionInputUpdateApprovers struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *RequestablePermissionInputUpdateApprovers) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *RequestablePermissionInputUpdateApprovers) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// RequestablePermissionInputUpdateApproversStage2 - AppStore App stage 2 approvers assigned. -type RequestablePermissionInputUpdateApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []BaseGroup `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []BaseUser `json:"users,omitempty"` -} - -func (o *RequestablePermissionInputUpdateApproversStage2) GetGroups() []BaseGroup { - if o == nil { - return nil - } - return o.Groups -} - -func (o *RequestablePermissionInputUpdateApproversStage2) GetUsers() []BaseUser { - if o == nil { - return nil - } - return o.Users -} - -// RequestablePermissionInputUpdateRequestApprovalConfig - A request approval config can be optionally associated with this config -type RequestablePermissionInputUpdateRequestApprovalConfig struct { - // Indicates if approval flow is overridden. - RequestApprovalConfigOverride *bool `json:"request_approval_config_override,omitempty"` - // Manager approval can be configured as necessary to continue - ManagerApproval *RequestablePermissionInputUpdateManagerApprovalOption `default:"NONE" json:"manager_approval"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // Indicates if custom_approval_message is overridden. - CustomApprovalMessageOverride *bool `json:"custom_approval_message_override,omitempty"` - // AppStore App approvers assigned. - Approvers *RequestablePermissionInputUpdateApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *RequestablePermissionInputUpdateApproversStage2 `json:"approvers_stage_2,omitempty"` - // The stages of this request approval. - RequestApprovalStages []RequestApprovalStageInput `json:"request_approval_stages,omitempty"` -} - -func (r RequestablePermissionInputUpdateRequestApprovalConfig) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionInputUpdateRequestApprovalConfig) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetRequestApprovalConfigOverride() *bool { - if o == nil { - return nil - } - return o.RequestApprovalConfigOverride -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetManagerApproval() *RequestablePermissionInputUpdateManagerApprovalOption { - if o == nil { - return nil - } - return o.ManagerApproval -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetCustomApprovalMessageOverride() *bool { - if o == nil { - return nil - } - return o.CustomApprovalMessageOverride -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetApprovers() *RequestablePermissionInputUpdateApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetApproversStage2() *RequestablePermissionInputUpdateApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *RequestablePermissionInputUpdateRequestApprovalConfig) GetRequestApprovalStages() []RequestApprovalStageInput { - if o == nil { - return nil - } - return o.RequestApprovalStages -} - -// RequestablePermissionInputUpdateAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this config. -type RequestablePermissionInputUpdateAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *RequestablePermissionInputUpdateAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// RequestablePermissionInputUpdateRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this config. -type RequestablePermissionInputUpdateRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *RequestablePermissionInputUpdateRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// RequestablePermissionInputUpdateProvisioningWebhook - The provisioning webhook optionally associated with this config. -type RequestablePermissionInputUpdateProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` -} - -func (o *RequestablePermissionInputUpdateProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// RequestablePermissionInputUpdateRequestFulfillmentConfig - A request fulfillment config can be optionally associated with this config -type RequestablePermissionInputUpdateRequestFulfillmentConfig struct { - // Whether manual steps are needed. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // The manual instructions that go along. - ManualInstructions *string `json:"manual_instructions,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Indicates if time based access is overriden. - TimeBasedAccessOverride *bool `json:"time_based_access_override,omitempty"` - // The provisioning webhook optionally associated with this config. - ProvisioningWebhook *RequestablePermissionInputUpdateProvisioningWebhook `json:"provisioning_webhook,omitempty"` -} - -func (o *RequestablePermissionInputUpdateRequestFulfillmentConfig) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *RequestablePermissionInputUpdateRequestFulfillmentConfig) GetManualInstructions() *string { - if o == nil { - return nil - } - return o.ManualInstructions -} - -func (o *RequestablePermissionInputUpdateRequestFulfillmentConfig) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *RequestablePermissionInputUpdateRequestFulfillmentConfig) GetTimeBasedAccessOverride() *bool { - if o == nil { - return nil - } - return o.TimeBasedAccessOverride -} - -func (o *RequestablePermissionInputUpdateRequestFulfillmentConfig) GetProvisioningWebhook() *RequestablePermissionInputUpdateProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -// RequestablePermissionInputUpdateRequestConfig - The request config associated with this requestable permission. -type RequestablePermissionInputUpdateRequestConfig struct { - // The appstore visibility of this request config. - AppstoreVisibility *RequestablePermissionInputUpdateAppStoreVisibilityOption `default:"HIDDEN" json:"appstore_visibility"` - // Indicates if allowed groups is overriden from the app-level settings. - AllowedGroupsOverride *bool `json:"allowed_groups_override,omitempty"` - // Refers to which group(s) can make requests to this permission. - AllowedGroups *RequestablePermissionInputUpdateAllowedGroups `json:"allowed_groups,omitempty"` - // A request approval config can be optionally associated with this config - RequestApprovalConfig *RequestablePermissionInputUpdateRequestApprovalConfig `json:"request_approval_config,omitempty"` - // A deprovisioning webhook can be optionally associated with this config. - AccessRemovalInlineWebhook *RequestablePermissionInputUpdateAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` - // A request validation webhook can be optionally associated with this config. - RequestValidationInlineWebhook *RequestablePermissionInputUpdateRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` - // A request fulfillment config can be optionally associated with this config - RequestFulfillmentConfig *RequestablePermissionInputUpdateRequestFulfillmentConfig `json:"request_fulfillment_config,omitempty"` -} - -func (r RequestablePermissionInputUpdateRequestConfig) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionInputUpdateRequestConfig) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetAppstoreVisibility() *RequestablePermissionInputUpdateAppStoreVisibilityOption { - if o == nil { - return nil - } - return o.AppstoreVisibility -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetAllowedGroupsOverride() *bool { - if o == nil { - return nil - } - return o.AllowedGroupsOverride -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetAllowedGroups() *RequestablePermissionInputUpdateAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetRequestApprovalConfig() *RequestablePermissionInputUpdateRequestApprovalConfig { - if o == nil { - return nil - } - return o.RequestApprovalConfig -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetAccessRemovalInlineWebhook() *RequestablePermissionInputUpdateAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetRequestValidationInlineWebhook() *RequestablePermissionInputUpdateRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - -func (o *RequestablePermissionInputUpdateRequestConfig) GetRequestFulfillmentConfig() *RequestablePermissionInputUpdateRequestFulfillmentConfig { - if o == nil { - return nil - } - return o.RequestFulfillmentConfig -} - type RequestablePermissionInputUpdate struct { // The ID of the app associated with this requestable permission. AppID *string `json:"app_id,omitempty"` @@ -429,7 +12,7 @@ type RequestablePermissionInputUpdate struct { // The label of this requestable permission. Label *string `json:"label,omitempty"` // The request config associated with this requestable permission. - RequestConfig *RequestablePermissionInputUpdateRequestConfig `json:"request_config,omitempty"` + RequestConfig *RequestConfigInputUpdate `json:"request_config,omitempty"` } func (o *RequestablePermissionInputUpdate) GetAppID() *string { @@ -460,7 +43,7 @@ func (o *RequestablePermissionInputUpdate) GetLabel() *string { return o.Label } -func (o *RequestablePermissionInputUpdate) GetRequestConfig() *RequestablePermissionInputUpdateRequestConfig { +func (o *RequestablePermissionInputUpdate) GetRequestConfig() *RequestConfigInputUpdate { if o == nil { return nil } diff --git a/internal/sdk/models/shared/requestablepermissionoutput.go b/internal/sdk/models/shared/requestablepermissionoutput.go index bae657f..2b21a1f 100644 --- a/internal/sdk/models/shared/requestablepermissionoutput.go +++ b/internal/sdk/models/shared/requestablepermissionoutput.go @@ -5,21 +5,19 @@ package shared import ( "encoding/json" "fmt" - "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" ) -// RequestablePermissionOutputPermissionType - The type of this requestable permission. -type RequestablePermissionOutputPermissionType string +type TypePermissionType string const ( - RequestablePermissionOutputPermissionTypeSynced RequestablePermissionOutputPermissionType = "SYNCED" - RequestablePermissionOutputPermissionTypeNative RequestablePermissionOutputPermissionType = "NATIVE" + TypePermissionTypeSynced TypePermissionType = "SYNCED" + TypePermissionTypeNative TypePermissionType = "NATIVE" ) -func (e RequestablePermissionOutputPermissionType) ToPointer() *RequestablePermissionOutputPermissionType { +func (e TypePermissionType) ToPointer() *TypePermissionType { return &e } -func (e *RequestablePermissionOutputPermissionType) UnmarshalJSON(data []byte) error { +func (e *TypePermissionType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -28,634 +26,28 @@ func (e *RequestablePermissionOutputPermissionType) UnmarshalJSON(data []byte) e case "SYNCED": fallthrough case "NATIVE": - *e = RequestablePermissionOutputPermissionType(v) + *e = TypePermissionType(v) return nil default: - return fmt.Errorf("invalid value for RequestablePermissionOutputPermissionType: %v", v) + return fmt.Errorf("invalid value for TypePermissionType: %v", v) } } -// AppStoreVisibilityOption - The appstore visibility of this request config. -type AppStoreVisibilityOption string - -const ( - AppStoreVisibilityOptionHidden AppStoreVisibilityOption = "HIDDEN" - AppStoreVisibilityOptionVisible AppStoreVisibilityOption = "VISIBLE" -) - -func (e AppStoreVisibilityOption) ToPointer() *AppStoreVisibilityOption { - return &e -} -func (e *AppStoreVisibilityOption) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "HIDDEN": - fallthrough - case "VISIBLE": - *e = AppStoreVisibilityOption(v) - return nil - default: - return fmt.Errorf("invalid value for AppStoreVisibilityOption: %v", v) - } -} - -// RequestablePermissionOutputAllowedGroupsConfigType - The type of this allowed groups config, can be all groups or specific. -type RequestablePermissionOutputAllowedGroupsConfigType string - -const ( - RequestablePermissionOutputAllowedGroupsConfigTypeAllGroups RequestablePermissionOutputAllowedGroupsConfigType = "ALL_GROUPS" - RequestablePermissionOutputAllowedGroupsConfigTypeSpecifiedGroups RequestablePermissionOutputAllowedGroupsConfigType = "SPECIFIED_GROUPS" -) - -func (e RequestablePermissionOutputAllowedGroupsConfigType) ToPointer() *RequestablePermissionOutputAllowedGroupsConfigType { - return &e -} -func (e *RequestablePermissionOutputAllowedGroupsConfigType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "ALL_GROUPS": - fallthrough - case "SPECIFIED_GROUPS": - *e = RequestablePermissionOutputAllowedGroupsConfigType(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionOutputAllowedGroupsConfigType: %v", v) - } -} - -// RequestablePermissionOutputAllowedGroups - The allowed groups config associated with this config. -type RequestablePermissionOutputAllowedGroups struct { - // The type of this allowed groups config, can be all groups or specific. - Type *RequestablePermissionOutputAllowedGroupsConfigType `default:"ALL_GROUPS" json:"type"` - // The groups allowed to request this permission. - Groups []Group `json:"groups,omitempty"` -} - -func (r RequestablePermissionOutputAllowedGroups) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestablePermissionOutputAllowedGroups) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestablePermissionOutputAllowedGroups) GetType() *RequestablePermissionOutputAllowedGroupsConfigType { - if o == nil { - return nil - } - return o.Type -} - -func (o *RequestablePermissionOutputAllowedGroups) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -// ManagerApprovalOption - Manager approval can be configured as necessary to continue -type ManagerApprovalOption string - -const ( - ManagerApprovalOptionNone ManagerApprovalOption = "NONE" - ManagerApprovalOptionInitialApproval ManagerApprovalOption = "INITIAL_APPROVAL" -) - -func (e ManagerApprovalOption) ToPointer() *ManagerApprovalOption { - return &e -} -func (e *ManagerApprovalOption) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "NONE": - fallthrough - case "INITIAL_APPROVAL": - *e = ManagerApprovalOption(v) - return nil - default: - return fmt.Errorf("invalid value for ManagerApprovalOption: %v", v) - } -} - -// RequestablePermissionOutputApprovers - AppStore App approvers assigned. -type RequestablePermissionOutputApprovers struct { - // Groups assigned as support request approvers. - Groups []Group `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []User `json:"users,omitempty"` -} - -func (o *RequestablePermissionOutputApprovers) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *RequestablePermissionOutputApprovers) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// RequestablePermissionOutputApproversStage2 - AppStore App stage 2 approvers assigned. -type RequestablePermissionOutputApproversStage2 struct { - // Groups assigned as support request approvers. - Groups []Group `json:"groups,omitempty"` - // Users assigned as support request approvers. - Users []User `json:"users,omitempty"` -} - -func (o *RequestablePermissionOutputApproversStage2) GetGroups() []Group { - if o == nil { - return nil - } - return o.Groups -} - -func (o *RequestablePermissionOutputApproversStage2) GetUsers() []User { - if o == nil { - return nil - } - return o.Users -} - -// RequestApprovalConfig - A request approval config can be optionally associated with this config -type RequestApprovalConfig struct { - // Indicates if approval flow is overridden. - RequestApprovalConfigOverride *bool `json:"request_approval_config_override,omitempty"` - // Manager approval can be configured as necessary to continue - ManagerApproval *ManagerApprovalOption `default:"NONE" json:"manager_approval"` - // Only turn on when working with sensitive permissions to ensure a smooth employee experience. - RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` - // After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. - CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` - // Indicates if custom_approval_message is overridden. - CustomApprovalMessageOverride *bool `json:"custom_approval_message_override,omitempty"` - // AppStore App approvers assigned. - Approvers *RequestablePermissionOutputApprovers `json:"approvers,omitempty"` - // AppStore App stage 2 approvers assigned. - ApproversStage2 *RequestablePermissionOutputApproversStage2 `json:"approvers_stage_2,omitempty"` - // The stages of this request approval. - RequestApprovalStages []RequestApprovalStageOutput `json:"request_approval_stages,omitempty"` -} - -func (r RequestApprovalConfig) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestApprovalConfig) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestApprovalConfig) GetRequestApprovalConfigOverride() *bool { - if o == nil { - return nil - } - return o.RequestApprovalConfigOverride -} - -func (o *RequestApprovalConfig) GetManagerApproval() *ManagerApprovalOption { - if o == nil { - return nil - } - return o.ManagerApproval -} - -func (o *RequestApprovalConfig) GetRequireAdditionalApproval() *bool { - if o == nil { - return nil - } - return o.RequireAdditionalApproval -} - -func (o *RequestApprovalConfig) GetCustomApprovalMessage() *string { - if o == nil { - return nil - } - return o.CustomApprovalMessage -} - -func (o *RequestApprovalConfig) GetCustomApprovalMessageOverride() *bool { - if o == nil { - return nil - } - return o.CustomApprovalMessageOverride -} - -func (o *RequestApprovalConfig) GetApprovers() *RequestablePermissionOutputApprovers { - if o == nil { - return nil - } - return o.Approvers -} - -func (o *RequestApprovalConfig) GetApproversStage2() *RequestablePermissionOutputApproversStage2 { - if o == nil { - return nil - } - return o.ApproversStage2 -} - -func (o *RequestApprovalConfig) GetRequestApprovalStages() []RequestApprovalStageOutput { - if o == nil { - return nil - } - return o.RequestApprovalStages -} - -// RequestablePermissionOutputLifecycle - The lifecycle of this group. -type RequestablePermissionOutputLifecycle string - -const ( - RequestablePermissionOutputLifecycleSynced RequestablePermissionOutputLifecycle = "SYNCED" - RequestablePermissionOutputLifecycleNative RequestablePermissionOutputLifecycle = "NATIVE" -) - -func (e RequestablePermissionOutputLifecycle) ToPointer() *RequestablePermissionOutputLifecycle { - return &e -} -func (e *RequestablePermissionOutputLifecycle) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "SYNCED": - fallthrough - case "NATIVE": - *e = RequestablePermissionOutputLifecycle(v) - return nil - default: - return fmt.Errorf("invalid value for RequestablePermissionOutputLifecycle: %v", v) - } -} - -// ProvisioningGroup - The provisioning group optionally assocated with this config. -type ProvisioningGroup struct { - // The ID of this group. - ID *string `json:"id,omitempty"` - // The ID of the app that sources this group. - AppID *string `json:"app_id,omitempty"` - // The ID of this group, specific to the integration. - IntegrationSpecificID *string `json:"integration_specific_id,omitempty"` - // The name of this group. - Name *string `json:"name,omitempty"` - // The description of this group. - Description *string `json:"description,omitempty"` - // The lifecycle of this group. - GroupLifecycle *RequestablePermissionOutputLifecycle `default:"SYNCED" json:"group_lifecycle"` - // The ID of the app that sources this group. - SourceAppID *string `json:"source_app_id,omitempty"` -} - -func (p ProvisioningGroup) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(p, "", false) -} - -func (p *ProvisioningGroup) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { - return err - } - return nil -} - -func (o *ProvisioningGroup) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *ProvisioningGroup) GetAppID() *string { - if o == nil { - return nil - } - return o.AppID -} - -func (o *ProvisioningGroup) GetIntegrationSpecificID() *string { - if o == nil { - return nil - } - return o.IntegrationSpecificID -} - -func (o *ProvisioningGroup) GetName() *string { - if o == nil { - return nil - } - return o.Name -} - -func (o *ProvisioningGroup) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -func (o *ProvisioningGroup) GetGroupLifecycle() *RequestablePermissionOutputLifecycle { - if o == nil { - return nil - } - return o.GroupLifecycle -} - -func (o *ProvisioningGroup) GetSourceAppID() *string { - if o == nil { - return nil - } - return o.SourceAppID -} - -// RequestablePermissionOutputProvisioningWebhook - The provisioning webhook optionally associated with this config. -type RequestablePermissionOutputProvisioningWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *RequestablePermissionOutputProvisioningWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *RequestablePermissionOutputProvisioningWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *RequestablePermissionOutputProvisioningWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *RequestablePermissionOutputProvisioningWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// RequestFulfillmentConfig - A request fulfillment config can be optionally associated with this config -type RequestFulfillmentConfig struct { - // Whether manual steps are needed. - ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` - // The manual instructions that go along. - ManualInstructions *string `json:"manual_instructions,omitempty"` - // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. - TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` - // Indicates if time based access is overriden. - TimeBasedAccessOverride *bool `json:"time_based_access_override,omitempty"` - // The provisioning group optionally assocated with this config. - ProvisioningGroup *ProvisioningGroup `json:"provisioning_group,omitempty"` - // The provisioning webhook optionally associated with this config. - ProvisioningWebhook *RequestablePermissionOutputProvisioningWebhook `json:"provisioning_webhook,omitempty"` -} - -func (o *RequestFulfillmentConfig) GetManualStepsNeeded() *bool { - if o == nil { - return nil - } - return o.ManualStepsNeeded -} - -func (o *RequestFulfillmentConfig) GetManualInstructions() *string { - if o == nil { - return nil - } - return o.ManualInstructions -} - -func (o *RequestFulfillmentConfig) GetTimeBasedAccess() []TimeBasedAccessOptions { - if o == nil { - return nil - } - return o.TimeBasedAccess -} - -func (o *RequestFulfillmentConfig) GetTimeBasedAccessOverride() *bool { - if o == nil { - return nil - } - return o.TimeBasedAccessOverride -} - -func (o *RequestFulfillmentConfig) GetProvisioningGroup() *ProvisioningGroup { - if o == nil { - return nil - } - return o.ProvisioningGroup -} - -func (o *RequestFulfillmentConfig) GetProvisioningWebhook() *RequestablePermissionOutputProvisioningWebhook { - if o == nil { - return nil - } - return o.ProvisioningWebhook -} - -// RequestablePermissionOutputAccessRemovalInlineWebhook - A deprovisioning webhook can be optionally associated with this config. -type RequestablePermissionOutputAccessRemovalInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *RequestablePermissionOutputAccessRemovalInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *RequestablePermissionOutputAccessRemovalInlineWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *RequestablePermissionOutputAccessRemovalInlineWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *RequestablePermissionOutputAccessRemovalInlineWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// RequestablePermissionOutputRequestValidationInlineWebhook - A request validation webhook can be optionally associated with this config. -type RequestablePermissionOutputRequestValidationInlineWebhook struct { - // The ID of this inline webhook. - ID string `json:"id"` - // The type of this inline webhook. - HookType InlineWebhookType `json:"hook_type"` - // The name of this inline webhook. - Name string `json:"name"` - // The description of this inline webhook. - Description *string `json:"description,omitempty"` -} - -func (o *RequestablePermissionOutputRequestValidationInlineWebhook) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *RequestablePermissionOutputRequestValidationInlineWebhook) GetHookType() InlineWebhookType { - if o == nil { - return InlineWebhookType("") - } - return o.HookType -} - -func (o *RequestablePermissionOutputRequestValidationInlineWebhook) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *RequestablePermissionOutputRequestValidationInlineWebhook) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -// RequestConfig - The request config associated with this requestable permission. -type RequestConfig struct { - // The appstore visibility of this request config. - AppstoreVisibility *AppStoreVisibilityOption `default:"HIDDEN" json:"appstore_visibility"` - // Indicates if allowed groups is overriden from the app-level settings. - AllowedGroupsOverride *bool `json:"allowed_groups_override,omitempty"` - // The allowed groups config associated with this config. - AllowedGroups *RequestablePermissionOutputAllowedGroups `json:"allowed_groups,omitempty"` - // A request approval config can be optionally associated with this config - RequestApprovalConfig *RequestApprovalConfig `json:"request_approval_config,omitempty"` - // A request fulfillment config can be optionally associated with this config - RequestFulfillmentConfig *RequestFulfillmentConfig `json:"request_fulfillment_config,omitempty"` - // A deprovisioning webhook can be optionally associated with this config. - AccessRemovalInlineWebhook *RequestablePermissionOutputAccessRemovalInlineWebhook `json:"access_removal_inline_webhook,omitempty"` - // A request validation webhook can be optionally associated with this config. - RequestValidationInlineWebhook *RequestablePermissionOutputRequestValidationInlineWebhook `json:"request_validation_inline_webhook,omitempty"` -} - -func (r RequestConfig) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *RequestConfig) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { - return err - } - return nil -} - -func (o *RequestConfig) GetAppstoreVisibility() *AppStoreVisibilityOption { - if o == nil { - return nil - } - return o.AppstoreVisibility -} - -func (o *RequestConfig) GetAllowedGroupsOverride() *bool { - if o == nil { - return nil - } - return o.AllowedGroupsOverride -} - -func (o *RequestConfig) GetAllowedGroups() *RequestablePermissionOutputAllowedGroups { - if o == nil { - return nil - } - return o.AllowedGroups -} - -func (o *RequestConfig) GetRequestApprovalConfig() *RequestApprovalConfig { - if o == nil { - return nil - } - return o.RequestApprovalConfig -} - -func (o *RequestConfig) GetRequestFulfillmentConfig() *RequestFulfillmentConfig { - if o == nil { - return nil - } - return o.RequestFulfillmentConfig -} - -func (o *RequestConfig) GetAccessRemovalInlineWebhook() *RequestablePermissionOutputAccessRemovalInlineWebhook { - if o == nil { - return nil - } - return o.AccessRemovalInlineWebhook -} - -func (o *RequestConfig) GetRequestValidationInlineWebhook() *RequestablePermissionOutputRequestValidationInlineWebhook { - if o == nil { - return nil - } - return o.RequestValidationInlineWebhook -} - type RequestablePermissionOutput struct { // The ID of this requestable permission. ID *string `json:"id,omitempty"` // The type of this requestable permission. - Type *RequestablePermissionOutputPermissionType `json:"type,omitempty"` + Type *TypePermissionType `json:"type,omitempty"` // The label of this requestable permission. Label string `json:"label"` // The ID of the app associated with this requestable permission. AppID string `json:"app_id"` // The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier. AppClassID string `json:"app_class_id"` - // The ID of the instance associated with this requestable permission. + // The ID of the instance associated with this requestable permission. This may be an empty string. AppInstanceID string `json:"app_instance_id"` // The request config associated with this requestable permission. - RequestConfig RequestConfig `json:"request_config"` + RequestConfig RequestConfigOutput `json:"request_config"` } func (o *RequestablePermissionOutput) GetID() *string { @@ -665,7 +57,7 @@ func (o *RequestablePermissionOutput) GetID() *string { return o.ID } -func (o *RequestablePermissionOutput) GetType() *RequestablePermissionOutputPermissionType { +func (o *RequestablePermissionOutput) GetType() *TypePermissionType { if o == nil { return nil } @@ -700,9 +92,9 @@ func (o *RequestablePermissionOutput) GetAppInstanceID() string { return o.AppInstanceID } -func (o *RequestablePermissionOutput) GetRequestConfig() RequestConfig { +func (o *RequestablePermissionOutput) GetRequestConfig() RequestConfigOutput { if o == nil { - return RequestConfig{} + return RequestConfigOutput{} } return o.RequestConfig } diff --git a/internal/sdk/models/shared/requestapprovalconfiginput.go b/internal/sdk/models/shared/requestapprovalconfiginput.go new file mode 100644 index 0000000..e92f05c --- /dev/null +++ b/internal/sdk/models/shared/requestapprovalconfiginput.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestApprovalConfigInput struct { + // Indicates if approval flow is overridden. + RequestApprovalConfigOverride *bool `json:"request_approval_config_override,omitempty"` + // Manager approval can be configured as necessary to continue + ManagerApproval *ManagerApprovalOption `json:"manager_approval,omitempty"` + // Only turn on when working with sensitive permissions to ensure a smooth employee experience. + RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` + // After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. + CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` + // Indicates if custom_approval_message is overridden. + CustomApprovalMessageOverride *bool `json:"custom_approval_message_override,omitempty"` + // AppStore App approvers assigned. + Approvers *AppApproversInput `json:"approvers,omitempty"` + // AppStore App stage 2 approvers assigned. + ApproversStage2 *AppApproversInput `json:"approvers_stage_2,omitempty"` + // The stages of this request approval. + RequestApprovalStages []RequestApprovalStageInput `json:"request_approval_stages,omitempty"` +} + +func (o *RequestApprovalConfigInput) GetRequestApprovalConfigOverride() *bool { + if o == nil { + return nil + } + return o.RequestApprovalConfigOverride +} + +func (o *RequestApprovalConfigInput) GetManagerApproval() *ManagerApprovalOption { + if o == nil { + return nil + } + return o.ManagerApproval +} + +func (o *RequestApprovalConfigInput) GetRequireAdditionalApproval() *bool { + if o == nil { + return nil + } + return o.RequireAdditionalApproval +} + +func (o *RequestApprovalConfigInput) GetCustomApprovalMessage() *string { + if o == nil { + return nil + } + return o.CustomApprovalMessage +} + +func (o *RequestApprovalConfigInput) GetCustomApprovalMessageOverride() *bool { + if o == nil { + return nil + } + return o.CustomApprovalMessageOverride +} + +func (o *RequestApprovalConfigInput) GetApprovers() *AppApproversInput { + if o == nil { + return nil + } + return o.Approvers +} + +func (o *RequestApprovalConfigInput) GetApproversStage2() *AppApproversInput { + if o == nil { + return nil + } + return o.ApproversStage2 +} + +func (o *RequestApprovalConfigInput) GetRequestApprovalStages() []RequestApprovalStageInput { + if o == nil { + return nil + } + return o.RequestApprovalStages +} diff --git a/internal/sdk/models/shared/requestapprovalconfigoutput.go b/internal/sdk/models/shared/requestapprovalconfigoutput.go new file mode 100644 index 0000000..e0aa313 --- /dev/null +++ b/internal/sdk/models/shared/requestapprovalconfigoutput.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestApprovalConfigOutput struct { + // Indicates if approval flow is overridden. + RequestApprovalConfigOverride *bool `json:"request_approval_config_override,omitempty"` + // Manager approval can be configured as necessary to continue + ManagerApproval *ManagerApprovalOption `json:"manager_approval,omitempty"` + // Only turn on when working with sensitive permissions to ensure a smooth employee experience. + RequireAdditionalApproval *bool `json:"require_additional_approval,omitempty"` + // After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported. + CustomApprovalMessage *string `json:"custom_approval_message,omitempty"` + // Indicates if custom_approval_message is overridden. + CustomApprovalMessageOverride *bool `json:"custom_approval_message_override,omitempty"` + // AppStore App approvers assigned. + Approvers *AppApproversOutput `json:"approvers,omitempty"` + // AppStore App stage 2 approvers assigned. + ApproversStage2 *AppApproversOutput `json:"approvers_stage_2,omitempty"` + // The stages of this request approval. + RequestApprovalStages []RequestApprovalStageOutput `json:"request_approval_stages,omitempty"` +} + +func (o *RequestApprovalConfigOutput) GetRequestApprovalConfigOverride() *bool { + if o == nil { + return nil + } + return o.RequestApprovalConfigOverride +} + +func (o *RequestApprovalConfigOutput) GetManagerApproval() *ManagerApprovalOption { + if o == nil { + return nil + } + return o.ManagerApproval +} + +func (o *RequestApprovalConfigOutput) GetRequireAdditionalApproval() *bool { + if o == nil { + return nil + } + return o.RequireAdditionalApproval +} + +func (o *RequestApprovalConfigOutput) GetCustomApprovalMessage() *string { + if o == nil { + return nil + } + return o.CustomApprovalMessage +} + +func (o *RequestApprovalConfigOutput) GetCustomApprovalMessageOverride() *bool { + if o == nil { + return nil + } + return o.CustomApprovalMessageOverride +} + +func (o *RequestApprovalConfigOutput) GetApprovers() *AppApproversOutput { + if o == nil { + return nil + } + return o.Approvers +} + +func (o *RequestApprovalConfigOutput) GetApproversStage2() *AppApproversOutput { + if o == nil { + return nil + } + return o.ApproversStage2 +} + +func (o *RequestApprovalConfigOutput) GetRequestApprovalStages() []RequestApprovalStageOutput { + if o == nil { + return nil + } + return o.RequestApprovalStages +} diff --git a/internal/sdk/models/shared/requestconfiginputcreate.go b/internal/sdk/models/shared/requestconfiginputcreate.go new file mode 100644 index 0000000..1e84fe4 --- /dev/null +++ b/internal/sdk/models/shared/requestconfiginputcreate.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestConfigInputCreate struct { + // The appstore visibility of this request config. + AppstoreVisibility *AppStoreVisibilityOption `json:"appstore_visibility,omitempty"` + // Indicates if allowed groups is overriden from the app-level settings. + AllowedGroupsOverride *bool `json:"allowed_groups_override,omitempty"` + // Refers to which group(s) can make requests to this permission. + AllowedGroups *AllowedGroupsConfigInput `json:"allowed_groups,omitempty"` + // A request approval config can be optionally associated with this config + RequestApprovalConfig *RequestApprovalConfigInput `json:"request_approval_config,omitempty"` + // A deprovisioning webhook can be optionally associated with this config. + AccessRemovalInlineWebhook *BaseInlineWebhook `json:"access_removal_inline_webhook,omitempty"` + // A request validation webhook can be optionally associated with this config. + RequestValidationInlineWebhook *BaseInlineWebhook `json:"request_validation_inline_webhook,omitempty"` + // A request fulfillment config can be optionally associated with this config + RequestFulfillmentConfig *RequestFulfillmentConfigInput `json:"request_fulfillment_config,omitempty"` +} + +func (o *RequestConfigInputCreate) GetAppstoreVisibility() *AppStoreVisibilityOption { + if o == nil { + return nil + } + return o.AppstoreVisibility +} + +func (o *RequestConfigInputCreate) GetAllowedGroupsOverride() *bool { + if o == nil { + return nil + } + return o.AllowedGroupsOverride +} + +func (o *RequestConfigInputCreate) GetAllowedGroups() *AllowedGroupsConfigInput { + if o == nil { + return nil + } + return o.AllowedGroups +} + +func (o *RequestConfigInputCreate) GetRequestApprovalConfig() *RequestApprovalConfigInput { + if o == nil { + return nil + } + return o.RequestApprovalConfig +} + +func (o *RequestConfigInputCreate) GetAccessRemovalInlineWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.AccessRemovalInlineWebhook +} + +func (o *RequestConfigInputCreate) GetRequestValidationInlineWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.RequestValidationInlineWebhook +} + +func (o *RequestConfigInputCreate) GetRequestFulfillmentConfig() *RequestFulfillmentConfigInput { + if o == nil { + return nil + } + return o.RequestFulfillmentConfig +} diff --git a/internal/sdk/models/shared/requestconfiginputupdate.go b/internal/sdk/models/shared/requestconfiginputupdate.go new file mode 100644 index 0000000..ffb06a5 --- /dev/null +++ b/internal/sdk/models/shared/requestconfiginputupdate.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestConfigInputUpdate struct { + // The appstore visibility of this request config. + AppstoreVisibility *AppStoreVisibilityOption `json:"appstore_visibility,omitempty"` + // Indicates if allowed groups is overriden from the app-level settings. + AllowedGroupsOverride *bool `json:"allowed_groups_override,omitempty"` + // Refers to which group(s) can make requests to this permission. + AllowedGroups *AllowedGroupsConfigInput `json:"allowed_groups,omitempty"` + // A request approval config can be optionally associated with this config + RequestApprovalConfig *RequestApprovalConfigInput `json:"request_approval_config,omitempty"` + // A deprovisioning webhook can be optionally associated with this config. + AccessRemovalInlineWebhook *BaseInlineWebhook `json:"access_removal_inline_webhook,omitempty"` + // A request validation webhook can be optionally associated with this config. + RequestValidationInlineWebhook *BaseInlineWebhook `json:"request_validation_inline_webhook,omitempty"` + // A request fulfillment config can be optionally associated with this config + RequestFulfillmentConfig *RequestFulfillmentConfigInputUpdate `json:"request_fulfillment_config,omitempty"` +} + +func (o *RequestConfigInputUpdate) GetAppstoreVisibility() *AppStoreVisibilityOption { + if o == nil { + return nil + } + return o.AppstoreVisibility +} + +func (o *RequestConfigInputUpdate) GetAllowedGroupsOverride() *bool { + if o == nil { + return nil + } + return o.AllowedGroupsOverride +} + +func (o *RequestConfigInputUpdate) GetAllowedGroups() *AllowedGroupsConfigInput { + if o == nil { + return nil + } + return o.AllowedGroups +} + +func (o *RequestConfigInputUpdate) GetRequestApprovalConfig() *RequestApprovalConfigInput { + if o == nil { + return nil + } + return o.RequestApprovalConfig +} + +func (o *RequestConfigInputUpdate) GetAccessRemovalInlineWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.AccessRemovalInlineWebhook +} + +func (o *RequestConfigInputUpdate) GetRequestValidationInlineWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.RequestValidationInlineWebhook +} + +func (o *RequestConfigInputUpdate) GetRequestFulfillmentConfig() *RequestFulfillmentConfigInputUpdate { + if o == nil { + return nil + } + return o.RequestFulfillmentConfig +} diff --git a/internal/sdk/models/shared/requestconfigoutput.go b/internal/sdk/models/shared/requestconfigoutput.go new file mode 100644 index 0000000..95244d5 --- /dev/null +++ b/internal/sdk/models/shared/requestconfigoutput.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestConfigOutput struct { + // The appstore visibility of this request config. + AppstoreVisibility *AppStoreVisibilityOption `json:"appstore_visibility,omitempty"` + // Indicates if allowed groups is overriden from the app-level settings. + AllowedGroupsOverride *bool `json:"allowed_groups_override,omitempty"` + // The allowed groups config associated with this config. + AllowedGroups *AllowedGroupsConfigOutput `json:"allowed_groups,omitempty"` + // A request approval config can be optionally associated with this config + RequestApprovalConfig *RequestApprovalConfigOutput `json:"request_approval_config,omitempty"` + // A request fulfillment config can be optionally associated with this config + RequestFulfillmentConfig *RequestFulfillmentConfigOutput `json:"request_fulfillment_config,omitempty"` + // A deprovisioning webhook can be optionally associated with this config. + AccessRemovalInlineWebhook *InlineWebhook `json:"access_removal_inline_webhook,omitempty"` + // A request validation webhook can be optionally associated with this config. + RequestValidationInlineWebhook *InlineWebhook `json:"request_validation_inline_webhook,omitempty"` +} + +func (o *RequestConfigOutput) GetAppstoreVisibility() *AppStoreVisibilityOption { + if o == nil { + return nil + } + return o.AppstoreVisibility +} + +func (o *RequestConfigOutput) GetAllowedGroupsOverride() *bool { + if o == nil { + return nil + } + return o.AllowedGroupsOverride +} + +func (o *RequestConfigOutput) GetAllowedGroups() *AllowedGroupsConfigOutput { + if o == nil { + return nil + } + return o.AllowedGroups +} + +func (o *RequestConfigOutput) GetRequestApprovalConfig() *RequestApprovalConfigOutput { + if o == nil { + return nil + } + return o.RequestApprovalConfig +} + +func (o *RequestConfigOutput) GetRequestFulfillmentConfig() *RequestFulfillmentConfigOutput { + if o == nil { + return nil + } + return o.RequestFulfillmentConfig +} + +func (o *RequestConfigOutput) GetAccessRemovalInlineWebhook() *InlineWebhook { + if o == nil { + return nil + } + return o.AccessRemovalInlineWebhook +} + +func (o *RequestConfigOutput) GetRequestValidationInlineWebhook() *InlineWebhook { + if o == nil { + return nil + } + return o.RequestValidationInlineWebhook +} diff --git a/internal/sdk/models/shared/requestfulfillmentconfiginput.go b/internal/sdk/models/shared/requestfulfillmentconfiginput.go new file mode 100644 index 0000000..c0df662 --- /dev/null +++ b/internal/sdk/models/shared/requestfulfillmentconfiginput.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestFulfillmentConfigInput struct { + // Whether manual steps are needed. + ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` + // The manual instructions that go along. + ManualInstructions *string `json:"manual_instructions,omitempty"` + // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. + TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` + // Indicates if time based access is overriden. + TimeBasedAccessOverride *bool `json:"time_based_access_override,omitempty"` + // The provisioning group optionally associated with this config. + ProvisioningGroup *BaseGroup `json:"provisioning_group,omitempty"` + // The provisioning webhook optionally associated with this config. + ProvisioningWebhook *BaseInlineWebhook `json:"provisioning_webhook,omitempty"` +} + +func (o *RequestFulfillmentConfigInput) GetManualStepsNeeded() *bool { + if o == nil { + return nil + } + return o.ManualStepsNeeded +} + +func (o *RequestFulfillmentConfigInput) GetManualInstructions() *string { + if o == nil { + return nil + } + return o.ManualInstructions +} + +func (o *RequestFulfillmentConfigInput) GetTimeBasedAccess() []TimeBasedAccessOptions { + if o == nil { + return nil + } + return o.TimeBasedAccess +} + +func (o *RequestFulfillmentConfigInput) GetTimeBasedAccessOverride() *bool { + if o == nil { + return nil + } + return o.TimeBasedAccessOverride +} + +func (o *RequestFulfillmentConfigInput) GetProvisioningGroup() *BaseGroup { + if o == nil { + return nil + } + return o.ProvisioningGroup +} + +func (o *RequestFulfillmentConfigInput) GetProvisioningWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.ProvisioningWebhook +} diff --git a/internal/sdk/models/shared/requestfulfillmentconfiginputupdate.go b/internal/sdk/models/shared/requestfulfillmentconfiginputupdate.go new file mode 100644 index 0000000..4bc0aa5 --- /dev/null +++ b/internal/sdk/models/shared/requestfulfillmentconfiginputupdate.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestFulfillmentConfigInputUpdate struct { + // Whether manual steps are needed. + ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` + // The manual instructions that go along. + ManualInstructions *string `json:"manual_instructions,omitempty"` + // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. + TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` + // Indicates if time based access is overriden. + TimeBasedAccessOverride *bool `json:"time_based_access_override,omitempty"` + // The provisioning webhook optionally associated with this config. + ProvisioningWebhook *BaseInlineWebhook `json:"provisioning_webhook,omitempty"` +} + +func (o *RequestFulfillmentConfigInputUpdate) GetManualStepsNeeded() *bool { + if o == nil { + return nil + } + return o.ManualStepsNeeded +} + +func (o *RequestFulfillmentConfigInputUpdate) GetManualInstructions() *string { + if o == nil { + return nil + } + return o.ManualInstructions +} + +func (o *RequestFulfillmentConfigInputUpdate) GetTimeBasedAccess() []TimeBasedAccessOptions { + if o == nil { + return nil + } + return o.TimeBasedAccess +} + +func (o *RequestFulfillmentConfigInputUpdate) GetTimeBasedAccessOverride() *bool { + if o == nil { + return nil + } + return o.TimeBasedAccessOverride +} + +func (o *RequestFulfillmentConfigInputUpdate) GetProvisioningWebhook() *BaseInlineWebhook { + if o == nil { + return nil + } + return o.ProvisioningWebhook +} diff --git a/internal/sdk/models/shared/requestfulfillmentconfigoutput.go b/internal/sdk/models/shared/requestfulfillmentconfigoutput.go new file mode 100644 index 0000000..d76ebe6 --- /dev/null +++ b/internal/sdk/models/shared/requestfulfillmentconfigoutput.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type RequestFulfillmentConfigOutput struct { + // Whether manual steps are needed. + ManualStepsNeeded *bool `json:"manual_steps_needed,omitempty"` + // The manual instructions that go along. + ManualInstructions *string `json:"manual_instructions,omitempty"` + // If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access. + TimeBasedAccess []TimeBasedAccessOptions `json:"time_based_access,omitempty"` + // Indicates if time based access is overriden. + TimeBasedAccessOverride *bool `json:"time_based_access_override,omitempty"` + // The provisioning group optionally assocated with this config. + ProvisioningGroup *Group `json:"provisioning_group,omitempty"` + // The provisioning webhook optionally associated with this config. + ProvisioningWebhook *InlineWebhook `json:"provisioning_webhook,omitempty"` +} + +func (o *RequestFulfillmentConfigOutput) GetManualStepsNeeded() *bool { + if o == nil { + return nil + } + return o.ManualStepsNeeded +} + +func (o *RequestFulfillmentConfigOutput) GetManualInstructions() *string { + if o == nil { + return nil + } + return o.ManualInstructions +} + +func (o *RequestFulfillmentConfigOutput) GetTimeBasedAccess() []TimeBasedAccessOptions { + if o == nil { + return nil + } + return o.TimeBasedAccess +} + +func (o *RequestFulfillmentConfigOutput) GetTimeBasedAccessOverride() *bool { + if o == nil { + return nil + } + return o.TimeBasedAccessOverride +} + +func (o *RequestFulfillmentConfigOutput) GetProvisioningGroup() *Group { + if o == nil { + return nil + } + return o.ProvisioningGroup +} + +func (o *RequestFulfillmentConfigOutput) GetProvisioningWebhook() *InlineWebhook { + if o == nil { + return nil + } + return o.ProvisioningWebhook +} diff --git a/internal/sdk/models/shared/runinfostatus.go b/internal/sdk/models/shared/runinfostatus.go index 8adb3e8..79d95d7 100644 --- a/internal/sdk/models/shared/runinfostatus.go +++ b/internal/sdk/models/shared/runinfostatus.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// RunInfoStatus - An enumeration. type RunInfoStatus string const ( diff --git a/internal/sdk/models/shared/supportrequeststatus.go b/internal/sdk/models/shared/supportrequeststatus.go index fe7c18f..119316e 100644 --- a/internal/sdk/models/shared/supportrequeststatus.go +++ b/internal/sdk/models/shared/supportrequeststatus.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// SupportRequestStatus - An enumeration. type SupportRequestStatus string const ( diff --git a/internal/sdk/models/shared/timebasedaccessoptions.go b/internal/sdk/models/shared/timebasedaccessoptions.go index 2f851ce..4e6e27b 100644 --- a/internal/sdk/models/shared/timebasedaccessoptions.go +++ b/internal/sdk/models/shared/timebasedaccessoptions.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// TimeBasedAccessOptions - An enumeration. type TimeBasedAccessOptions string const ( diff --git a/internal/sdk/models/shared/userlifecyclestatus.go b/internal/sdk/models/shared/userlifecyclestatus.go index f869f8f..573c9a5 100644 --- a/internal/sdk/models/shared/userlifecyclestatus.go +++ b/internal/sdk/models/shared/userlifecyclestatus.go @@ -7,7 +7,6 @@ import ( "fmt" ) -// UserLifecycleStatus - An enumeration. type UserLifecycleStatus string const ( diff --git a/internal/sdk/models/shared/vendor.go b/internal/sdk/models/shared/vendor.go new file mode 100644 index 0000000..b93c05f --- /dev/null +++ b/internal/sdk/models/shared/vendor.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type Vendor struct { + // A user friendly name for the vendor + Name string `json:"name"` +} + +func (o *Vendor) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/internal/sdk/models/shared/vendoragreement.go b/internal/sdk/models/shared/vendoragreement.go index 2a93dad..34936f2 100644 --- a/internal/sdk/models/shared/vendoragreement.go +++ b/internal/sdk/models/shared/vendoragreement.go @@ -7,56 +7,23 @@ import ( "github.com/teamlumos/terraform-provider-lumos/internal/sdk/types" ) -// Vendor - The vendor in which the agreement is created for -type Vendor struct { - // A user friendly name for the vendor - Name string `json:"name"` -} - -func (o *Vendor) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -// TotalContractCost - The total cost of the current service term, including all line items and true ups, and including future years for multi-year agreements. -type TotalContractCost struct { - // The currency in which this cost is stored - Currency *string `json:"currency,omitempty"` - // The quantity of the cost in terms of the specified currency - Value int64 `json:"value"` -} - -func (o *TotalContractCost) GetCurrency() *string { - if o == nil { - return nil - } - return o.Currency -} - -func (o *TotalContractCost) GetValue() int64 { - if o == nil { - return 0 - } - return o.Value -} - type VendorAgreement struct { // A unique identifier for this Vendor Agreement ID string `json:"id"` // The vendor in which the agreement is created for Vendor Vendor `json:"vendor"` // The start of the current term - StartDate types.Date `json:"start_date"` + StartDate *types.Date `json:"start_date"` // The end of the current term - EndDate types.Date `json:"end_date"` + EndDate *types.Date `json:"end_date"` // The date by which the vendor must be notified if you want to terminate the agreement - OptOutDate types.Date `json:"opt_out_date"` + OptOutDate *types.Date `json:"opt_out_date"` // The total cost of the current service term, including all line items and true ups, and including future years for multi-year agreements. - TotalContractCost TotalContractCost `json:"total_contract_cost"` + TotalContractCost Cost `json:"total_contract_cost"` // The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned. LineItems []LineItem `json:"line_items"` + // Custom metadata tracked about each of your Vendor Agreements. The set of available options must be configured within the Lumos admin panel. + CustomAttributes map[string]VendorAgreementCustomAttributeOutput `json:"custom_attributes,omitempty"` } func (v VendorAgreement) MarshalJSON() ([]byte, error) { @@ -84,30 +51,30 @@ func (o *VendorAgreement) GetVendor() Vendor { return o.Vendor } -func (o *VendorAgreement) GetStartDate() types.Date { +func (o *VendorAgreement) GetStartDate() *types.Date { if o == nil { - return types.Date{} + return nil } return o.StartDate } -func (o *VendorAgreement) GetEndDate() types.Date { +func (o *VendorAgreement) GetEndDate() *types.Date { if o == nil { - return types.Date{} + return nil } return o.EndDate } -func (o *VendorAgreement) GetOptOutDate() types.Date { +func (o *VendorAgreement) GetOptOutDate() *types.Date { if o == nil { - return types.Date{} + return nil } return o.OptOutDate } -func (o *VendorAgreement) GetTotalContractCost() TotalContractCost { +func (o *VendorAgreement) GetTotalContractCost() Cost { if o == nil { - return TotalContractCost{} + return Cost{} } return o.TotalContractCost } @@ -118,3 +85,10 @@ func (o *VendorAgreement) GetLineItems() []LineItem { } return o.LineItems } + +func (o *VendorAgreement) GetCustomAttributes() map[string]VendorAgreementCustomAttributeOutput { + if o == nil { + return nil + } + return o.CustomAttributes +} diff --git a/internal/sdk/models/shared/vendoragreementcustomattributeinput.go b/internal/sdk/models/shared/vendoragreementcustomattributeinput.go new file mode 100644 index 0000000..221969f --- /dev/null +++ b/internal/sdk/models/shared/vendoragreementcustomattributeinput.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" +) + +type VendorAgreementCustomAttributeInputValueType string + +const ( + VendorAgreementCustomAttributeInputValueTypeStr VendorAgreementCustomAttributeInputValueType = "str" + VendorAgreementCustomAttributeInputValueTypeArrayOfUser VendorAgreementCustomAttributeInputValueType = "arrayOfUser" +) + +// VendorAgreementCustomAttributeInputValue - The value of the attribute for an individual Order +type VendorAgreementCustomAttributeInputValue struct { + Str *string + ArrayOfUser []User + + Type VendorAgreementCustomAttributeInputValueType +} + +func CreateVendorAgreementCustomAttributeInputValueStr(str string) VendorAgreementCustomAttributeInputValue { + typ := VendorAgreementCustomAttributeInputValueTypeStr + + return VendorAgreementCustomAttributeInputValue{ + Str: &str, + Type: typ, + } +} + +func CreateVendorAgreementCustomAttributeInputValueArrayOfUser(arrayOfUser []User) VendorAgreementCustomAttributeInputValue { + typ := VendorAgreementCustomAttributeInputValueTypeArrayOfUser + + return VendorAgreementCustomAttributeInputValue{ + ArrayOfUser: arrayOfUser, + Type: typ, + } +} + +func (u *VendorAgreementCustomAttributeInputValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = VendorAgreementCustomAttributeInputValueTypeStr + return nil + } + + var arrayOfUser []User = []User{} + if err := utils.UnmarshalJSON(data, &arrayOfUser, "", true, true); err == nil { + u.ArrayOfUser = arrayOfUser + u.Type = VendorAgreementCustomAttributeInputValueTypeArrayOfUser + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for VendorAgreementCustomAttributeInputValue", string(data)) +} + +func (u VendorAgreementCustomAttributeInputValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfUser != nil { + return utils.MarshalJSON(u.ArrayOfUser, "", true) + } + + return nil, errors.New("could not marshal union type VendorAgreementCustomAttributeInputValue: all fields are null") +} + +type VendorAgreementCustomAttributeInput struct { + // The type of custom attribute. Only text and user options are available today + Type VendorAgreementCustomAttributeType `json:"type"` + // The value of the attribute for an individual Order + Value *VendorAgreementCustomAttributeInputValue `json:"value,omitempty"` +} + +func (o *VendorAgreementCustomAttributeInput) GetType() VendorAgreementCustomAttributeType { + if o == nil { + return VendorAgreementCustomAttributeType("") + } + return o.Type +} + +func (o *VendorAgreementCustomAttributeInput) GetValue() *VendorAgreementCustomAttributeInputValue { + if o == nil { + return nil + } + return o.Value +} diff --git a/internal/sdk/models/shared/vendoragreementcustomattributeoutput.go b/internal/sdk/models/shared/vendoragreementcustomattributeoutput.go new file mode 100644 index 0000000..6af2113 --- /dev/null +++ b/internal/sdk/models/shared/vendoragreementcustomattributeoutput.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/teamlumos/terraform-provider-lumos/internal/sdk/internal/utils" +) + +type ValueType string + +const ( + ValueTypeStr ValueType = "str" + ValueTypeArrayOfUser ValueType = "arrayOfUser" +) + +// Value - The value of the attribute for an individual Order +type Value struct { + Str *string + ArrayOfUser []User + + Type ValueType +} + +func CreateValueStr(str string) Value { + typ := ValueTypeStr + + return Value{ + Str: &str, + Type: typ, + } +} + +func CreateValueArrayOfUser(arrayOfUser []User) Value { + typ := ValueTypeArrayOfUser + + return Value{ + ArrayOfUser: arrayOfUser, + Type: typ, + } +} + +func (u *Value) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = ValueTypeStr + return nil + } + + var arrayOfUser []User = []User{} + if err := utils.UnmarshalJSON(data, &arrayOfUser, "", true, true); err == nil { + u.ArrayOfUser = arrayOfUser + u.Type = ValueTypeArrayOfUser + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Value", string(data)) +} + +func (u Value) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfUser != nil { + return utils.MarshalJSON(u.ArrayOfUser, "", true) + } + + return nil, errors.New("could not marshal union type Value: all fields are null") +} + +type VendorAgreementCustomAttributeOutput struct { + // The type of custom attribute. Only text and user options are available today + Type VendorAgreementCustomAttributeType `json:"type"` + // The value of the attribute for an individual Order + Value *Value `json:"value,omitempty"` +} + +func (o *VendorAgreementCustomAttributeOutput) GetType() VendorAgreementCustomAttributeType { + if o == nil { + return VendorAgreementCustomAttributeType("") + } + return o.Type +} + +func (o *VendorAgreementCustomAttributeOutput) GetValue() *Value { + if o == nil { + return nil + } + return o.Value +} diff --git a/internal/sdk/models/shared/vendoragreementcustomattributetype.go b/internal/sdk/models/shared/vendoragreementcustomattributetype.go new file mode 100644 index 0000000..4fedab5 --- /dev/null +++ b/internal/sdk/models/shared/vendoragreementcustomattributetype.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type VendorAgreementCustomAttributeType string + +const ( + VendorAgreementCustomAttributeTypeText VendorAgreementCustomAttributeType = "TEXT" + VendorAgreementCustomAttributeTypeUser VendorAgreementCustomAttributeType = "USER" + VendorAgreementCustomAttributeTypeSingleSelect VendorAgreementCustomAttributeType = "SINGLE_SELECT" +) + +func (e VendorAgreementCustomAttributeType) ToPointer() *VendorAgreementCustomAttributeType { + return &e +} +func (e *VendorAgreementCustomAttributeType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "USER": + fallthrough + case "SINGLE_SELECT": + *e = VendorAgreementCustomAttributeType(v) + return nil + default: + return fmt.Errorf("invalid value for VendorAgreementCustomAttributeType: %v", v) + } +} diff --git a/internal/sdk/types/pointers.go b/internal/sdk/types/pointers.go index 950d6a3..35c439d 100644 --- a/internal/sdk/types/pointers.go +++ b/internal/sdk/types/pointers.go @@ -8,3 +8,4 @@ func Int(i int) *int { return &i } func Int64(i int64) *int64 { return &i } func Float32(f float32) *float32 { return &f } func Float64(f float64) *float64 { return &f } +func Pointer[T any](v T) *T { return &v } diff --git a/internal/sdk/vendormanagement.go b/internal/sdk/vendormanagement.go index 45ebc95..66f8844 100644 --- a/internal/sdk/vendormanagement.go +++ b/internal/sdk/vendormanagement.go @@ -179,17 +179,25 @@ func (s *VendorManagement) ListVendorAgreements(ctx context.Context, request ope RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.PageVendorAgreement if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -197,11 +205,21 @@ func (s *VendorManagement) ListVendorAgreements(ctx context.Context, request ope res.PageVendorAgreement = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -209,9 +227,19 @@ func (s *VendorManagement) ListVendorAgreements(ctx context.Context, request ope res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -219,12 +247,12 @@ func (s *VendorManagement) ListVendorAgreements(ctx context.Context, request ope } -// CreateFoundDocumentMultipart - Upload Found Documents +// CreateFoundDocumentJSON - Upload Found Documents // Upload a newly discovered document (e.g. Order Form, Quote) to Lumos for review -func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, request operations.CreateFoundDocumentMultipartRequestBody, opts ...operations.Option) (*operations.CreateFoundDocumentMultipartResponse, error) { +func (s *VendorManagement) CreateFoundDocumentJSON(ctx context.Context, request shared.FoundDocumentsUpload, opts ...operations.Option) (*operations.CreateFoundDocumentJSONResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createFoundDocument_multipart", + OperationID: "createFoundDocument_json", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -247,7 +275,7 @@ func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, req return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "multipart", `request:"mediaType=multipart/form-data"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } @@ -366,23 +394,31 @@ func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, req } } - res := &operations.CreateFoundDocumentMultipartResponse{ + res := &operations.CreateFoundDocumentJSONResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out any if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -390,11 +426,21 @@ func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, req res.Any = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -402,9 +448,19 @@ func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, req res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -412,12 +468,12 @@ func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, req } -// CreateFoundDocumentJSON - Upload Found Documents +// CreateFoundDocumentMultipart - Upload Found Documents // Upload a newly discovered document (e.g. Order Form, Quote) to Lumos for review -func (s *VendorManagement) CreateFoundDocumentJSON(ctx context.Context, request shared.FoundDocumentsUpload, opts ...operations.Option) (*operations.CreateFoundDocumentJSONResponse, error) { +func (s *VendorManagement) CreateFoundDocumentMultipart(ctx context.Context, request operations.CreateFoundDocumentMultipartRequestBody, opts ...operations.Option) (*operations.CreateFoundDocumentMultipartResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createFoundDocument_json", + OperationID: "createFoundDocument_multipart", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -440,7 +496,7 @@ func (s *VendorManagement) CreateFoundDocumentJSON(ctx context.Context, request return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "multipart", `request:"mediaType=multipart/form-data"`) if err != nil { return nil, err } @@ -559,23 +615,31 @@ func (s *VendorManagement) CreateFoundDocumentJSON(ctx context.Context, request } } - res := &operations.CreateFoundDocumentJSONResponse{ + res := &operations.CreateFoundDocumentMultipartResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out any if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -583,11 +647,21 @@ func (s *VendorManagement) CreateFoundDocumentJSON(ctx context.Context, request res.Any = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -595,9 +669,19 @@ func (s *VendorManagement) CreateFoundDocumentJSON(ctx context.Context, request res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -758,17 +842,25 @@ func (s *VendorManagement) CreateOrder(ctx context.Context, request shared.Order RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out any if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -776,11 +868,21 @@ func (s *VendorManagement) CreateOrder(ctx context.Context, request shared.Order res.Any = out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 422: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + var out shared.HTTPValidationError if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -788,9 +890,19 @@ func (s *VendorManagement) CreateOrder(ctx context.Context, request shared.Order res.HTTPValidationError = &out default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } diff --git a/internal/validators/objectvalidators/request_config_input_validator.go b/internal/validators/objectvalidators/request_config_input_validator.go index 16566bb..ba9b8a1 100644 --- a/internal/validators/objectvalidators/request_config_input_validator.go +++ b/internal/validators/objectvalidators/request_config_input_validator.go @@ -44,7 +44,7 @@ func (v ObjectRequestConfigInputValidatorValidator) MarkdownDescription(ctx cont // Validate performs the validation. func (v ObjectRequestConfigInputValidatorValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse) { - requestConfig := tfTypes.RequestablePermissionInputRequestConfig{} + requestConfig := tfTypes.RequestConfigInputCreate{} req.ConfigValue.As(ctx, &requestConfig, basetypes.ObjectAsOptions{UnhandledNullAsEmpty: true, UnhandledUnknownAsEmpty: true}) // Check that none of the overrides are false or null with corresponding fields populated, @@ -141,7 +141,7 @@ func (v ObjectRequestConfigInputValidatorValidator) ValidateObject(ctx context.C } } -func ApproversIsPopulated(approvers *tfTypes.AddAppToAppStoreInputApprovers) bool { +func ApproversIsPopulated(approvers *tfTypes.AppApproversInput) bool { if approvers == nil { return false } @@ -155,7 +155,7 @@ func ApproversIsPopulated(approvers *tfTypes.AddAppToAppStoreInputApprovers) boo // first bool indicates if its populated // second bool indicate if its *properly* populated -func AllowedGroupsIsPopulatedProperly(allowedGroups *tfTypes.AddAppToAppStoreInputAllowedGroups) (bool, bool, string) { +func AllowedGroupsIsPopulatedProperly(allowedGroups *tfTypes.AllowedGroupsConfigInput) (bool, bool, string) { if allowedGroups == nil { return false, false, "`allowed_groups` is not populated" } diff --git a/openapi.json b/openapi.json index f13529c..614c3ee 100644 --- a/openapi.json +++ b/openapi.json @@ -1,6298 +1,7606 @@ { - "openapi": "3.1.0", - "info": { - "title": "Lumos", - "description": "\n The Lumos API gives you the building blocks to administer and extend Lumos programmatically.\n Our REST API provides a management interface for the AppStore and a read interface\n for the Lumos Core.\n Go to https://developers.lumos.com to see our complete documentation.\n", - "version": "0.1.0" - }, - "servers": [ - { - "url": "https://api.lumos.com" - } - ], - "paths": { - "/apps": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Apps", - "description": "List all of your company's apps.", - "operationId": "listApps", - "parameters": [ - { - "description": "Search against name, app instance identifier, and app class ID.", - "required": false, - "schema": { - "type": "string", - "title": "Name Search", - "description": "Search against name, app instance identifier, and app class ID." - }, - "name": "name_search", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_App_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "post": { - "tags": [ - "Core" - ], - "summary": "Create App", - "description": "Create a new app.", - "operationId": "createApp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInputCreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/apps/categories": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get App Categories", - "description": "Get app categories.", - "operationId": "getAppCategories", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Response Getappcategories" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/apps/{app_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get App", - "description": "Get an app by id.", - "operationId": "getApp", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": [ - "Core" - ], - "summary": "Update App", - "description": "Update an app.", - "operationId": "updateApp", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInputCreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/apps/{app_id}/settings": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Appstore App Settings", - "description": "Get AppStore app settings.", - "operationId": "getAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppSettingOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": [ - "Core" - ], - "summary": "Update Domain App Appstore Settings", - "description": "Update app settings.", - "operationId": "updateAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppSettingInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppSettingOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/users/current": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Current User", - "description": "Get current user", - "operationId": "currentUser", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/users": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Users", - "description": "List all of your company's users.", - "operationId": "listUsers", - "parameters": [ - { - "description": "Search for users by name or email.", - "required": false, - "schema": { - "type": "string", - "title": "Search Term", - "description": "Search for users by name or email." - }, - "name": "search_term", - "in": "query" - }, - { - "description": "If a search_term is provided, only accept exact matches.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "If a search_term is provided, only accept exact matches.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_User_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/users/{user_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get User", - "description": "Get user by id.", - "operationId": "getUser", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "User Id" - }, - "name": "user_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/inline_webhooks": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Inline Webhooks", - "description": "Get available webhooks", - "operationId": "get_inline_webhooks_inline_webhooks_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/InlineWebhook" - }, - "type": "array", - "title": "Response Get Inline Webhooks Inline Webhooks Get" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/accounts": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Accounts", - "description": "Get all accounts associated with apps at your company.", - "operationId": "getAccounts", - "parameters": [ - { - "required": false, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Account_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/groups/{group_id}/users": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Group Membership", - "description": "Get user members by group ID.", - "operationId": "getGroupMembership", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Group Id" - }, - "name": "group_id", - "in": "path" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_User_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/groups/{group_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Group", - "description": "Get group by ID.", - "operationId": "getGroup", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Group Id" - }, - "name": "group_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Group" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/groups": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Groups", - "description": "Get groups synced from connected integrations", - "operationId": "getGroups", - "parameters": [ - { - "description": "Filters groups by integration specific ID, e.g. the group's Okta ID.", - "required": false, - "schema": { - "type": "string", - "title": "Integration Specific Id", - "description": "Filters groups by integration specific ID, e.g. the group's Okta ID." - }, - "name": "integration_specific_id", - "in": "query" - }, - { - "description": "Filters groups by name.", - "required": false, - "schema": { - "type": "string", - "title": "Name", - "description": "Filters groups by name." - }, - "name": "name", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "description": "Filters groups by the ID of the app to which they belong.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters groups by the ID of the app to which they belong." - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Group_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/accounts/upload/{job_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Upload Job State", - "description": "Get state of an account upload job.", - "operationId": "getUploadJobState", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStateOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/activity_logs": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Activity Logs", - "description": "Get activity logs.", - "operationId": "getActivityLogs", - "parameters": [ - { - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "title": "Since" - }, - "name": "since", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "title": "Until" - }, - "name": "until", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Limit", - "default": 50 - }, - "name": "limit", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 0.0, - "title": "Offset", - "default": 0 - }, - "name": "offset", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LimitOffsetPage_ActivityLog_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/accounts/upload": { - "post": { - "tags": [ - "Core" - ], - "summary": "Create Accounts", - "description": "Upload accounts to an app.", - "operationId": "postAccounts", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AccountsUploadInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStateOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/activity_records": { - "post": { - "tags": [ - "Core" - ], - "summary": "Update Activity Records", - "description": "Update the last_login or last_activity for a given account.", - "operationId": "activityRecords", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivityRecordInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivityRecordOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/activity_records/job/{job_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Activity Records Job State", - "description": "Get the state of an activity records post-processing job.", - "operationId": "getActivityRecordsJobState", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncTaskOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/requestable_permissions": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Permissions For App", - "description": "Get AppStore permissions for an application.", - "operationId": "get_appstore_permissions_for_app_appstore_requestable_permissions_get", - "parameters": [ - { - "description": "Filters requestable permissions by the ID of the app to which they belong.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters requestable permissions by the ID of the app to which they belong." - }, - "name": "app_id", - "in": "query" - }, - { - "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n", - "required": false, - "schema": { - "type": "string", - "title": "Search Term", - "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n" - }, - "name": "search_term", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "description": "\n Filters permissions by visibility in the AppStore.\n", - "required": false, - "schema": { - "type": "boolean", - "title": "In App Store", - "description": "\n Filters permissions by visibility in the AppStore.\n" - }, - "name": "in_app_store", - "in": "query" - }, - { - "description": "Include inherited configurations from parent app.", - "required": false, - "schema": { - "type": "boolean", - "title": "Include Inherited Configs", - "description": "Include inherited configurations from parent app.", - "default": true - }, - "name": "include_inherited_configs", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_RequestablePermissionOutput_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "post": { - "tags": [ - "AppStore" - ], - "summary": "Create Appstore Requestable Permission", - "description": "**Create a permission attached to an App in the AppStore.**\n\n\n*Required fields:*\n- app-identifier. The App should be identified either by app_id or app_class_id + app_instance_id.\n- label\n\n*Defaults:*\n- request_config:\n - appstore_visibility: HIDDEN\n - allowed_groups:\n - type: ALL_GROUPS\n - groups: []\n - request_approval_config\n - manager_approval: NONE\n - request_approval_stages: []\n - request_fulfillment_config\n - manual_steps_needed: false\n- All other fields will have null values by default.", - "operationId": "create_appstore_requestable_permission_appstore_requestable_permissions_post", - "parameters": [ - { - "description": "Include inherited configurations from parent app.", - "required": false, - "schema": { - "type": "boolean", - "title": "Include Inherited Configs", - "description": "Include inherited configurations from parent app.", - "default": true - }, - "name": "include_inherited_configs", - "in": "query" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/requestable_permissions/{permission_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Permission", - "description": "Get an AppStore permission.", - "operationId": "get_appstore_permission_appstore_requestable_permissions__permission_id__get", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Permission Id" - }, - "name": "permission_id", - "in": "path" - }, - { - "description": "Include inherited configurations from parent app.", - "required": false, - "schema": { - "type": "boolean", - "title": "Include Inherited Configs", - "description": "Include inherited configurations from parent app.", - "default": true - }, - "name": "include_inherited_configs", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Delete Appstore Permission", - "description": "Delete a requestable permission by ID.\n\n Only permissions of type 'NATIVE' can be deleted.", - "operationId": "delete_appstore_permission_appstore_requestable_permissions__permission_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Permission Id" - }, - "name": "permission_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": [ - "AppStore" - ], - "summary": "Update Appstore Permission", - "description": "**Update an AppStore permission.**\n\n\nAll fields present in the payload will override the permission's data.\nAny missing fields will be disregarded.\n\n Non-updatable fields for now:\n request_config -> request_fulfillment_config -> provisioning_group", - "operationId": "update_appstore_permission_appstore_requestable_permissions__permission_id__patch", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Permission Id" - }, - "name": "permission_id", - "in": "path" - }, - { - "description": "Include inherited configurations from parent app.", - "required": false, - "schema": { - "type": "boolean", - "title": "Include Inherited Configs", - "description": "Include inherited configurations from parent app.", - "default": true - }, - "name": "include_inherited_configs", - "in": "query" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionInputUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/pre_approval_rules": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Pre Approval Rules For App", - "description": "Get AppStore pre-approval rules for an app.", - "operationId": "get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get", - "parameters": [ - { - "description": "Filters preapproval rules by the ID of the app to which they belong.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters preapproval rules by the ID of the app to which they belong." - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_PreApprovalRuleOutput_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "post": { - "tags": [ - "AppStore" - ], - "summary": "Create Pre Approval Rule", - "description": "Create a pre-approval rule attached to an App in the AppStore.", - "operationId": "create_pre_approval_rule_appstore_pre_approval_rules_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/pre_approval_rules/{pre_approval_rule_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Pre Approval Rule", - "description": "Get an AppStore pre-approval rule.", - "operationId": "get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Pre Approval Rule Id" - }, - "name": "pre_approval_rule_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Delete Pre Approval Rule", - "description": "Delete a pre-approval rule by ID.", - "operationId": "delete_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Pre Approval Rule Id" - }, - "name": "pre_approval_rule_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": [ - "AppStore" - ], - "summary": "Update Pre Approval Rule", - "description": "**Update a pre-approval rule attached to an App in the AppStore.**\n\nAll fields present in the payload will override the pre-approval rule's data.\nAny missing fields will be disregarded.", - "operationId": "update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Pre Approval Rule Id" - }, - "name": "pre_approval_rule_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleUpdateInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/apps/{app_id}/settings": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore App Settings", - "description": "Get AppStore app settings.", - "operationId": "getAppStoreAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "patch": { - "tags": [ - "AppStore" - ], - "summary": "Update Appstore App Settings", - "description": "Update AppStore app settings.", - "operationId": "updateAppStoreAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/apps": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Apps", - "description": "List all AppStore apps.", - "operationId": "getAppStoreApps", - "parameters": [ - { - "description": "Filters apps by the ID of the app.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters apps by the ID of the app." - }, - "name": "app_id", - "in": "query" - }, - { - "description": "Search against name, app instance identifier, and app class ID.", - "required": false, - "schema": { - "type": "string", - "title": "Name Search", - "description": "Search against name, app instance identifier, and app class ID." - }, - "name": "name_search", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "description": "Get all apps in the AppStore regardless of visibility. Only available to admins.", - "required": false, - "schema": { - "type": "boolean", - "title": "All Visibilities", - "description": "Get all apps in the AppStore regardless of visibility. Only available to admins.", - "default": false - }, - "name": "all_visibilities", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_AppStoreApp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "post": { - "tags": [ - "AppStore" - ], - "summary": "Add App To Appstore", - "description": "Add app to AppStore with given settings.", - "operationId": "addAppToAppStore", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddAppToAppStoreInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/apps/{app_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore App", - "description": "Get AppStore app.", - "operationId": "getAppStoreApp", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreApp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Remove App From Appstore", - "description": "Remove app from AppStore.", - "operationId": "removeAppFromAppStore", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/access_requests/{id}": { - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Cancel Access Request", - "description": "Cancel an access request.", - "operationId": "cancelAccessRequest", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Id" - }, - "name": "id", - "in": "path" - }, - { - "description": "Reason for cancellation.", - "required": false, - "schema": { - "type": "string", - "title": "Reason", - "description": "Reason for cancellation." - }, - "name": "reason", - "in": "query" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/access_request": { - "post": { - "tags": [ - "AppStore" - ], - "summary": "Create Access Request", - "description": "Create a request to access a specific permission in the appstore.", - "operationId": "createAccessRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAccessRequestInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AccessRequest" - }, - "type": "array", - "title": "Response Createaccessrequest" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/access_requests/{access_request_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Access Request", - "description": "Get access request by ID.", - "operationId": "getAccessRequest", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Access Request Id" - }, - "name": "access_request_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AccessRequest" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/appstore/access_requests": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Access Requests", - "description": "Get all access requests for the current organization.", - "operationId": "getAccessRequests", - "parameters": [ - { - "description": "Filters requests by the ID of the target user.", - "required": false, - "schema": { - "type": "string", - "title": "Target User Id", - "description": "Filters requests by the ID of the target user." - }, - "name": "target_user_id", - "in": "query" - }, - { - "description": "Filters requests by the ID of the requesting user.", - "required": false, - "schema": { - "type": "string", - "title": "Requester User Id", - "description": "Filters requests by the ID of the requesting user." - }, - "name": "requester_user_id", - "in": "query" - }, - { - "description": "Filters requests by the ID of the user.", - "required": false, - "schema": { - "type": "string", - "title": "User Id", - "description": "Filters requests by the ID of the user." - }, - "name": "user_id", - "in": "query" - }, - { - "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'", - "required": false, - "schema": { - "items": { - "$ref": "#/components/schemas/SupportRequestStatus" - }, - "type": "array", - "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'" - }, - "name": "statuses", - "in": "query" - }, - { - "description": "Sort access requests ascending (ASC) or descending (DESC) by created date.", - "required": false, - "schema": { - "type": "string", - "title": "Sort", - "description": "Sort access requests ascending (ASC) or descending (DESC) by created date.", - "default": "ASC" - }, - "name": "sort", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_AccessRequest_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/vendor_agreements": { - "get": { - "tags": [ - "Vendor Management" - ], - "summary": "Get Vendor Agreements", - "description": "List all of your company's vendor agreements.", - "operationId": "listVendorAgreements", - "parameters": [ - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_VendorAgreement_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/found_documents": { - "post": { - "tags": [ - "Vendor Management" - ], - "summary": "Upload Found Documents", - "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos for review", - "operationId": "createFoundDocument", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FoundDocumentsUpload", - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." - }, - "files": { - "items": { - "properties": { - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array", - "title": "Files", - "description": "A list of publicly accessible URLs that direct to files related to a Vendor Agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." - }, - "vendor_name": { - "type": "string", - "title": "Vendor Name", - "description": "The name of the vendor associated with this document" - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start date of the attached contract" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end date of the attached contract" - }, - "source_app_id": { - "type": "string", - "title": "Source App ID", - "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." - }, - "total_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Total Cost", - "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years." - } - }, - "type": "object", - "required": [ - "unique_identifier", - "files" - ] - } - }, - "multipart/form-data": { - "schema": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." - }, - "files": { - "items": { - "type": "string", - "format": "binary" - }, - "type": "array", - "title": "Files", - "description": "A list of files related to a vendor agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." - }, - "vendor_name": { - "type": "string", - "title": "Vendor Name", - "description": "The name of the vendor associated with this document" - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start date of the attached contract" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end date of the attached contract" - }, - "source_app_id": { - "type": "string", - "title": "Source App ID", - "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." - } - }, - "type": "object", - "required": [ - "unique_identifier", - "files" - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/orders": { - "post": { - "tags": [ - "Vendor Management" - ], - "summary": "Upload Order", - "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos", - "operationId": "createOrder", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrderInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/art": { - "get": { - "tags": [ - "Meta" - ], - "summary": "Get Art", - "description": "Return Lumos ASCII art. Can be used to verify the API is working.", - "operationId": "Lumos Art.", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/info": { - "get": { - "tags": [ - "Meta" - ], - "summary": "Get Info", - "description": "Returns current git revision.", - "operationId": "Lumos liveness check", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Response Lumos Liveness Check" - } - } - } - } - } - } - }, - "/webhooks/airbase/purchase_request_approved/{domain_app_uuid}": { - "post": { - "tags": [ - "Integration Webhooks" - ], - "summary": "Process Airbase Purchase Request Approved", - "description": "Webhook for Airbase to send events as a workflow transitions through milestones", - "operationId": "processAirbaseMilestoneEvent", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Domain App Uuid" - }, - "name": "domain_app_uuid", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AirbasePurchaseRequestEvent" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "AccessRequest": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of the access request." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app the request is for." - }, - "app_name": { - "type": "string", - "title": "App Name", - "description": "The name of the app the request is for." - }, - "requester_user": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - } - ], - "title": "Requester User", - "description": "The user who requested access. It's possible for one user to request access on another's behalf." - }, - "target_user": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - } - ], - "title": "Target User", - "description": "The user the request is for." - }, - "supporter_user": { - "$ref": "#/components/schemas/User" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/SupportRequestStatus" - } - ], - "description": "The current status of the request." - }, - "notes": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Notes", - "description": "The reason the user wrote for putting the access request into the given state.", - "default": { - - } - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At" - }, - "requestable_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - }, - "type": "array", - "title": "Requestable Permissions" - }, - "requested_at": { - "type": "string", - "format": "date-time", - "title": "Requested At" - } - }, - "type": "object", - "required": [ - "id", - "app_id", - "app_name", - "requester_user", - "target_user", - "status" - ], - "title": "AccessRequest", - "description": "API version of DomainAppSupportRequest." - }, - "Account": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app that owns this account." - }, - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The stable identifier of this account from the associated service." - }, - "account_type": { - "allOf": [ - { - "$ref": "#/components/schemas/AccountType" - } - ], - "description": "The type of this account, one of 'USER', 'ROLE' (e.g. AWS), 'SERVICE' (e.g. GCP)." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of this account." - }, - "user_id": { - "type": "string", - "title": "User Id", - "description": "The ID of the user associated with this account." - } - }, - "type": "object", - "required": [ - "app_id", - "unique_identifier", - "account_type" - ], - "title": "Account" - }, - "AccountInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique identifier for this account, such as an account ID or email." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of this account." - }, - "first_name": { - "type": "string", - "title": "First Name", - "description": "The first name of the user." - }, - "last_name": { - "type": "string", - "title": "Last Name", - "description": "The last name of the user." - }, - "last_activity": { - "type": "string", - "title": "Last Activity", - "description": "The datetime of last activity of the user." - }, - "last_login": { - "type": "string", - "title": "Last Login", - "description": "The datetime of last login of the user." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AccountLifecycleStatus" - } - ], - "description": "The status of the account." - }, - "permissions": { - "items": { - "$ref": "#/components/schemas/PermissionInput" - }, - "type": "array", - "title": "Permissions", - "description": "The permissions of the account.", - "default": [ - - ] - }, - "attributes": { - "items": { - "$ref": "#/components/schemas/AttributeInput" - }, - "type": "array", - "title": "Attributes", - "description": "The attributes of the account.", - "default": [ - - ] - } - }, - "type": "object", - "required": [ - "unique_identifier" - ], - "title": "AccountInput" - }, - "AccountLifecycleStatus": { - "type": "string", - "enum": [ - "DISCOVERED", - "STAGED", - "ACCESS_CREATED", - "ACTIVE", - "ARCHIVED", - "SUSPENDED", - "DEPROVISIONED", - "MANUALLY_REMOVED", - "ACCESS_REMOVED", - "NON_CORPORATE_ACCOUNT", - "WAITING_MANUAL_REMOVAL" - ], - "title": "AccountLifecycleStatus", - "description": "NOTE: If you update this, also update UserDomainAppLifecycleStatus\n\nDISCOVERED - Account discovered through accountfinding. Could be noisy.\n\nSTAGED - An account that has been queued for provisioning, but is not\n provisioned yet. Relevant for Apps where provisioning is async\n (eg. Okta, OneLogin).\n\nACCESS_CREATED - When an account has been provisioned but not accessed.\n\nACTIVE - A live, active, accessible account.\n\nSUSPENDED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nDEPROVISIONED - The user can no longer access the account, the license was removed,\n and the account cannot be recovered.\n\nARCHIVED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nMANUALLY_REMOVED - The user can no longer access the account, the license is presumably\n removed, but all of this was done manually\n\nACCESS_REMOVED - The user can no longer access the account, but a license may still\n exist. This is the case when we remove access through Okta but not a\n direct integration\n\nNON_CORPORATE_ACCOUNT - The account doesn't exist, or is a personal employee account.\n\nWAITING_MANUAL_REMOVAL - Waiting manual removal, someone was requested to remove the user access\n from the App, and we are waiting for an answer about it." - }, - "AccountType": { - "type": "string", - "enum": [ - "USER", - "ROLE", - "SERVICE" - ], - "title": "AccountType", - "description": "An enumeration." - }, - "AccountsUploadInput": { - "properties": { - "accounts": { - "items": { - "$ref": "#/components/schemas/AccountInput" - }, - "type": "array", - "title": "Accounts", - "description": "Accounts to upload.", - "default": [ - - ] - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app to upload accounts to." - } - }, - "type": "object", - "required": [ - "app_id" - ], - "title": "AccountsUploadInput" - }, - "ActivityLog": { - "properties": { - "event_hash": { - "type": "string", - "title": "Event Hash" - }, - "event_type": { - "type": "string", - "title": "Event Type" - }, - "event_type_user_friendly": { - "type": "string", - "title": "Event Type User Friendly" - }, - "outcome": { - "type": "string", - "title": "Outcome" - }, - "targets": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Targets" - }, - "actor": { - "type": "object", - "title": "Actor" - }, - "event_began_at": { - "type": "string", - "format": "date-time", - "title": "Event Began At" - }, - "event_metadata": { - "type": "object", - "title": "Event Metadata" - } - }, - "type": "object", - "required": [ - "event_hash", - "event_type", - "event_type_user_friendly", - "outcome", - "targets", - "actor", - "event_began_at", - "event_metadata" - ], - "title": "ActivityLog", - "description": "API version of SIEMEvent" - }, - "ActivityRecord": { - "properties": { - "account": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordAccountInput" - } - ], - "title": "Account", - "description": "Metadata that Lumos can use to match the activity record to a software account within Lumos." - }, - "event": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordEventInput" - } - ], - "title": "Event", - "description": "Metadata about the event being uploaded." - }, - "timestamp": { - "type": "string", - "format": "date-time", - "title": "Timestamp", - "description": "The timestamp of this event, in ISO 8601 format." - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "UUID of the application in Lumos where this activity record was sourced (e.g. the ID of Okta within Lumos found by going to Apps > Find your app in the list > Click '...' > Copy Stable Identifier)" - }, - "app": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordAppInput" - } - ], - "title": "App", - "description": "Metadata that Lumos can use to match the activity record to an application within Lumos." - } - }, - "type": "object", - "required": [ - "account", - "event", - "timestamp", - "source_app_id" - ], - "title": "ActivityRecord" - }, - "ActivityRecordAccountInput": { - "properties": { - "external_id": { - "type": "string", - "title": "External Id", - "description": "The external app's user ID for the account." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email associated with the account" - } - }, - "type": "object", - "title": "ActivityRecordAccountInput" - }, - "ActivityRecordAppInput": { - "properties": { - "instance_identifier": { - "type": "string", - "title": "Instance Identifier", - "description": "The ID of the app as it is identified in the source E.g. the ID that Okta uses to identify the app" - } - }, - "type": "object", - "required": [ - "instance_identifier" - ], - "title": "ActivityRecordAppInput" - }, - "ActivityRecordEventInput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordEventType" - } - ], - "description": "The type of event being uploaded." - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "ActivityRecordEventInput" - }, - "ActivityRecordEventType": { - "enum": [ - "LOGIN", - "ACTIVITY" - ], - "title": "ActivityRecordEventType", - "description": "An enumeration." - }, - "ActivityRecordInput": { - "properties": { - "records": { - "items": { - "$ref": "#/components/schemas/ActivityRecord" - }, - "type": "array", - "title": "Records", - "description": "The activity records to upload." - } - }, - "type": "object", - "required": [ - "records" - ], - "title": "ActivityRecordInput" - }, - "ActivityRecordOutput": { - "properties": { - "job": { - "allOf": [ - { - "$ref": "#/components/schemas/SyncTaskOutput" - } - ], - "title": "Job", - "description": "State of the job to post-process the records." - } - }, - "type": "object", - "required": [ - "job" - ], - "title": "ActivityRecordOutput" - }, - "AddAppToAppStoreInput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app to add to the app store." - } - }, - "type": "object", - "required": [ - "app_id" - ], - "title": "AddAppToAppStoreInput" - }, - "AirbasePurchaseRequestEvent": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "object": { - "type": "string", - "title": "Object" - }, - "type": { - "type": "string", - "title": "Type" - }, - "created_date": { - "type": "string", - "title": "Created Date" - }, - "data": { - "type": "object", - "title": "Data" - } - }, - "type": "object", - "required": [ - "id", - "object", - "type", - "created_date", - "data" - ], - "title": "AirbasePurchaseRequestEvent", - "description": "Model of the input we'll get from Airbase's webhook call.\nAll events seem to follow this same base structure, it is just `data` that is different\nfor each. We are using `dict` here to be permissive to other webhook events (so we can warn if\nthe customer misconfigures for a different webhook), and we actually only use 2 fields from it." - }, - "AllowedGroupsConfigInput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigType" - } - ], - "description": "The type of this allowed groups config, can be all groups or specific.", - "default": "ALL_GROUPS" - }, - "groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Groups", - "description": "The groups allowed to request this permission." - } - }, - "type": "object", - "title": "AllowedGroupsConfigInput" - }, - "AllowedGroupsConfigOutput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigType" - } - ], - "description": "The type of this allowed groups config, can be all groups or specific.", - "default": "ALL_GROUPS" - }, - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Groups", - "description": "The groups allowed to request this permission.", - "default": [ - - ] - } - }, - "type": "object", - "title": "AllowedGroupsConfigOutput" - }, - "AllowedGroupsConfigType": { - "type": "string", - "enum": [ - "ALL_GROUPS", - "SPECIFIED_GROUPS" - ], - "title": "AllowedGroupsConfigType", - "description": "An enumeration." - }, - "App": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this app." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "instance_id": { - "type": "string", - "title": "Instance Id", - "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it\u2019s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." - }, - "user_friendly_label": { - "type": "string", - "title": "User Friendly Label", - "description": "The user-friendly label of this app." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/DomainAppStatus" - } - ], - "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" - }, - "sources": { - "items": { - "$ref": "#/components/schemas/DiscoverySource" - }, - "type": "array", - "description": "The sources of this app." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." - }, - "logo_url": { - "type": "string", - "title": "Logo Url", - "description": "The URL of the logo of this app." - }, - "website_url": { - "type": "string", - "title": "Website Url", - "description": "The URL of the website of this app." - }, - "request_instructions": { - "type": "string", - "title": "Request Instructions", - "description": "The request instructions." - } - }, - "type": "object", - "required": [ - "id", - "app_class_id", - "instance_id", - "user_friendly_label", - "status", - "sources", - "allow_multiple_permission_selection" - ], - "title": "App" - }, - "AppAdminsInput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as app admins." - }, - "users": { - "items": { - "$ref": "#/components/schemas/BaseUser" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as app admins." - } - }, - "type": "object", - "title": "AppAdminsInput" - }, - "AppAdminsOutput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as app admins.", - "default": [ - - ] - }, - "users": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as app admins.", - "default": [ - - ] - } - }, - "type": "object", - "title": "AppAdminsOutput" - }, - "AppApproversInput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as support request approvers.", - "default": [ - - ] - }, - "users": { - "items": { - "$ref": "#/components/schemas/BaseUser" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as support request approvers.", - "default": [ - - ] - } - }, - "type": "object", - "title": "AppApproversInput" - }, - "AppApproversOutput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as support request approvers.", - "default": [ - - ] - }, - "users": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as support request approvers.", - "default": [ - - ] - } - }, - "type": "object", - "title": "AppApproversOutput" - }, - "AppInputCreate": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the app you're creating." - }, - "category": { - "type": "string", - "title": "Category", - "description": "The category of the app you're creating. Possible values: 'Accounting & Finance', 'Marketing & Analytics', 'Content & Social Media', 'Sales & Support', 'Design & Creativity', 'IT & Security', 'Developers', 'HR & Learning', 'Office & Legal', 'Communication', 'Collaboration', 'Commerce & Marketplaces', 'Other', 'Internal'" - }, - "description": { - "type": "string", - "maxLength": 8192, - "title": "Description", - "description": "The description of the app you're creating." - }, - "logo_url": { - "type": "string", - "title": "Logo Url", - "description": "The URL of the logo of the app you're creating." - }, - "website_url": { - "type": "string", - "title": "Website Url", - "description": "The URL of the website of the app you're creating." - }, - "request_instructions": { - "type": "string", - "title": "Request Instructions", - "description": "The request instructions." - } - }, - "type": "object", - "required": [ - "name", - "category", - "description" - ], - "title": "AppInputCreate" - }, - "AppSettingInput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - }, - "in_app_store": { - "type": "boolean", - "title": "In App Store", - "description": "Whether the app is in the app store.", - "default": false - } - }, - "type": "object", - "title": "AppSettingInput" - }, - "AppSettingOutput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - }, - "in_app_store": { - "type": "boolean", - "title": "In App Store", - "description": "Whether the app is in the app store.", - "default": false - } - }, - "type": "object", - "title": "AppSettingOutput" - }, - "AppStoreApp": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this app." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "instance_id": { - "type": "string", - "title": "Instance Id", - "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it\u2019s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." - }, - "user_friendly_label": { - "type": "string", - "title": "User Friendly Label", - "description": "The user-friendly label of this app." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/DomainAppStatus" - } - ], - "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" - }, - "sources": { - "items": { - "$ref": "#/components/schemas/DiscoverySource" - }, - "type": "array", - "description": "The sources of this app." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." - }, - "logo_url": { - "type": "string", - "title": "Logo Url", - "description": "The URL of the logo of this app." - }, - "website_url": { - "type": "string", - "title": "Website Url", - "description": "The URL of the website of this app." - }, - "request_instructions": { - "type": "string", - "title": "Request Instructions", - "description": "The request instructions." - } - }, - "type": "object", - "required": [ - "id", - "app_class_id", - "instance_id", - "user_friendly_label", - "status", - "sources", - "allow_multiple_permission_selection" - ], - "title": "AppStoreApp" - }, - "AppStoreAppSettingsInput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsInput" - }, - "AppStoreAppSettingsOutput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsOutput" - }, - "AppStoreAppSettingsProvisioningInput": { - "properties": { - "groups_provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/GroupProvisioningOption" - } - ], - "description": "If enabled, Approvers must choose a group to provision the user to for access requests." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Whether the app is configured to allow users to request multiple permissions in a single request" - }, - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." - }, - "custom_provisioning_instructions": { - "type": "string", - "title": "Custom Provisioning Instructions", - "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this app." - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsProvisioningInput" - }, - "AppStoreAppSettingsProvisioningOutput": { - "properties": { - "groups_provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/GroupProvisioningOption" - } - ], - "description": "If enabled, Approvers must choose a group to provision the user to for access requests." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Whether the app is configured to allow users to request multiple permissions in a single request" - }, - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." - }, - "custom_provisioning_instructions": { - "type": "string", - "title": "Custom Provisioning Instructions", - "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - } - }, - "type": "object", - "title": "AppStoreAppSettingsProvisioningOutput" - }, - "AppStoreAppSettingsRequestFlowInput": { - "properties": { - "discoverability": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibility" - } - ], - "description": "AppStore App visibility." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." - }, - "require_manager_approval": { - "type": "boolean", - "title": "Require Manager Approval", - "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigInput" - } - ], - "title": "Allowed Groups", - "description": "The allowed groups associated with this config." - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned." - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned." - }, - "admins": { - "allOf": [ - { - "$ref": "#/components/schemas/AppAdminsInput" - } - ], - "title": "Admins", - "description": "AppStore App admins assigned." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsRequestFlowInput" - }, - "AppStoreAppSettingsRequestFlowOutput": { - "properties": { - "discoverability": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibility" - } - ], - "description": "AppStore App visibility." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." - }, - "require_manager_approval": { - "type": "boolean", - "title": "Require Manager Approval", - "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigOutput" - } - ], - "title": "Allowed Groups", - "description": "The allowed groups config associated with this config.", - "default": { - "type": "ALL_GROUPS", - "groups": [ - - ] - } - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned.", - "default": { - "groups": [ - - ], - "users": [ - - ] - } - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned.", - "default": { - "groups": [ - - ], - "users": [ - - ] - } - }, - "admins": { - "allOf": [ - { - "$ref": "#/components/schemas/AppAdminsOutput" - } - ], - "title": "Admins", - "description": "AppStore App admins assigned.", - "default": [ - - ] - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - } - }, - "type": "object", - "title": "AppStoreAppSettingsRequestFlowOutput" - }, - "AppStoreVisibility": { - "enum": [ - "FULL", - "LIMITED", - "NONE" - ], - "title": "AppStoreVisibility", - "description": "An enumeration." - }, - "AppStoreVisibilityOption": { - "type": "string", - "enum": [ - "HIDDEN", - "VISIBLE" - ], - "title": "AppStoreVisibilityOption", - "description": "An enumeration." - }, - "ApproverInput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ApproverType" - } - ], - "description": "The type of this approver." - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseUser" - } - ], - "title": "User", - "description": "Optionally, the approver can be a user." - }, - "group": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseGroup" - } - ], - "title": "Group", - "description": "Optionally, the approver can be a group." - } - }, - "type": "object", - "title": "ApproverInput" - }, - "ApproverOutput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ApproverType" - } - ], - "description": "The type of this approver." - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - } - ], - "title": "User", - "description": "Optionally, the approver can be a user." - }, - "group": { - "allOf": [ - { - "$ref": "#/components/schemas/Group" - } - ], - "title": "Group", - "description": "Optionally, the approver can be a group." - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "ApproverOutput" - }, - "ApproverType": { - "type": "string", - "enum": [ - "USER", - "GROUP" - ], - "title": "ApproverType", - "description": "An enumeration." - }, - "AttributeInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The unique identifier of the custom attribute" - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of the attribute." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the attribute." - } - }, - "type": "object", - "title": "AttributeInput" - }, - "BaseGroup": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this group." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app that sources this group." - }, - "integration_specific_id": { - "type": "string", - "title": "Integration Specific Id", - "description": "The ID of this group, specific to the integration." - } - }, - "type": "object", - "title": "BaseGroup" - }, - "BaseInlineWebhook": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this inline webhook." - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "BaseInlineWebhook" - }, - "BaseUser": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this user." - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "BaseUser" - }, - "Cost": { - "properties": { - "currency": { - "type": "string", - "title": "Currency", - "description": "The currency in which this cost is stored" - }, - "value": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "number" - } - ], - "title": "Value", - "description": "The quantity of the cost in terms of the specified currency" - } - }, - "type": "object", - "required": [ - "value" - ], - "title": "Cost" - }, - "CreateAccessRequestInput": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id" - }, - "target_user_id": { - "type": "string", - "title": "Target User Id", - "description": "User to request access for. If omitted, request for the current user." - }, - "note": { - "type": "string", - "title": "Note", - "description": "[Deprecated - use business_justification] Why the user needs access." - }, - "business_justification": { - "type": "string", - "title": "Business Justification", - "description": "Why the user needs access." - }, - "expiration_in_seconds": { - "type": "integer", - "title": "Expiration In Seconds", - "description": "[Deprecated, use access_length] Once granted, how long the access should last. Omit for permanent access." - }, - "access_length": { - "type": "string", - "title": "Access Length", - "description": "Once granted, how long the access should last. Omit for permanent access. All possible values are '2 hours', '4 hours', '8 hours', '12 hours', '1 day', '2 days', '3 days', '7 days', '14 days', '30 days', '90 days', 'Unlimited', but the exact options depend on the settings of the app and permissions." - }, - "requestable_permission_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Requestable Permission Ids", - "description": "The IDs of the requestable permissions the user is requesting access to. Omit this to just request access to the app." - } - }, - "type": "object", - "required": [ - "app_id" - ], - "title": "CreateAccessRequestInput" - }, - "DiscoverySource": { - "type": "string", - "enum": [ - "GSUITE_QUICK_INBOX", - "GSUITE_DEEP_INBOX", - "MICROSOFT_DEEP_INBOX", - "MICROSOFT_OAUTH", - "MICROSOFT_GCC", - "GSUITE_OAUTH", - "OKTA", - "MANUAL", - "ONELOGIN", - "ATLASSIAN", - "GOOGLE_CLOUD", - "LUMOS_INTEGRATION", - "JUMPCLOUD" - ], - "title": "DiscoverySource", - "description": "An enumeration." - }, - "DomainAppStatus": { - "enum": [ - "DISCOVERED", - "NEEDS_REVIEW", - "APPROVED", - "BLOCKLISTED", - "DEPRECATED" - ], - "title": "DomainAppStatus", - "description": "An enumeration." - }, - "FileUpload": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/FileUploadType" - } - ], - "description": "The type of content being uploaded. The only supported type today is 'url'" - }, - "value": { - "type": "string", - "title": "Value", - "description": "The data to upload. This should be a publicly accessible URL that resolves to a file" - } - }, - "type": "object", - "required": [ - "type", - "value" - ], - "title": "FileUpload" - }, - "FileUploadType": { - "type": "string", - "enum": [ - "url" - ], - "title": "FileUploadType", - "description": "An enumeration." - }, - "FlowState": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE", - "RUNNING", - "NOT_STARTED" - ], - "title": "FlowState", - "description": "An enumeration." - }, - "FoundDocumentsUpload": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A value that can be used to uniquely identify this contract (e.g. PO number, file name, etc)" - }, - "files": { - "items": { - "$ref": "#/components/schemas/FileUpload" - }, - "type": "array", - "title": "Files", - "description": "A list of URLs that resolve to files that should be attached to the Found Document" - }, - "vendor_name": { - "type": "string", - "title": "Vendor Name", - "description": "The name of the vendor that this document is for" - }, - "start_date": { - "type": "string", - "title": "Start Date", - "description": "The start of the vendor agreement" - }, - "end_date": { - "type": "string", - "title": "End Date", - "description": "The end of the vendor agreement" - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "By passing the ID of an application within Lumos, it will appear as if this Found Document was sourced from that app" - }, - "total_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Total Cost", - "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years" - }, - "line_items": { - "items": { - "$ref": "#/components/schemas/LineItemUpload" - }, - "type": "array", - "title": "Line Items", - "description": "The line items on the contract" - } - }, - "type": "object", - "required": [ - "unique_identifier", - "files" - ], - "title": "FoundDocumentsUpload" - }, - "Group": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this group." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app that sources this group." - }, - "integration_specific_id": { - "type": "string", - "title": "Integration Specific Id", - "description": "The ID of this group, specific to the integration." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of this group." - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of this group." - }, - "group_lifecycle": { - "allOf": [ - { - "$ref": "#/components/schemas/Lifecycle" - } - ], - "description": "The lifecycle of this group.", - "default": "SYNCED" - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "The ID of the app that sources this group." - } - }, - "type": "object", - "title": "Group" - }, - "GroupProvisioningOption": { - "enum": [ - "DIRECT_TO_USER", - "GROUPS_AND_HIDDEN", - "GROUPS_AND_VISIBLE" - ], - "title": "GroupProvisioningOption", - "description": "An enumeration." - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "InlineWebhook": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this inline webhook." - }, - "hook_type": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhookType" - } - ], - "description": "The type of this inline webhook." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of this inline webhook." - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of this inline webhook." - } - }, - "type": "object", - "required": [ - "id", - "hook_type", - "name" - ], - "title": "InlineWebhook" - }, - "InlineWebhookType": { - "type": "string", - "enum": [ - "PRE_APPROVAL", - "PROVISION", - "DEPROVISION", - "REQUEST_VALIDATION", - "SIEM" - ], - "title": "InlineWebhookType", - "description": "An enumeration." - }, - "JobStateOutput": { - "properties": { - "job_id": { - "type": "string", - "title": "Job Id", - "description": "The ID of the job." - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/FlowState" - } - ], - "description": "The state of the job." - } - }, - "type": "object", - "required": [ - "job_id" - ], - "title": "JobStateOutput" - }, - "Lifecycle": { - "type": "string", - "enum": [ - "SYNCED", - "NATIVE" - ], - "title": "Lifecycle", - "description": "An enumeration." - }, - "LimitOffsetPage_ActivityLog_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ActivityLog" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "limit": { - "type": "integer", - "minimum": 1.0, - "title": "Limit" - }, - "offset": { - "type": "integer", - "minimum": 0.0, - "title": "Offset" - }, - "links": { - "$ref": "#/components/schemas/Links" - } - }, - "type": "object", - "required": [ - "items", - "links" - ], - "title": "LimitOffsetPage[ActivityLog]" - }, - "LineItem": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the line item as stored in Lumos" - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of purchase that this line item refers to" - }, - "quantity": { - "type": "integer", - "title": "Quantity", - "description": "The number of units purchased for this line item" - }, - "unit_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/LineItemUnitCost" - } - ], - "title": "Unit Cost", - "description": "The unit cost of this line item" - } - }, - "type": "object", - "required": [ - "name", - "type", - "quantity", - "unit_cost" - ], - "title": "LineItem" - }, - "LineItemInput": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the line item as stored in Lumos" - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of purchase that this line item refers to" - }, - "quantity": { - "type": "integer", - "title": "Quantity", - "description": "The number of units purchased for this line item" - }, - "unit_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/LineItemUnitCostInput" - } - ], - "title": "Unit Cost", - "description": "The per-unit cost of the line item" - } - }, - "type": "object", - "required": [ - "name", - "type", - "quantity", - "unit_cost" - ], - "title": "LineItemInput" - }, - "LineItemUnitCost": { - "properties": { - "per_month": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Per Month", - "description": "The per unit cost associated with this line item, amortized to the cost per month" - } - }, - "type": "object", - "required": [ - "per_month" - ], - "title": "LineItemUnitCost" - }, - "LineItemUnitCostInput": { - "properties": { - "period": { - "type": "string", - "title": "Period", - "description": "The period which this cost covers. Available options are per_month or per_year" - }, - "value": { - "type": "number", - "title": "Value", - "description": "The cost in terms of the specified currency (4 decimal places supported)" - } - }, - "type": "object", - "required": [ - "period", - "value" - ], - "title": "LineItemUnitCostInput" - }, - "LineItemUpload": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the line item as stored in Lumos" - }, - "quantity": { - "type": "integer", - "title": "Quantity", - "description": "The number of units purchased for this line item" - }, - "unit_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Unit Cost", - "description": "The unit cost of this line item" - } - }, - "type": "object", - "required": [ - "name", - "quantity", - "unit_cost" - ], - "title": "LineItemUpload" - }, - "Links": { - "properties": { - "first": { - "type": "string", - "title": "First", - "example": "/api/v1/users?limit=1&offset1" - }, - "last": { - "type": "string", - "title": "Last", - "example": "/api/v1/users?limit=1&offset1" - }, - "self": { - "type": "string", - "title": "Self", - "example": "/api/v1/users?limit=1&offset1" - }, - "next": { - "type": "string", - "title": "Next", - "example": "/api/v1/users?limit=1&offset1" - }, - "prev": { - "type": "string", - "title": "Prev", - "example": "/api/v1/users?limit=1&offset1" - } - }, - "type": "object", - "title": "Links" - }, - "ManagerApprovalOption": { - "type": "string", - "enum": [ - "NONE", - "INITIAL_APPROVAL" - ], - "title": "ManagerApprovalOption", - "description": "An enumeration." - }, - "OrderCustomAttribute": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/OrderCustomAttributeType" - } - ], - "description": "The type of custom attribute. Only text and user options are available today" - }, - "value": { - "type": "string", - "title": "Value", - "description": "The value of the attribute for an individual Order" - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "OrderCustomAttribute" - }, - "OrderCustomAttributeType": { - "enum": [ - "TEXT", - "USER" - ], - "title": "OrderCustomAttributeType", - "description": "An enumeration." - }, - "OrderInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique ID for the contract being uploaded. This can be an ID from an external system like Ironclad, an internal ID such as a PO number, or simply the name of the vendor + date of the contract." - }, - "vendor": { - "allOf": [ - { - "$ref": "#/components/schemas/Vendor" - } - ], - "title": "Vendor", - "description": "Information about the vendor associated with this contract. Currently, we will only support a name field." - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start date of the attached contract" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end date of the attached contract" - }, - "opt_out_date": { - "type": "string", - "format": "date", - "title": "Opt Out Date", - "description": "The date by which a vendor must be notified before terminating the order" - }, - "auto_renewal": { - "type": "boolean", - "title": "Auto Renewal", - "description": "Whether or not the contract auto-renews" - }, - "currency": { - "type": "string", - "title": "Currency", - "description": "The currency in which the contract is being paid in ISO 4217 format" - }, - "line_items": { - "items": { - "$ref": "#/components/schemas/LineItemInput" - }, - "type": "array", - "title": "Line Items", - "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." - }, - "custom_attributes": { - "additionalProperties": { - "$ref": "#/components/schemas/OrderCustomAttribute" - }, - "type": "object", - "title": "Custom Attributes", - "description": "Any additional attributes that you would like to save on the Order. The set of available options must be configured in advance in Lumos." - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "UUID of the application in Lumos where this order was sourced (e.g. the ID of Ironclad within Lumos)" - } - }, - "type": "object", - "required": [ - "unique_identifier", - "vendor", - "start_date", - "end_date", - "auto_renewal", - "line_items" - ], - "title": "OrderInput" - }, - "Page_AccessRequest_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AccessRequest" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[AccessRequest]" - }, - "Page_Account_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Account" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[Account]" - }, - "Page_AppStoreApp_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AppStoreApp" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[AppStoreApp]" - }, - "Page_App_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/App" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[App]" - }, - "Page_Group_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[Group]" - }, - "Page_PreApprovalRuleOutput_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[PreApprovalRuleOutput]" - }, - "Page_RequestablePermissionOutput_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[RequestablePermissionOutput]" - }, - "Page_User_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[User]" - }, - "Page_VendorAgreement_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/VendorAgreement" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[VendorAgreement]" - }, - "PermissionInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The unique identifier of the permission." - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of the permission." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the permission." - } - }, - "type": "object", - "title": "PermissionInput" - }, - "PermissionType": { - "type": "string", - "enum": [ - "SYNCED", - "NATIVE" - ], - "title": "PermissionType", - "description": "An enumeration." - }, - "PreApprovalRuleInput": { - "properties": { - "justification": { - "type": "string", - "title": "Justification", - "description": "The justification of this preapproval rule." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "Preapproval rule time access length," - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this pre-approval rule." - }, - "preapproved_groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Preapproved Groups", - "description": "The preapproved groups of this preapproval rule.", - "default": [ - - ] - }, - "preapproved_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionBase" - }, - "type": "array", - "title": "Preapproved Permissions", - "description": "The preapproved permissions of this preapproval rule.", - "default": [ - - ] - }, - "preapproval_webhooks": { - "items": { - "$ref": "#/components/schemas/BaseInlineWebhook" - }, - "type": "array", - "title": "Preapproval Webhooks", - "description": "The preapproval webhooks of this preapproval rule.", - "default": [ - - ] - } - }, - "type": "object", - "required": [ - "justification", - "app_id" - ], - "title": "PreApprovalRuleInput" - }, - "PreApprovalRuleOutput": { - "properties": { - "justification": { - "type": "string", - "title": "Justification", - "description": "The justification of this preapproval rule." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "Preapproval rule time access length," - }, - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this preapproval rule." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this pre-approval rule." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The ID of the service associated with this pre-approval rule." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "Optionally, an app has an identifer associated with it's particular instance." - }, - "preapproved_groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Preapproved Groups", - "description": "The preapproved groups of this preapproval rule.", - "default": [ - - ] - }, - "preapproved_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionBaseOutput" - }, - "type": "array", - "title": "Preapproved Permissions", - "description": "The preapproved permissions of this preapproval rule.", - "default": [ - - ] - }, - "preapproval_webhooks": { - "items": { - "$ref": "#/components/schemas/InlineWebhook" - }, - "type": "array", - "title": "Preapproval Webhooks", - "description": "The preapproval webhooks of this preapproval rule.", - "default": [ - - ] - } - }, - "type": "object", - "required": [ - "justification", - "app_id", - "app_class_id", - "app_instance_id" - ], - "title": "PreApprovalRuleOutput" - }, - "PreApprovalRuleUpdateInput": { - "properties": { - "justification": { - "type": "string", - "title": "Justification", - "description": "The justification of this preapproval rule." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "Preapproval rule time access length," - }, - "preapproved_groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Preapproved Groups", - "description": "The preapproved groups of this preapproval rule.", - "default": [ - - ] - }, - "preapproved_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionBase" - }, - "type": "array", - "title": "Preapproved Permissions", - "description": "The preapproved permissions of this preapproval rule.", - "default": [ - - ] - }, - "preapproval_webhooks": { - "items": { - "$ref": "#/components/schemas/BaseInlineWebhook" - }, - "type": "array", - "title": "Preapproval Webhooks", - "description": "The preapproval webhooks of this preapproval rule.", - "default": [ - - ] - } - }, - "type": "object", - "required": [ - "justification" - ], - "title": "PreApprovalRuleUpdateInput" - }, - "RequestApprovalConfigInput": { - "properties": { - "request_approval_config_override": { - "type": "boolean", - "title": "Request Approval Config Override", - "description": "Indicates if approval flow is overridden." - }, - "manager_approval": { - "allOf": [ - { - "$ref": "#/components/schemas/ManagerApprovalOption" - } - ], - "description": "Manager approval can be configured as necessary to continue", - "default": "NONE" - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." - }, - "custom_approval_message_override": { - "type": "boolean", - "title": "Custom Approval Message Override", - "description": "Indicates if custom_approval_message is overridden." - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned." - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned." - }, - "request_approval_stages": { - "items": { - "$ref": "#/components/schemas/RequestApprovalStageInput" - }, - "type": "array", - "title": "Request Approval Stages", - "description": "The stages of this request approval." - } - }, - "type": "object", - "title": "RequestApprovalConfigInput" - }, - "RequestApprovalConfigOutput": { - "properties": { - "request_approval_config_override": { - "type": "boolean", - "title": "Request Approval Config Override", - "description": "Indicates if approval flow is overridden." - }, - "manager_approval": { - "allOf": [ - { - "$ref": "#/components/schemas/ManagerApprovalOption" - } - ], - "description": "Manager approval can be configured as necessary to continue", - "default": "NONE" - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." - }, - "custom_approval_message_override": { - "type": "boolean", - "title": "Custom Approval Message Override", - "description": "Indicates if custom_approval_message is overridden." - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned." - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned." - }, - "request_approval_stages": { - "items": { - "$ref": "#/components/schemas/RequestApprovalStageOutput" - }, - "type": "array", - "title": "Request Approval Stages", - "description": "The stages of this request approval.", - "default": [ - { - - } - ] - } - }, - "type": "object", - "title": "RequestApprovalConfigOutput" - }, - "RequestApprovalStageInput": { - "properties": { - "approvers": { - "items": { - "$ref": "#/components/schemas/ApproverInput" - }, - "type": "array", - "title": "Approvers", - "description": "The approvers of this stage." - } - }, - "type": "object", - "title": "RequestApprovalStageInput" - }, - "RequestApprovalStageOutput": { - "properties": { - "approvers": { - "items": { - "$ref": "#/components/schemas/ApproverOutput" - }, - "type": "array", - "title": "Approvers", - "description": "The approvers of this stage." - } - }, - "type": "object", - "title": "RequestApprovalStageOutput" - }, - "RequestConfigInputCreate": { - "properties": { - "appstore_visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibilityOption" - } - ], - "description": "The appstore visibility of this request config.", - "default": "HIDDEN" - }, - "allowed_groups_override": { - "type": "boolean", - "title": "Allowed Groups Override", - "description": "Indicates if allowed groups is overriden from the app-level settings." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigInput" - } - ], - "title": "Allowed Groups", - "description": "Refers to which group(s) can make requests to this permission." - }, - "request_approval_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestApprovalConfigInput" - } - ], - "title": "Request Approval Config", - "description": "A request approval config can be optionally associated with this config" - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - }, - "request_fulfillment_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestFulfillmentConfigInput" - } - ], - "title": "Request Fulfillment Config", - "description": "A request fulfillment config can be optionally associated with this config" - } - }, - "type": "object", - "title": "RequestConfigInputCreate" - }, - "RequestConfigInputUpdate": { - "properties": { - "appstore_visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibilityOption" - } - ], - "description": "The appstore visibility of this request config.", - "default": "HIDDEN" - }, - "allowed_groups_override": { - "type": "boolean", - "title": "Allowed Groups Override", - "description": "Indicates if allowed groups is overriden from the app-level settings." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigInput" - } - ], - "title": "Allowed Groups", - "description": "Refers to which group(s) can make requests to this permission." - }, - "request_approval_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestApprovalConfigInput" - } - ], - "title": "Request Approval Config", - "description": "A request approval config can be optionally associated with this config" - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - }, - "request_fulfillment_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestFulfillmentConfigInputUpdate" - } - ], - "title": "Request Fulfillment Config", - "description": "A request fulfillment config can be optionally associated with this config" - } - }, - "type": "object", - "title": "RequestConfigInputUpdate" - }, - "RequestConfigOutput": { - "properties": { - "appstore_visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibilityOption" - } - ], - "description": "The appstore visibility of this request config.", - "default": "HIDDEN" - }, - "allowed_groups_override": { - "type": "boolean", - "title": "Allowed Groups Override", - "description": "Indicates if allowed groups is overriden from the app-level settings." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigOutput" - } - ], - "title": "Allowed Groups", - "description": "The allowed groups config associated with this config.", - "default": { - "type": "ALL_GROUPS", - "groups": [ - - ] - } - }, - "request_approval_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestApprovalConfigOutput" - } - ], - "title": "Request Approval Config", - "description": "A request approval config can be optionally associated with this config", - "default": { - "manager_approval": "NONE", - "request_approval_stages": [ - { - - } - ] - } - }, - "request_fulfillment_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestFulfillmentConfigOutput" - } - ], - "title": "Request Fulfillment Config", - "description": "A request fulfillment config can be optionally associated with this config", - "default": { - - } - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - } - }, - "type": "object", - "title": "RequestConfigOutput" - }, - "RequestFulfillmentConfigInput": { - "properties": { - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "Whether manual steps are needed." - }, - "manual_instructions": { - "type": "string", - "title": "Manual Instructions", - "description": "The manual instructions that go along." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "time_based_access_override": { - "type": "boolean", - "title": "Time Based Access Override", - "description": "Indicates if time based access is overriden." - }, - "provisioning_group": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseGroup" - } - ], - "title": "Provisioning Group", - "description": "The provisioning group optionally associated with this config." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - } - }, - "type": "object", - "title": "RequestFulfillmentConfigInput" - }, - "RequestFulfillmentConfigInputUpdate": { - "properties": { - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "Whether manual steps are needed." - }, - "manual_instructions": { - "type": "string", - "title": "Manual Instructions", - "description": "The manual instructions that go along." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "time_based_access_override": { - "type": "boolean", - "title": "Time Based Access Override", - "description": "Indicates if time based access is overriden." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - } - }, - "type": "object", - "title": "RequestFulfillmentConfigInputUpdate" - }, - "RequestFulfillmentConfigOutput": { - "properties": { - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "Whether manual steps are needed." - }, - "manual_instructions": { - "type": "string", - "title": "Manual Instructions", - "description": "The manual instructions that go along." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "time_based_access_override": { - "type": "boolean", - "title": "Time Based Access Override", - "description": "Indicates if time based access is overriden." - }, - "provisioning_group": { - "allOf": [ - { - "$ref": "#/components/schemas/Group" - } - ], - "title": "Provisioning Group", - "description": "The provisioning group optionally assocated with this config." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - } - }, - "type": "object", - "title": "RequestFulfillmentConfigOutput" - }, - "RequestablePermissionBase": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this requestable permission." - } - }, - "type": "object", - "title": "RequestablePermissionBase" - }, - "RequestablePermissionBaseOutput": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this requestable permission." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/PermissionType" - } - ], - "description": "The type of this requestable permission." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "The ID of the instance associated with this requestable permission." - } - }, - "type": "object", - "required": [ - "label", - "app_id", - "app_class_id", - "app_instance_id" - ], - "title": "RequestablePermissionBaseOutput" - }, - "RequestablePermissionInput": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The ID of the service associated with this requestable permission." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "Optionally, an app has an identifer associated with it's particular instance." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "request_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestConfigInputCreate" - } - ], - "title": "Request Config", - "description": "The request config associated with this requestable permission." - } - }, - "type": "object", - "required": [ - "app_id", - "label" - ], - "title": "RequestablePermissionInput" - }, - "RequestablePermissionInputUpdate": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The ID of the service associated with this requestable permission." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "Optionally, an app has an identifer associated with it's particular instance." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "request_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestConfigInputUpdate" - } - ], - "title": "Request Config", - "description": "The request config associated with this requestable permission." - } - }, - "type": "object", - "title": "RequestablePermissionInputUpdate" - }, - "RequestablePermissionOutput": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this requestable permission." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/PermissionType" - } - ], - "description": "The type of this requestable permission." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "The ID of the instance associated with this requestable permission." - }, - "request_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestConfigOutput" - } - ], - "title": "Request Config", - "description": "The request config associated with this requestable permission." - } - }, - "type": "object", - "required": [ - "label", - "app_id", - "app_class_id", - "app_instance_id", - "request_config" - ], - "title": "RequestablePermissionOutput" - }, - "RunInfoStatus": { - "enum": [ - "RUNNING", - "DONE" - ], - "title": "RunInfoStatus", - "description": "An enumeration." - }, - "SupportRequestStatus": { - "enum": [ - "PENDING", - "PENDING_MANAGER_APPROVAL", - "MANAGER_APPROVED", - "MANAGER_DENIED", - "PENDING_APPROVAL", - "APPROVED", - "DENIED", - "EXPIRED", - "CANCELLED", - "PENDING_PROVISIONING", - "PENDING_MANUAL_PROVISIONING", - "DENIED_PROVISIONING", - "PROVISIONED", - "PENDING_MANUAL_DEPROVISIONING", - "TIME_BASED_EXPIRED", - "COMPLETED", - "REVERTING", - "REVERTED" - ], - "title": "SupportRequestStatus", - "description": "An enumeration." - }, - "SyncTaskOutput": { - "properties": { - "job_id": { - "type": "string", - "title": "Job Id", - "description": "The ID of the job." - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/RunInfoStatus" - } - ], - "description": "The state of the job." - } - }, - "type": "object", - "required": [ - "job_id" - ], - "title": "SyncTaskOutput" - }, - "TimeBasedAccessOptions": { - "type": "string", - "enum": [ - "2 hours", - "4 hours", - "12 hours", - "7 days", - "14 days", - "30 days", - "90 days", - "Unlimited" - ], - "title": "TimeBasedAccessOptions", - "description": "An enumeration." - }, - "User": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this user." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of this user." - }, - "given_name": { - "type": "string", - "title": "Given Name", - "description": "The given name of this user." - }, - "family_name": { - "type": "string", - "title": "Family Name", - "description": "The family name of this user." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/UserLifecycleStatus" - } - ], - "description": "The status of this user." - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "User" - }, - "UserLifecycleStatus": { - "type": "string", - "enum": [ - "STAGED", - "ACTIVE", - "SUSPENDED", - "INACTIVE" - ], - "title": "UserLifecycleStatus", - "description": "An enumeration." - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - }, - "Vendor": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "A user friendly name for the vendor" - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "Vendor" - }, - "VendorAgreement": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "A unique identifier for this Vendor Agreement" - }, - "vendor": { - "allOf": [ - { - "$ref": "#/components/schemas/Vendor" - } - ], - "title": "Vendor", - "description": "The vendor in which the agreement is created for" - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start of the current term" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end of the current term" - }, - "opt_out_date": { - "type": "string", - "format": "date", - "title": "Opt Out Date", - "description": "The date by which the vendor must be notified if you want to terminate the agreement" - }, - "total_contract_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Total Contract Cost", - "description": "The total cost of the current service term, including all line items and true ups, and including future years for multi-year agreements." - }, - "line_items": { - "items": { - "$ref": "#/components/schemas/LineItem" - }, - "type": "array", - "title": "Line Items", - "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." - } - }, - "type": "object", - "required": [ - "id", - "vendor", - "start_date", - "end_date", - "opt_out_date", - "total_contract_cost", - "line_items" - ], - "title": "VendorAgreement" - } - }, - "securitySchemes": { - "HTTPBearer": { - "type": "http", - "scheme": "bearer" - } - } - } -} + "openapi": "3.1.0", + "info": { + "title": "Lumos", + "description": "\n The Lumos API gives you the building blocks to administer and extend Lumos programmatically.\n Our REST API provides a management interface for the AppStore and a read interface\n for the Lumos Core.\n Go to https://developers.lumos.com to see our complete documentation.\n", + "version": "0.1.0" + }, + "servers": [ + { + "url": "https://api.lumos.com" + } + ], + "paths": { + "/apps": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Apps", + "description": "List all of your company's apps.", + "operationId": "listApps", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "name_search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search against name, app instance identifier, and app class ID.", + "title": "Name Search" + }, + "description": "Search against name, app instance identifier, and app class ID." + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_App_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Core" + ], + "summary": "Create App", + "description": "Create a new app.", + "operationId": "createApp", + "security": [ + { + "HTTPBearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInputCreate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/App" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/categories": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get App Categories", + "description": "Get app categories.", + "operationId": "getAppCategories", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Getappcategories" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/apps/{app_id}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get App", + "description": "Get an app by id.", + "operationId": "getApp", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/App" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "tags": [ + "Core" + ], + "summary": "Update App", + "description": "Update an app.", + "operationId": "updateApp", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInputCreate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/App" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/settings": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Appstore App Settings", + "description": "Get AppStore app settings.", + "operationId": "getAppSettings", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppSettingOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "tags": [ + "Core" + ], + "summary": "Update Domain App Appstore Settings", + "description": "Update app settings.", + "operationId": "updateAppSettings", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppSettingInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppSettingOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/users/current": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Current User", + "description": "Get current user", + "operationId": "currentUser", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/users": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Users", + "description": "List all of your company's users.", + "operationId": "listUsers", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "search_term", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search for users by name or email.", + "title": "Search Term" + }, + "description": "Search for users by name or email." + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If a search_term is provided, only accept exact matches.", + "default": false, + "title": "Exact Match" + }, + "description": "If a search_term is provided, only accept exact matches." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_User_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/users/{user_id}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get User", + "description": "Get user by id.", + "operationId": "getUser", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/inline_webhooks": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Inline Webhooks", + "description": "Get available webhooks", + "operationId": "get_inline_webhooks_inline_webhooks_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InlineWebhook" + }, + "type": "array", + "title": "Response Get Inline Webhooks Inline Webhooks Get" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/accounts": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Accounts", + "description": "Get all accounts associated with apps at your company.", + "operationId": "getAccounts", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Id" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Account_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/groups/{group_id}/users": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Group Membership", + "description": "Get user members by group ID.", + "operationId": "getGroupMembership", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Group Id" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_User_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/groups/{group_id}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Group", + "description": "Get group by ID.", + "operationId": "getGroup", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Group Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/groups": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Groups", + "description": "Get groups synced from connected integrations", + "operationId": "getGroups", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "integration_specific_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters groups by integration specific ID, e.g. the group's Okta ID.", + "title": "Integration Specific Id" + }, + "description": "Filters groups by integration specific ID, e.g. the group's Okta ID." + }, + { + "name": "name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters groups by name.", + "title": "Name" + }, + "description": "Filters groups by name." + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters groups by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters groups by the ID of the app to which they belong." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Group_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/accounts/upload/{job_id}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Upload Job State", + "description": "Get state of an account upload job.", + "operationId": "getUploadJobState", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStateOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/activity_logs": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Activity Logs", + "description": "Get activity logs.", + "operationId": "getActivityLogs", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "since", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Since" + } + }, + { + "name": "until", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Until" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size limit", + "default": 50, + "title": "Limit" + }, + "description": "Page size limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "description": "Page offset", + "default": 0, + "title": "Offset" + }, + "description": "Page offset" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_ActivityLog_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/accounts/upload": { + "post": { + "tags": [ + "Core" + ], + "summary": "Create Accounts", + "description": "Upload accounts to an app.", + "operationId": "postAccounts", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsUploadInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStateOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/activity_records": { + "post": { + "tags": [ + "Core" + ], + "summary": "Update Activity Records", + "description": "Update the last_login or last_activity for a given account.", + "operationId": "activityRecords", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityRecordInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityRecordOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/activity_records/job/{job_id}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Get Activity Records Job State", + "description": "Get the state of an activity records post-processing job.", + "operationId": "getActivityRecordsJobState", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncTaskOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/apps/{app_id}/requestable_permissions": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore Permissions For App", + "description": "Get AppStore permissions for an application.", + "operationId": "get_appstore_permissions_for_app_appstore_apps__app_id__requestable_permissions_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Filters requestable permissions by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters requestable permissions by the ID of the app to which they belong." + }, + { + "name": "search_term", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n", + "title": "Search Term" + }, + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n" + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "in_app_store", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "\n Filters permissions by visibility in the AppStore.\n", + "title": "In App Store" + }, + "description": "\n Filters permissions by visibility in the AppStore.\n" + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_RequestablePermissionOutput_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/requestable_permissions": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore Permissions", + "description": "Get AppStore permissions for an application.", + "operationId": "get_appstore_permissions_appstore_requestable_permissions_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Filters requestable permissions by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters requestable permissions by the ID of the app to which they belong." + }, + { + "name": "search_term", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n", + "title": "Search Term" + }, + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n" + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "in_app_store", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "\n Filters permissions by visibility in the AppStore.\n", + "title": "In App Store" + }, + "description": "\n Filters permissions by visibility in the AppStore.\n" + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_RequestablePermissionOutput_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "AppStore" + ], + "summary": "Create Appstore Requestable Permission", + "description": "**Create a permission attached to an App in the AppStore.**\n\n\n*Required fields:*\n- app-identifier. The App should be identified either by app_id or app_class_id + app_instance_id.\n- label\n\n*Defaults:*\n- request_config:\n - appstore_visibility: HIDDEN\n - allowed_groups:\n - type: ALL_GROUPS\n - groups: []\n - request_approval_config\n - manager_approval: NONE\n - request_approval_stages: []\n - request_fulfillment_config\n - manual_steps_needed: false\n- All other fields will have null values by default.", + "operationId": "create_appstore_requestable_permission_appstore_requestable_permissions_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionInput" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/requestable_permissions/{permission_id}": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore Permission", + "description": "Get an AppStore permission.", + "operationId": "get_appstore_permission_appstore_requestable_permissions__permission_id__get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "permission_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Permission Id" + } + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "tags": [ + "AppStore" + ], + "summary": "Update Appstore Permission", + "description": "**Update an AppStore permission.**\n\n\nAll fields present in the payload will override the permission's data.\nAny missing fields will be disregarded.\n\n Non-updatable fields for now:\n request_config -> request_fulfillment_config -> provisioning_group", + "operationId": "update_appstore_permission_appstore_requestable_permissions__permission_id__patch", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "permission_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Permission Id" + } + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionInputUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "AppStore" + ], + "summary": "Delete Appstore Permission", + "description": "Delete a requestable permission by ID.\n\n Only permissions of type 'NATIVE' can be deleted.", + "operationId": "delete_appstore_permission_appstore_requestable_permissions__permission_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "permission_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Permission Id" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/pre_approval_rules": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore Pre Approval Rules For App", + "description": "Get AppStore pre-approval rules for an app.", + "operationId": "get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Filters preapproval rules by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters preapproval rules by the ID of the app to which they belong." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_PreApprovalRuleOutput_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "AppStore" + ], + "summary": "Create Pre Approval Rule", + "description": "Create a pre-approval rule attached to an App in the AppStore.", + "operationId": "create_pre_approval_rule_appstore_pre_approval_rules_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleInput" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/pre_approval_rules/{pre_approval_rule_id}": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore Pre Approval Rule", + "description": "Get an AppStore pre-approval rule.", + "operationId": "get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "pre_approval_rule_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Pre Approval Rule Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "tags": [ + "AppStore" + ], + "summary": "Update Pre Approval Rule", + "description": "**Update a pre-approval rule attached to an App in the AppStore.**\n\nAll fields present in the payload will override the pre-approval rule's data.\nAny missing fields will be disregarded.", + "operationId": "update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "pre_approval_rule_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Pre Approval Rule Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleUpdateInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "AppStore" + ], + "summary": "Delete Pre Approval Rule", + "description": "Delete a pre-approval rule by ID.", + "operationId": "delete_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "pre_approval_rule_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Pre Approval Rule Id" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/apps/{app_id}/settings": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore App Settings", + "description": "Get AppStore app settings.", + "operationId": "getAppStoreAppSettings", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "tags": [ + "AppStore" + ], + "summary": "Update Appstore App Settings", + "description": "Update AppStore app settings.", + "operationId": "updateAppStoreAppSettings", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/apps": { + "post": { + "tags": [ + "AppStore" + ], + "summary": "Add App To Appstore", + "description": "Add app to AppStore with given settings.", + "operationId": "addAppToAppStore", + "security": [ + { + "HTTPBearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddAppToAppStoreInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore Apps", + "description": "List all AppStore apps.", + "operationId": "getAppStoreApps", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters apps by the ID of the app.", + "title": "App Id" + }, + "description": "Filters apps by the ID of the app." + }, + { + "name": "name_search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search against name, app instance identifier, and app class ID.", + "title": "Name Search" + }, + "description": "Search against name, app instance identifier, and app class ID." + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "all_visibilities", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Get all apps in the AppStore regardless of visibility. Only available to admins.", + "default": false, + "title": "All Visibilities" + }, + "description": "Get all apps in the AppStore regardless of visibility. Only available to admins." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_AppStoreApp_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/apps/{app_id}": { + "delete": { + "tags": [ + "AppStore" + ], + "summary": "Remove App From Appstore", + "description": "Remove app from AppStore.", + "operationId": "removeAppFromAppStore", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Appstore App", + "description": "Get AppStore app.", + "operationId": "getAppStoreApp", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreApp" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/access_requests/{id}": { + "delete": { + "tags": [ + "AppStore" + ], + "summary": "Cancel Access Request", + "description": "Cancel an access request.", + "operationId": "cancelAccessRequest", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Id" + } + }, + { + "name": "reason", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Reason for cancellation.", + "title": "Reason" + }, + "description": "Reason for cancellation." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/access_request": { + "post": { + "tags": [ + "AppStore" + ], + "summary": "Create Access Request", + "description": "Create a request to access a specific permission in the appstore.", + "operationId": "createAccessRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAccessRequestInput" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AccessRequest" + }, + "type": "array", + "title": "Response Createaccessrequest" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/appstore/access_requests/{access_request_id}": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Access Request", + "description": "Get access request by ID.", + "operationId": "getAccessRequest", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "access_request_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Access Request Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccessRequest" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/appstore/access_requests": { + "get": { + "tags": [ + "AppStore" + ], + "summary": "Get Access Requests", + "description": "Get all access requests for the current organization.", + "operationId": "getAccessRequests", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "target_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters requests by the ID of the target user.", + "title": "Target User Id" + }, + "description": "Filters requests by the ID of the target user." + }, + { + "name": "requester_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters requests by the ID of the requesting user.", + "title": "Requester User Id" + }, + "description": "Filters requests by the ID of the requesting user." + }, + { + "name": "user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filters requests by the ID of the user.", + "title": "User Id" + }, + "description": "Filters requests by the ID of the user." + }, + { + "name": "statuses", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SupportRequestStatus" + } + }, + { + "type": "null" + } + ], + "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'", + "title": "Statuses" + }, + "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'" + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Sort access requests ascending (ASC) or descending (DESC) by created date.", + "default": "ASC", + "title": "Sort" + }, + "description": "Sort access requests ascending (ASC) or descending (DESC) by created date." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_AccessRequest_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/vendor_agreements": { + "get": { + "tags": [ + "Vendor Management" + ], + "summary": "Get Vendor Agreements", + "description": "List all of your company's vendor agreements.", + "operationId": "listVendorAgreements", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_VendorAgreement_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/found_documents": { + "post": { + "tags": [ + "Vendor Management" + ], + "summary": "Upload Found Documents", + "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos for review", + "operationId": "createFoundDocument", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FoundDocumentsUpload", + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." + }, + "files": { + "items": { + "properties": { + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array", + "title": "Files", + "description": "A list of publicly accessible URLs that direct to files related to a Vendor Agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." + }, + "vendor_name": { + "type": "string", + "title": "Vendor Name", + "description": "The name of the vendor associated with this document" + }, + "start_date": { + "type": "string", + "format": "date", + "title": "Start Date", + "description": "The start date of the attached contract" + }, + "end_date": { + "type": "string", + "format": "date", + "title": "End Date", + "description": "The end date of the attached contract" + }, + "source_app_id": { + "type": "string", + "title": "Source App ID", + "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." + }, + "total_cost": { + "allOf": [ + { + "$ref": "#/components/schemas/Cost" + } + ], + "title": "Total Cost", + "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years." + } + }, + "type": "object", + "required": [ + "unique_identifier", + "files" + ] + } + }, + "multipart/form-data": { + "schema": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." + }, + "files": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "title": "Files", + "description": "A list of files related to a vendor agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." + }, + "vendor_name": { + "type": "string", + "title": "Vendor Name", + "description": "The name of the vendor associated with this document" + }, + "start_date": { + "type": "string", + "format": "date", + "title": "Start Date", + "description": "The start date of the attached contract" + }, + "end_date": { + "type": "string", + "format": "date", + "title": "End Date", + "description": "The end date of the attached contract" + }, + "source_app_id": { + "type": "string", + "title": "Source App ID", + "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." + } + }, + "type": "object", + "required": [ + "unique_identifier", + "files" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/orders": { + "post": { + "tags": [ + "Vendor Management" + ], + "summary": "Upload Order", + "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos", + "operationId": "createOrder", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderInput" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/art": { + "get": { + "tags": [ + "Meta" + ], + "summary": "Get Art", + "description": "Return Lumos ASCII art. Can be used to verify the API is working.", + "operationId": "Lumos Art.", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/info": { + "get": { + "tags": [ + "Meta" + ], + "summary": "Get Info", + "description": "Returns current git revision.", + "operationId": "Lumos liveness check", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Lumos Liveness Check" + } + } + } + } + } + } + }, + "/webhooks/airbase/purchase_request_approved/{domain_app_uuid}": { + "post": { + "tags": [ + "Integration Webhooks" + ], + "summary": "Process Airbase Purchase Request Approved", + "description": "Webhook for Airbase to send events as a workflow transitions through milestones", + "operationId": "processAirbaseMilestoneEvent", + "parameters": [ + { + "name": "domain_app_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain App Uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AirbasePurchaseRequestEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AccessRequest": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the access request." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app the request is for." + }, + "app_name": { + "type": "string", + "title": "App Name", + "description": "The name of the app the request is for." + }, + "requester_user": { + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ], + "description": "The user who requested access. It's possible for one user to request access on another's behalf." + }, + "target_user": { + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ], + "description": "The user the request is for." + }, + "supporter_user": { + "anyOf": [ + { + "$ref": "#/components/schemas/User" + }, + { + "type": "null" + } + ] + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SupportRequestStatus" + } + ], + "description": "The current status of the request." + }, + "notes": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object", + "title": "Notes", + "description": "The reason the user wrote for putting the access request into the given state.", + "default": {} + }, + "expires_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Expires At" + }, + "requestable_permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Requestable Permissions" + }, + "requested_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Requested At" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "app_name", + "requester_user", + "target_user", + "status" + ], + "title": "AccessRequest", + "description": "API version of DomainAppSupportRequest." + }, + "Account": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app that owns this account." + }, + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "The stable identifier of this account from the associated service." + }, + "account_type": { + "allOf": [ + { + "$ref": "#/components/schemas/AccountType" + } + ], + "description": "The type of this account, one of 'USER', 'ROLE' (e.g. AWS), 'SERVICE' (e.g. GCP)." + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email", + "description": "The email of this account." + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id", + "description": "The ID of the user associated with this account." + } + }, + "type": "object", + "required": [ + "app_id", + "unique_identifier", + "account_type" + ], + "title": "Account" + }, + "AccountInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique identifier for this account, such as an account ID or email." + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email", + "description": "The email of this account." + }, + "first_name": { + "type": "string", + "title": "First Name", + "description": "The first name of the user." + }, + "last_name": { + "type": "string", + "title": "Last Name", + "description": "The last name of the user." + }, + "last_activity": { + "type": "string", + "title": "Last Activity", + "description": "The datetime of last activity of the user." + }, + "last_login": { + "type": "string", + "title": "Last Login", + "description": "The datetime of last login of the user." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AccountLifecycleStatus" + } + ], + "description": "The status of the account." + }, + "permissions": { + "items": { + "$ref": "#/components/schemas/PermissionInput" + }, + "type": "array", + "title": "Permissions", + "description": "The permissions of the account.", + "default": [] + }, + "attributes": { + "items": { + "$ref": "#/components/schemas/AttributeInput" + }, + "type": "array", + "title": "Attributes", + "description": "The attributes of the account.", + "default": [] + } + }, + "type": "object", + "required": [ + "unique_identifier" + ], + "title": "AccountInput" + }, + "AccountLifecycleStatus": { + "type": "string", + "enum": [ + "DISCOVERED", + "STAGED", + "ACCESS_CREATED", + "ACTIVE", + "ARCHIVED", + "SUSPENDED", + "DEPROVISIONED", + "MANUALLY_REMOVED", + "ACCESS_REMOVED", + "NON_CORPORATE_ACCOUNT", + "WAITING_MANUAL_REMOVAL" + ], + "title": "AccountLifecycleStatus", + "description": "NOTE: If you update this, also update UserDomainAppLifecycleStatus\n\nDISCOVERED - Account discovered through accountfinding. Could be noisy.\n\nSTAGED - An account that has been queued for provisioning, but is not\n provisioned yet. Relevant for Apps where provisioning is async\n (eg. Okta, OneLogin).\n\nACCESS_CREATED - When an account has been provisioned but not accessed.\n\nACTIVE - A live, active, accessible account.\n\nSUSPENDED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nDEPROVISIONED - The user can no longer access the account, the license was removed,\n and the account cannot be recovered.\n\nARCHIVED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nMANUALLY_REMOVED - The user can no longer access the account, the license is presumably\n removed, but all of this was done manually\n\nACCESS_REMOVED - The user can no longer access the account, but a license may still\n exist. This is the case when we remove access through Okta but not a\n direct integration\n\nNON_CORPORATE_ACCOUNT - The account doesn't exist, or is a personal employee account.\n\nWAITING_MANUAL_REMOVAL - Waiting manual removal, someone was requested to remove the user access\n from the App, and we are waiting for an answer about it." + }, + "AccountType": { + "type": "string", + "enum": [ + "USER", + "ROLE", + "SERVICE" + ], + "title": "AccountType" + }, + "AccountsUploadInput": { + "properties": { + "accounts": { + "items": { + "$ref": "#/components/schemas/AccountInput" + }, + "type": "array", + "title": "Accounts", + "description": "Accounts to upload.", + "default": [] + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app to upload accounts to." + } + }, + "type": "object", + "required": [ + "app_id" + ], + "title": "AccountsUploadInput" + }, + "ActivityLog": { + "properties": { + "event_hash": { + "type": "string", + "title": "Event Hash" + }, + "event_type": { + "type": "string", + "title": "Event Type" + }, + "event_type_user_friendly": { + "type": "string", + "title": "Event Type User Friendly" + }, + "outcome": { + "type": "string", + "title": "Outcome" + }, + "targets": { + "items": { + "type": "object" + }, + "type": "array", + "title": "Targets" + }, + "actor": { + "type": "object", + "title": "Actor" + }, + "event_began_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Event Began At" + }, + "event_metadata": { + "type": "object", + "title": "Event Metadata" + } + }, + "type": "object", + "required": [ + "event_hash", + "event_type", + "event_type_user_friendly", + "outcome", + "targets", + "actor", + "event_metadata" + ], + "title": "ActivityLog", + "description": "API version of SIEMEvent" + }, + "ActivityRecord": { + "properties": { + "account": { + "allOf": [ + { + "$ref": "#/components/schemas/ActivityRecordAccountInput" + } + ], + "description": "Metadata that Lumos can use to match the activity record to a software account within Lumos." + }, + "event": { + "allOf": [ + { + "$ref": "#/components/schemas/ActivityRecordEventInput" + } + ], + "description": "Metadata about the event being uploaded." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp", + "description": "The timestamp of this event, in ISO 8601 format." + }, + "source_app_id": { + "type": "string", + "title": "Source App Id", + "description": "UUID of the application in Lumos where this activity record was sourced (e.g. the ID of Okta within Lumos found by going to Apps > Find your app in the list > Click '...' > Copy Stable Identifier)" + }, + "app": { + "anyOf": [ + { + "$ref": "#/components/schemas/ActivityRecordAppInput" + }, + { + "type": "null" + } + ], + "description": "Metadata that Lumos can use to match the activity record to an application within Lumos." + } + }, + "type": "object", + "required": [ + "account", + "event", + "timestamp", + "source_app_id" + ], + "title": "ActivityRecord" + }, + "ActivityRecordAccountInput": { + "properties": { + "external_id": { + "type": "string", + "title": "External Id", + "description": "The external app's user ID for the account." + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email", + "description": "The email associated with the account" + } + }, + "type": "object", + "title": "ActivityRecordAccountInput" + }, + "ActivityRecordAppInput": { + "properties": { + "instance_identifier": { + "type": "string", + "title": "Instance Identifier", + "description": "The ID of the app as it is identified in the source E.g. the ID that Okta uses to identify the app" + } + }, + "type": "object", + "required": [ + "instance_identifier" + ], + "title": "ActivityRecordAppInput" + }, + "ActivityRecordEventInput": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ActivityRecordEventType" + } + ], + "description": "The type of event being uploaded." + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "ActivityRecordEventInput" + }, + "ActivityRecordEventType": { + "type": "string", + "enum": [ + "LOGIN", + "ACTIVITY" + ], + "title": "ActivityRecordEventType" + }, + "ActivityRecordInput": { + "properties": { + "records": { + "items": { + "$ref": "#/components/schemas/ActivityRecord" + }, + "type": "array", + "title": "Records", + "description": "The activity records to upload." + } + }, + "type": "object", + "required": [ + "records" + ], + "title": "ActivityRecordInput" + }, + "ActivityRecordOutput": { + "properties": { + "job": { + "allOf": [ + { + "$ref": "#/components/schemas/SyncTaskOutput" + } + ], + "description": "State of the job to post-process the records." + } + }, + "type": "object", + "required": [ + "job" + ], + "title": "ActivityRecordOutput" + }, + "AddAppToAppStoreInput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" + } + ], + "description": "Provisioning flow configuration to request access to app." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app to add to the app store." + } + }, + "type": "object", + "required": [ + "app_id" + ], + "title": "AddAppToAppStoreInput" + }, + "AirbasePurchaseRequestEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "object": { + "type": "string", + "title": "Object" + }, + "type": { + "type": "string", + "title": "Type" + }, + "created_date": { + "type": "string", + "title": "Created Date" + }, + "data": { + "type": "object", + "title": "Data" + } + }, + "type": "object", + "required": [ + "id", + "object", + "type", + "created_date", + "data" + ], + "title": "AirbasePurchaseRequestEvent", + "description": "Model of the input we'll get from Airbase's webhook call.\nAll events seem to follow this same base structure, it is just `data` that is different\nfor each. We are using `dict` here to be permissive to other webhook events (so we can warn if\nthe customer misconfigures for a different webhook), and we actually only use 2 fields from it." + }, + "AllowedGroupsConfigInput": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigType" + } + ], + "description": "The type of this allowed groups config, can be all groups or specific.", + "default": "ALL_GROUPS" + }, + "groups": { + "items": { + "$ref": "#/components/schemas/BaseGroup" + }, + "type": "array", + "title": "Groups", + "description": "The groups allowed to request this permission." + } + }, + "type": "object", + "title": "AllowedGroupsConfigInput" + }, + "AllowedGroupsConfigOutput": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigType" + } + ], + "description": "The type of this allowed groups config, can be all groups or specific.", + "default": "ALL_GROUPS" + }, + "groups": { + "items": { + "$ref": "#/components/schemas/Group" + }, + "type": "array", + "title": "Groups", + "description": "The groups allowed to request this permission.", + "default": [] + } + }, + "type": "object", + "title": "AllowedGroupsConfigOutput" + }, + "AllowedGroupsConfigType": { + "type": "string", + "enum": [ + "ALL_GROUPS", + "SPECIFIED_GROUPS" + ], + "title": "AllowedGroupsConfigType" + }, + "App": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this app." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "instance_id": { + "type": "string", + "title": "Instance Id", + "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it’s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." + }, + "user_friendly_label": { + "type": "string", + "title": "User Friendly Label", + "description": "The user-friendly label of this app." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/DomainAppStatus" + } + ], + "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" + }, + "sources": { + "items": { + "$ref": "#/components/schemas/DiscoverySource" + }, + "type": "array", + "title": "Sources", + "description": "The sources of this app." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." + }, + "logo_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Logo Url", + "description": "The URL of the logo of this app." + }, + "website_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Website Url", + "description": "The URL of the website of this app." + }, + "request_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Instructions", + "description": "The request instructions." + } + }, + "type": "object", + "required": [ + "id", + "app_class_id", + "instance_id", + "user_friendly_label", + "status", + "sources", + "allow_multiple_permission_selection" + ], + "title": "App" + }, + "AppAdminsInput": { + "properties": { + "groups": { + "items": { + "$ref": "#/components/schemas/BaseGroup" + }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as app admins." + }, + "users": { + "items": { + "$ref": "#/components/schemas/BaseUser" + }, + "type": "array", + "title": "Users", + "description": "Users assigned as app admins." + } + }, + "type": "object", + "title": "AppAdminsInput" + }, + "AppAdminsOutput": { + "properties": { + "groups": { + "items": { + "$ref": "#/components/schemas/Group" + }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as app admins.", + "default": [] + }, + "users": { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array", + "title": "Users", + "description": "Users assigned as app admins.", + "default": [] + } + }, + "type": "object", + "title": "AppAdminsOutput" + }, + "AppApproversInput": { + "properties": { + "groups": { + "items": { + "$ref": "#/components/schemas/BaseGroup" + }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as support request approvers.", + "default": [] + }, + "users": { + "items": { + "$ref": "#/components/schemas/BaseUser" + }, + "type": "array", + "title": "Users", + "description": "Users assigned as support request approvers.", + "default": [] + } + }, + "type": "object", + "title": "AppApproversInput" + }, + "AppApproversOutput": { + "properties": { + "groups": { + "items": { + "$ref": "#/components/schemas/Group" + }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as support request approvers.", + "default": [] + }, + "users": { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array", + "title": "Users", + "description": "Users assigned as support request approvers.", + "default": [] + } + }, + "type": "object", + "title": "AppApproversOutput" + }, + "AppInputCreate": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the app you're creating." + }, + "category": { + "type": "string", + "title": "Category", + "description": "The category of the app you're creating. Possible values: 'Accounting & Finance', 'Marketing & Analytics', 'Content & Social Media', 'Sales & Support', 'Design & Creativity', 'IT & Security', 'Developers', 'HR & Learning', 'Office & Legal', 'Communication', 'Collaboration', 'Commerce & Marketplaces', 'Other', 'Internal'" + }, + "description": { + "type": "string", + "maxLength": 8192, + "title": "Description", + "description": "The description of the app you're creating." + }, + "logo_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Logo Url", + "description": "The URL of the logo of the app you're creating." + }, + "website_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Website Url", + "description": "The URL of the website of the app you're creating." + }, + "request_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Instructions", + "description": "The request instructions." + } + }, + "type": "object", + "required": [ + "name", + "category", + "description" + ], + "title": "AppInputCreate" + }, + "AppSettingInput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" + } + ], + "description": "Provisioning flow configuration to request access to app." + }, + "in_app_store": { + "type": "boolean", + "title": "In App Store", + "description": "Whether the app is in the app store.", + "default": false + } + }, + "type": "object", + "title": "AppSettingInput" + }, + "AppSettingOutput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" + } + ], + "description": "Provisioning flow configuration to request access to app." + }, + "in_app_store": { + "type": "boolean", + "title": "In App Store", + "description": "Whether the app is in the app store.", + "default": false + } + }, + "type": "object", + "title": "AppSettingOutput" + }, + "AppStoreApp": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this app." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "instance_id": { + "type": "string", + "title": "Instance Id", + "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it’s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." + }, + "user_friendly_label": { + "type": "string", + "title": "User Friendly Label", + "description": "The user-friendly label of this app." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/DomainAppStatus" + } + ], + "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" + }, + "sources": { + "items": { + "$ref": "#/components/schemas/DiscoverySource" + }, + "type": "array", + "title": "Sources", + "description": "The sources of this app." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." + }, + "logo_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Logo Url", + "description": "The URL of the logo of this app." + }, + "website_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Website Url", + "description": "The URL of the website of this app." + }, + "request_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Instructions", + "description": "The request instructions." + } + }, + "type": "object", + "required": [ + "id", + "app_class_id", + "instance_id", + "user_friendly_label", + "status", + "sources", + "allow_multiple_permission_selection" + ], + "title": "AppStoreApp" + }, + "AppStoreAppSettingsInput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" + } + ], + "description": "Provisioning flow configuration to request access to app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsInput" + }, + "AppStoreAppSettingsOutput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" + } + ], + "description": "Provisioning flow configuration to request access to app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsOutput" + }, + "AppStoreAppSettingsProvisioningInput": { + "properties": { + "groups_provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupProvisioningOption" + } + ], + "description": "If enabled, Approvers must choose a group to provision the user to for access requests." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Whether the app is configured to allow users to request multiple permissions in a single request" + }, + "manual_steps_needed": { + "type": "boolean", + "title": "Manual Steps Needed", + "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." + }, + "custom_provisioning_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Provisioning Instructions", + "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." + }, + "provisioning_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "The provisioning webhook optionally associated with this app." + }, + "access_removal_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A deprovisioning webhook can be optionally associated with this app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsProvisioningInput" + }, + "AppStoreAppSettingsProvisioningOutput": { + "properties": { + "groups_provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupProvisioningOption" + } + ], + "description": "If enabled, Approvers must choose a group to provision the user to for access requests." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Whether the app is configured to allow users to request multiple permissions in a single request" + }, + "manual_steps_needed": { + "type": "boolean", + "title": "Manual Steps Needed", + "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." + }, + "custom_provisioning_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Provisioning Instructions", + "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." + }, + "provisioning_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/InlineWebhook" + }, + { + "type": "null" + } + ], + "description": "The provisioning webhook optionally associated with this config." + }, + "access_removal_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/InlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." + } + }, + "type": "object", + "title": "AppStoreAppSettingsProvisioningOutput" + }, + "AppStoreAppSettingsRequestFlowInput": { + "properties": { + "discoverability": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreVisibility" + } + ], + "description": "AppStore App visibility." + }, + "custom_approval_message": { + "type": "string", + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." + }, + "require_manager_approval": { + "type": "boolean", + "title": "Require Manager Approval", + "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "allowed_groups": { + "anyOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigInput" + }, + { + "type": "null" + } + ], + "description": "The allowed groups associated with this config." + }, + "approvers": { + "allOf": [ + { + "$ref": "#/components/schemas/AppApproversInput" + } + ], + "description": "AppStore App approvers assigned." + }, + "approvers_stage_2": { + "allOf": [ + { + "$ref": "#/components/schemas/AppApproversInput" + } + ], + "description": "AppStore App stage 2 approvers assigned." + }, + "admins": { + "allOf": [ + { + "$ref": "#/components/schemas/AppAdminsInput" + } + ], + "description": "AppStore App admins assigned." + }, + "request_validation_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A request validation webhook can be optionally associated with this app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsRequestFlowInput" + }, + "AppStoreAppSettingsRequestFlowOutput": { + "properties": { + "discoverability": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreVisibility" + } + ], + "description": "AppStore App visibility." + }, + "custom_approval_message": { + "type": "string", + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." + }, + "require_manager_approval": { + "type": "boolean", + "title": "Require Manager Approval", + "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "allowed_groups": { + "anyOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigOutput" + }, + { + "type": "null" + } + ], + "description": "The allowed groups config associated with this config.", + "default": { + "type": "ALL_GROUPS", + "groups": [] + } + }, + "approvers": { + "allOf": [ + { + "$ref": "#/components/schemas/AppApproversOutput" + } + ], + "description": "AppStore App approvers assigned.", + "default": { + "groups": [], + "users": [] + } + }, + "approvers_stage_2": { + "allOf": [ + { + "$ref": "#/components/schemas/AppApproversOutput" + } + ], + "description": "AppStore App stage 2 approvers assigned.", + "default": { + "groups": [], + "users": [] + } + }, + "admins": { + "allOf": [ + { + "$ref": "#/components/schemas/AppAdminsOutput" + } + ], + "description": "AppStore App admins assigned.", + "default": [] + }, + "request_validation_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/InlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A request validation webhook can be optionally associated with this config." + } + }, + "type": "object", + "title": "AppStoreAppSettingsRequestFlowOutput" + }, + "AppStoreVisibility": { + "type": "string", + "enum": [ + "FULL", + "LIMITED", + "NONE" + ], + "title": "AppStoreVisibility" + }, + "AppStoreVisibilityOption": { + "type": "string", + "enum": [ + "HIDDEN", + "VISIBLE" + ], + "title": "AppStoreVisibilityOption" + }, + "ApproverInput": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ApproverType" + } + ], + "description": "The type of this approver." + }, + "user": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseUser" + }, + { + "type": "null" + } + ], + "description": "Optionally, the approver can be a user." + }, + "group": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseGroup" + }, + { + "type": "null" + } + ], + "description": "Optionally, the approver can be a group." + } + }, + "type": "object", + "title": "ApproverInput" + }, + "ApproverOutput": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ApproverType" + } + ], + "description": "The type of this approver." + }, + "user": { + "anyOf": [ + { + "$ref": "#/components/schemas/User" + }, + { + "type": "null" + } + ], + "description": "Optionally, the approver can be a user." + }, + "group": { + "anyOf": [ + { + "$ref": "#/components/schemas/Group" + }, + { + "type": "null" + } + ], + "description": "Optionally, the approver can be a group." + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "ApproverOutput" + }, + "ApproverType": { + "type": "string", + "enum": [ + "USER", + "GROUP" + ], + "title": "ApproverType" + }, + "AttributeInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "The unique identifier of the custom attribute" + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of the attribute." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the attribute." + } + }, + "type": "object", + "title": "AttributeInput" + }, + "BaseGroup": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id", + "description": "The ID of this group." + }, + "app_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Id", + "description": "The ID of the app that sources this group." + }, + "integration_specific_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Integration Specific Id", + "description": "The ID of this group, specific to the integration." + } + }, + "type": "object", + "title": "BaseGroup" + }, + "BaseInlineWebhook": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this inline webhook." + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "BaseInlineWebhook" + }, + "BaseUser": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this user." + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "BaseUser" + }, + "Cost": { + "properties": { + "currency": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Currency", + "description": "The currency in which this cost is stored" + }, + "value": { + "type": "number", + "title": "Value", + "description": "The quantity of the cost in terms of the specified currency" + } + }, + "type": "object", + "required": [ + "value" + ], + "title": "Cost" + }, + "CreateAccessRequestInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "target_user_id": { + "type": "string", + "title": "Target User Id", + "description": "User to request access for. If omitted, request for the current user." + }, + "note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Note", + "description": "[Deprecated - use business_justification] Why the user needs access." + }, + "business_justification": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Business Justification", + "description": "Why the user needs access." + }, + "expiration_in_seconds": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Expiration In Seconds", + "description": "[Deprecated, use access_length] Once granted, how long the access should last. Omit for permanent access." + }, + "access_length": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Access Length", + "description": "Once granted, how long the access should last. Omit for permanent access. All possible values are '2 hours', '4 hours', '8 hours', '12 hours', '1 day', '2 days', '3 days', '7 days', '14 days', '30 days', '90 days', 'Unlimited', but the exact options depend on the settings of the app and permissions." + }, + "requestable_permission_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Requestable Permission Ids", + "description": "The IDs of the requestable permissions the user is requesting access to. Omit this to just request access to the app." + } + }, + "type": "object", + "required": [ + "app_id" + ], + "title": "CreateAccessRequestInput" + }, + "DiscoverySource": { + "type": "string", + "enum": [ + "GSUITE_QUICK_INBOX", + "GSUITE_DEEP_INBOX", + "MICROSOFT_DEEP_INBOX", + "MICROSOFT_OAUTH", + "MICROSOFT_GCC", + "GSUITE_OAUTH", + "OKTA", + "MANUAL", + "ONELOGIN", + "ATLASSIAN", + "GOOGLE_CLOUD", + "LUMOS_INTEGRATION", + "JUMPCLOUD" + ], + "title": "DiscoverySource" + }, + "DomainAppStatus": { + "type": "string", + "enum": [ + "DISCOVERED", + "NEEDS_REVIEW", + "APPROVED", + "BLOCKLISTED", + "DEPRECATED" + ], + "title": "DomainAppStatus" + }, + "FileUpload": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/FileUploadType" + } + ], + "description": "The type of content being uploaded. The only supported type today is 'url'" + }, + "value": { + "type": "string", + "title": "Value", + "description": "The data to upload. This should be a publicly accessible URL that resolves to a file" + } + }, + "type": "object", + "required": [ + "type", + "value" + ], + "title": "FileUpload" + }, + "FileUploadType": { + "type": "string", + "enum": [ + "url" + ], + "const": "url", + "title": "FileUploadType" + }, + "FlowState": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILURE", + "RUNNING", + "NOT_STARTED" + ], + "title": "FlowState" + }, + "FoundDocumentsUpload": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A value that can be used to uniquely identify this contract (e.g. PO number, file name, etc)" + }, + "files": { + "items": { + "$ref": "#/components/schemas/FileUpload" + }, + "type": "array", + "title": "Files", + "description": "A list of URLs that resolve to files that should be attached to the Found Document" + }, + "vendor_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Vendor Name", + "description": "The name of the vendor that this document is for" + }, + "start_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Date", + "description": "The start of the vendor agreement" + }, + "end_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Date", + "description": "The end of the vendor agreement" + }, + "source_app_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source App Id", + "description": "By passing the ID of an application within Lumos, it will appear as if this Found Document was sourced from that app" + }, + "total_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/Cost" + }, + { + "type": "null" + } + ], + "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years" + }, + "line_items": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/LineItemUpload" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Line Items", + "description": "The line items on the contract" + } + }, + "type": "object", + "required": [ + "unique_identifier", + "files" + ], + "title": "FoundDocumentsUpload" + }, + "Group": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id", + "description": "The ID of this group." + }, + "app_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Id", + "description": "The ID of the app that sources this group." + }, + "integration_specific_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Integration Specific Id", + "description": "The ID of this group, specific to the integration." + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "The name of this group." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of this group." + }, + "group_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/Lifecycle" + }, + { + "type": "null" + } + ], + "description": "The lifecycle of this group.", + "default": "SYNCED" + }, + "source_app_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source App Id", + "description": "The ID of the app that sources this group." + } + }, + "type": "object", + "title": "Group" + }, + "GroupProvisioningOption": { + "type": "string", + "enum": [ + "DIRECT_TO_USER", + "GROUPS_AND_HIDDEN", + "GROUPS_AND_VISIBLE" + ], + "title": "GroupProvisioningOption" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "InlineWebhook": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this inline webhook." + }, + "hook_type": { + "allOf": [ + { + "$ref": "#/components/schemas/InlineWebhookType" + } + ], + "description": "The type of this inline webhook." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of this inline webhook." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of this inline webhook." + } + }, + "type": "object", + "required": [ + "id", + "hook_type", + "name" + ], + "title": "InlineWebhook" + }, + "InlineWebhookType": { + "type": "string", + "enum": [ + "PRE_APPROVAL", + "PROVISION", + "DEPROVISION", + "REQUEST_VALIDATION", + "SIEM" + ], + "title": "InlineWebhookType" + }, + "JobStateOutput": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "The ID of the job." + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/FlowState" + } + ], + "description": "The state of the job." + } + }, + "type": "object", + "required": [ + "job_id" + ], + "title": "JobStateOutput" + }, + "Lifecycle": { + "type": "string", + "enum": [ + "SYNCED", + "NATIVE" + ], + "title": "Lifecycle" + }, + "LimitOffsetPage_ActivityLog_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ActivityLog" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Limit" + }, + "offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Offset" + }, + "links": { + "$ref": "#/components/schemas/Links" + } + }, + "type": "object", + "required": [ + "items", + "total", + "limit", + "offset", + "links" + ], + "title": "LimitOffsetPage[ActivityLog]" + }, + "LineItem": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the line item as stored in Lumos" + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of purchase that this line item refers to" + }, + "quantity": { + "type": "integer", + "title": "Quantity", + "description": "The number of units purchased for this line item" + }, + "unit_cost": { + "allOf": [ + { + "$ref": "#/components/schemas/LineItemUnitCost" + } + ], + "description": "The unit cost of this line item" + }, + "start_date": { + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ], + "title": "Start Date", + "description": "The start of the line item" + }, + "end_date": { + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ], + "title": "End Date", + "description": "The end of the line item. Null for monthly line items." + } + }, + "type": "object", + "required": [ + "name", + "type", + "quantity", + "unit_cost", + "start_date", + "end_date" + ], + "title": "LineItem" + }, + "LineItemInput": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the line item as stored in Lumos" + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of purchase that this line item refers to" + }, + "quantity": { + "type": "integer", + "title": "Quantity", + "description": "The number of units purchased for this line item" + }, + "unit_cost": { + "allOf": [ + { + "$ref": "#/components/schemas/LineItemUnitCostInput" + } + ], + "description": "The per-unit cost of the line item" + } + }, + "type": "object", + "required": [ + "name", + "type", + "quantity", + "unit_cost" + ], + "title": "LineItemInput" + }, + "LineItemUnitCost": { + "properties": { + "per_month": { + "allOf": [ + { + "$ref": "#/components/schemas/Cost" + } + ], + "description": "The per unit cost associated with this line item, amortized to the cost per month" + } + }, + "type": "object", + "required": [ + "per_month" + ], + "title": "LineItemUnitCost" + }, + "LineItemUnitCostInput": { + "properties": { + "period": { + "type": "string", + "title": "Period", + "description": "The period which this cost covers. Available options are per_month or per_year" + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ], + "title": "Value", + "description": "The cost in terms of the specified currency (4 decimal places supported)" + } + }, + "type": "object", + "required": [ + "period", + "value" + ], + "title": "LineItemUnitCostInput" + }, + "LineItemUpload": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the line item as stored in Lumos" + }, + "quantity": { + "type": "integer", + "title": "Quantity", + "description": "The number of units purchased for this line item" + }, + "unit_cost": { + "allOf": [ + { + "$ref": "#/components/schemas/Cost" + } + ], + "description": "The unit cost of this line item" + } + }, + "type": "object", + "required": [ + "name", + "quantity", + "unit_cost" + ], + "title": "LineItemUpload" + }, + "Links": { + "properties": { + "first": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First", + "examples": [ + "/api/v1/users?limit=1&offset1" + ] + }, + "last": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last", + "examples": [ + "/api/v1/users?limit=1&offset1" + ] + }, + "self": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Self", + "examples": [ + "/api/v1/users?limit=1&offset1" + ] + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next", + "examples": [ + "/api/v1/users?limit=1&offset1" + ] + }, + "prev": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prev", + "examples": [ + "/api/v1/users?limit=1&offset1" + ] + } + }, + "type": "object", + "required": [ + "first", + "last", + "self", + "next", + "prev" + ], + "title": "Links" + }, + "ManagerApprovalOption": { + "type": "string", + "enum": [ + "NONE", + "INITIAL_APPROVAL" + ], + "title": "ManagerApprovalOption" + }, + "OrderInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique ID for the contract being uploaded. This can be an ID from an external system like Ironclad, an internal ID such as a PO number, or simply the name of the vendor + date of the contract." + }, + "vendor": { + "allOf": [ + { + "$ref": "#/components/schemas/Vendor" + } + ], + "description": "Information about the vendor associated with this contract. Currently, we will only support a name field." + }, + "start_date": { + "type": "string", + "format": "date", + "title": "Start Date", + "description": "The start date of the attached contract" + }, + "end_date": { + "type": "string", + "format": "date", + "title": "End Date", + "description": "The end date of the attached contract" + }, + "opt_out_date": { + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ], + "title": "Opt Out Date", + "description": "The date by which a vendor must be notified before terminating the order" + }, + "auto_renewal": { + "type": "boolean", + "title": "Auto Renewal", + "description": "Whether or not the contract auto-renews" + }, + "currency": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Currency", + "description": "The currency in which the contract is being paid in ISO 4217 format" + }, + "line_items": { + "items": { + "$ref": "#/components/schemas/LineItemInput" + }, + "type": "array", + "title": "Line Items", + "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." + }, + "custom_attributes": { + "additionalProperties": { + "$ref": "#/components/schemas/VendorAgreementCustomAttribute-Input" + }, + "type": "object", + "title": "Custom Attributes", + "description": "Any additional attributes that you would like to save on the Order. The set of available options must be configured in advance in Lumos." + }, + "source_app_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source App Id", + "description": "UUID of the application in Lumos where this order was sourced (e.g. the ID of Ironclad within Lumos)" + } + }, + "type": "object", + "required": [ + "unique_identifier", + "vendor", + "start_date", + "end_date", + "auto_renewal", + "line_items" + ], + "title": "OrderInput" + }, + "Page_AccessRequest_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AccessRequest" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[AccessRequest]" + }, + "Page_Account_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Account" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[Account]" + }, + "Page_AppStoreApp_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AppStoreApp" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[AppStoreApp]" + }, + "Page_App_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/App" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[App]" + }, + "Page_Group_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Group" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[Group]" + }, + "Page_PreApprovalRuleOutput_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[PreApprovalRuleOutput]" + }, + "Page_RequestablePermissionOutput_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[RequestablePermissionOutput]" + }, + "Page_User_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[User]" + }, + "Page_VendorAgreement_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/VendorAgreement" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size" + ], + "title": "Page[VendorAgreement]" + }, + "PermissionInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "The unique identifier of the permission." + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of the permission." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the permission." + } + }, + "type": "object", + "title": "PermissionInput" + }, + "PermissionType": { + "type": "string", + "enum": [ + "SYNCED", + "NATIVE" + ], + "title": "PermissionType" + }, + "PreApprovalRuleInput": { + "properties": { + "justification": { + "type": "string", + "title": "Justification", + "description": "The justification of this preapproval rule." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "Preapproval rule time access length," + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this pre-approval rule." + }, + "preapproved_groups": { + "items": { + "$ref": "#/components/schemas/BaseGroup" + }, + "type": "array", + "title": "Preapproved Groups", + "description": "The preapproved groups of this preapproval rule.", + "default": [] + }, + "preapproved_permissions": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionBase" + }, + "type": "array", + "title": "Preapproved Permissions", + "description": "The preapproved permissions of this preapproval rule.", + "default": [] + }, + "preapproval_webhooks": { + "items": { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + "type": "array", + "title": "Preapproval Webhooks", + "description": "The preapproval webhooks of this preapproval rule.", + "default": [] + } + }, + "type": "object", + "required": [ + "justification", + "app_id" + ], + "title": "PreApprovalRuleInput" + }, + "PreApprovalRuleOutput": { + "properties": { + "justification": { + "type": "string", + "title": "Justification", + "description": "The justification of this preapproval rule." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "Preapproval rule time access length," + }, + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this preapproval rule." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this pre-approval rule." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The ID of the service associated with this pre-approval rule." + }, + "app_instance_id": { + "type": "string", + "title": "App Instance Id", + "description": "Optionally, an app has an identifer associated with it's particular instance." + }, + "preapproved_groups": { + "items": { + "$ref": "#/components/schemas/Group" + }, + "type": "array", + "title": "Preapproved Groups", + "description": "The preapproved groups of this preapproval rule.", + "default": [] + }, + "preapproved_permissions": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionBaseOutput" + }, + "type": "array", + "title": "Preapproved Permissions", + "description": "The preapproved permissions of this preapproval rule.", + "default": [] + }, + "preapproval_webhooks": { + "items": { + "$ref": "#/components/schemas/InlineWebhook" + }, + "type": "array", + "title": "Preapproval Webhooks", + "description": "The preapproval webhooks of this preapproval rule.", + "default": [] + } + }, + "type": "object", + "required": [ + "justification", + "app_id", + "app_class_id", + "app_instance_id" + ], + "title": "PreApprovalRuleOutput" + }, + "PreApprovalRuleUpdateInput": { + "properties": { + "justification": { + "type": "string", + "title": "Justification", + "description": "The justification of this preapproval rule." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "Preapproval rule time access length," + }, + "preapproved_groups": { + "items": { + "$ref": "#/components/schemas/BaseGroup" + }, + "type": "array", + "title": "Preapproved Groups", + "description": "The preapproved groups of this preapproval rule.", + "default": [] + }, + "preapproved_permissions": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionBase" + }, + "type": "array", + "title": "Preapproved Permissions", + "description": "The preapproved permissions of this preapproval rule.", + "default": [] + }, + "preapproval_webhooks": { + "items": { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + "type": "array", + "title": "Preapproval Webhooks", + "description": "The preapproval webhooks of this preapproval rule.", + "default": [] + } + }, + "type": "object", + "required": [ + "justification" + ], + "title": "PreApprovalRuleUpdateInput" + }, + "RequestApprovalConfigInput": { + "properties": { + "request_approval_config_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Request Approval Config Override", + "description": "Indicates if approval flow is overridden." + }, + "manager_approval": { + "anyOf": [ + { + "$ref": "#/components/schemas/ManagerApprovalOption" + }, + { + "type": "null" + } + ], + "description": "Manager approval can be configured as necessary to continue", + "default": "NONE" + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "custom_approval_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." + }, + "custom_approval_message_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Custom Approval Message Override", + "description": "Indicates if custom_approval_message is overridden." + }, + "approvers": { + "allOf": [ + { + "$ref": "#/components/schemas/AppApproversInput" + } + ], + "description": "AppStore App approvers assigned." + }, + "approvers_stage_2": { + "allOf": [ + { + "$ref": "#/components/schemas/AppApproversInput" + } + ], + "description": "AppStore App stage 2 approvers assigned." + }, + "request_approval_stages": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestApprovalStageInput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Request Approval Stages", + "description": "The stages of this request approval." + } + }, + "type": "object", + "title": "RequestApprovalConfigInput" + }, + "RequestApprovalConfigOutput": { + "properties": { + "request_approval_config_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Request Approval Config Override", + "description": "Indicates if approval flow is overridden." + }, + "manager_approval": { + "anyOf": [ + { + "$ref": "#/components/schemas/ManagerApprovalOption" + }, + { + "type": "null" + } + ], + "description": "Manager approval can be configured as necessary to continue", + "default": "NONE" + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "custom_approval_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." + }, + "custom_approval_message_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Custom Approval Message Override", + "description": "Indicates if custom_approval_message is overridden." + }, + "approvers": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppApproversOutput" + }, + { + "type": "null" + } + ], + "description": "AppStore App approvers assigned." + }, + "approvers_stage_2": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppApproversOutput" + }, + { + "type": "null" + } + ], + "description": "AppStore App stage 2 approvers assigned." + }, + "request_approval_stages": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestApprovalStageOutput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Request Approval Stages", + "description": "The stages of this request approval.", + "default": [ + {} + ] + } + }, + "type": "object", + "title": "RequestApprovalConfigOutput" + }, + "RequestApprovalStageInput": { + "properties": { + "approvers": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ApproverInput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Approvers", + "description": "The approvers of this stage." + } + }, + "type": "object", + "title": "RequestApprovalStageInput" + }, + "RequestApprovalStageOutput": { + "properties": { + "approvers": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ApproverOutput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Approvers", + "description": "The approvers of this stage." + } + }, + "type": "object", + "title": "RequestApprovalStageOutput" + }, + "RequestConfigInputCreate": { + "properties": { + "appstore_visibility": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppStoreVisibilityOption" + }, + { + "type": "null" + } + ], + "description": "The appstore visibility of this request config.", + "default": "HIDDEN" + }, + "allowed_groups_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Allowed Groups Override", + "description": "Indicates if allowed groups is overriden from the app-level settings." + }, + "allowed_groups": { + "anyOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigInput" + }, + { + "type": "null" + } + ], + "description": "Refers to which group(s) can make requests to this permission." + }, + "request_approval_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestApprovalConfigInput" + }, + { + "type": "null" + } + ], + "description": "A request approval config can be optionally associated with this config" + }, + "access_removal_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." + }, + "request_validation_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A request validation webhook can be optionally associated with this config." + }, + "request_fulfillment_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestFulfillmentConfigInput" + }, + { + "type": "null" + } + ], + "description": "A request fulfillment config can be optionally associated with this config" + } + }, + "type": "object", + "title": "RequestConfigInputCreate" + }, + "RequestConfigInputUpdate": { + "properties": { + "appstore_visibility": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppStoreVisibilityOption" + }, + { + "type": "null" + } + ], + "description": "The appstore visibility of this request config.", + "default": "HIDDEN" + }, + "allowed_groups_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Allowed Groups Override", + "description": "Indicates if allowed groups is overriden from the app-level settings." + }, + "allowed_groups": { + "anyOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigInput" + }, + { + "type": "null" + } + ], + "description": "Refers to which group(s) can make requests to this permission." + }, + "request_approval_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestApprovalConfigInput" + }, + { + "type": "null" + } + ], + "description": "A request approval config can be optionally associated with this config" + }, + "access_removal_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." + }, + "request_validation_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A request validation webhook can be optionally associated with this config." + }, + "request_fulfillment_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestFulfillmentConfigInputUpdate" + }, + { + "type": "null" + } + ], + "description": "A request fulfillment config can be optionally associated with this config" + } + }, + "type": "object", + "title": "RequestConfigInputUpdate" + }, + "RequestConfigOutput": { + "properties": { + "appstore_visibility": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppStoreVisibilityOption" + }, + { + "type": "null" + } + ], + "description": "The appstore visibility of this request config.", + "default": "HIDDEN" + }, + "allowed_groups_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Allowed Groups Override", + "description": "Indicates if allowed groups is overriden from the app-level settings." + }, + "allowed_groups": { + "anyOf": [ + { + "$ref": "#/components/schemas/AllowedGroupsConfigOutput" + }, + { + "type": "null" + } + ], + "description": "The allowed groups config associated with this config.", + "default": { + "type": "ALL_GROUPS", + "groups": [] + } + }, + "request_approval_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestApprovalConfigOutput" + }, + { + "type": "null" + } + ], + "description": "A request approval config can be optionally associated with this config", + "default": { + "manager_approval": "NONE", + "request_approval_stages": [ + {} + ] + } + }, + "request_fulfillment_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestFulfillmentConfigOutput" + }, + { + "type": "null" + } + ], + "description": "A request fulfillment config can be optionally associated with this config", + "default": {} + }, + "access_removal_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/InlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." + }, + "request_validation_inline_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/InlineWebhook" + }, + { + "type": "null" + } + ], + "description": "A request validation webhook can be optionally associated with this config." + } + }, + "type": "object", + "title": "RequestConfigOutput" + }, + "RequestFulfillmentConfigInput": { + "properties": { + "manual_steps_needed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Manual Steps Needed", + "description": "Whether manual steps are needed." + }, + "manual_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Manual Instructions", + "description": "The manual instructions that go along." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "time_based_access_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Time Based Access Override", + "description": "Indicates if time based access is overriden." + }, + "provisioning_group": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseGroup" + }, + { + "type": "null" + } + ], + "description": "The provisioning group optionally associated with this config." + }, + "provisioning_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "The provisioning webhook optionally associated with this config." + } + }, + "type": "object", + "title": "RequestFulfillmentConfigInput" + }, + "RequestFulfillmentConfigInputUpdate": { + "properties": { + "manual_steps_needed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Manual Steps Needed", + "description": "Whether manual steps are needed." + }, + "manual_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Manual Instructions", + "description": "The manual instructions that go along." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "time_based_access_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Time Based Access Override", + "description": "Indicates if time based access is overriden." + }, + "provisioning_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseInlineWebhook" + }, + { + "type": "null" + } + ], + "description": "The provisioning webhook optionally associated with this config." + } + }, + "type": "object", + "title": "RequestFulfillmentConfigInputUpdate" + }, + "RequestFulfillmentConfigOutput": { + "properties": { + "manual_steps_needed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Manual Steps Needed", + "description": "Whether manual steps are needed." + }, + "manual_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Manual Instructions", + "description": "The manual instructions that go along." + }, + "time_based_access": { + "items": { + "$ref": "#/components/schemas/TimeBasedAccessOptions" + }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "time_based_access_override": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Time Based Access Override", + "description": "Indicates if time based access is overriden." + }, + "provisioning_group": { + "anyOf": [ + { + "$ref": "#/components/schemas/Group" + }, + { + "type": "null" + } + ], + "description": "The provisioning group optionally assocated with this config." + }, + "provisioning_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/InlineWebhook" + }, + { + "type": "null" + } + ], + "description": "The provisioning webhook optionally associated with this config." + } + }, + "type": "object", + "title": "RequestFulfillmentConfigOutput" + }, + "RequestablePermissionBase": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this requestable permission." + } + }, + "type": "object", + "title": "RequestablePermissionBase" + }, + "RequestablePermissionBaseOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this requestable permission." + }, + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PermissionType" + }, + { + "type": "null" + } + ], + "description": "The type of this requestable permission." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The label of this requestable permission." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "app_instance_id": { + "type": "string", + "title": "App Instance Id", + "description": "The ID of the instance associated with this requestable permission. This may be an empty string." + } + }, + "type": "object", + "required": [ + "label", + "app_id", + "app_class_id", + "app_instance_id" + ], + "title": "RequestablePermissionBaseOutput" + }, + "RequestablePermissionInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Class Id", + "description": "The ID of the service associated with this requestable permission." + }, + "app_instance_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Instance Id", + "description": "Optionally, an app has an identifer associated with it's particular instance." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The label of this requestable permission." + }, + "request_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestConfigInputCreate" + }, + { + "type": "null" + } + ], + "description": "The request config associated with this requestable permission." + } + }, + "type": "object", + "required": [ + "app_id", + "label" + ], + "title": "RequestablePermissionInput" + }, + "RequestablePermissionInputUpdate": { + "properties": { + "app_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Class Id", + "description": "The ID of the service associated with this requestable permission." + }, + "app_instance_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Instance Id", + "description": "Optionally, an app has an identifer associated with it's particular instance." + }, + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "The label of this requestable permission." + }, + "request_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestConfigInputUpdate" + }, + { + "type": "null" + } + ], + "description": "The request config associated with this requestable permission." + } + }, + "type": "object", + "title": "RequestablePermissionInputUpdate" + }, + "RequestablePermissionOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this requestable permission." + }, + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PermissionType" + }, + { + "type": "null" + } + ], + "description": "The type of this requestable permission." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The label of this requestable permission." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "app_instance_id": { + "type": "string", + "title": "App Instance Id", + "description": "The ID of the instance associated with this requestable permission. This may be an empty string." + }, + "request_config": { + "allOf": [ + { + "$ref": "#/components/schemas/RequestConfigOutput" + } + ], + "description": "The request config associated with this requestable permission." + } + }, + "type": "object", + "required": [ + "label", + "app_id", + "app_class_id", + "app_instance_id", + "request_config" + ], + "title": "RequestablePermissionOutput" + }, + "RunInfoStatus": { + "type": "string", + "enum": [ + "RUNNING", + "DONE" + ], + "title": "RunInfoStatus" + }, + "SupportRequestStatus": { + "type": "string", + "enum": [ + "PENDING", + "PENDING_MANAGER_APPROVAL", + "MANAGER_APPROVED", + "MANAGER_DENIED", + "PENDING_APPROVAL", + "APPROVED", + "DENIED", + "EXPIRED", + "CANCELLED", + "PENDING_PROVISIONING", + "PENDING_MANUAL_PROVISIONING", + "DENIED_PROVISIONING", + "PROVISIONED", + "PENDING_MANUAL_DEPROVISIONING", + "TIME_BASED_EXPIRED", + "COMPLETED", + "REVERTING", + "REVERTED" + ], + "title": "SupportRequestStatus" + }, + "SyncTaskOutput": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "The ID of the job." + }, + "state": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunInfoStatus" + }, + { + "type": "null" + } + ], + "description": "The state of the job." + } + }, + "type": "object", + "required": [ + "job_id" + ], + "title": "SyncTaskOutput" + }, + "TimeBasedAccessOptions": { + "type": "string", + "enum": [ + "2 hours", + "4 hours", + "12 hours", + "7 days", + "14 days", + "30 days", + "90 days", + "Unlimited" + ], + "title": "TimeBasedAccessOptions" + }, + "User": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this user." + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email", + "description": "The email of this user." + }, + "given_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Given Name", + "description": "The given name of this user." + }, + "family_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Family Name", + "description": "The family name of this user." + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserLifecycleStatus" + }, + { + "type": "null" + } + ], + "description": "The status of this user." + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "User" + }, + "UserLifecycleStatus": { + "type": "string", + "enum": [ + "STAGED", + "ACTIVE", + "SUSPENDED", + "INACTIVE" + ], + "title": "UserLifecycleStatus" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "Vendor": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "A user friendly name for the vendor" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Vendor" + }, + "VendorAgreement": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "A unique identifier for this Vendor Agreement" + }, + "vendor": { + "allOf": [ + { + "$ref": "#/components/schemas/Vendor" + } + ], + "description": "The vendor in which the agreement is created for" + }, + "start_date": { + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ], + "title": "Start Date", + "description": "The start of the current term" + }, + "end_date": { + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ], + "title": "End Date", + "description": "The end of the current term" + }, + "opt_out_date": { + "anyOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ], + "title": "Opt Out Date", + "description": "The date by which the vendor must be notified if you want to terminate the agreement" + }, + "total_contract_cost": { + "allOf": [ + { + "$ref": "#/components/schemas/Cost" + } + ], + "description": "The total cost of the current service term, including all line items and true ups, and including future years for multi-year agreements." + }, + "line_items": { + "items": { + "$ref": "#/components/schemas/LineItem" + }, + "type": "array", + "title": "Line Items", + "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." + }, + "custom_attributes": { + "additionalProperties": { + "$ref": "#/components/schemas/VendorAgreementCustomAttribute-Output" + }, + "type": "object", + "title": "Custom Attributes", + "description": "Custom metadata tracked about each of your Vendor Agreements. The set of available options must be configured within the Lumos admin panel." + } + }, + "type": "object", + "required": [ + "id", + "vendor", + "start_date", + "end_date", + "opt_out_date", + "total_contract_cost", + "line_items" + ], + "title": "VendorAgreement" + }, + "VendorAgreementCustomAttribute-Input": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VendorAgreementCustomAttributeType" + } + ], + "description": "The type of custom attribute. Only text and user options are available today" + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Value", + "description": "The value of the attribute for an individual Order" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "VendorAgreementCustomAttribute" + }, + "VendorAgreementCustomAttribute-Output": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VendorAgreementCustomAttributeType" + } + ], + "description": "The type of custom attribute. Only text and user options are available today" + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Value", + "description": "The value of the attribute for an individual Order" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "VendorAgreementCustomAttribute" + }, + "VendorAgreementCustomAttributeType": { + "type": "string", + "enum": [ + "TEXT", + "USER", + "SINGLE_SELECT" + ], + "title": "VendorAgreementCustomAttributeType" + } + }, + "securitySchemes": { + "HTTPBearer": { + "type": "http", + "scheme": "bearer" + } + } + } +} \ No newline at end of file diff --git a/original-openapi.json b/original-openapi.json index c1a9eec..84c022f 100644 --- a/original-openapi.json +++ b/original-openapi.json @@ -1,6130 +1,5476 @@ { "openapi": "3.1.0", "info": { - "title": "Lumos", - "description": "\n The Lumos API gives you the building blocks to administer and extend Lumos programmatically.\n Our REST API provides a management interface for the AppStore and a read interface\n for the Lumos Core.\n Go to https://developers.lumos.com to see our complete documentation.\n", - "version": "0.1.0" + "title": "Lumos", + "description": "\n The Lumos API gives you the building blocks to administer and extend Lumos programmatically.\n Our REST API provides a management interface for the AppStore and a read interface\n for the Lumos Core.\n Go to https://developers.lumos.com to see our complete documentation.\n", + "version": "0.1.0" }, - "servers": [ - { - "url": "https://api.lumos.com" - } - ], + "servers": [{ "url": "https://api.lumos.com" }], "paths": { - "/apps": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Apps", - "description": "List all of your company's apps.", - "operationId": "listApps", - "parameters": [ - { - "description": "Search against name, app instance identifier, and app class ID.", - "required": false, - "schema": { - "type": "string", - "title": "Name Search", - "description": "Search against name, app instance identifier, and app class ID." - }, - "name": "name_search", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_App_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "/apps": { + "get": { + "tags": ["Core"], + "summary": "Get Apps", + "description": "List all of your company's apps.", + "operationId": "listApps", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "name_search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Search against name, app instance identifier, and app class ID.", + "title": "Name Search" + }, + "description": "Search against name, app instance identifier, and app class ID." }, - "post": { - "tags": [ - "Core" - ], - "summary": "Create App", - "description": "Create a new app.", - "operationId": "createApp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInputCreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/apps/categories": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get App Categories", - "description": "Get app categories.", - "operationId": "getAppCategories", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Response Getappcategories" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/apps/{app_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get App", - "description": "Get an app by id.", - "operationId": "getApp", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." }, - "patch": { - "tags": [ - "Core" - ], - "summary": "Update App", - "description": "Update an app.", - "operationId": "updateApp", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInputCreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" } - }, - "/apps/{app_id}/settings": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Appstore App Settings", - "description": "Get AppStore app settings.", - "operationId": "getAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppSettingOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_App_" } + } + } }, - "patch": { - "tags": [ - "Core" - ], - "summary": "Update Domain App Appstore Settings", - "description": "Update app settings.", - "operationId": "updateAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppSettingInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppSettingOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } + } }, - "/users/current": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Current User", - "description": "Get current user", - "operationId": "currentUser", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "post": { + "tags": ["Core"], + "summary": "Create App", + "description": "Create a new app.", + "operationId": "createApp", + "security": [{ "HTTPBearer": [] }], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AppInputCreate" } + } } - }, - "/users": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Users", - "description": "List all of your company's users.", - "operationId": "listUsers", - "parameters": [ - { - "description": "Search for users by name or email.", - "required": false, - "schema": { - "type": "string", - "title": "Search Term", - "description": "Search for users by name or email." - }, - "name": "search_term", - "in": "query" - }, - { - "description": "If a search_term is provided, only accept exact matches.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "If a search_term is provided, only accept exact matches.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_User_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/App" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/users/{user_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get User", - "description": "Get user by id.", - "operationId": "getUser", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "User Id" - }, - "name": "user_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/apps/categories": { + "get": { + "tags": ["Core"], + "summary": "Get App Categories", + "description": "Get app categories.", + "operationId": "getAppCategories", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { "type": "string" }, + "type": "array", + "title": "Response Getappcategories" + } + } + } } - }, - "/inline_webhooks": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Inline Webhooks", - "description": "Get available webhooks", - "operationId": "get_inline_webhooks_inline_webhooks_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/InlineWebhook" - }, - "type": "array", - "title": "Response Get Inline Webhooks Inline Webhooks Get" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/apps/{app_id}": { + "get": { + "tags": ["Core"], + "summary": "Get App", + "description": "Get an app by id.", + "operationId": "getApp", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } } - }, - "/accounts": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Accounts", - "description": "Get all accounts associated with apps at your company.", - "operationId": "getAccounts", - "parameters": [ - { - "required": false, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Account_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/App" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } + } }, - "/groups/{group_id}/users": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Group Membership", - "description": "Get user members by group ID.", - "operationId": "getGroupMembership", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Group Id" - }, - "name": "group_id", - "in": "path" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_User_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "patch": { + "tags": ["Core"], + "summary": "Update App", + "description": "Update an app.", + "operationId": "updateApp", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } } - }, - "/groups/{group_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Group", - "description": "Get group by ID.", - "operationId": "getGroup", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Group Id" - }, - "name": "group_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Group" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AppInputCreate" } + } } - }, - "/groups": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Groups", - "description": "Get groups synced from connected integrations", - "operationId": "getGroups", - "parameters": [ - { - "description": "Filters groups by integration specific ID, e.g. the group's Okta ID.", - "required": false, - "schema": { - "type": "string", - "title": "Integration Specific Id", - "description": "Filters groups by integration specific ID, e.g. the group's Okta ID." - }, - "name": "integration_specific_id", - "in": "query" - }, - { - "description": "Filters groups by name.", - "required": false, - "schema": { - "type": "string", - "title": "Name", - "description": "Filters groups by name." - }, - "name": "name", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "description": "Filters groups by the ID of the app to which they belong.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters groups by the ID of the app to which they belong." - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Group_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/App" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/accounts/upload/{job_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Upload Job State", - "description": "Get state of an account upload job.", - "operationId": "getUploadJobState", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStateOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/apps/{app_id}/settings": { + "get": { + "tags": ["Core"], + "summary": "Get Appstore App Settings", + "description": "Get AppStore app settings.", + "operationId": "getAppSettings", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } } - }, - "/activity_logs": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Activity Logs", - "description": "Get activity logs.", - "operationId": "getActivityLogs", - "parameters": [ - { - "required": false, - "schema": { - "type": "string", - "title": "Since" - }, - "name": "since", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "string", - "title": "Until" - }, - "name": "until", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Limit", - "default": 50 - }, - "name": "limit", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 0.0, - "title": "Offset", - "default": 0 - }, - "name": "offset", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LimitOffsetPage_ActivityLog_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AppSettingOutput" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } + } }, - "/accounts/upload": { - "post": { - "tags": [ - "Core" - ], - "summary": "Create Accounts", - "description": "Upload accounts to an app.", - "operationId": "postAccounts", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AccountsUploadInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStateOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "patch": { + "tags": ["Core"], + "summary": "Update Domain App Appstore Settings", + "description": "Update app settings.", + "operationId": "updateAppSettings", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } } - }, - "/activity_records": { - "post": { - "tags": [ - "Core" - ], - "summary": "Update Activity Records", - "description": "Update the last_login or last_activity for a given account.", - "operationId": "activityRecords", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivityRecordInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivityRecordOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AppSettingInput" } + } } - }, - "/activity_records/job/{job_id}": { - "get": { - "tags": [ - "Core" - ], - "summary": "Get Activity Records Job State", - "description": "Get the state of an activity records post-processing job.", - "operationId": "getActivityRecordsJobState", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncTaskOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AppSettingOutput" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/appstore/requestable_permissions": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Permissions For App", - "description": "Get AppStore permissions for an application.", - "operationId": "get_appstore_permissions_for_app_appstore_requestable_permissions_get", - "parameters": [ - { - "description": "Filters requestable permissions by the ID of the app to which they belong.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters requestable permissions by the ID of the app to which they belong." - }, - "name": "app_id", - "in": "query" - }, - { - "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n", - "required": false, - "schema": { - "type": "string", - "title": "Search Term", - "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n" - }, - "name": "search_term", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "description": "\n Filters permissions by visibility in the AppStore.\n", - "required": false, - "schema": { - "type": "boolean", - "title": "In App Store", - "description": "\n Filters permissions by visibility in the AppStore.\n" - }, - "name": "in_app_store", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_RequestablePermissionOutput_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/users/current": { + "get": { + "tags": ["Core"], + "summary": "Get Current User", + "description": "Get current user", + "operationId": "currentUser", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/User" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/users": { + "get": { + "tags": ["Core"], + "summary": "Get Users", + "description": "List all of your company's users.", + "operationId": "listUsers", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "search_term", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Search for users by name or email.", + "title": "Search Term" + }, + "description": "Search for users by name or email." }, - "post": { - "tags": [ - "AppStore" - ], - "summary": "Create Appstore Requestable Permission", - "description": "**Create a permission attached to an App in the AppStore.**\n\n\n*Required fields:*\n- app-identifier. The App should be identified either by app_id or app_class_id + app_instance_id.\n- label\n\n*Defaults:*\n- request_config:\n - appstore_visibility: HIDDEN\n - allowed_groups:\n - type: ALL_GROUPS\n - groups: []\n - request_approval_config\n - manager_approval: NONE\n - request_approval_stages: []\n - request_fulfillment_config\n - manual_steps_needed: false\n- All other fields will have null values by default.", - "operationId": "create_appstore_requestable_permission_appstore_requestable_permissions_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If a search_term is provided, only accept exact matches.", + "default": false, + "title": "Exact Match" + }, + "description": "If a search_term is provided, only accept exact matches." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" } - }, - "/appstore/requestable_permissions/{permission_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Permission", - "description": "Get an AppStore permission.", - "operationId": "get_appstore_permission_appstore_requestable_permissions__permission_id__get", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Permission Id" - }, - "name": "permission_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - }, - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Delete Appstore Permission", - "description": "Delete a requestable permission by ID.\n\n Only permissions of type 'NATIVE' can be deleted.", - "operationId": "delete_appstore_permission_appstore_requestable_permissions__permission_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Permission Id" - }, - "name": "permission_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_User_" } + } + } }, - "patch": { - "tags": [ - "AppStore" - ], - "summary": "Update Appstore Permission", - "description": "**Update an AppStore permission.**\n\n\nAll fields present in the payload will override the permission's data.\nAny missing fields will be disregarded.\n\n Non-updatable fields for now:\n request_config -> request_fulfillment_config -> provisioning_group", - "operationId": "update_appstore_permission_appstore_requestable_permissions__permission_id__patch", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Permission Id" - }, - "name": "permission_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionInputUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/appstore/pre_approval_rules": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Pre Approval Rules For App", - "description": "Get AppStore pre-approval rules for an app.", - "operationId": "get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get", - "parameters": [ - { - "description": "Filters preapproval rules by the ID of the app to which they belong.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters preapproval rules by the ID of the app to which they belong." - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_PreApprovalRuleOutput_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/users/{user_id}": { + "get": { + "tags": ["Core"], + "summary": "Get User", + "description": "Get user by id.", + "operationId": "getUser", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "User Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/User" } + } + } }, - "post": { - "tags": [ - "AppStore" - ], - "summary": "Create Pre Approval Rule", - "description": "Create a pre-approval rule attached to an App in the AppStore.", - "operationId": "create_pre_approval_rule_appstore_pre_approval_rules_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/appstore/pre_approval_rules/{pre_approval_rule_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Pre Approval Rule", - "description": "Get an AppStore pre-approval rule.", - "operationId": "get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Pre Approval Rule Id" - }, - "name": "pre_approval_rule_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/inline_webhooks": { + "get": { + "tags": ["Core"], + "summary": "Get Inline Webhooks", + "description": "Get available webhooks", + "operationId": "get_inline_webhooks_inline_webhooks_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { "$ref": "#/components/schemas/InlineWebhook" }, + "type": "array", + "title": "Response Get Inline Webhooks Inline Webhooks Get" + } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/accounts": { + "get": { + "tags": ["Core"], + "summary": "Get Accounts", + "description": "Get all accounts associated with apps at your company.", + "operationId": "getAccounts", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Id" + } }, - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Delete Pre Approval Rule", - "description": "Delete a pre-approval rule by ID.", - "operationId": "delete_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Pre Approval Rule Id" - }, - "name": "pre_approval_rule_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" }, - "patch": { - "tags": [ - "AppStore" - ], - "summary": "Update Pre Approval Rule", - "description": "**Update a pre-approval rule attached to an App in the AppStore.**\n\nAll fields present in the payload will override the pre-approval rule's data.\nAny missing fields will be disregarded.", - "operationId": "update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Pre Approval Rule Id" - }, - "name": "pre_approval_rule_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleUpdateInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" } - }, - "/appstore/apps/{app_id}/settings": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore App Settings", - "description": "Get AppStore app settings.", - "operationId": "getAppStoreAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_Account_" } + } + } }, - "patch": { - "tags": [ - "AppStore" - ], - "summary": "Update Appstore App Settings", - "description": "Update AppStore app settings.", - "operationId": "updateAppStoreAppSettings", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/appstore/apps": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore Apps", - "description": "List all AppStore apps.", - "operationId": "getAppStoreApps", - "parameters": [ - { - "description": "Filters apps by the ID of the app.", - "required": false, - "schema": { - "type": "string", - "title": "App Id", - "description": "Filters apps by the ID of the app." - }, - "name": "app_id", - "in": "query" - }, - { - "description": "Search against name, app instance identifier, and app class ID.", - "required": false, - "schema": { - "type": "string", - "title": "Name Search", - "description": "Search against name, app instance identifier, and app class ID." - }, - "name": "name_search", - "in": "query" - }, - { - "description": "Search filter should be an exact match.", - "required": false, - "schema": { - "type": "boolean", - "title": "Exact Match", - "description": "Search filter should be an exact match.", - "default": false - }, - "name": "exact_match", - "in": "query" - }, - { - "description": "Get all apps in the AppStore regardless of visibility. Only available to admins.", - "required": false, - "schema": { - "type": "boolean", - "title": "All Visibilities", - "description": "Get all apps in the AppStore regardless of visibility. Only available to admins.", - "default": false - }, - "name": "all_visibilities", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_AppStoreApp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/groups/{group_id}/users": { + "get": { + "tags": ["Core"], + "summary": "Get Group Membership", + "description": "Get user members by group ID.", + "operationId": "getGroupMembership", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "group_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Group Id" } }, - "post": { - "tags": [ - "AppStore" - ], - "summary": "Add App To Appstore", - "description": "Add app to AppStore with given settings.", - "operationId": "addAppToAppStore", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddAppToAppStoreInput" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreAppSettingsOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" } - }, - "/appstore/apps/{app_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Appstore App", - "description": "Get AppStore app.", - "operationId": "getAppStoreApp", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppStoreApp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_User_" } + } + } }, - "delete": { - "tags": [ - "AppStore" - ], - "summary": "Remove App From Appstore", - "description": "Remove app from AppStore.", - "operationId": "removeAppFromAppStore", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "App Id" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/appstore/access_request": { - "post": { - "tags": [ - "AppStore" - ], - "summary": "Create Access Request", - "description": "Create a request to access a specific permission in the appstore.", - "operationId": "createAccessRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAccessRequestInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AccessRequest" - }, - "type": "array", - "title": "Response Createaccessrequest" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/groups/{group_id}": { + "get": { + "tags": ["Core"], + "summary": "Get Group", + "description": "Get group by ID.", + "operationId": "getGroup", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "group_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Group Id" } } - }, - "/appstore/access_requests/{access_request_id}": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Access Request", - "description": "Get access request by ID.", - "operationId": "getAccessRequest", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Access Request Id" - }, - "name": "access_request_id", - "in": "path" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AccessRequest" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Group" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/appstore/access_requests": { - "get": { - "tags": [ - "AppStore" - ], - "summary": "Get Access Requests", - "description": "Get all access requests for the current organization.", - "operationId": "getAccessRequests", - "parameters": [ - { - "description": "Filters requests by the ID of the target user.", - "required": false, - "schema": { - "type": "string", - "title": "Target User Id", - "description": "Filters requests by the ID of the target user." - }, - "name": "target_user_id", - "in": "query" - }, - { - "description": "Filters requests by the ID of the requesting user.", - "required": false, - "schema": { - "type": "string", - "title": "Requester User Id", - "description": "Filters requests by the ID of the requesting user." - }, - "name": "requester_user_id", - "in": "query" - }, - { - "description": "Filters requests by the ID of the user.", - "required": false, - "schema": { - "type": "string", - "title": "User Id", - "description": "Filters requests by the ID of the user." - }, - "name": "user_id", - "in": "query" - }, - { - "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'", - "required": false, - "schema": { - "items": { - "$ref": "#/components/schemas/SupportRequestStatus" - }, - "type": "array", - "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'" - }, - "name": "statuses", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_AccessRequest_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/groups": { + "get": { + "tags": ["Core"], + "summary": "Get Groups", + "description": "Get groups synced from connected integrations", + "operationId": "getGroups", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "integration_specific_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters groups by integration specific ID, e.g. the group's Okta ID.", + "title": "Integration Specific Id" + }, + "description": "Filters groups by integration specific ID, e.g. the group's Okta ID." + }, + { + "name": "name", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters groups by name.", + "title": "Name" + }, + "description": "Filters groups by name." + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters groups by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters groups by the ID of the app to which they belong." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" } - }, - "/vendor_agreements": { - "get": { - "tags": [ - "Vendor Management" - ], - "summary": "Get Vendor Agreements", - "description": "List all of your company's vendor agreements.", - "operationId": "listVendorAgreements", - "parameters": [ - { - "required": false, - "schema": { - "type": "integer", - "minimum": 1.0, - "title": "Page", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "maximum": 100.0, - "minimum": 1.0, - "title": "Size", - "default": 50 - }, - "name": "size", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_VendorAgreement_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_Group_" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/found_documents": { - "post": { - "tags": [ - "Vendor Management" - ], - "summary": "Upload Found Documents", - "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos for review", - "operationId": "createFoundDocument", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FoundDocumentsUpload", - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." - }, - "files": { - "items": { - "properties": { - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array", - "title": "Files", - "description": "A list of publicly accessible URLs that direct to files related to a Vendor Agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." - }, - "vendor_name": { - "type": "string", - "title": "Vendor Name", - "description": "The name of the vendor associated with this document" - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start date of the attached contract" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end date of the attached contract" - }, - "source_app_id": { - "type": "string", - "title": "Source App ID", - "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." - }, - "total_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Total Cost", - "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years." - } - }, - "type": "object", - "required": [ - "unique_identifier", - "files" - ] - } - }, - "multipart/form-data": { - "schema": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." - }, - "files": { - "items": { - "type": "string", - "format": "binary" - }, - "type": "array", - "title": "Files", - "description": "A list of files related to a vendor agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." - }, - "vendor_name": { - "type": "string", - "title": "Vendor Name", - "description": "The name of the vendor associated with this document" - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start date of the attached contract" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end date of the attached contract" - }, - "source_app_id": { - "type": "string", - "title": "Source App ID", - "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." - } - }, - "type": "object", - "required": [ - "unique_identifier", - "files" - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } + } + }, + "/accounts/upload/{job_id}": { + "get": { + "tags": ["Core"], + "summary": "Get Upload Job State", + "description": "Get state of an account upload job.", + "operationId": "getUploadJobState", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Job Id" } } - }, - "/orders": { - "post": { - "tags": [ - "Vendor Management" - ], - "summary": "Upload Order", - "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos", - "operationId": "createOrder", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrderInput" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/JobStateOutput" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/art": { - "get": { - "tags": [ - "Meta" - ], - "summary": "Get Art", - "description": "Return Lumos ASCII art. Can be used to verify the API is working.", - "operationId": "Lumos Art.", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } + } + } + }, + "/activity_logs": { + "get": { + "tags": ["Core"], + "summary": "Get Activity Logs", + "description": "Get activity logs.", + "operationId": "getActivityLogs", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "since", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { "type": "string", "format": "date-time" }, + { "type": "null" } + ], + "title": "Since" + } + }, + { + "name": "until", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { "type": "string", "format": "date-time" }, + { "type": "null" } + ], + "title": "Until" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size limit", + "default": 50, + "title": "Limit" + }, + "description": "Page size limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "description": "Page offset", + "default": 0, + "title": "Offset" + }, + "description": "Page offset" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_ActivityLog_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } + } } - }, - "/info": { - "get": { - "tags": [ - "Meta" - ], - "summary": "Get Info", - "description": "Returns current git revision.", - "operationId": "Lumos liveness check", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Response Lumos Liveness Check" - } - } - } - } + } + } + }, + "/accounts/upload": { + "post": { + "tags": ["Core"], + "summary": "Create Accounts", + "description": "Upload accounts to an app.", + "operationId": "postAccounts", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AccountsUploadInput" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/JobStateOutput" } } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } } - }, - "/webhooks/airbase/purchase_request_approved/{domain_app_uuid}": { - "post": { - "tags": [ - "Integration Webhooks" - ], - "summary": "Process Airbase Purchase Request Approved", - "description": "Webhook for Airbase to send events as a workflow transitions through milestones", - "operationId": "processAirbaseMilestoneEvent", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Domain App Uuid" - }, - "name": "domain_app_uuid", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AirbasePurchaseRequestEvent" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/activity_records": { + "post": { + "tags": ["Core"], + "summary": "Update Activity Records", + "description": "Update the last_login or last_activity for a given account.", + "operationId": "activityRecords", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ActivityRecordInput" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityRecordOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } + } } + }, + "security": [{ "HTTPBearer": [] }] } - }, - "components": { - "schemas": { - "AccessRequest": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of the access request." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app the request is for." - }, - "app_name": { - "type": "string", - "title": "App Name", - "description": "The name of the app the request is for." - }, - "requester_user": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - } - ], - "title": "Requester User", - "description": "The user who requested access. It's possible for one user to request access on another's behalf." - }, - "target_user": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - } - ], - "title": "Target User", - "description": "The user the request is for." - }, - "supporter_user": { - "$ref": "#/components/schemas/User" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/SupportRequestStatus" - } - ], - "description": "The current status of the request." - }, - "notes": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Notes", - "description": "The reason the user wrote for putting the access request into the given state.", - "default": {} - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At" - }, - "requestable_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - }, - "type": "array", - "title": "Requestable Permissions" - }, - "requested_at": { - "type": "string", - "format": "date-time", - "title": "Requested At" - } - }, - "type": "object", - "required": [ - "id", - "app_id", - "app_name", - "requester_user", - "target_user", - "status" - ], - "title": "AccessRequest", - "description": "API version of DomainAppSupportRequest." - }, - "Account": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app that owns this account." - }, - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The stable identifier of this account from the associated service." - }, - "account_type": { - "allOf": [ - { - "$ref": "#/components/schemas/AccountType" - } - ], - "description": "The type of this account, one of 'USER', 'ROLE' (e.g. AWS), 'SERVICE' (e.g. GCP)." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of this account." - }, - "user_id": { - "type": "string", - "title": "User Id", - "description": "The ID of the user associated with this account." - } - }, - "type": "object", - "required": [ - "app_id", - "unique_identifier", - "account_type" - ], - "title": "Account" + }, + "/activity_records/job/{job_id}": { + "get": { + "tags": ["Core"], + "summary": "Get Activity Records Job State", + "description": "Get the state of an activity records post-processing job.", + "operationId": "getActivityRecordsJobState", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Job Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SyncTaskOutput" } + } + } }, - "AccountInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The stable identifier of this account." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of this account." - }, - "first_name": { - "type": "string", - "title": "First Name", - "description": "The first name of the user." - }, - "last_name": { - "type": "string", - "title": "Last Name", - "description": "The last name of the user." - }, - "last_activity": { - "type": "string", - "title": "Last Activity", - "description": "The datetime of last activity of the user." - }, - "last_login": { - "type": "string", - "title": "Last Login", - "description": "The datetime of last login of the user." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AccountLifecycleStatus" - } - ], - "description": "The status of the account." - }, - "permissions": { - "items": { - "$ref": "#/components/schemas/PermissionInput" - }, - "type": "array", - "title": "Permissions", - "description": "The permissions of the account.", - "default": [] - }, - "attributes": { - "items": { - "$ref": "#/components/schemas/AttributeInput" - }, - "type": "array", - "title": "Attributes", - "description": "The attributes of the account.", - "default": [] - } - }, - "type": "object", - "required": [ - "unique_identifier" - ], - "title": "AccountInput" + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/apps/{app_id}/requestable_permissions": { + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore Permissions For App", + "description": "Get AppStore permissions for an application.", + "operationId": "get_appstore_permissions_for_app_appstore_apps__app_id__requestable_permissions_get", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Filters requestable permissions by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters requestable permissions by the ID of the app to which they belong." + }, + { + "name": "search_term", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n", + "title": "Search Term" + }, + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n" + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "in_app_store", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "description": "\n Filters permissions by visibility in the AppStore.\n", + "title": "In App Store" + }, + "description": "\n Filters permissions by visibility in the AppStore.\n" + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_RequestablePermissionOutput_" + } + } + } }, - "AccountLifecycleStatus": { + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/requestable_permissions": { + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore Permissions", + "description": "Get AppStore permissions for an application.", + "operationId": "get_appstore_permissions_appstore_requestable_permissions_get", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { "type": "string", - "enum": [ - "DISCOVERED", - "STAGED", - "ACCESS_CREATED", - "ACTIVE", - "ARCHIVED", - "SUSPENDED", - "DEPROVISIONED", - "MANUALLY_REMOVED", - "ACCESS_REMOVED", - "NON_CORPORATE_ACCOUNT", - "WAITING_MANUAL_REMOVAL" - ], - "title": "AccountLifecycleStatus", - "description": "NOTE: If you update this, also update UserDomainAppLifecycleStatus\n\nDISCOVERED - Account discovered through accountfinding. Could be noisy.\n\nSTAGED - An account that has been queued for provisioning, but is not\n provisioned yet. Relevant for Apps where provisioning is async\n (eg. Okta, OneLogin).\n\nACCESS_CREATED - When an account has been provisioned but not accessed.\n\nACTIVE - A live, active, accessible account.\n\nSUSPENDED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nDEPROVISIONED - The user can no longer access the account, the license was removed,\n and the account cannot be recovered.\n\nARCHIVED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nMANUALLY_REMOVED - The user can no longer access the account, the license is presumably\n removed, but all of this was done manually\n\nACCESS_REMOVED - The user can no longer access the account, but a license may still\n exist. This is the case when we remove access through Okta but not a\n direct integration\n\nNON_CORPORATE_ACCOUNT - The account doesn't exist, or is a personal employee account.\n\nWAITING_MANUAL_REMOVAL - Waiting manual removal, someone was requested to remove the user access\n from the App, and we are waiting for an answer about it." + "description": "Filters requestable permissions by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters requestable permissions by the ID of the app to which they belong." + }, + { + "name": "search_term", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n", + "title": "Search Term" + }, + "description": "\n Searches permissions by the permission's group name,\n request configuration name, or specific integration ID.\n" + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "in_app_store", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "description": "\n Filters permissions by visibility in the AppStore.\n", + "title": "In App Store" + }, + "description": "\n Filters permissions by visibility in the AppStore.\n" + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_RequestablePermissionOutput_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "post": { + "tags": ["AppStore"], + "summary": "Create Appstore Requestable Permission", + "description": "**Create a permission attached to an App in the AppStore.**\n\n\n*Required fields:*\n- app-identifier. The App should be identified either by app_id or app_class_id + app_instance_id.\n- label\n\n*Defaults:*\n- request_config:\n - appstore_visibility: HIDDEN\n - allowed_groups:\n - type: ALL_GROUPS\n - groups: []\n - request_approval_config\n - manager_approval: NONE\n - request_approval_stages: []\n - request_fulfillment_config\n - manual_steps_needed: false\n- All other fields will have null values by default.", + "operationId": "create_appstore_requestable_permission_appstore_requestable_permissions_post", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionInput" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/requestable_permissions/{permission_id}": { + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore Permission", + "description": "Get an AppStore permission.", + "operationId": "get_appstore_permission_appstore_requestable_permissions__permission_id__get", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "permission_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Permission Id" } + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "patch": { + "tags": ["AppStore"], + "summary": "Update Appstore Permission", + "description": "**Update an AppStore permission.**\n\n\nAll fields present in the payload will override the permission's data.\nAny missing fields will be disregarded.\n\n Non-updatable fields for now:\n request_config -> request_fulfillment_config -> provisioning_group", + "operationId": "update_appstore_permission_appstore_requestable_permissions__permission_id__patch", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "permission_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Permission Id" } + }, + { + "name": "include_inherited_configs", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include inherited configurations from parent app.", + "default": true, + "title": "Include Inherited Configs" + }, + "description": "Include inherited configurations from parent app." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionInputUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + } + } + } }, - "AccountType": { + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "delete": { + "tags": ["AppStore"], + "summary": "Delete Appstore Permission", + "description": "Delete a requestable permission by ID.\n\n Only permissions of type 'NATIVE' can be deleted.", + "operationId": "delete_appstore_permission_appstore_requestable_permissions__permission_id__delete", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "permission_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Permission Id" } + } + ], + "responses": { + "204": { "description": "Successful Response" }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/pre_approval_rules": { + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore Pre Approval Rules For App", + "description": "Get AppStore pre-approval rules for an app.", + "operationId": "get_appstore_pre_approval_rules_for_app_appstore_pre_approval_rules_get", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { "type": "string", - "enum": [ - "USER", - "ROLE", - "SERVICE" - ], - "title": "AccountType", - "description": "An enumeration." - }, - "AccountsUploadInput": { - "properties": { - "accounts": { - "items": { - "$ref": "#/components/schemas/AccountInput" - }, - "type": "array", - "title": "Accounts", - "description": "Accounts to upload.", - "default": [] - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app to upload accounts to." + "description": "Filters preapproval rules by the ID of the app to which they belong.", + "title": "App Id" + }, + "description": "Filters preapproval rules by the ID of the app to which they belong." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_PreApprovalRuleOutput_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "post": { + "tags": ["AppStore"], + "summary": "Create Pre Approval Rule", + "description": "Create a pre-approval rule attached to an App in the AppStore.", + "operationId": "create_pre_approval_rule_appstore_pre_approval_rules_post", + "security": [{ "HTTPBearer": [] }], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PreApprovalRuleInput" } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/pre_approval_rules/{pre_approval_rule_id}": { + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore Pre Approval Rule", + "description": "Get an AppStore pre-approval rule.", + "operationId": "get_appstore_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__get", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "pre_approval_rule_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Pre Approval Rule Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "patch": { + "tags": ["AppStore"], + "summary": "Update Pre Approval Rule", + "description": "**Update a pre-approval rule attached to an App in the AppStore.**\n\nAll fields present in the payload will override the pre-approval rule's data.\nAny missing fields will be disregarded.", + "operationId": "update_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__patch", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "pre_approval_rule_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Pre Approval Rule Id" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleUpdateInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreApprovalRuleOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "delete": { + "tags": ["AppStore"], + "summary": "Delete Pre Approval Rule", + "description": "Delete a pre-approval rule by ID.", + "operationId": "delete_pre_approval_rule_appstore_pre_approval_rules__pre_approval_rule_id__delete", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "pre_approval_rule_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Pre Approval Rule Id" } + } + ], + "responses": { + "204": { "description": "Successful Response" }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/apps/{app_id}/settings": { + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore App Settings", + "description": "Get AppStore app settings.", + "operationId": "getAppStoreAppSettings", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "patch": { + "tags": ["AppStore"], + "summary": "Update Appstore App Settings", + "description": "Update AppStore app settings.", + "operationId": "updateAppStoreAppSettings", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/apps": { + "post": { + "tags": ["AppStore"], + "summary": "Add App To Appstore", + "description": "Add app to AppStore with given settings.", + "operationId": "addAppToAppStore", + "security": [{ "HTTPBearer": [] }], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AddAppToAppStoreInput" } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppStoreAppSettingsOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore Apps", + "description": "List all AppStore apps.", + "operationId": "getAppStoreApps", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters apps by the ID of the app.", + "title": "App Id" + }, + "description": "Filters apps by the ID of the app." + }, + { + "name": "name_search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Search against name, app instance identifier, and app class ID.", + "title": "Name Search" + }, + "description": "Search against name, app instance identifier, and app class ID." + }, + { + "name": "exact_match", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Search filter should be an exact match.", + "default": false, + "title": "Exact Match" + }, + "description": "Search filter should be an exact match." + }, + { + "name": "all_visibilities", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Get all apps in the AppStore regardless of visibility. Only available to admins.", + "default": false, + "title": "All Visibilities" + }, + "description": "Get all apps in the AppStore regardless of visibility. Only available to admins." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_AppStoreApp_" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/apps/{app_id}": { + "delete": { + "tags": ["AppStore"], + "summary": "Remove App From Appstore", + "description": "Remove app from AppStore.", + "operationId": "removeAppFromAppStore", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { "application/json": { "schema": {} } } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "get": { + "tags": ["AppStore"], + "summary": "Get Appstore App", + "description": "Get AppStore app.", + "operationId": "getAppStoreApp", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "App Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AppStoreApp" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/access_requests/{id}": { + "get": { + "tags": ["AppStore"], + "summary": "Get Access Request", + "description": "Get access request by ID.", + "operationId": "getAccessRequest", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AccessRequest" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "delete": { + "tags": ["AppStore"], + "summary": "Cancel Access Request", + "description": "Cancel an access request.", + "operationId": "cancelAccessRequest", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Id" } + }, + { + "name": "reason", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Reason for cancellation.", + "title": "Reason" + }, + "description": "Reason for cancellation." + } + ], + "responses": { + "204": { "description": "Successful Response" }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/appstore/access_request": { + "post": { + "tags": ["AppStore"], + "summary": "Create Access Request", + "description": "Create a request to access a specific permission in the appstore.", + "operationId": "createAccessRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAccessRequestInput" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { "$ref": "#/components/schemas/AccessRequest" }, + "type": "array", + "title": "Response Createaccessrequest" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/appstore/access_requests": { + "get": { + "tags": ["AppStore"], + "summary": "Get Access Requests", + "description": "Get all access requests for the current organization.", + "operationId": "getAccessRequests", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "target_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters requests by the ID of the target user.", + "title": "Target User Id" + }, + "description": "Filters requests by the ID of the target user." + }, + { + "name": "requester_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters requests by the ID of the requesting user.", + "title": "Requester User Id" + }, + "description": "Filters requests by the ID of the requesting user." + }, + { + "name": "user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "Filters requests by the ID of the user.", + "title": "User Id" + }, + "description": "Filters requests by the ID of the user." + }, + { + "name": "statuses", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SupportRequestStatus" } - }, - "type": "object", - "required": [ - "app_id" + }, + { "type": "null" } ], - "title": "AccountsUploadInput" + "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'", + "title": "Statuses" + }, + "description": "Filters requests by their status. Possible values: 'PENDING', 'PENDING_MANAGER_APPROVAL', 'MANAGER_APPROVED', 'MANAGER_DENIED', 'PENDING_APPROVAL', 'APPROVED', 'DENIED', 'EXPIRED', 'CANCELLED', 'PENDING_PROVISIONING', 'PENDING_MANUAL_PROVISIONING', 'DENIED_PROVISIONING', 'PROVISIONED', 'PENDING_MANUAL_DEPROVISIONING', 'TIME_BASED_EXPIRED', 'COMPLETED', 'REVERTING', 'REVERTED'" }, - "ActivityLog": { - "properties": { - "event_hash": { - "type": "string", - "title": "Event Hash" - }, - "event_type": { - "type": "string", - "title": "Event Type" + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Sort access requests ascending (ASC) or descending (DESC) by created date.", + "default": "ASC", + "title": "Sort" + }, + "description": "Sort access requests ascending (ASC) or descending (DESC) by created date." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/Page_AccessRequest_" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/vendor_agreements": { + "get": { + "tags": ["Vendor Management"], + "summary": "Get Vendor Agreements", + "description": "List all of your company's vendor agreements.", + "operationId": "listVendorAgreements", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_VendorAgreement_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/found_documents": { + "post": { + "tags": ["Vendor Management"], + "summary": "Upload Found Documents", + "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos for review", + "operationId": "createFoundDocument", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FoundDocumentsUpload", + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." }, - "event_type_user_friendly": { - "type": "string", - "title": "Event Type User Friendly" + "files": { + "items": { + "properties": { + "type": { "type": "string" }, + "value": { "type": "string" } + }, + "type": "object" + }, + "type": "array", + "title": "Files", + "description": "A list of publicly accessible URLs that direct to files related to a Vendor Agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." }, - "outcome": { - "type": "string", - "title": "Outcome" + "vendor_name": { + "type": "string", + "title": "Vendor Name", + "description": "The name of the vendor associated with this document" }, - "targets": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Targets" + "start_date": { + "type": "string", + "format": "date", + "title": "Start Date", + "description": "The start date of the attached contract" }, - "actor": { - "type": "object", - "title": "Actor" + "end_date": { + "type": "string", + "format": "date", + "title": "End Date", + "description": "The end date of the attached contract" }, - "event_began_at": { - "type": "string", - "format": "date-time", - "title": "Event Began At" + "source_app_id": { + "type": "string", + "title": "Source App ID", + "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." }, - "event_metadata": { - "type": "object", - "title": "Event Metadata" + "total_cost": { + "allOf": [{ "$ref": "#/components/schemas/Cost" }], + "title": "Total Cost", + "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years." } - }, - "type": "object", - "required": [ - "event_hash", - "event_type", - "event_type_user_friendly", - "outcome", - "targets", - "actor", - "event_began_at", - "event_metadata" - ], - "title": "ActivityLog", - "description": "API version of SIEMEvent" - }, - "ActivityRecord": { - "properties": { - "account": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordAccountInput" - } - ], - "title": "Account", - "description": "Metadata that Lumos can use to match the activity record to a software account within Lumos." + }, + "type": "object", + "required": ["unique_identifier", "files"] + } + }, + "multipart/form-data": { + "schema": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique identifier for the contract being uploaded. This can be an ID from an external system like Coupa, an internal ID such as a PO number, or simply the name of the file." }, - "event": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordEventInput" - } - ], - "title": "Event", - "description": "Metadata about the event being uploaded." + "files": { + "items": { "type": "string", "format": "binary" }, + "type": "array", + "title": "Files", + "description": "A list of files related to a vendor agreement. For example, the Order Form, Quote, MSA, or Terms and Conditions." }, - "timestamp": { - "type": "string", - "format": "date-time", - "title": "Timestamp", - "description": "The timestamp of this event, in ISO 8601 format." + "vendor_name": { + "type": "string", + "title": "Vendor Name", + "description": "The name of the vendor associated with this document" }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "UUID of the application in Lumos where this activity record was sourced (e.g. the ID of Okta within Lumos found by going to Apps > Find your app in the list > Click '...' > Copy Stable Identifier)" + "start_date": { + "type": "string", + "format": "date", + "title": "Start Date", + "description": "The start date of the attached contract" }, - "app": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordAppInput" - } - ], - "title": "App", - "description": "Metadata that Lumos can use to match the activity record to an application within Lumos." - } - }, - "type": "object", - "required": [ - "account", - "event", - "timestamp", - "source_app_id" - ], - "title": "ActivityRecord" - }, - "ActivityRecordAccountInput": { - "properties": { - "external_id": { - "type": "string", - "title": "External Id", - "description": "The external app's user ID for the account." + "end_date": { + "type": "string", + "format": "date", + "title": "End Date", + "description": "The end date of the attached contract" }, - "email": { - "type": "string", - "title": "Email", - "description": "The email associated with the account" - } - }, - "type": "object", - "title": "ActivityRecordAccountInput" - }, - "ActivityRecordAppInput": { - "properties": { - "instance_identifier": { - "type": "string", - "title": "Instance Identifier", - "description": "The ID of the app as it is identified in the source E.g. the ID that Okta uses to identify the app" - } - }, - "type": "object", - "required": [ - "instance_identifier" - ], - "title": "ActivityRecordAppInput" - }, - "ActivityRecordEventInput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ActivityRecordEventType" - } - ], - "description": "The type of event being uploaded." + "source_app_id": { + "type": "string", + "title": "Source App ID", + "description": "The ID of the app that sourced this document. For example, if you are using this API to create a custom Google Drive integration, you might include the ID for the Google Workspaceapp in Lumos. This determines which app's logo is displayed in Lumos." } - }, - "type": "object", - "required": [ - "type" - ], - "title": "ActivityRecordEventInput" + }, + "type": "object", + "required": ["unique_identifier", "files"] + } + } }, - "ActivityRecordEventType": { - "enum": [ - "LOGIN", - "ACTIVITY" - ], - "title": "ActivityRecordEventType", - "description": "An enumeration." - }, - "ActivityRecordInput": { - "properties": { - "records": { - "items": { - "$ref": "#/components/schemas/ActivityRecord" - }, - "type": "array", - "title": "Records", - "description": "The activity records to upload." - } - }, - "type": "object", - "required": [ - "records" - ], - "title": "ActivityRecordInput" - }, - "ActivityRecordOutput": { - "properties": { - "job": { - "allOf": [ - { - "$ref": "#/components/schemas/SyncTaskOutput" - } - ], - "title": "Job", - "description": "State of the job to post-process the records." - } - }, - "type": "object", - "required": [ - "job" - ], - "title": "ActivityRecordOutput" - }, - "AddAppToAppStoreInput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app to add to the app store." - } - }, - "type": "object", - "required": [ - "app_id" - ], - "title": "AddAppToAppStoreInput" + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { "application/json": { "schema": {} } } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/orders": { + "post": { + "tags": ["Vendor Management"], + "summary": "Upload Order", + "description": "Upload a newly discovered document (e.g. Order Form, Quote) to Lumos", + "operationId": "createOrder", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/OrderInput" } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { "application/json": { "schema": {} } } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/art": { + "get": { + "tags": ["Meta"], + "summary": "Get Art", + "description": "Return Lumos ASCII art. Can be used to verify the API is working.", + "operationId": "Lumos Art.", + "responses": { + "200": { + "description": "Successful Response", + "content": { "text/plain": { "schema": { "type": "string" } } } + } + } + } + }, + "/info": { + "get": { + "tags": ["Meta"], + "summary": "Get Info", + "description": "Returns current git revision.", + "operationId": "Lumos liveness check", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Lumos Liveness Check" + } + } + } + } + } + } + }, + "/webhooks/airbase/purchase_request_approved/{domain_app_uuid}": { + "post": { + "tags": ["Integration Webhooks"], + "summary": "Process Airbase Purchase Request Approved", + "description": "Webhook for Airbase to send events as a workflow transitions through milestones", + "operationId": "processAirbaseMilestoneEvent", + "parameters": [ + { + "name": "domain_app_uuid", + "in": "path", + "required": true, + "schema": { "type": "string", "title": "Domain App Uuid" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AirbasePurchaseRequestEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { "application/json": { "schema": {} } } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AccessRequest": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the access request." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app the request is for." + }, + "app_name": { + "type": "string", + "title": "App Name", + "description": "The name of the app the request is for." + }, + "requester_user": { + "allOf": [{ "$ref": "#/components/schemas/User" }], + "description": "The user who requested access. It's possible for one user to request access on another's behalf." + }, + "target_user": { + "allOf": [{ "$ref": "#/components/schemas/User" }], + "description": "The user the request is for." + }, + "supporter_user": { + "anyOf": [ + { "$ref": "#/components/schemas/User" }, + { "type": "null" } + ] + }, + "status": { + "allOf": [{ "$ref": "#/components/schemas/SupportRequestStatus" }], + "description": "The current status of the request." + }, + "notes": { + "additionalProperties": { + "anyOf": [{ "type": "string" }, { "type": "null" }] + }, + "type": "object", + "title": "Notes", + "description": "The reason the user wrote for putting the access request into the given state.", + "default": {} + }, + "expires_at": { + "anyOf": [ + { "type": "string", "format": "date-time" }, + { "type": "null" } + ], + "title": "Expires At" + }, + "requestable_permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Requestable Permissions" + }, + "requested_at": { + "anyOf": [ + { "type": "string", "format": "date-time" }, + { "type": "null" } + ], + "title": "Requested At" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "app_name", + "requester_user", + "target_user", + "status" + ], + "title": "AccessRequest", + "description": "API version of DomainAppSupportRequest." + }, + "Account": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app that owns this account." + }, + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "The stable identifier of this account from the associated service." + }, + "account_type": { + "allOf": [{ "$ref": "#/components/schemas/AccountType" }], + "description": "The type of this account, one of 'USER', 'ROLE' (e.g. AWS), 'SERVICE' (e.g. GCP)." + }, + "email": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Email", + "description": "The email of this account." + }, + "user_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "User Id", + "description": "The ID of the user associated with this account." + } + }, + "type": "object", + "required": ["app_id", "unique_identifier", "account_type"], + "title": "Account" + }, + "AccountInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique identifier for this account, such as an account ID or email." + }, + "email": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Email", + "description": "The email of this account." + }, + "first_name": { + "type": "string", + "title": "First Name", + "description": "The first name of the user." + }, + "last_name": { + "type": "string", + "title": "Last Name", + "description": "The last name of the user." + }, + "last_activity": { + "type": "string", + "title": "Last Activity", + "description": "The datetime of last activity of the user." + }, + "last_login": { + "type": "string", + "title": "Last Login", + "description": "The datetime of last login of the user." + }, + "status": { + "allOf": [ + { "$ref": "#/components/schemas/AccountLifecycleStatus" } + ], + "description": "The status of the account." + }, + "permissions": { + "items": { "$ref": "#/components/schemas/PermissionInput" }, + "type": "array", + "title": "Permissions", + "description": "The permissions of the account.", + "default": [] + }, + "attributes": { + "items": { "$ref": "#/components/schemas/AttributeInput" }, + "type": "array", + "title": "Attributes", + "description": "The attributes of the account.", + "default": [] + } + }, + "type": "object", + "required": ["unique_identifier"], + "title": "AccountInput" + }, + "AccountLifecycleStatus": { + "type": "string", + "enum": [ + "DISCOVERED", + "STAGED", + "ACCESS_CREATED", + "ACTIVE", + "ARCHIVED", + "SUSPENDED", + "DEPROVISIONED", + "MANUALLY_REMOVED", + "ACCESS_REMOVED", + "NON_CORPORATE_ACCOUNT", + "WAITING_MANUAL_REMOVAL" + ], + "title": "AccountLifecycleStatus", + "description": "NOTE: If you update this, also update UserDomainAppLifecycleStatus\n\nDISCOVERED - Account discovered through accountfinding. Could be noisy.\n\nSTAGED - An account that has been queued for provisioning, but is not\n provisioned yet. Relevant for Apps where provisioning is async\n (eg. Okta, OneLogin).\n\nACCESS_CREATED - When an account has been provisioned but not accessed.\n\nACTIVE - A live, active, accessible account.\n\nSUSPENDED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nDEPROVISIONED - The user can no longer access the account, the license was removed,\n and the account cannot be recovered.\n\nARCHIVED - The user can no longer access the account, the license may or may not\n be removed. The account can be recovered.\n\nMANUALLY_REMOVED - The user can no longer access the account, the license is presumably\n removed, but all of this was done manually\n\nACCESS_REMOVED - The user can no longer access the account, but a license may still\n exist. This is the case when we remove access through Okta but not a\n direct integration\n\nNON_CORPORATE_ACCOUNT - The account doesn't exist, or is a personal employee account.\n\nWAITING_MANUAL_REMOVAL - Waiting manual removal, someone was requested to remove the user access\n from the App, and we are waiting for an answer about it." + }, + "AccountType": { + "type": "string", + "enum": ["USER", "ROLE", "SERVICE"], + "title": "AccountType" + }, + "AccountsUploadInput": { + "properties": { + "accounts": { + "items": { "$ref": "#/components/schemas/AccountInput" }, + "type": "array", + "title": "Accounts", + "description": "Accounts to upload.", + "default": [] + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app to upload accounts to." + } + }, + "type": "object", + "required": ["app_id"], + "title": "AccountsUploadInput" + }, + "ActivityLog": { + "properties": { + "event_hash": { "type": "string", "title": "Event Hash" }, + "event_type": { "type": "string", "title": "Event Type" }, + "event_type_user_friendly": { + "type": "string", + "title": "Event Type User Friendly" + }, + "outcome": { "type": "string", "title": "Outcome" }, + "targets": { + "items": { "type": "object" }, + "type": "array", + "title": "Targets" + }, + "actor": { "type": "object", "title": "Actor" }, + "event_began_at": { + "anyOf": [ + { "type": "string", "format": "date-time" }, + { "type": "null" } + ], + "title": "Event Began At" + }, + "event_metadata": { "type": "object", "title": "Event Metadata" } + }, + "type": "object", + "required": [ + "event_hash", + "event_type", + "event_type_user_friendly", + "outcome", + "targets", + "actor", + "event_metadata" + ], + "title": "ActivityLog", + "description": "API version of SIEMEvent" + }, + "ActivityRecord": { + "properties": { + "account": { + "allOf": [ + { "$ref": "#/components/schemas/ActivityRecordAccountInput" } + ], + "description": "Metadata that Lumos can use to match the activity record to a software account within Lumos." + }, + "event": { + "allOf": [ + { "$ref": "#/components/schemas/ActivityRecordEventInput" } + ], + "description": "Metadata about the event being uploaded." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp", + "description": "The timestamp of this event, in ISO 8601 format." + }, + "source_app_id": { + "type": "string", + "title": "Source App Id", + "description": "UUID of the application in Lumos where this activity record was sourced (e.g. the ID of Okta within Lumos found by going to Apps > Find your app in the list > Click '...' > Copy Stable Identifier)" + }, + "app": { + "anyOf": [ + { "$ref": "#/components/schemas/ActivityRecordAppInput" }, + { "type": "null" } + ], + "description": "Metadata that Lumos can use to match the activity record to an application within Lumos." + } + }, + "type": "object", + "required": ["account", "event", "timestamp", "source_app_id"], + "title": "ActivityRecord" + }, + "ActivityRecordAccountInput": { + "properties": { + "external_id": { + "type": "string", + "title": "External Id", + "description": "The external app's user ID for the account." + }, + "email": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Email", + "description": "The email associated with the account" + } + }, + "type": "object", + "title": "ActivityRecordAccountInput" + }, + "ActivityRecordAppInput": { + "properties": { + "instance_identifier": { + "type": "string", + "title": "Instance Identifier", + "description": "The ID of the app as it is identified in the source E.g. the ID that Okta uses to identify the app" + } + }, + "type": "object", + "required": ["instance_identifier"], + "title": "ActivityRecordAppInput" + }, + "ActivityRecordEventInput": { + "properties": { + "type": { + "allOf": [ + { "$ref": "#/components/schemas/ActivityRecordEventType" } + ], + "description": "The type of event being uploaded." + } + }, + "type": "object", + "required": ["type"], + "title": "ActivityRecordEventInput" + }, + "ActivityRecordEventType": { + "type": "string", + "enum": ["LOGIN", "ACTIVITY"], + "title": "ActivityRecordEventType" + }, + "ActivityRecordInput": { + "properties": { + "records": { + "items": { "$ref": "#/components/schemas/ActivityRecord" }, + "type": "array", + "title": "Records", + "description": "The activity records to upload." + } + }, + "type": "object", + "required": ["records"], + "title": "ActivityRecordInput" + }, + "ActivityRecordOutput": { + "properties": { + "job": { + "allOf": [{ "$ref": "#/components/schemas/SyncTaskOutput" }], + "description": "State of the job to post-process the records." + } + }, + "type": "object", + "required": ["job"], + "title": "ActivityRecordOutput" + }, + "AddAppToAppStoreInput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" + } + ], + "description": "Provisioning flow configuration to request access to app." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app to add to the app store." + } + }, + "type": "object", + "required": ["app_id"], + "title": "AddAppToAppStoreInput" + }, + "AirbasePurchaseRequestEvent": { + "properties": { + "id": { "type": "string", "title": "Id" }, + "object": { "type": "string", "title": "Object" }, + "type": { "type": "string", "title": "Type" }, + "created_date": { "type": "string", "title": "Created Date" }, + "data": { "type": "object", "title": "Data" } + }, + "type": "object", + "required": ["id", "object", "type", "created_date", "data"], + "title": "AirbasePurchaseRequestEvent", + "description": "Model of the input we'll get from Airbase's webhook call.\nAll events seem to follow this same base structure, it is just `data` that is different\nfor each. We are using `dict` here to be permissive to other webhook events (so we can warn if\nthe customer misconfigures for a different webhook), and we actually only use 2 fields from it." + }, + "AllowedGroupsConfigInput": { + "properties": { + "type": { + "allOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigType" } + ], + "description": "The type of this allowed groups config, can be all groups or specific.", + "default": "ALL_GROUPS" + }, + "groups": { + "items": { "$ref": "#/components/schemas/BaseGroup" }, + "type": "array", + "title": "Groups", + "description": "The groups allowed to request this permission." + } + }, + "type": "object", + "title": "AllowedGroupsConfigInput" + }, + "AllowedGroupsConfigOutput": { + "properties": { + "type": { + "allOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigType" } + ], + "description": "The type of this allowed groups config, can be all groups or specific.", + "default": "ALL_GROUPS" + }, + "groups": { + "items": { "$ref": "#/components/schemas/Group" }, + "type": "array", + "title": "Groups", + "description": "The groups allowed to request this permission.", + "default": [] + } + }, + "type": "object", + "title": "AllowedGroupsConfigOutput" + }, + "AllowedGroupsConfigType": { + "type": "string", + "enum": ["ALL_GROUPS", "SPECIFIED_GROUPS"], + "title": "AllowedGroupsConfigType" + }, + "App": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this app." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "instance_id": { + "type": "string", + "title": "Instance Id", + "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it\u2019s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." + }, + "user_friendly_label": { + "type": "string", + "title": "User Friendly Label", + "description": "The user-friendly label of this app." + }, + "status": { + "allOf": [{ "$ref": "#/components/schemas/DomainAppStatus" }], + "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" + }, + "sources": { + "items": { "$ref": "#/components/schemas/DiscoverySource" }, + "type": "array", + "title": "Sources", + "description": "The sources of this app." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." + }, + "logo_url": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Logo Url", + "description": "The URL of the logo of this app." + }, + "website_url": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Website Url", + "description": "The URL of the website of this app." + }, + "request_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Request Instructions", + "description": "The request instructions." + } + }, + "type": "object", + "required": [ + "id", + "app_class_id", + "instance_id", + "user_friendly_label", + "status", + "sources", + "allow_multiple_permission_selection" + ], + "title": "App" + }, + "AppAdminsInput": { + "properties": { + "groups": { + "items": { "$ref": "#/components/schemas/BaseGroup" }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as app admins." + }, + "users": { + "items": { "$ref": "#/components/schemas/BaseUser" }, + "type": "array", + "title": "Users", + "description": "Users assigned as app admins." + } + }, + "type": "object", + "title": "AppAdminsInput" + }, + "AppAdminsOutput": { + "properties": { + "groups": { + "items": { "$ref": "#/components/schemas/Group" }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as app admins.", + "default": [] + }, + "users": { + "items": { "$ref": "#/components/schemas/User" }, + "type": "array", + "title": "Users", + "description": "Users assigned as app admins.", + "default": [] + } + }, + "type": "object", + "title": "AppAdminsOutput" + }, + "AppApproversInput": { + "properties": { + "groups": { + "items": { "$ref": "#/components/schemas/BaseGroup" }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as support request approvers.", + "default": [] + }, + "users": { + "items": { "$ref": "#/components/schemas/BaseUser" }, + "type": "array", + "title": "Users", + "description": "Users assigned as support request approvers.", + "default": [] + } + }, + "type": "object", + "title": "AppApproversInput" + }, + "AppApproversOutput": { + "properties": { + "groups": { + "items": { "$ref": "#/components/schemas/Group" }, + "type": "array", + "title": "Groups", + "description": "Groups assigned as support request approvers.", + "default": [] + }, + "users": { + "items": { "$ref": "#/components/schemas/User" }, + "type": "array", + "title": "Users", + "description": "Users assigned as support request approvers.", + "default": [] + } + }, + "type": "object", + "title": "AppApproversOutput" + }, + "AppInputCreate": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the app you're creating." + }, + "category": { + "type": "string", + "title": "Category", + "description": "The category of the app you're creating. Possible values: 'Accounting & Finance', 'Marketing & Analytics', 'Content & Social Media', 'Sales & Support', 'Design & Creativity', 'IT & Security', 'Developers', 'HR & Learning', 'Office & Legal', 'Communication', 'Collaboration', 'Commerce & Marketplaces', 'Other', 'Internal'" + }, + "description": { + "type": "string", + "maxLength": 8192, + "title": "Description", + "description": "The description of the app you're creating." + }, + "logo_url": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Logo Url", + "description": "The URL of the logo of the app you're creating." + }, + "website_url": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Website Url", + "description": "The URL of the website of the app you're creating." + }, + "request_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Request Instructions", + "description": "The request instructions." + } + }, + "type": "object", + "required": ["name", "category", "description"], + "title": "AppInputCreate" + }, + "AppSettingInput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" + } + ], + "description": "Provisioning flow configuration to request access to app." + }, + "in_app_store": { + "type": "boolean", + "title": "In App Store", + "description": "Whether the app is in the app store.", + "default": false + } + }, + "type": "object", + "title": "AppSettingInput" + }, + "AppSettingOutput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" + } + ], + "description": "Provisioning flow configuration to request access to app." + }, + "in_app_store": { + "type": "boolean", + "title": "In App Store", + "description": "Whether the app is in the app store.", + "default": false + } + }, + "type": "object", + "title": "AppSettingOutput" + }, + "AppStoreApp": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this app." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "instance_id": { + "type": "string", + "title": "Instance Id", + "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it\u2019s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." + }, + "user_friendly_label": { + "type": "string", + "title": "User Friendly Label", + "description": "The user-friendly label of this app." + }, + "status": { + "allOf": [{ "$ref": "#/components/schemas/DomainAppStatus" }], + "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" + }, + "sources": { + "items": { "$ref": "#/components/schemas/DiscoverySource" }, + "type": "array", + "title": "Sources", + "description": "The sources of this app." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." + }, + "logo_url": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Logo Url", + "description": "The URL of the logo of this app." + }, + "website_url": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Website Url", + "description": "The URL of the website of this app." + }, + "request_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Request Instructions", + "description": "The request instructions." + } + }, + "type": "object", + "required": [ + "id", + "app_class_id", + "instance_id", + "user_friendly_label", + "status", + "sources", + "allow_multiple_permission_selection" + ], + "title": "AppStoreApp" + }, + "AppStoreAppSettingsInput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" + } + ], + "description": "Provisioning flow configuration to request access to app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsInput" + }, + "AppStoreAppSettingsOutput": { + "properties": { + "custom_request_instructions": { + "type": "string", + "title": "Custom Request Instructions", + "description": "AppStore App instructions that are shown to the requester." + }, + "request_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" + } + ], + "description": "Request flow configuration to request access to app." + }, + "provisioning": { + "allOf": [ + { + "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" + } + ], + "description": "Provisioning flow configuration to request access to app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsOutput" + }, + "AppStoreAppSettingsProvisioningInput": { + "properties": { + "groups_provisioning": { + "allOf": [ + { "$ref": "#/components/schemas/GroupProvisioningOption" } + ], + "description": "If enabled, Approvers must choose a group to provision the user to for access requests." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Whether the app is configured to allow users to request multiple permissions in a single request" + }, + "manual_steps_needed": { + "type": "boolean", + "title": "Manual Steps Needed", + "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." + }, + "custom_provisioning_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Custom Provisioning Instructions", + "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." + }, + "provisioning_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "The provisioning webhook optionally associated with this app." + }, + "access_removal_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "A deprovisioning webhook can be optionally associated with this app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsProvisioningInput" + }, + "AppStoreAppSettingsProvisioningOutput": { + "properties": { + "groups_provisioning": { + "allOf": [ + { "$ref": "#/components/schemas/GroupProvisioningOption" } + ], + "description": "If enabled, Approvers must choose a group to provision the user to for access requests." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "allow_multiple_permission_selection": { + "type": "boolean", + "title": "Allow Multiple Permission Selection", + "description": "Whether the app is configured to allow users to request multiple permissions in a single request" + }, + "manual_steps_needed": { + "type": "boolean", + "title": "Manual Steps Needed", + "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." + }, + "custom_provisioning_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Custom Provisioning Instructions", + "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." + }, + "provisioning_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/InlineWebhook" }, + { "type": "null" } + ], + "description": "The provisioning webhook optionally associated with this config." + }, + "access_removal_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/InlineWebhook" }, + { "type": "null" } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." + } + }, + "type": "object", + "title": "AppStoreAppSettingsProvisioningOutput" + }, + "AppStoreAppSettingsRequestFlowInput": { + "properties": { + "discoverability": { + "allOf": [{ "$ref": "#/components/schemas/AppStoreVisibility" }], + "description": "AppStore App visibility." + }, + "custom_approval_message": { + "type": "string", + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." + }, + "require_manager_approval": { + "type": "boolean", + "title": "Require Manager Approval", + "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "allowed_groups": { + "anyOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigInput" }, + { "type": "null" } + ], + "description": "The allowed groups associated with this config." + }, + "approvers": { + "allOf": [{ "$ref": "#/components/schemas/AppApproversInput" }], + "description": "AppStore App approvers assigned." + }, + "approvers_stage_2": { + "allOf": [{ "$ref": "#/components/schemas/AppApproversInput" }], + "description": "AppStore App stage 2 approvers assigned." + }, + "admins": { + "allOf": [{ "$ref": "#/components/schemas/AppAdminsInput" }], + "description": "AppStore App admins assigned." + }, + "request_validation_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "A request validation webhook can be optionally associated with this app." + } + }, + "type": "object", + "title": "AppStoreAppSettingsRequestFlowInput" + }, + "AppStoreAppSettingsRequestFlowOutput": { + "properties": { + "discoverability": { + "allOf": [{ "$ref": "#/components/schemas/AppStoreVisibility" }], + "description": "AppStore App visibility." + }, + "custom_approval_message": { + "type": "string", + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." + }, + "require_manager_approval": { + "type": "boolean", + "title": "Require Manager Approval", + "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "allowed_groups": { + "anyOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigOutput" }, + { "type": "null" } + ], + "description": "The allowed groups config associated with this config.", + "default": { "type": "ALL_GROUPS", "groups": [] } + }, + "approvers": { + "allOf": [{ "$ref": "#/components/schemas/AppApproversOutput" }], + "description": "AppStore App approvers assigned.", + "default": { "groups": [], "users": [] } + }, + "approvers_stage_2": { + "allOf": [{ "$ref": "#/components/schemas/AppApproversOutput" }], + "description": "AppStore App stage 2 approvers assigned.", + "default": { "groups": [], "users": [] } + }, + "admins": { + "allOf": [{ "$ref": "#/components/schemas/AppAdminsOutput" }], + "description": "AppStore App admins assigned.", + "default": [] + }, + "request_validation_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/InlineWebhook" }, + { "type": "null" } + ], + "description": "A request validation webhook can be optionally associated with this config." + } + }, + "type": "object", + "title": "AppStoreAppSettingsRequestFlowOutput" + }, + "AppStoreVisibility": { + "type": "string", + "enum": ["FULL", "LIMITED", "NONE"], + "title": "AppStoreVisibility" + }, + "AppStoreVisibilityOption": { + "type": "string", + "enum": ["HIDDEN", "VISIBLE"], + "title": "AppStoreVisibilityOption" + }, + "ApproverInput": { + "properties": { + "type": { + "allOf": [{ "$ref": "#/components/schemas/ApproverType" }], + "description": "The type of this approver." + }, + "user": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseUser" }, + { "type": "null" } + ], + "description": "Optionally, the approver can be a user." + }, + "group": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseGroup" }, + { "type": "null" } + ], + "description": "Optionally, the approver can be a group." + } + }, + "type": "object", + "title": "ApproverInput" + }, + "ApproverOutput": { + "properties": { + "type": { + "allOf": [{ "$ref": "#/components/schemas/ApproverType" }], + "description": "The type of this approver." + }, + "user": { + "anyOf": [ + { "$ref": "#/components/schemas/User" }, + { "type": "null" } + ], + "description": "Optionally, the approver can be a user." + }, + "group": { + "anyOf": [ + { "$ref": "#/components/schemas/Group" }, + { "type": "null" } + ], + "description": "Optionally, the approver can be a group." + } + }, + "type": "object", + "required": ["type"], + "title": "ApproverOutput" + }, + "ApproverType": { + "type": "string", + "enum": ["USER", "GROUP"], + "title": "ApproverType" + }, + "AttributeInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "The unique identifier of the custom attribute" + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of the attribute." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the attribute." + } + }, + "type": "object", + "title": "AttributeInput" + }, + "BaseGroup": { + "properties": { + "id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Id", + "description": "The ID of this group." + }, + "app_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Id", + "description": "The ID of the app that sources this group." + }, + "integration_specific_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Integration Specific Id", + "description": "The ID of this group, specific to the integration." + } + }, + "type": "object", + "title": "BaseGroup" + }, + "BaseInlineWebhook": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this inline webhook." + } + }, + "type": "object", + "required": ["id"], + "title": "BaseInlineWebhook" + }, + "BaseUser": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this user." + } + }, + "type": "object", + "required": ["id"], + "title": "BaseUser" + }, + "Cost": { + "properties": { + "currency": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Currency", + "description": "The currency in which this cost is stored" + }, + "value": { + "type": "number", + "title": "Value", + "description": "The quantity of the cost in terms of the specified currency" + } + }, + "type": "object", + "required": ["value"], + "title": "Cost" + }, + "CreateAccessRequestInput": { + "properties": { + "app_id": { "type": "string", "title": "App Id" }, + "target_user_id": { + "type": "string", + "title": "Target User Id", + "description": "User to request access for. If omitted, request for the current user." + }, + "note": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Note", + "description": "[Deprecated - use business_justification] Why the user needs access." + }, + "business_justification": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Business Justification", + "description": "Why the user needs access." + }, + "expiration_in_seconds": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Expiration In Seconds", + "description": "[Deprecated, use access_length] Once granted, how long the access should last. Omit for permanent access." + }, + "access_length": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Access Length", + "description": "Once granted, how long the access should last. Omit for permanent access. All possible values are '2 hours', '4 hours', '8 hours', '12 hours', '1 day', '2 days', '3 days', '7 days', '14 days', '30 days', '90 days', 'Unlimited', but the exact options depend on the settings of the app and permissions." + }, + "requestable_permission_ids": { + "anyOf": [ + { "items": { "type": "string" }, "type": "array" }, + { "type": "null" } + ], + "title": "Requestable Permission Ids", + "description": "The IDs of the requestable permissions the user is requesting access to. Omit this to just request access to the app." + } + }, + "type": "object", + "required": ["app_id"], + "title": "CreateAccessRequestInput" + }, + "DiscoverySource": { + "type": "string", + "enum": [ + "GSUITE_QUICK_INBOX", + "GSUITE_DEEP_INBOX", + "MICROSOFT_DEEP_INBOX", + "MICROSOFT_OAUTH", + "MICROSOFT_GCC", + "GSUITE_OAUTH", + "OKTA", + "MANUAL", + "ONELOGIN", + "ATLASSIAN", + "GOOGLE_CLOUD", + "LUMOS_INTEGRATION", + "JUMPCLOUD" + ], + "title": "DiscoverySource" + }, + "DomainAppStatus": { + "type": "string", + "enum": [ + "DISCOVERED", + "NEEDS_REVIEW", + "APPROVED", + "BLOCKLISTED", + "DEPRECATED" + ], + "title": "DomainAppStatus" + }, + "FileUpload": { + "properties": { + "type": { + "allOf": [{ "$ref": "#/components/schemas/FileUploadType" }], + "description": "The type of content being uploaded. The only supported type today is 'url'" + }, + "value": { + "type": "string", + "title": "Value", + "description": "The data to upload. This should be a publicly accessible URL that resolves to a file" + } + }, + "type": "object", + "required": ["type", "value"], + "title": "FileUpload" + }, + "FileUploadType": { + "type": "string", + "enum": ["url"], + "const": "url", + "title": "FileUploadType" + }, + "FlowState": { + "type": "string", + "enum": ["SUCCESS", "FAILURE", "RUNNING", "NOT_STARTED"], + "title": "FlowState" + }, + "FoundDocumentsUpload": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A value that can be used to uniquely identify this contract (e.g. PO number, file name, etc)" + }, + "files": { + "items": { "$ref": "#/components/schemas/FileUpload" }, + "type": "array", + "title": "Files", + "description": "A list of URLs that resolve to files that should be attached to the Found Document" + }, + "vendor_name": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Vendor Name", + "description": "The name of the vendor that this document is for" + }, + "start_date": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Start Date", + "description": "The start of the vendor agreement" + }, + "end_date": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "End Date", + "description": "The end of the vendor agreement" + }, + "source_app_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Source App Id", + "description": "By passing the ID of an application within Lumos, it will appear as if this Found Document was sourced from that app" + }, + "total_cost": { + "anyOf": [ + { "$ref": "#/components/schemas/Cost" }, + { "type": "null" } + ], + "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years" + }, + "line_items": { + "anyOf": [ + { + "items": { "$ref": "#/components/schemas/LineItemUpload" }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Line Items", + "description": "The line items on the contract" + } + }, + "type": "object", + "required": ["unique_identifier", "files"], + "title": "FoundDocumentsUpload" + }, + "Group": { + "properties": { + "id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Id", + "description": "The ID of this group." + }, + "app_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Id", + "description": "The ID of the app that sources this group." + }, + "integration_specific_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Integration Specific Id", + "description": "The ID of this group, specific to the integration." + }, + "name": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Name", + "description": "The name of this group." + }, + "description": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Description", + "description": "The description of this group." + }, + "group_lifecycle": { + "anyOf": [ + { "$ref": "#/components/schemas/Lifecycle" }, + { "type": "null" } + ], + "description": "The lifecycle of this group.", + "default": "SYNCED" + }, + "source_app_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Source App Id", + "description": "The ID of the app that sources this group." + } + }, + "type": "object", + "title": "Group" + }, + "GroupProvisioningOption": { + "type": "string", + "enum": ["DIRECT_TO_USER", "GROUPS_AND_HIDDEN", "GROUPS_AND_VISIBLE"], + "title": "GroupProvisioningOption" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { "$ref": "#/components/schemas/ValidationError" }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "InlineWebhook": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this inline webhook." + }, + "hook_type": { + "allOf": [{ "$ref": "#/components/schemas/InlineWebhookType" }], + "description": "The type of this inline webhook." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of this inline webhook." + }, + "description": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Description", + "description": "The description of this inline webhook." + } + }, + "type": "object", + "required": ["id", "hook_type", "name"], + "title": "InlineWebhook" + }, + "InlineWebhookType": { + "type": "string", + "enum": [ + "PRE_APPROVAL", + "PROVISION", + "DEPROVISION", + "REQUEST_VALIDATION", + "SIEM" + ], + "title": "InlineWebhookType" + }, + "JobStateOutput": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "The ID of the job." + }, + "state": { + "allOf": [{ "$ref": "#/components/schemas/FlowState" }], + "description": "The state of the job." + } + }, + "type": "object", + "required": ["job_id"], + "title": "JobStateOutput" + }, + "Lifecycle": { + "type": "string", + "enum": ["SYNCED", "NATIVE"], + "title": "Lifecycle" + }, + "LimitOffsetPage_ActivityLog_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/ActivityLog" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "limit": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Limit" + }, + "offset": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Offset" + }, + "links": { "$ref": "#/components/schemas/Links" } + }, + "type": "object", + "required": ["items", "total", "limit", "offset", "links"], + "title": "LimitOffsetPage[ActivityLog]" + }, + "LineItem": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the line item as stored in Lumos" + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of purchase that this line item refers to" + }, + "quantity": { + "type": "integer", + "title": "Quantity", + "description": "The number of units purchased for this line item" + }, + "unit_cost": { + "allOf": [{ "$ref": "#/components/schemas/LineItemUnitCost" }], + "description": "The unit cost of this line item" + }, + "start_date": { + "anyOf": [ + { "type": "string", "format": "date" }, + { "type": "null" } + ], + "title": "Start Date", + "description": "The start of the line item" + }, + "end_date": { + "anyOf": [ + { "type": "string", "format": "date" }, + { "type": "null" } + ], + "title": "End Date", + "description": "The end of the line item. Null for monthly line items." + } + }, + "type": "object", + "required": [ + "name", + "type", + "quantity", + "unit_cost", + "start_date", + "end_date" + ], + "title": "LineItem" + }, + "LineItemInput": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the line item as stored in Lumos" + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of purchase that this line item refers to" }, - "AirbasePurchaseRequestEvent": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "object": { - "type": "string", - "title": "Object" - }, - "type": { - "type": "string", - "title": "Type" - }, - "created_date": { - "type": "string", - "title": "Created Date" - }, - "data": { - "type": "object", - "title": "Data" - } - }, - "type": "object", - "required": [ - "id", - "object", - "type", - "created_date", - "data" - ], - "title": "AirbasePurchaseRequestEvent", - "description": "Model of the input we'll get from Airbase's webhook call.\nAll events seem to follow this same base structure, it is just `data` that is different\nfor each. We are using `dict` here to be permissive to other webhook events (so we can warn if\nthe customer misconfigures for a different webhook), and we actually only use 2 fields from it." - }, - "AllowedGroupsConfigInput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigType" - } - ], - "description": "The type of this allowed groups config, can be all groups or specific.", - "default": "ALL_GROUPS" - }, - "groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Groups", - "description": "The groups allowed to request this permission." - } - }, - "type": "object", - "title": "AllowedGroupsConfigInput" - }, - "AllowedGroupsConfigOutput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigType" - } - ], - "description": "The type of this allowed groups config, can be all groups or specific.", - "default": "ALL_GROUPS" - }, - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Groups", - "description": "The groups allowed to request this permission.", - "default": [] - } - }, - "type": "object", - "title": "AllowedGroupsConfigOutput" + "quantity": { + "type": "integer", + "title": "Quantity", + "description": "The number of units purchased for this line item" }, - "AllowedGroupsConfigType": { - "type": "string", - "enum": [ - "ALL_GROUPS", - "SPECIFIED_GROUPS" - ], - "title": "AllowedGroupsConfigType", - "description": "An enumeration." - }, - "App": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this app." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "instance_id": { - "type": "string", - "title": "Instance Id", - "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it\u2019s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." - }, - "user_friendly_label": { - "type": "string", - "title": "User Friendly Label", - "description": "The user-friendly label of this app." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/DomainAppStatus" - } - ], - "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" - }, - "sources": { - "items": { - "$ref": "#/components/schemas/DiscoverySource" - }, - "type": "array", - "description": "The sources of this app." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." - }, - "logo_url": { - "type": "string", - "title": "Logo Url", - "description": "The URL of the logo of this app." - }, - "website_url": { - "type": "string", - "title": "Website Url", - "description": "The URL of the website of this app." - }, - "request_instructions": { - "type": "string", - "title": "Request Instructions", - "description": "The request instructions." - } - }, - "type": "object", - "required": [ - "id", - "app_class_id", - "instance_id", - "user_friendly_label", - "status", - "sources", - "allow_multiple_permission_selection" - ], - "title": "App" + "unit_cost": { + "allOf": [{ "$ref": "#/components/schemas/LineItemUnitCostInput" }], + "description": "The per-unit cost of the line item" + } + }, + "type": "object", + "required": ["name", "type", "quantity", "unit_cost"], + "title": "LineItemInput" + }, + "LineItemUnitCost": { + "properties": { + "per_month": { + "allOf": [{ "$ref": "#/components/schemas/Cost" }], + "description": "The per unit cost associated with this line item, amortized to the cost per month" + } + }, + "type": "object", + "required": ["per_month"], + "title": "LineItemUnitCost" + }, + "LineItemUnitCostInput": { + "properties": { + "period": { + "type": "string", + "title": "Period", + "description": "The period which this cost covers. Available options are per_month or per_year" }, - "AppAdminsInput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as app admins." - }, - "users": { - "items": { - "$ref": "#/components/schemas/BaseUser" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as app admins." - } - }, - "type": "object", - "title": "AppAdminsInput" - }, - "AppAdminsOutput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as app admins.", - "default": [] - }, - "users": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as app admins.", - "default": [] - } - }, - "type": "object", - "title": "AppAdminsOutput" - }, - "AppApproversInput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as support request approvers.", - "default": [] - }, - "users": { - "items": { - "$ref": "#/components/schemas/BaseUser" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as support request approvers.", - "default": [] - } - }, - "type": "object", - "title": "AppApproversInput" - }, - "AppApproversOutput": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Groups", - "description": "Groups assigned as support request approvers.", - "default": [] - }, - "users": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Users", - "description": "Users assigned as support request approvers.", - "default": [] - } - }, - "type": "object", - "title": "AppApproversOutput" - }, - "AppInputCreate": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the app you're creating." - }, - "category": { - "type": "string", - "title": "Category", - "description": "The category of the app you're creating. Possible values: 'Accounting & Finance', 'Marketing & Analytics', 'Content & Social Media', 'Sales & Support', 'Design & Creativity', 'IT & Security', 'Developers', 'HR & Learning', 'Office & Legal', 'Communication', 'Collaboration', 'Commerce & Marketplaces', 'Other', 'Internal'" - }, - "description": { - "type": "string", - "maxLength": 8192, - "title": "Description", - "description": "The description of the app you're creating." - }, - "logo_url": { - "type": "string", - "title": "Logo Url", - "description": "The URL of the logo of the app you're creating." - }, - "website_url": { - "type": "string", - "title": "Website Url", - "description": "The URL of the website of the app you're creating." - }, - "request_instructions": { - "type": "string", - "title": "Request Instructions", - "description": "The request instructions." - } - }, - "type": "object", - "required": [ - "name", - "category", - "description" - ], - "title": "AppInputCreate" - }, - "AppSettingInput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - }, - "in_app_store": { - "type": "boolean", - "title": "In App Store", - "description": "Whether the app is in the app store.", - "default": false - } - }, - "type": "object", - "title": "AppSettingInput" - }, - "AppSettingOutput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - }, - "in_app_store": { - "type": "boolean", - "title": "In App Store", - "description": "Whether the app is in the app store.", - "default": false - } - }, - "type": "object", - "title": "AppSettingOutput" - }, - "AppStoreApp": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this app." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "instance_id": { - "type": "string", - "title": "Instance Id", - "description": "The non-unique ID of the instance associated with this app. This will be the Okta app id if it\u2019s an Okta app, or will be marked as custom_app_import if manually uploaded into Lumos." - }, - "user_friendly_label": { - "type": "string", - "title": "User Friendly Label", - "description": "The user-friendly label of this app." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/DomainAppStatus" - } - ], - "description": "The status of this app. Possible values: 'DISCOVERED', 'NEEDS_REVIEW', 'APPROVED', 'BLOCKLISTED', 'DEPRECATED'" - }, - "sources": { - "items": { - "$ref": "#/components/schemas/DiscoverySource" - }, - "type": "array", - "description": "The sources of this app." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Determines whether users can request multiple permissions at once.This field will be removed in subsequent API versions." - }, - "logo_url": { - "type": "string", - "title": "Logo Url", - "description": "The URL of the logo of this app." - }, - "website_url": { - "type": "string", - "title": "Website Url", - "description": "The URL of the website of this app." - }, - "request_instructions": { - "type": "string", - "title": "Request Instructions", - "description": "The request instructions." - } - }, - "type": "object", - "required": [ - "id", - "app_class_id", - "instance_id", - "user_friendly_label", - "status", - "sources", - "allow_multiple_permission_selection" - ], - "title": "AppStoreApp" - }, - "AppStoreAppSettingsInput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowInput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningInput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsInput" - }, - "AppStoreAppSettingsOutput": { - "properties": { - "custom_request_instructions": { - "type": "string", - "title": "Custom Request Instructions", - "description": "AppStore App instructions that are shown to the requester." - }, - "request_flow": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsRequestFlowOutput" - } - ], - "title": "Request Flow", - "description": "Request flow configuration to request access to app." - }, - "provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreAppSettingsProvisioningOutput" - } - ], - "title": "Provisioning", - "description": "Provisioning flow configuration to request access to app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsOutput" - }, - "AppStoreAppSettingsProvisioningInput": { - "properties": { - "groups_provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/GroupProvisioningOption" - } - ], - "description": "If enabled, Approvers must choose a group to provision the user to for access requests." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Whether the app is configured to allow users to request multiple permissions in a single request" - }, - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." - }, - "custom_provisioning_instructions": { - "type": "string", - "title": "Custom Provisioning Instructions", - "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this app." - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsProvisioningInput" - }, - "AppStoreAppSettingsProvisioningOutput": { - "properties": { - "groups_provisioning": { - "allOf": [ - { - "$ref": "#/components/schemas/GroupProvisioningOption" - } - ], - "description": "If enabled, Approvers must choose a group to provision the user to for access requests." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "allow_multiple_permission_selection": { - "type": "boolean", - "title": "Allow Multiple Permission Selection", - "description": "Whether the app is configured to allow users to request multiple permissions in a single request" - }, - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "If enabled, Lumos will notify the App Admin after initial access is granted to perform additional manual steps. Note that if this option is enabled, this action must be confirmed by the App Admin in order to resolve the request." - }, - "custom_provisioning_instructions": { - "type": "string", - "title": "Custom Provisioning Instructions", - "description": "Only Available if manual steps is active. During the provisioning step, Lumos will send a custom message to app admins explaining how to provision a user to the app. Markdown for links and text formatting is supported." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - } - }, - "type": "object", - "title": "AppStoreAppSettingsProvisioningOutput" - }, - "AppStoreAppSettingsRequestFlowInput": { - "properties": { - "discoverability": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibility" - } - ], - "description": "AppStore App visibility." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." - }, - "require_manager_approval": { - "type": "boolean", - "title": "Require Manager Approval", - "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigInput" - } - ], - "title": "Allowed Groups", - "description": "The allowed groups associated with this config." - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned." - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned." - }, - "admins": { - "allOf": [ - { - "$ref": "#/components/schemas/AppAdminsInput" - } - ], - "title": "Admins", - "description": "AppStore App admins assigned." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this app." - } - }, - "type": "object", - "title": "AppStoreAppSettingsRequestFlowInput" - }, - "AppStoreAppSettingsRequestFlowOutput": { - "properties": { - "discoverability": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibility" - } - ], - "description": "AppStore App visibility." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Markdown for links and text formatting is supported." - }, - "require_manager_approval": { - "type": "boolean", - "title": "Require Manager Approval", - "description": "When a user makes an access request, require that their manager approves the request before moving on to additional approvals." - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigOutput" - } - ], - "title": "Allowed Groups", - "description": "The allowed groups config associated with this config.", - "default": { - "type": "ALL_GROUPS", - "groups": [] - } - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned.", - "default": { - "groups": [], - "users": [] - } - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned.", - "default": { - "groups": [], - "users": [] - } - }, - "admins": { - "allOf": [ - { - "$ref": "#/components/schemas/AppAdminsOutput" - } - ], - "title": "Admins", - "description": "AppStore App admins assigned.", - "default": [] - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - } - }, - "type": "object", - "title": "AppStoreAppSettingsRequestFlowOutput" - }, - "AppStoreVisibility": { - "enum": [ - "FULL", - "LIMITED", - "NONE" - ], - "title": "AppStoreVisibility", - "description": "An enumeration." + "value": { + "anyOf": [{ "type": "number" }, { "type": "string" }], + "title": "Value", + "description": "The cost in terms of the specified currency (4 decimal places supported)" + } + }, + "type": "object", + "required": ["period", "value"], + "title": "LineItemUnitCostInput" + }, + "LineItemUpload": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the line item as stored in Lumos" + }, + "quantity": { + "type": "integer", + "title": "Quantity", + "description": "The number of units purchased for this line item" + }, + "unit_cost": { + "allOf": [{ "$ref": "#/components/schemas/Cost" }], + "description": "The unit cost of this line item" + } + }, + "type": "object", + "required": ["name", "quantity", "unit_cost"], + "title": "LineItemUpload" + }, + "Links": { + "properties": { + "first": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "First", + "examples": ["/api/v1/users?limit=1&offset1"] + }, + "last": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Last", + "examples": ["/api/v1/users?limit=1&offset1"] + }, + "self": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Self", + "examples": ["/api/v1/users?limit=1&offset1"] + }, + "next": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Next", + "examples": ["/api/v1/users?limit=1&offset1"] + }, + "prev": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Prev", + "examples": ["/api/v1/users?limit=1&offset1"] + } + }, + "type": "object", + "required": ["first", "last", "self", "next", "prev"], + "title": "Links" + }, + "ManagerApprovalOption": { + "type": "string", + "enum": ["NONE", "INITIAL_APPROVAL"], + "title": "ManagerApprovalOption" + }, + "OrderInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "A unique ID for the contract being uploaded. This can be an ID from an external system like Ironclad, an internal ID such as a PO number, or simply the name of the vendor + date of the contract." + }, + "vendor": { + "allOf": [{ "$ref": "#/components/schemas/Vendor" }], + "description": "Information about the vendor associated with this contract. Currently, we will only support a name field." + }, + "start_date": { + "type": "string", + "format": "date", + "title": "Start Date", + "description": "The start date of the attached contract" + }, + "end_date": { + "type": "string", + "format": "date", + "title": "End Date", + "description": "The end date of the attached contract" + }, + "opt_out_date": { + "anyOf": [ + { "type": "string", "format": "date" }, + { "type": "null" } + ], + "title": "Opt Out Date", + "description": "The date by which a vendor must be notified before terminating the order" + }, + "auto_renewal": { + "type": "boolean", + "title": "Auto Renewal", + "description": "Whether or not the contract auto-renews" + }, + "currency": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Currency", + "description": "The currency in which the contract is being paid in ISO 4217 format" + }, + "line_items": { + "items": { "$ref": "#/components/schemas/LineItemInput" }, + "type": "array", + "title": "Line Items", + "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." + }, + "custom_attributes": { + "additionalProperties": { + "$ref": "#/components/schemas/VendorAgreementCustomAttribute-Input" + }, + "type": "object", + "title": "Custom Attributes", + "description": "Any additional attributes that you would like to save on the Order. The set of available options must be configured in advance in Lumos." + }, + "source_app_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Source App Id", + "description": "UUID of the application in Lumos where this order was sourced (e.g. the ID of Ironclad within Lumos)" + } + }, + "type": "object", + "required": [ + "unique_identifier", + "vendor", + "start_date", + "end_date", + "auto_renewal", + "line_items" + ], + "title": "OrderInput" + }, + "Page_AccessRequest_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/AccessRequest" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[AccessRequest]" + }, + "Page_Account_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/Account" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[Account]" + }, + "Page_AppStoreApp_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/AppStoreApp" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[AppStoreApp]" + }, + "Page_App_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/App" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[App]" + }, + "Page_Group_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/Group" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[Group]" + }, + "Page_PreApprovalRuleOutput_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/PreApprovalRuleOutput" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[PreApprovalRuleOutput]" + }, + "Page_RequestablePermissionOutput_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionOutput" + }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[RequestablePermissionOutput]" + }, + "Page_User_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/User" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[User]" + }, + "Page_VendorAgreement_": { + "properties": { + "items": { + "items": { "$ref": "#/components/schemas/VendorAgreement" }, + "type": "array", + "title": "Items" + }, + "total": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Page" + }, + "size": { + "anyOf": [ + { "type": "integer", "minimum": 1.0 }, + { "type": "null" } + ], + "title": "Size" + }, + "pages": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size"], + "title": "Page[VendorAgreement]" + }, + "PermissionInput": { + "properties": { + "unique_identifier": { + "type": "string", + "title": "Unique Identifier", + "description": "The unique identifier of the permission." + }, + "type": { + "type": "string", + "title": "Type", + "description": "The type of the permission." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the permission." + } + }, + "type": "object", + "title": "PermissionInput" + }, + "PermissionType": { + "type": "string", + "enum": ["SYNCED", "NATIVE"], + "title": "PermissionType" + }, + "PreApprovalRuleInput": { + "properties": { + "justification": { + "type": "string", + "title": "Justification", + "description": "The justification of this preapproval rule." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "Preapproval rule time access length," + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this pre-approval rule." + }, + "preapproved_groups": { + "items": { "$ref": "#/components/schemas/BaseGroup" }, + "type": "array", + "title": "Preapproved Groups", + "description": "The preapproved groups of this preapproval rule.", + "default": [] + }, + "preapproved_permissions": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionBase" + }, + "type": "array", + "title": "Preapproved Permissions", + "description": "The preapproved permissions of this preapproval rule.", + "default": [] + }, + "preapproval_webhooks": { + "items": { "$ref": "#/components/schemas/BaseInlineWebhook" }, + "type": "array", + "title": "Preapproval Webhooks", + "description": "The preapproval webhooks of this preapproval rule.", + "default": [] + } + }, + "type": "object", + "required": ["justification", "app_id"], + "title": "PreApprovalRuleInput" + }, + "PreApprovalRuleOutput": { + "properties": { + "justification": { + "type": "string", + "title": "Justification", + "description": "The justification of this preapproval rule." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "Preapproval rule time access length," + }, + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this preapproval rule." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this pre-approval rule." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The ID of the service associated with this pre-approval rule." + }, + "app_instance_id": { + "type": "string", + "title": "App Instance Id", + "description": "Optionally, an app has an identifer associated with it's particular instance." + }, + "preapproved_groups": { + "items": { "$ref": "#/components/schemas/Group" }, + "type": "array", + "title": "Preapproved Groups", + "description": "The preapproved groups of this preapproval rule.", + "default": [] + }, + "preapproved_permissions": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionBaseOutput" + }, + "type": "array", + "title": "Preapproved Permissions", + "description": "The preapproved permissions of this preapproval rule.", + "default": [] + }, + "preapproval_webhooks": { + "items": { "$ref": "#/components/schemas/InlineWebhook" }, + "type": "array", + "title": "Preapproval Webhooks", + "description": "The preapproval webhooks of this preapproval rule.", + "default": [] + } + }, + "type": "object", + "required": [ + "justification", + "app_id", + "app_class_id", + "app_instance_id" + ], + "title": "PreApprovalRuleOutput" + }, + "PreApprovalRuleUpdateInput": { + "properties": { + "justification": { + "type": "string", + "title": "Justification", + "description": "The justification of this preapproval rule." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "Preapproval rule time access length," + }, + "preapproved_groups": { + "items": { "$ref": "#/components/schemas/BaseGroup" }, + "type": "array", + "title": "Preapproved Groups", + "description": "The preapproved groups of this preapproval rule.", + "default": [] + }, + "preapproved_permissions": { + "items": { + "$ref": "#/components/schemas/RequestablePermissionBase" + }, + "type": "array", + "title": "Preapproved Permissions", + "description": "The preapproved permissions of this preapproval rule.", + "default": [] + }, + "preapproval_webhooks": { + "items": { "$ref": "#/components/schemas/BaseInlineWebhook" }, + "type": "array", + "title": "Preapproval Webhooks", + "description": "The preapproval webhooks of this preapproval rule.", + "default": [] + } + }, + "type": "object", + "required": ["justification"], + "title": "PreApprovalRuleUpdateInput" + }, + "RequestApprovalConfigInput": { + "properties": { + "request_approval_config_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Request Approval Config Override", + "description": "Indicates if approval flow is overridden." + }, + "manager_approval": { + "anyOf": [ + { "$ref": "#/components/schemas/ManagerApprovalOption" }, + { "type": "null" } + ], + "description": "Manager approval can be configured as necessary to continue", + "default": "NONE" + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "custom_approval_message": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." + }, + "custom_approval_message_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Custom Approval Message Override", + "description": "Indicates if custom_approval_message is overridden." + }, + "approvers": { + "allOf": [{ "$ref": "#/components/schemas/AppApproversInput" }], + "description": "AppStore App approvers assigned." + }, + "approvers_stage_2": { + "allOf": [{ "$ref": "#/components/schemas/AppApproversInput" }], + "description": "AppStore App stage 2 approvers assigned." + }, + "request_approval_stages": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestApprovalStageInput" + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Request Approval Stages", + "description": "The stages of this request approval." + } + }, + "type": "object", + "title": "RequestApprovalConfigInput" + }, + "RequestApprovalConfigOutput": { + "properties": { + "request_approval_config_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Request Approval Config Override", + "description": "Indicates if approval flow is overridden." + }, + "manager_approval": { + "anyOf": [ + { "$ref": "#/components/schemas/ManagerApprovalOption" }, + { "type": "null" } + ], + "description": "Manager approval can be configured as necessary to continue", + "default": "NONE" + }, + "require_additional_approval": { + "type": "boolean", + "title": "Require Additional Approval", + "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." + }, + "custom_approval_message": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Custom Approval Message", + "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." + }, + "custom_approval_message_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Custom Approval Message Override", + "description": "Indicates if custom_approval_message is overridden." + }, + "approvers": { + "anyOf": [ + { "$ref": "#/components/schemas/AppApproversOutput" }, + { "type": "null" } + ], + "description": "AppStore App approvers assigned." + }, + "approvers_stage_2": { + "anyOf": [ + { "$ref": "#/components/schemas/AppApproversOutput" }, + { "type": "null" } + ], + "description": "AppStore App stage 2 approvers assigned." + }, + "request_approval_stages": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestApprovalStageOutput" + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Request Approval Stages", + "description": "The stages of this request approval.", + "default": [{}] + } + }, + "type": "object", + "title": "RequestApprovalConfigOutput" + }, + "RequestApprovalStageInput": { + "properties": { + "approvers": { + "anyOf": [ + { + "items": { "$ref": "#/components/schemas/ApproverInput" }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Approvers", + "description": "The approvers of this stage." + } + }, + "type": "object", + "title": "RequestApprovalStageInput" + }, + "RequestApprovalStageOutput": { + "properties": { + "approvers": { + "anyOf": [ + { + "items": { "$ref": "#/components/schemas/ApproverOutput" }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Approvers", + "description": "The approvers of this stage." + } + }, + "type": "object", + "title": "RequestApprovalStageOutput" + }, + "RequestConfigInputCreate": { + "properties": { + "appstore_visibility": { + "anyOf": [ + { "$ref": "#/components/schemas/AppStoreVisibilityOption" }, + { "type": "null" } + ], + "description": "The appstore visibility of this request config.", + "default": "HIDDEN" }, - "AppStoreVisibilityOption": { - "type": "string", - "enum": [ - "HIDDEN", - "VISIBLE" - ], - "title": "AppStoreVisibilityOption", - "description": "An enumeration." - }, - "ApproverInput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ApproverType" - } - ], - "description": "The type of this approver." - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseUser" - } - ], - "title": "User", - "description": "Optionally, the approver can be a user." - }, - "group": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseGroup" - } - ], - "title": "Group", - "description": "Optionally, the approver can be a group." - } - }, - "type": "object", - "title": "ApproverInput" - }, - "ApproverOutput": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ApproverType" - } - ], - "description": "The type of this approver." - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - } - ], - "title": "User", - "description": "Optionally, the approver can be a user." - }, - "group": { - "allOf": [ - { - "$ref": "#/components/schemas/Group" - } - ], - "title": "Group", - "description": "Optionally, the approver can be a group." - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "ApproverOutput" + "allowed_groups_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Allowed Groups Override", + "description": "Indicates if allowed groups is overriden from the app-level settings." }, - "ApproverType": { - "type": "string", - "enum": [ - "USER", - "GROUP" - ], - "title": "ApproverType", - "description": "An enumeration." + "allowed_groups": { + "anyOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigInput" }, + { "type": "null" } + ], + "description": "Refers to which group(s) can make requests to this permission." }, - "AttributeInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The unique identifier of the custom attribute" - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of the attribute." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the attribute." - } - }, - "type": "object", - "title": "AttributeInput" - }, - "BaseGroup": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this group." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app that sources this group." - }, - "integration_specific_id": { - "type": "string", - "title": "Integration Specific Id", - "description": "The ID of this group, specific to the integration." - } - }, - "type": "object", - "title": "BaseGroup" - }, - "BaseInlineWebhook": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this inline webhook." - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "BaseInlineWebhook" - }, - "BaseUser": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this user." - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "BaseUser" - }, - "Cost": { - "properties": { - "currency": { - "type": "string", - "title": "Currency", - "description": "The currency in which this cost is stored" - }, - "value": { - "type": "integer", - "title": "Value", - "description": "The quantity of the cost in terms of the specified currency" - } - }, - "type": "object", - "required": [ - "value" - ], - "title": "Cost" + "request_approval_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestApprovalConfigInput" }, + { "type": "null" } + ], + "description": "A request approval config can be optionally associated with this config" }, - "CreateAccessRequestInput": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id" - }, - "target_user_id": { - "type": "string", - "title": "Target User Id", - "description": "User to request access for. If omitted, request for the current user." - }, - "note": { - "type": "string", - "title": "Note", - "description": "[Deprecated - use business_justification] Why the user needs access." - }, - "business_justification": { - "type": "string", - "title": "Business Justification", - "description": "Why the user needs access." - }, - "expiration_in_seconds": { - "type": "integer", - "title": "Expiration In Seconds", - "description": "[Deprecated, use access_length] Once granted, how long the access should last. Omit for permanent access." - }, - "access_length": { - "type": "string", - "title": "Access Length", - "description": "Once granted, how long the access should last. Omit for permanent access." - }, - "requestable_permission_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Requestable Permission Ids", - "description": "The IDs of the requestable permissions the user is requesting access to. Omit this to just request access to the app." - } - }, - "type": "object", - "required": [ - "app_id" - ], - "title": "CreateAccessRequestInput" + "access_removal_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." }, - "DiscoverySource": { - "type": "string", - "enum": [ - "GSUITE_QUICK_INBOX", - "GSUITE_DEEP_INBOX", - "MICROSOFT_DEEP_INBOX", - "MICROSOFT_OAUTH", - "MICROSOFT_GCC", - "GSUITE_OAUTH", - "OKTA", - "MANUAL", - "ONELOGIN", - "ATLASSIAN", - "GOOGLE_CLOUD", - "LUMOS_INTEGRATION", - "JUMPCLOUD" - ], - "title": "DiscoverySource", - "description": "An enumeration." - }, - "DomainAppStatus": { - "enum": [ - "DISCOVERED", - "NEEDS_REVIEW", - "APPROVED", - "BLOCKLISTED", - "DEPRECATED" - ], - "title": "DomainAppStatus", - "description": "An enumeration." - }, - "FileUpload": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/FileUploadType" - } - ], - "description": "The type of content being uploaded. The only supported type today is 'url'" - }, - "value": { - "type": "string", - "title": "Value", - "description": "The data to upload. This should be a publicly accessible URL that resolves to a file" - } - }, - "type": "object", - "required": [ - "type", - "value" - ], - "title": "FileUpload" + "request_validation_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "A request validation webhook can be optionally associated with this config." }, - "FileUploadType": { - "type": "string", - "enum": [ - "url" - ], - "title": "FileUploadType", - "description": "An enumeration." + "request_fulfillment_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestFulfillmentConfigInput" }, + { "type": "null" } + ], + "description": "A request fulfillment config can be optionally associated with this config" + } + }, + "type": "object", + "title": "RequestConfigInputCreate" + }, + "RequestConfigInputUpdate": { + "properties": { + "appstore_visibility": { + "anyOf": [ + { "$ref": "#/components/schemas/AppStoreVisibilityOption" }, + { "type": "null" } + ], + "description": "The appstore visibility of this request config.", + "default": "HIDDEN" }, - "FlowState": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE", - "RUNNING", - "NOT_STARTED" - ], - "title": "FlowState", - "description": "An enumeration." + "allowed_groups_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Allowed Groups Override", + "description": "Indicates if allowed groups is overriden from the app-level settings." }, - "FoundDocumentsUpload": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A value that can be used to uniquely identify this contract (e.g. PO number, file name, etc)" - }, - "files": { - "items": { - "$ref": "#/components/schemas/FileUpload" - }, - "type": "array", - "title": "Files", - "description": "A list of URLs that resolve to files that should be attached to the Found Document" - }, - "vendor_name": { - "type": "string", - "title": "Vendor Name", - "description": "The name of the vendor that this document is for" - }, - "start_date": { - "type": "string", - "title": "Start Date", - "description": "The start of the vendor agreement" - }, - "end_date": { - "type": "string", - "title": "End Date", - "description": "The end of the vendor agreement" - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "By passing the ID of an application within Lumos, it will appear as if this Found Document was sourced from that app" - }, - "total_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Total Cost", - "description": "The total cost of the contract. If this is a multi-year contract, this should include the cost for future years" - }, - "line_items": { - "items": { - "$ref": "#/components/schemas/LineItemUpload" - }, - "type": "array", - "title": "Line Items", - "description": "The line items on the contract" - } - }, - "type": "object", - "required": [ - "unique_identifier", - "files" - ], - "title": "FoundDocumentsUpload" - }, - "Group": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this group." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app that sources this group." - }, - "integration_specific_id": { - "type": "string", - "title": "Integration Specific Id", - "description": "The ID of this group, specific to the integration." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of this group." - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of this group." - }, - "group_lifecycle": { - "allOf": [ - { - "$ref": "#/components/schemas/Lifecycle" - } - ], - "description": "The lifecycle of this group.", - "default": "SYNCED" - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "The ID of the app that sources this group." - } - }, - "type": "object", - "title": "Group" - }, - "GroupProvisioningOption": { - "enum": [ - "DIRECT_TO_USER", - "GROUPS_AND_HIDDEN", - "GROUPS_AND_VISIBLE" - ], - "title": "GroupProvisioningOption", - "description": "An enumeration." - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "InlineWebhook": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this inline webhook." - }, - "hook_type": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhookType" - } - ], - "description": "The type of this inline webhook." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of this inline webhook." - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of this inline webhook." - } - }, - "type": "object", - "required": [ - "id", - "hook_type", - "name" - ], - "title": "InlineWebhook" + "allowed_groups": { + "anyOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigInput" }, + { "type": "null" } + ], + "description": "Refers to which group(s) can make requests to this permission." }, - "InlineWebhookType": { - "type": "string", - "enum": [ - "PRE_APPROVAL", - "PROVISION", - "DEPROVISION", - "REQUEST_VALIDATION", - "SIEM" - ], - "title": "InlineWebhookType", - "description": "An enumeration." - }, - "JobStateOutput": { - "properties": { - "job_id": { - "type": "string", - "title": "Job Id", - "description": "The ID of the job." - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/FlowState" - } - ], - "description": "The state of the job." - } - }, - "type": "object", - "required": [ - "job_id" - ], - "title": "JobStateOutput" + "request_approval_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestApprovalConfigInput" }, + { "type": "null" } + ], + "description": "A request approval config can be optionally associated with this config" }, - "Lifecycle": { - "type": "string", - "enum": [ - "SYNCED", - "NATIVE" - ], - "title": "Lifecycle", - "description": "An enumeration." + "access_removal_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." }, - "LimitOffsetPage_ActivityLog_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ActivityLog" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "limit": { - "type": "integer", - "minimum": 1.0, - "title": "Limit" - }, - "offset": { - "type": "integer", - "minimum": 0.0, - "title": "Offset" - }, - "links": { - "$ref": "#/components/schemas/Links" - } - }, - "type": "object", - "required": [ - "items", - "links" - ], - "title": "LimitOffsetPage[ActivityLog]" - }, - "LineItem": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the line item as stored in Lumos" - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of purchase that this line item refers to" - }, - "quantity": { - "type": "integer", - "title": "Quantity", - "description": "The number of units purchased for this line item" - }, - "unit_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/LineItemUnitCost" - } - ], - "title": "Unit Cost", - "description": "The unit cost of this line item" - } - }, - "type": "object", - "required": [ - "name", - "type", - "quantity", - "unit_cost" - ], - "title": "LineItem" - }, - "LineItemInput": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the line item as stored in Lumos" - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of purchase that this line item refers to" - }, - "quantity": { - "type": "integer", - "title": "Quantity", - "description": "The number of units purchased for this line item" - }, - "unit_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/LineItemUnitCostInput" - } - ], - "title": "Unit Cost", - "description": "The per-unit cost of the line item" - } - }, - "type": "object", - "required": [ - "name", - "type", - "quantity", - "unit_cost" - ], - "title": "LineItemInput" - }, - "LineItemUnitCost": { - "properties": { - "per_month": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Per Month", - "description": "The per unit cost associated with this line item, amortized to the cost per month" - } - }, - "type": "object", - "required": [ - "per_month" - ], - "title": "LineItemUnitCost" - }, - "LineItemUnitCostInput": { - "properties": { - "period": { - "type": "string", - "title": "Period", - "description": "The period which this cost covers. Available options are per_month or per_year" - }, - "value": { - "type": "number", - "title": "Value", - "description": "The cost in terms of the specified currency (4 decimal places supported)" - } - }, - "type": "object", - "required": [ - "period", - "value" - ], - "title": "LineItemUnitCostInput" - }, - "LineItemUpload": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the line item as stored in Lumos" - }, - "quantity": { - "type": "integer", - "title": "Quantity", - "description": "The number of units purchased for this line item" - }, - "unit_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Unit Cost", - "description": "The unit cost of this line item" - } - }, - "type": "object", - "required": [ - "name", - "quantity", - "unit_cost" - ], - "title": "LineItemUpload" - }, - "Links": { - "properties": { - "first": { - "type": "string", - "title": "First", - "example": "/api/v1/users?limit=1&offset1" - }, - "last": { - "type": "string", - "title": "Last", - "example": "/api/v1/users?limit=1&offset1" - }, - "self": { - "type": "string", - "title": "Self", - "example": "/api/v1/users?limit=1&offset1" - }, - "next": { - "type": "string", - "title": "Next", - "example": "/api/v1/users?limit=1&offset1" - }, - "prev": { - "type": "string", - "title": "Prev", - "example": "/api/v1/users?limit=1&offset1" - } - }, - "type": "object", - "title": "Links" + "request_validation_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "A request validation webhook can be optionally associated with this config." }, - "ManagerApprovalOption": { - "type": "string", - "enum": [ - "NONE", - "INITIAL_APPROVAL" - ], - "title": "ManagerApprovalOption", - "description": "An enumeration." - }, - "OrderCustomAttribute": { - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/OrderCustomAttributeType" - } - ], - "description": "The type of custom attribute. Only text and user options are available today" - }, - "value": { - "type": "string", - "title": "Value", - "description": "The value of the attribute for an individual Order" - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "OrderCustomAttribute" + "request_fulfillment_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestFulfillmentConfigInputUpdate" + }, + { "type": "null" } + ], + "description": "A request fulfillment config can be optionally associated with this config" + } + }, + "type": "object", + "title": "RequestConfigInputUpdate" + }, + "RequestConfigOutput": { + "properties": { + "appstore_visibility": { + "anyOf": [ + { "$ref": "#/components/schemas/AppStoreVisibilityOption" }, + { "type": "null" } + ], + "description": "The appstore visibility of this request config.", + "default": "HIDDEN" }, - "OrderCustomAttributeType": { - "enum": [ - "TEXT", - "USER" - ], - "title": "OrderCustomAttributeType", - "description": "An enumeration." + "allowed_groups_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Allowed Groups Override", + "description": "Indicates if allowed groups is overriden from the app-level settings." }, - "OrderInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "A unique ID for the contract being uploaded. This can be an ID from an external system like Ironclad, an internal ID such as a PO number, or simply the name of the vendor + date of the contract." - }, - "vendor": { - "allOf": [ - { - "$ref": "#/components/schemas/Vendor" - } - ], - "title": "Vendor", - "description": "Information about the vendor associated with this contract. Currently, we will only support a name field." - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start date of the attached contract" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end date of the attached contract" - }, - "opt_out_date": { - "type": "string", - "format": "date", - "title": "Opt Out Date", - "description": "The date by which a vendor must be notified before terminating the order" - }, - "auto_renewal": { - "type": "boolean", - "title": "Auto Renewal", - "description": "Whether or not the contract auto-renews" - }, - "currency": { - "type": "string", - "title": "Currency", - "description": "The currency in which the contract is being paid in ISO 4217 format" - }, - "line_items": { - "items": { - "$ref": "#/components/schemas/LineItemInput" - }, - "type": "array", - "title": "Line Items", - "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." - }, - "custom_attributes": { - "additionalProperties": { - "$ref": "#/components/schemas/OrderCustomAttribute" - }, - "type": "object", - "title": "Custom Attributes", - "description": "Any additional attributes that you would like to save on the Order. The set of available options must be configured in advance in Lumos." - }, - "source_app_id": { - "type": "string", - "title": "Source App Id", - "description": "UUID of the application in Lumos where this order was sourced (e.g. the ID of Ironclad within Lumos)" - } - }, - "type": "object", - "required": [ - "unique_identifier", - "vendor", - "start_date", - "end_date", - "auto_renewal", - "line_items" - ], - "title": "OrderInput" + "allowed_groups": { + "anyOf": [ + { "$ref": "#/components/schemas/AllowedGroupsConfigOutput" }, + { "type": "null" } + ], + "description": "The allowed groups config associated with this config.", + "default": { "type": "ALL_GROUPS", "groups": [] } }, - "Page_AccessRequest_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AccessRequest" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[AccessRequest]" + "request_approval_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestApprovalConfigOutput" }, + { "type": "null" } + ], + "description": "A request approval config can be optionally associated with this config", + "default": { + "manager_approval": "NONE", + "request_approval_stages": [{}] + } }, - "Page_Account_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Account" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[Account]" + "request_fulfillment_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestFulfillmentConfigOutput" }, + { "type": "null" } + ], + "description": "A request fulfillment config can be optionally associated with this config", + "default": {} }, - "Page_AppStoreApp_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AppStoreApp" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[AppStoreApp]" + "access_removal_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/InlineWebhook" }, + { "type": "null" } + ], + "description": "A deprovisioning webhook can be optionally associated with this config." + }, + "request_validation_inline_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/InlineWebhook" }, + { "type": "null" } + ], + "description": "A request validation webhook can be optionally associated with this config." + } + }, + "type": "object", + "title": "RequestConfigOutput" + }, + "RequestFulfillmentConfigInput": { + "properties": { + "manual_steps_needed": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Manual Steps Needed", + "description": "Whether manual steps are needed." + }, + "manual_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Manual Instructions", + "description": "The manual instructions that go along." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "time_based_access_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Time Based Access Override", + "description": "Indicates if time based access is overriden." + }, + "provisioning_group": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseGroup" }, + { "type": "null" } + ], + "description": "The provisioning group optionally associated with this config." + }, + "provisioning_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "The provisioning webhook optionally associated with this config." + } + }, + "type": "object", + "title": "RequestFulfillmentConfigInput" + }, + "RequestFulfillmentConfigInputUpdate": { + "properties": { + "manual_steps_needed": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Manual Steps Needed", + "description": "Whether manual steps are needed." + }, + "manual_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Manual Instructions", + "description": "The manual instructions that go along." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "time_based_access_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Time Based Access Override", + "description": "Indicates if time based access is overriden." + }, + "provisioning_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/BaseInlineWebhook" }, + { "type": "null" } + ], + "description": "The provisioning webhook optionally associated with this config." + } + }, + "type": "object", + "title": "RequestFulfillmentConfigInputUpdate" + }, + "RequestFulfillmentConfigOutput": { + "properties": { + "manual_steps_needed": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Manual Steps Needed", + "description": "Whether manual steps are needed." + }, + "manual_instructions": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Manual Instructions", + "description": "The manual instructions that go along." + }, + "time_based_access": { + "items": { "$ref": "#/components/schemas/TimeBasedAccessOptions" }, + "type": "array", + "title": "Time Based Access", + "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." + }, + "time_based_access_override": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Time Based Access Override", + "description": "Indicates if time based access is overriden." + }, + "provisioning_group": { + "anyOf": [ + { "$ref": "#/components/schemas/Group" }, + { "type": "null" } + ], + "description": "The provisioning group optionally assocated with this config." + }, + "provisioning_webhook": { + "anyOf": [ + { "$ref": "#/components/schemas/InlineWebhook" }, + { "type": "null" } + ], + "description": "The provisioning webhook optionally associated with this config." + } + }, + "type": "object", + "title": "RequestFulfillmentConfigOutput" + }, + "RequestablePermissionBase": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this requestable permission." + } + }, + "type": "object", + "title": "RequestablePermissionBase" + }, + "RequestablePermissionBaseOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this requestable permission." + }, + "type": { + "anyOf": [ + { "$ref": "#/components/schemas/PermissionType" }, + { "type": "null" } + ], + "description": "The type of this requestable permission." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The label of this requestable permission." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "app_instance_id": { + "type": "string", + "title": "App Instance Id", + "description": "The ID of the instance associated with this requestable permission. This may be an empty string." + } + }, + "type": "object", + "required": ["label", "app_id", "app_class_id", "app_instance_id"], + "title": "RequestablePermissionBaseOutput" + }, + "RequestablePermissionInput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Class Id", + "description": "The ID of the service associated with this requestable permission." + }, + "app_instance_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Instance Id", + "description": "Optionally, an app has an identifer associated with it's particular instance." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The label of this requestable permission." + }, + "request_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestConfigInputCreate" }, + { "type": "null" } + ], + "description": "The request config associated with this requestable permission." + } + }, + "type": "object", + "required": ["app_id", "label"], + "title": "RequestablePermissionInput" + }, + "RequestablePermissionInputUpdate": { + "properties": { + "app_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Class Id", + "description": "The ID of the service associated with this requestable permission." + }, + "app_instance_id": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "App Instance Id", + "description": "Optionally, an app has an identifer associated with it's particular instance." + }, + "label": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Label", + "description": "The label of this requestable permission." + }, + "request_config": { + "anyOf": [ + { "$ref": "#/components/schemas/RequestConfigInputUpdate" }, + { "type": "null" } + ], + "description": "The request config associated with this requestable permission." + } + }, + "type": "object", + "title": "RequestablePermissionInputUpdate" + }, + "RequestablePermissionOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this requestable permission." + }, + "type": { + "anyOf": [ + { "$ref": "#/components/schemas/PermissionType" }, + { "type": "null" } + ], + "description": "The type of this requestable permission." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The label of this requestable permission." + }, + "app_id": { + "type": "string", + "title": "App Id", + "description": "The ID of the app associated with this requestable permission." + }, + "app_class_id": { + "type": "string", + "title": "App Class Id", + "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." + }, + "app_instance_id": { + "type": "string", + "title": "App Instance Id", + "description": "The ID of the instance associated with this requestable permission. This may be an empty string." + }, + "request_config": { + "allOf": [{ "$ref": "#/components/schemas/RequestConfigOutput" }], + "description": "The request config associated with this requestable permission." + } + }, + "type": "object", + "required": [ + "label", + "app_id", + "app_class_id", + "app_instance_id", + "request_config" + ], + "title": "RequestablePermissionOutput" + }, + "RunInfoStatus": { + "type": "string", + "enum": ["RUNNING", "DONE"], + "title": "RunInfoStatus" + }, + "SupportRequestStatus": { + "type": "string", + "enum": [ + "PENDING", + "PENDING_MANAGER_APPROVAL", + "MANAGER_APPROVED", + "MANAGER_DENIED", + "PENDING_APPROVAL", + "APPROVED", + "DENIED", + "EXPIRED", + "CANCELLED", + "PENDING_PROVISIONING", + "PENDING_MANUAL_PROVISIONING", + "DENIED_PROVISIONING", + "PROVISIONED", + "PENDING_MANUAL_DEPROVISIONING", + "TIME_BASED_EXPIRED", + "COMPLETED", + "REVERTING", + "REVERTED" + ], + "title": "SupportRequestStatus" + }, + "SyncTaskOutput": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "The ID of the job." + }, + "state": { + "anyOf": [ + { "$ref": "#/components/schemas/RunInfoStatus" }, + { "type": "null" } + ], + "description": "The state of the job." + } + }, + "type": "object", + "required": ["job_id"], + "title": "SyncTaskOutput" + }, + "TimeBasedAccessOptions": { + "type": "string", + "enum": [ + "2 hours", + "4 hours", + "12 hours", + "7 days", + "14 days", + "30 days", + "90 days", + "Unlimited" + ], + "title": "TimeBasedAccessOptions" + }, + "User": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of this user." }, - "Page_App_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/App" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[App]" + "email": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Email", + "description": "The email of this user." }, - "Page_Group_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[Group]" + "given_name": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Given Name", + "description": "The given name of this user." }, - "Page_PreApprovalRuleOutput_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PreApprovalRuleOutput" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[PreApprovalRuleOutput]" + "family_name": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Family Name", + "description": "The family name of this user." }, - "Page_RequestablePermissionOutput_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionOutput" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[RequestablePermissionOutput]" + "status": { + "anyOf": [ + { "$ref": "#/components/schemas/UserLifecycleStatus" }, + { "type": "null" } + ], + "description": "The status of this user." + } + }, + "type": "object", + "required": ["id"], + "title": "User" + }, + "UserLifecycleStatus": { + "type": "string", + "enum": ["STAGED", "ACTIVE", "SUSPENDED", "INACTIVE"], + "title": "UserLifecycleStatus" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, + "type": "array", + "title": "Location" }, - "Page_User_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[User]" + "msg": { "type": "string", "title": "Message" }, + "type": { "type": "string", "title": "Error Type" } + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError" + }, + "Vendor": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "A user friendly name for the vendor" + } + }, + "type": "object", + "required": ["name"], + "title": "Vendor" + }, + "VendorAgreement": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "A unique identifier for this Vendor Agreement" }, - "Page_VendorAgreement_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/VendorAgreement" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0.0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1.0, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1.0, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0.0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "Page[VendorAgreement]" + "vendor": { + "allOf": [{ "$ref": "#/components/schemas/Vendor" }], + "description": "The vendor in which the agreement is created for" }, - "PermissionInput": { - "properties": { - "unique_identifier": { - "type": "string", - "title": "Unique Identifier", - "description": "The unique identifier of the permission." - }, - "type": { - "type": "string", - "title": "Type", - "description": "The type of the permission." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the permission." - } - }, - "type": "object", - "title": "PermissionInput" + "start_date": { + "anyOf": [ + { "type": "string", "format": "date" }, + { "type": "null" } + ], + "title": "Start Date", + "description": "The start of the current term" }, - "PermissionType": { - "type": "string", - "enum": [ - "SYNCED", - "NATIVE" - ], - "title": "PermissionType", - "description": "An enumeration." - }, - "PreApprovalRuleInput": { - "properties": { - "justification": { - "type": "string", - "title": "Justification", - "description": "The justification of this preapproval rule." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "Preapproval rule time access length," - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this pre-approval rule." - }, - "preapproved_groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Preapproved Groups", - "description": "The preapproved groups of this preapproval rule.", - "default": [] - }, - "preapproved_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionBase" - }, - "type": "array", - "title": "Preapproved Permissions", - "description": "The preapproved permissions of this preapproval rule.", - "default": [] - }, - "preapproval_webhooks": { - "items": { - "$ref": "#/components/schemas/BaseInlineWebhook" - }, - "type": "array", - "title": "Preapproval Webhooks", - "description": "The preapproval webhooks of this preapproval rule.", - "default": [] - } - }, - "type": "object", - "required": [ - "justification", - "app_id" - ], - "title": "PreApprovalRuleInput" - }, - "PreApprovalRuleOutput": { - "properties": { - "justification": { - "type": "string", - "title": "Justification", - "description": "The justification of this preapproval rule." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "Preapproval rule time access length," - }, - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this preapproval rule." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this pre-approval rule." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The ID of the service associated with this pre-approval rule." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "Optionally, an app has an identifer associated with it's particular instance." - }, - "preapproved_groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array", - "title": "Preapproved Groups", - "description": "The preapproved groups of this preapproval rule.", - "default": [] - }, - "preapproved_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionBaseOutput" - }, - "type": "array", - "title": "Preapproved Permissions", - "description": "The preapproved permissions of this preapproval rule.", - "default": [] - }, - "preapproval_webhooks": { - "items": { - "$ref": "#/components/schemas/InlineWebhook" - }, - "type": "array", - "title": "Preapproval Webhooks", - "description": "The preapproval webhooks of this preapproval rule.", - "default": [] - } - }, - "type": "object", - "required": [ - "justification", - "app_id", - "app_class_id", - "app_instance_id" - ], - "title": "PreApprovalRuleOutput" - }, - "PreApprovalRuleUpdateInput": { - "properties": { - "justification": { - "type": "string", - "title": "Justification", - "description": "The justification of this preapproval rule." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "Preapproval rule time access length," - }, - "preapproved_groups": { - "items": { - "$ref": "#/components/schemas/BaseGroup" - }, - "type": "array", - "title": "Preapproved Groups", - "description": "The preapproved groups of this preapproval rule.", - "default": [] - }, - "preapproved_permissions": { - "items": { - "$ref": "#/components/schemas/RequestablePermissionBase" - }, - "type": "array", - "title": "Preapproved Permissions", - "description": "The preapproved permissions of this preapproval rule.", - "default": [] - }, - "preapproval_webhooks": { - "items": { - "$ref": "#/components/schemas/BaseInlineWebhook" - }, - "type": "array", - "title": "Preapproval Webhooks", - "description": "The preapproval webhooks of this preapproval rule.", - "default": [] - } - }, - "type": "object", - "required": [ - "justification" - ], - "title": "PreApprovalRuleUpdateInput" - }, - "RequestApprovalConfigInput": { - "properties": { - "request_approval_config_override": { - "type": "boolean", - "title": "Request Approval Config Override", - "description": "Indicates if approval flow is overridden." - }, - "manager_approval": { - "allOf": [ - { - "$ref": "#/components/schemas/ManagerApprovalOption" - } - ], - "description": "Manager approval can be configured as necessary to continue", - "default": "NONE" - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." - }, - "custom_approval_message_override": { - "type": "boolean", - "title": "Custom Approval Message Override", - "description": "Indicates if custom_approval_message is overridden." - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned." - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversInput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned." - }, - "request_approval_stages": { - "items": { - "$ref": "#/components/schemas/RequestApprovalStageInput" - }, - "type": "array", - "title": "Request Approval Stages", - "description": "The stages of this request approval." - } - }, - "type": "object", - "title": "RequestApprovalConfigInput" - }, - "RequestApprovalConfigOutput": { - "properties": { - "request_approval_config_override": { - "type": "boolean", - "title": "Request Approval Config Override", - "description": "Indicates if approval flow is overridden." - }, - "manager_approval": { - "allOf": [ - { - "$ref": "#/components/schemas/ManagerApprovalOption" - } - ], - "description": "Manager approval can be configured as necessary to continue", - "default": "NONE" - }, - "require_additional_approval": { - "type": "boolean", - "title": "Require Additional Approval", - "description": "Only turn on when working with sensitive permissions to ensure a smooth employee experience." - }, - "custom_approval_message": { - "type": "string", - "title": "Custom Approval Message", - "description": "After the approval step, send a custom message to requesters. Note that the permission level approval message will override the App level approval message if custom_approval_message_override is set. Markdown for links and text formatting is supported." - }, - "custom_approval_message_override": { - "type": "boolean", - "title": "Custom Approval Message Override", - "description": "Indicates if custom_approval_message is overridden." - }, - "approvers": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers", - "description": "AppStore App approvers assigned." - }, - "approvers_stage_2": { - "allOf": [ - { - "$ref": "#/components/schemas/AppApproversOutput" - } - ], - "title": "Approvers Stage 2", - "description": "AppStore App stage 2 approvers assigned." - }, - "request_approval_stages": { - "items": { - "$ref": "#/components/schemas/RequestApprovalStageOutput" - }, - "type": "array", - "title": "Request Approval Stages", - "description": "The stages of this request approval.", - "default": [ - {} - ] - } - }, - "type": "object", - "title": "RequestApprovalConfigOutput" - }, - "RequestApprovalStageInput": { - "properties": { - "approvers": { - "items": { - "$ref": "#/components/schemas/ApproverInput" - }, - "type": "array", - "title": "Approvers", - "description": "The approvers of this stage." - } - }, - "type": "object", - "title": "RequestApprovalStageInput" - }, - "RequestApprovalStageOutput": { - "properties": { - "approvers": { - "items": { - "$ref": "#/components/schemas/ApproverOutput" - }, - "type": "array", - "title": "Approvers", - "description": "The approvers of this stage." - } - }, - "type": "object", - "title": "RequestApprovalStageOutput" - }, - "RequestConfigInputCreate": { - "properties": { - "appstore_visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibilityOption" - } - ], - "description": "The appstore visibility of this request config.", - "default": "HIDDEN" - }, - "allowed_groups_override": { - "type": "boolean", - "title": "Allowed Groups Override", - "description": "Indicates if allowed groups is overriden from the app-level settings." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigInput" - } - ], - "title": "Allowed Groups", - "description": "Refers to which group(s) can make requests to this permission." - }, - "request_approval_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestApprovalConfigInput" - } - ], - "title": "Request Approval Config", - "description": "A request approval config can be optionally associated with this config" - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - }, - "request_fulfillment_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestFulfillmentConfigInput" - } - ], - "title": "Request Fulfillment Config", - "description": "A request fulfillment config can be optionally associated with this config" - } - }, - "type": "object", - "title": "RequestConfigInputCreate" - }, - "RequestConfigInputUpdate": { - "properties": { - "appstore_visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibilityOption" - } - ], - "description": "The appstore visibility of this request config.", - "default": "HIDDEN" - }, - "allowed_groups_override": { - "type": "boolean", - "title": "Allowed Groups Override", - "description": "Indicates if allowed groups is overriden from the app-level settings." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigInput" - } - ], - "title": "Allowed Groups", - "description": "Refers to which group(s) can make requests to this permission." - }, - "request_approval_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestApprovalConfigInput" - } - ], - "title": "Request Approval Config", - "description": "A request approval config can be optionally associated with this config" - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - }, - "request_fulfillment_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestFulfillmentConfigInputUpdate" - } - ], - "title": "Request Fulfillment Config", - "description": "A request fulfillment config can be optionally associated with this config" - } - }, - "type": "object", - "title": "RequestConfigInputUpdate" - }, - "RequestConfigOutput": { - "properties": { - "appstore_visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AppStoreVisibilityOption" - } - ], - "description": "The appstore visibility of this request config.", - "default": "HIDDEN" - }, - "allowed_groups_override": { - "type": "boolean", - "title": "Allowed Groups Override", - "description": "Indicates if allowed groups is overriden from the app-level settings." - }, - "allowed_groups": { - "allOf": [ - { - "$ref": "#/components/schemas/AllowedGroupsConfigOutput" - } - ], - "title": "Allowed Groups", - "description": "The allowed groups config associated with this config.", - "default": { - "type": "ALL_GROUPS", - "groups": [] - } - }, - "request_approval_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestApprovalConfigOutput" - } - ], - "title": "Request Approval Config", - "description": "A request approval config can be optionally associated with this config", - "default": { - "manager_approval": "NONE", - "request_approval_stages": [ - {} - ] - } - }, - "request_fulfillment_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestFulfillmentConfigOutput" - } - ], - "title": "Request Fulfillment Config", - "description": "A request fulfillment config can be optionally associated with this config", - "default": {} - }, - "access_removal_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Access Removal Inline Webhook", - "description": "A deprovisioning webhook can be optionally associated with this config." - }, - "request_validation_inline_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Request Validation Inline Webhook", - "description": "A request validation webhook can be optionally associated with this config." - } - }, - "type": "object", - "title": "RequestConfigOutput" - }, - "RequestFulfillmentConfigInput": { - "properties": { - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "Whether manual steps are needed." - }, - "manual_instructions": { - "type": "string", - "title": "Manual Instructions", - "description": "The manual instructions that go along." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "time_based_access_override": { - "type": "boolean", - "title": "Time Based Access Override", - "description": "Indicates if time based access is overriden." - }, - "provisioning_group": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseGroup" - } - ], - "title": "Provisioning Group", - "description": "The provisioning group optionally associated with this config." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - } - }, - "type": "object", - "title": "RequestFulfillmentConfigInput" - }, - "RequestFulfillmentConfigInputUpdate": { - "properties": { - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "Whether manual steps are needed." - }, - "manual_instructions": { - "type": "string", - "title": "Manual Instructions", - "description": "The manual instructions that go along." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "time_based_access_override": { - "type": "boolean", - "title": "Time Based Access Override", - "description": "Indicates if time based access is overriden." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseInlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - } - }, - "type": "object", - "title": "RequestFulfillmentConfigInputUpdate" - }, - "RequestFulfillmentConfigOutput": { - "properties": { - "manual_steps_needed": { - "type": "boolean", - "title": "Manual Steps Needed", - "description": "Whether manual steps are needed." - }, - "manual_instructions": { - "type": "string", - "title": "Manual Instructions", - "description": "The manual instructions that go along." - }, - "time_based_access": { - "items": { - "$ref": "#/components/schemas/TimeBasedAccessOptions" - }, - "type": "array", - "description": "If enabled, users can request an app for a selected duration. After expiry, Lumos will automatically remove user's access." - }, - "time_based_access_override": { - "type": "boolean", - "title": "Time Based Access Override", - "description": "Indicates if time based access is overriden." - }, - "provisioning_group": { - "allOf": [ - { - "$ref": "#/components/schemas/Group" - } - ], - "title": "Provisioning Group", - "description": "The provisioning group optionally assocated with this config." - }, - "provisioning_webhook": { - "allOf": [ - { - "$ref": "#/components/schemas/InlineWebhook" - } - ], - "title": "Provisioning Webhook", - "description": "The provisioning webhook optionally associated with this config." - } - }, - "type": "object", - "title": "RequestFulfillmentConfigOutput" - }, - "RequestablePermissionBase": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this requestable permission." - } - }, - "type": "object", - "title": "RequestablePermissionBase" - }, - "RequestablePermissionBaseOutput": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this requestable permission." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/PermissionType" - } - ], - "description": "The type of this requestable permission." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "The ID of the instance associated with this requestable permission." - } - }, - "type": "object", - "required": [ - "label", - "app_id", - "app_class_id", - "app_instance_id" - ], - "title": "RequestablePermissionBaseOutput" - }, - "RequestablePermissionInput": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The ID of the service associated with this requestable permission." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "Optionally, an app has an identifer associated with it's particular instance." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "request_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestConfigInputCreate" - } - ], - "title": "Request Config", - "description": "The request config associated with this requestable permission." - } - }, - "type": "object", - "required": [ - "app_id", - "label" - ], - "title": "RequestablePermissionInput" - }, - "RequestablePermissionInputUpdate": { - "properties": { - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The ID of the service associated with this requestable permission." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "Optionally, an app has an identifer associated with it's particular instance." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "request_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestConfigInputUpdate" - } - ], - "title": "Request Config", - "description": "The request config associated with this requestable permission." - } - }, - "type": "object", - "title": "RequestablePermissionInputUpdate" - }, - "RequestablePermissionOutput": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this requestable permission." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/PermissionType" - } - ], - "description": "The type of this requestable permission." - }, - "label": { - "type": "string", - "title": "Label", - "description": "The label of this requestable permission." - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "The ID of the app associated with this requestable permission." - }, - "app_class_id": { - "type": "string", - "title": "App Class Id", - "description": "The non-unique ID of the service associated with this requestable permission. Depending on how it is sourced in Lumos, this may be the app's name, website, or other identifier." - }, - "app_instance_id": { - "type": "string", - "title": "App Instance Id", - "description": "The ID of the instance associated with this requestable permission." - }, - "request_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RequestConfigOutput" - } - ], - "title": "Request Config", - "description": "The request config associated with this requestable permission." - } - }, - "type": "object", - "required": [ - "label", - "app_id", - "app_class_id", - "app_instance_id", - "request_config" - ], - "title": "RequestablePermissionOutput" + "end_date": { + "anyOf": [ + { "type": "string", "format": "date" }, + { "type": "null" } + ], + "title": "End Date", + "description": "The end of the current term" }, - "RunInfoStatus": { - "enum": [ - "RUNNING", - "DONE" - ], - "title": "RunInfoStatus", - "description": "An enumeration." - }, - "SupportRequestStatus": { - "enum": [ - "PENDING", - "PENDING_MANAGER_APPROVAL", - "MANAGER_APPROVED", - "MANAGER_DENIED", - "PENDING_APPROVAL", - "APPROVED", - "DENIED", - "EXPIRED", - "CANCELLED", - "PENDING_PROVISIONING", - "PENDING_MANUAL_PROVISIONING", - "DENIED_PROVISIONING", - "PROVISIONED", - "PENDING_MANUAL_DEPROVISIONING", - "TIME_BASED_EXPIRED", - "COMPLETED", - "REVERTING", - "REVERTED" - ], - "title": "SupportRequestStatus", - "description": "An enumeration." - }, - "SyncTaskOutput": { - "properties": { - "job_id": { - "type": "string", - "title": "Job Id", - "description": "The ID of the job." - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/RunInfoStatus" - } - ], - "description": "The state of the job." - } - }, - "type": "object", - "required": [ - "job_id" - ], - "title": "SyncTaskOutput" + "opt_out_date": { + "anyOf": [ + { "type": "string", "format": "date" }, + { "type": "null" } + ], + "title": "Opt Out Date", + "description": "The date by which the vendor must be notified if you want to terminate the agreement" }, - "TimeBasedAccessOptions": { - "type": "string", - "enum": [ - "2 hours", - "4 hours", - "12 hours", - "7 days", - "14 days", - "30 days", - "90 days", - "Unlimited" - ], - "title": "TimeBasedAccessOptions", - "description": "An enumeration." - }, - "User": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of this user." - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of this user." - }, - "given_name": { - "type": "string", - "title": "Given Name", - "description": "The given name of this user." - }, - "family_name": { - "type": "string", - "title": "Family Name", - "description": "The family name of this user." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/UserLifecycleStatus" - } - ], - "description": "The status of this user." - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "User" + "total_contract_cost": { + "allOf": [{ "$ref": "#/components/schemas/Cost" }], + "description": "The total cost of the current service term, including all line items and true ups, and including future years for multi-year agreements." }, - "UserLifecycleStatus": { - "type": "string", - "enum": [ - "STAGED", - "ACTIVE", - "SUSPENDED", - "INACTIVE" - ], - "title": "UserLifecycleStatus", - "description": "An enumeration." - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - }, - "Vendor": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "A user friendly name for the vendor" - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "Vendor" - }, - "VendorAgreement": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "A unique identifier for this Vendor Agreement" - }, - "vendor": { - "allOf": [ - { - "$ref": "#/components/schemas/Vendor" - } - ], - "title": "Vendor", - "description": "The vendor in which the agreement is created for" - }, - "start_date": { - "type": "string", - "format": "date", - "title": "Start Date", - "description": "The start of the current term" - }, - "end_date": { - "type": "string", - "format": "date", - "title": "End Date", - "description": "The end of the current term" - }, - "opt_out_date": { - "type": "string", - "format": "date", - "title": "Opt Out Date", - "description": "The date by which the vendor must be notified if you want to terminate the agreement" - }, - "total_contract_cost": { - "allOf": [ - { - "$ref": "#/components/schemas/Cost" - } - ], - "title": "Total Contract Cost", - "description": "The total cost of the current service term, including all line items and true ups, and including future years for multi-year agreements." - }, - "line_items": { - "items": { - "$ref": "#/components/schemas/LineItem" - }, - "type": "array", - "title": "Line Items", - "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." - } - }, - "type": "object", - "required": [ - "id", - "vendor", - "start_date", - "end_date", - "opt_out_date", - "total_contract_cost", - "line_items" - ], - "title": "VendorAgreement" + "line_items": { + "items": { "$ref": "#/components/schemas/LineItem" }, + "type": "array", + "title": "Line Items", + "description": "The list of currently active line items for this Vendor Agreement. If there are no currently active line items, the most recent set of line items is returned." + }, + "custom_attributes": { + "additionalProperties": { + "$ref": "#/components/schemas/VendorAgreementCustomAttribute-Output" + }, + "type": "object", + "title": "Custom Attributes", + "description": "Custom metadata tracked about each of your Vendor Agreements. The set of available options must be configured within the Lumos admin panel." + } + }, + "type": "object", + "required": [ + "id", + "vendor", + "start_date", + "end_date", + "opt_out_date", + "total_contract_cost", + "line_items" + ], + "title": "VendorAgreement" + }, + "VendorAgreementCustomAttribute-Input": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VendorAgreementCustomAttributeType" + } + ], + "description": "The type of custom attribute. Only text and user options are available today" + }, + "value": { + "anyOf": [ + { "type": "string" }, + { + "items": { "$ref": "#/components/schemas/User" }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Value", + "description": "The value of the attribute for an individual Order" } + }, + "type": "object", + "required": ["type"], + "title": "VendorAgreementCustomAttribute" }, - "securitySchemes": { - "HTTPBearer": { - "type": "http", - "scheme": "bearer" + "VendorAgreementCustomAttribute-Output": { + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VendorAgreementCustomAttributeType" + } + ], + "description": "The type of custom attribute. Only text and user options are available today" + }, + "value": { + "anyOf": [ + { "type": "string" }, + { + "items": { "$ref": "#/components/schemas/User" }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Value", + "description": "The value of the attribute for an individual Order" } + }, + "type": "object", + "required": ["type"], + "title": "VendorAgreementCustomAttribute" + }, + "VendorAgreementCustomAttributeType": { + "type": "string", + "enum": ["TEXT", "USER", "SINGLE_SELECT"], + "title": "VendorAgreementCustomAttributeType" } + }, + "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } -} \ No newline at end of file + } \ No newline at end of file