From db25ec8f48acde6689337de1848fbf68e7c2e9cd Mon Sep 17 00:00:00 2001 From: Tobias Herber <22559657+herber@users.noreply.github.com> Date: Wed, 20 May 2026 12:05:09 +0200 Subject: [PATCH 1/2] Update client --- v1/endpoints/agents.go | 62 +++ v1/endpoints/agents_instances.go | 61 +++ v1/endpoints/assistants.go | 54 +++ v1/endpoints/callbacks_instances.go | 12 + v1/endpoints/conversations.go | 92 +++++ v1/endpoints/conversations_messages.go | 74 ++++ v1/endpoints/documents.go | 135 +++++++ v1/endpoints/documents_participants.go | 60 +++ v1/endpoints/documents_permissions.go | 28 ++ v1/endpoints/documents_versions.go | 60 +++ v1/endpoints/files.go | 14 +- .../{file_links.go => files_links.go} | 36 +- v1/endpoints/integrations.go | 121 ++++++ v1/endpoints/integrations_instance_groups.go | 163 ++++++++ .../integrations_instance_groups_providers.go | 100 +++++ v1/endpoints/integrations_instances.go | 170 +++++++++ .../integrations_instances_providers.go | 91 +++++ v1/endpoints/integrations_providers.go | 131 +++++++ v1/endpoints/integrations_setup_sessions.go | 88 +++++ v1/endpoints/magic_mcp_endpoints.go | 7 +- v1/endpoints/magic_mcp_servers.go | 18 +- v1/endpoints/magic_mcp_servers_providers.go | 74 ++-- v1/endpoints/management/agents.go | 62 +++ v1/endpoints/management/agents_instances.go | 61 +++ v1/endpoints/management/assistants.go | 54 +++ .../management/callbacks_instances.go | 12 + v1/endpoints/management/conversations.go | 92 +++++ .../management/conversations_messages.go | 74 ++++ v1/endpoints/management/documents.go | 135 +++++++ .../management/documents_participants.go | 60 +++ .../management/documents_permissions.go | 28 ++ v1/endpoints/management/documents_versions.go | 60 +++ v1/endpoints/management/files.go | 14 +- .../{file_links.go => files_links.go} | 36 +- v1/endpoints/management/integrations.go | 121 ++++++ .../integrations_instance_groups.go | 163 ++++++++ .../integrations_instance_groups_providers.go | 100 +++++ .../management/integrations_instances.go | 170 +++++++++ .../integrations_instances_providers.go | 91 +++++ .../management/integrations_providers.go | 131 +++++++ .../management/integrations_setup_sessions.go | 88 +++++ .../management/magic_mcp_endpoints.go | 7 +- v1/endpoints/management/magic_mcp_servers.go | 18 +- .../management/magic_mcp_servers_providers.go | 74 ++-- v1/endpoints/management/portals.go | 21 +- v1/endpoints/management/portals_access.go | 118 ++++++ .../management/portals_access_requests.go | 77 ++++ v1/endpoints/management/portals_auth_app.go | 46 +++ .../management/portals_auth_sso_tenants.go | 72 ++++ .../portals_auth_sso_tenants_connections.go | 42 +++ .../management/portals_consumer_groups.go | 110 ++++++ .../management/portals_consumer_invites.go | 76 ++++ .../management/portals_consumer_profiles.go | 93 +++++ v1/endpoints/management/portals_listings.go | 116 ++++++ .../provider_deployments_auth_configs.go | 4 + .../provider_deployments_configs.go | 4 + v1/endpoints/management/provider_templates.go | 36 +- v1/endpoints/management/sessions.go | 8 + .../management/sessions_connections.go | 10 + .../management/sessions_participants.go | 10 + v1/endpoints/management/skills.go | 192 ++++++++++ v1/endpoints/management/skills_agents.go | 106 ++++++ .../management/skills_configurations.go | 106 ++++++ v1/endpoints/management/skills_exports.go | 78 ++++ v1/endpoints/management/skills_groups.go | 116 ++++++ .../management/skills_groups_items.go | 89 +++++ v1/endpoints/management/skills_items.go | 85 +++++ .../management/skills_marketplaces.go | 128 +++++++ .../management/skills_marketplaces_plugins.go | 94 +++++ .../management/skills_participants.go | 54 +++ v1/endpoints/management/skills_plugins.go | 134 +++++++ .../management/skills_plugins_skills.go | 122 ++++++ v1/endpoints/management/skills_templates.go | 117 ++++++ .../management/skills_templates_items.go | 78 ++++ v1/endpoints/management/skills_versions.go | 54 +++ .../management/skills_versions_snapshot.go | 28 ++ v1/endpoints/management/stores.go | 112 ++++++ v1/endpoints/management/stores_items.go | 84 +++++ .../management/stores_participants.go | 54 +++ v1/endpoints/management/stores_permissions.go | 28 ++ v1/endpoints/management/tool_calls.go | 10 + v1/endpoints/portals.go | 21 +- v1/endpoints/portals_access.go | 118 ++++++ v1/endpoints/portals_access_requests.go | 77 ++++ v1/endpoints/portals_auth_app.go | 46 +++ v1/endpoints/portals_auth_sso_tenants.go | 72 ++++ .../portals_auth_sso_tenants_connections.go | 42 +++ v1/endpoints/portals_consumer_groups.go | 110 ++++++ v1/endpoints/portals_consumer_invites.go | 76 ++++ v1/endpoints/portals_consumer_profiles.go | 93 +++++ v1/endpoints/portals_listings.go | 116 ++++++ .../provider_deployments_auth_configs.go | 4 + v1/endpoints/provider_deployments_configs.go | 4 + v1/endpoints/provider_templates.go | 36 +- v1/endpoints/sessions.go | 8 + v1/endpoints/sessions_connections.go | 10 + v1/endpoints/sessions_participants.go | 10 + v1/endpoints/skills.go | 192 ++++++++++ v1/endpoints/skills_agents.go | 106 ++++++ v1/endpoints/skills_configurations.go | 106 ++++++ v1/endpoints/skills_exports.go | 78 ++++ v1/endpoints/skills_groups.go | 116 ++++++ v1/endpoints/skills_groups_items.go | 89 +++++ v1/endpoints/skills_items.go | 85 +++++ v1/endpoints/skills_marketplaces.go | 128 +++++++ v1/endpoints/skills_marketplaces_plugins.go | 94 +++++ v1/endpoints/skills_participants.go | 54 +++ v1/endpoints/skills_plugins.go | 134 +++++++ v1/endpoints/skills_plugins_skills.go | 122 ++++++ v1/endpoints/skills_templates.go | 117 ++++++ v1/endpoints/skills_templates_items.go | 78 ++++ v1/endpoints/skills_versions.go | 54 +++ v1/endpoints/skills_versions_snapshot.go | 28 ++ v1/endpoints/stores.go | 112 ++++++ v1/endpoints/stores_items.go | 84 +++++ v1/endpoints/stores_participants.go | 54 +++ v1/endpoints/stores_permissions.go | 28 ++ ...t_helpers_consumer_oauth_authorizations.go | 37 ++ v1/endpoints/tool_calls.go | 10 + v1/resources/agents/get.go | 36 ++ v1/resources/agents/instances/get.go | 46 +++ v1/resources/agents/instances/list.go | 104 +++++ v1/resources/agents/list.go | 95 +++++ v1/resources/assistants/get.go | 72 ++++ v1/resources/assistants/list.go | 107 ++++++ v1/resources/callbacks/instances/get.go | 187 +++++++++ v1/resources/consumers/create.go | 1 + v1/resources/consumers/get.go | 1 + v1/resources/consumers/get_member_consumer.go | 49 +-- v1/resources/consumers/list.go | 1 + v1/resources/consumers/profiles/get.go | 2 +- v1/resources/consumers/profiles/list.go | 37 +- v1/resources/consumers/update.go | 1 + v1/resources/consumersurfaces/get.go | 28 +- v1/resources/consumersurfaces/list.go | 28 +- v1/resources/conversations/create.go | 167 +++++++++ v1/resources/conversations/get.go | 147 ++++++++ v1/resources/conversations/list.go | 183 +++++++++ v1/resources/conversations/messages/create.go | 149 ++++++++ v1/resources/conversations/messages/get.go | 123 ++++++ v1/resources/conversations/messages/list.go | 158 ++++++++ v1/resources/conversations/update.go | 166 ++++++++ v1/resources/documents/clone.go | 116 ++++++ v1/resources/documents/create.go | 116 ++++++ v1/resources/documents/delete.go | 96 +++++ v1/resources/documents/get.go | 96 +++++ v1/resources/documents/list.go | 159 ++++++++ v1/resources/documents/participants/get.go | 93 +++++ v1/resources/documents/participants/list.go | 150 ++++++++ v1/resources/documents/permissions/get.go | 32 ++ v1/resources/documents/update.go | 116 ++++++ v1/resources/documents/versions/get.go | 94 +++++ v1/resources/documents/versions/list.go | 151 ++++++++ v1/resources/filelinks/create.go | 56 --- v1/resources/filelinks/list.go | 73 ---- v1/resources/files/delete.go | 68 +++- v1/resources/files/get.go | 68 +++- v1/resources/files/links/create.go | 56 +++ .../{filelinks => files/links}/delete.go | 16 +- .../{filelinks => files/links}/get.go | 16 +- v1/resources/files/links/list.go | 73 ++++ v1/resources/files/list.go | 98 ++++- v1/resources/integrations/create.go | 127 +++++++ v1/resources/integrations/delete.go | 103 +++++ v1/resources/integrations/get.go | 103 +++++ .../integrations/instancegroups/create.go | 98 +++++ .../instancegroups/create_session.go | 179 +++++++++ .../instancegroups/create_session_template.go | 146 ++++++++ .../integrations/instancegroups/delete.go | 70 ++++ .../integrations/instancegroups/get.go | 70 ++++ .../integrations/instancegroups/list.go | 136 +++++++ .../instancegroups/providers/delete.go | 49 +++ .../instancegroups/providers/get.go | 49 +++ .../instancegroups/providers/list.go | 116 ++++++ .../instancegroups/providers/set.go | 68 ++++ .../integrations/instancegroups/update.go | 98 +++++ v1/resources/integrations/instances/create.go | 228 +++++++++++ .../integrations/instances/create_session.go | 179 +++++++++ .../instances/create_session_template.go | 146 ++++++++ v1/resources/integrations/instances/delete.go | 194 ++++++++++ v1/resources/integrations/instances/get.go | 194 ++++++++++ v1/resources/integrations/instances/list.go | 262 +++++++++++++ .../integrations/instances/providers/get.go | 170 +++++++++ .../integrations/instances/providers/list.go | 236 ++++++++++++ .../integrations/instances/providers/set.go | 193 ++++++++++ v1/resources/integrations/instances/update.go | 227 +++++++++++ v1/resources/integrations/list.go | 163 ++++++++ v1/resources/integrations/providers/create.go | 99 +++++ v1/resources/integrations/providers/delete.go | 71 ++++ v1/resources/integrations/providers/get.go | 71 ++++ v1/resources/integrations/providers/list.go | 135 +++++++ v1/resources/integrations/providers/update.go | 97 +++++ .../integrations/setupsessions/create.go | 278 ++++++++++++++ .../integrations/setupsessions/get.go | 212 +++++++++++ .../integrations/setupsessions/list.go | 271 ++++++++++++++ v1/resources/integrations/update.go | 127 +++++++ v1/resources/magicmcpendpoints/add_servers.go | 32 +- v1/resources/magicmcpendpoints/create.go | 41 +- v1/resources/magicmcpendpoints/delete.go | 25 +- v1/resources/magicmcpendpoints/get.go | 25 +- v1/resources/magicmcpendpoints/list.go | 25 +- .../magicmcpendpoints/remove_servers.go | 25 +- v1/resources/magicmcpendpoints/update.go | 25 +- v1/resources/magicmcpservers/create.go | 235 +++++++++++- v1/resources/magicmcpservers/delete.go | 226 ++++++++++- v1/resources/magicmcpservers/get.go | 226 ++++++++++- v1/resources/magicmcpservers/list.go | 226 ++++++++++- .../magicmcpservers/providers/create.go | 163 ++++++-- .../magicmcpservers/providers/delete.go | 153 +++++++- v1/resources/magicmcpservers/providers/get.go | 153 +++++++- .../magicmcpservers/providers/list.go | 182 +++++++-- .../magicmcpservers/providers/update.go | 158 +++++++- v1/resources/magicmcpservers/update.go | 235 +++++++++++- v1/resources/magicmcpsessions/get.go | 251 +++++++++++-- v1/resources/magicmcpsessions/list.go | 251 +++++++++++-- v1/resources/portals/access/create.go | 149 ++++++++ v1/resources/portals/access/delete.go | 114 ++++++ v1/resources/portals/access/get.go | 114 ++++++ v1/resources/portals/access/list.go | 159 ++++++++ v1/resources/portals/access/update.go | 135 +++++++ v1/resources/portals/accessrequests/get.go | 72 ++++ v1/resources/portals/accessrequests/list.go | 110 ++++++ v1/resources/portals/accessrequests/update.go | 93 +++++ v1/resources/portals/auth/app/get.go | 32 ++ v1/resources/portals/auth/app/update.go | 51 +++ .../auth/ssotenants/connections/list.go | 65 ++++ .../portals/auth/ssotenants/create.go | 56 +++ v1/resources/portals/auth/ssotenants/list.go | 72 ++++ v1/resources/portals/auth/ssotenants/setup.go | 25 ++ v1/resources/portals/consumergroups/create.go | 55 +++ v1/resources/portals/consumergroups/delete.go | 33 ++ v1/resources/portals/consumergroups/get.go | 33 ++ v1/resources/portals/consumergroups/list.go | 70 ++++ v1/resources/portals/consumergroups/update.go | 55 +++ .../portals/consumerinvites/create.go | 71 ++++ v1/resources/portals/consumerinvites/get.go | 50 +++ v1/resources/portals/consumerinvites/list.go | 87 +++++ .../portals/consumerprofiles/assign_groups.go | 73 ++++ v1/resources/portals/consumerprofiles/get.go | 54 +++ v1/resources/portals/consumerprofiles/list.go | 57 +++ .../consumerprofiles/unassign_groups.go | 73 ++++ v1/resources/portals/create.go | 49 ++- v1/resources/portals/delete.go | 39 +- v1/resources/portals/get.go | 39 +- v1/resources/portals/list.go | 39 +- v1/resources/portals/listings/create.go | 143 +++++++ v1/resources/portals/listings/delete.go | 109 ++++++ v1/resources/portals/listings/get.go | 109 ++++++ v1/resources/portals/listings/list.go | 153 ++++++++ v1/resources/portals/listings/update.go | 130 +++++++ v1/resources/portals/update.go | 57 ++- .../providerdeployments/authconfigs/list.go | 4 + .../providerdeployments/configs/list.go | 4 + v1/resources/providertemplates/create.go | 56 ++- v1/resources/providertemplates/delete.go | 28 +- v1/resources/providertemplates/get.go | 28 +- v1/resources/providertemplates/list.go | 46 +-- v1/resources/providertemplates/update.go | 49 +-- v1/resources/sessions/connections/get.go | 8 +- v1/resources/sessions/connections/list.go | 18 +- v1/resources/sessions/events/get.go | 100 ++++- v1/resources/sessions/events/list.go | 100 ++++- v1/resources/sessions/list.go | 8 + v1/resources/sessions/messages/get.go | 92 ++++- v1/resources/sessions/messages/list.go | 92 ++++- v1/resources/sessions/participants/get.go | 8 +- v1/resources/sessions/participants/list.go | 18 +- v1/resources/sessiontemplates/create.go | 4 +- v1/resources/sessiontemplates/delete.go | 4 +- v1/resources/sessiontemplates/get.go | 4 +- v1/resources/sessiontemplates/list.go | 4 +- v1/resources/sessiontemplates/update.go | 4 +- v1/resources/skills/agents/create.go | 60 +++ v1/resources/skills/agents/delete.go | 39 ++ v1/resources/skills/agents/get.go | 39 ++ v1/resources/skills/agents/list.go | 75 ++++ v1/resources/skills/agents/update.go | 59 +++ v1/resources/skills/configurations/create.go | 55 +++ v1/resources/skills/configurations/delete.go | 34 ++ v1/resources/skills/configurations/get.go | 34 ++ v1/resources/skills/configurations/list.go | 69 ++++ v1/resources/skills/configurations/update.go | 55 +++ v1/resources/skills/create.go | 321 ++++++++++++++++ v1/resources/skills/delete.go | 293 +++++++++++++++ v1/resources/skills/duplicate.go | 319 ++++++++++++++++ v1/resources/skills/exports/create.go | 217 +++++++++++ v1/resources/skills/exports/get.go | 195 ++++++++++ v1/resources/skills/exports/list.go | 233 ++++++++++++ v1/resources/skills/fork.go | 320 ++++++++++++++++ v1/resources/skills/get.go | 293 +++++++++++++++ v1/resources/skills/groups/create.go | 74 ++++ v1/resources/skills/groups/delete.go | 52 +++ v1/resources/skills/groups/get.go | 52 +++ v1/resources/skills/groups/items/create.go | 68 ++++ v1/resources/skills/groups/items/delete.go | 49 +++ v1/resources/skills/groups/items/get.go | 49 +++ v1/resources/skills/groups/items/list.go | 97 +++++ v1/resources/skills/groups/list.go | 111 ++++++ v1/resources/skills/groups/update.go | 74 ++++ v1/resources/skills/items/create.go | 93 +++++ v1/resources/skills/items/delete.go | 71 ++++ v1/resources/skills/items/get.go | 71 ++++ v1/resources/skills/items/list.go | 121 ++++++ v1/resources/skills/list.go | 354 ++++++++++++++++++ v1/resources/skills/marketplaces/archive.go | 85 +++++ v1/resources/skills/marketplaces/create.go | 107 ++++++ v1/resources/skills/marketplaces/get.go | 85 +++++ v1/resources/skills/marketplaces/list.go | 144 +++++++ .../skills/marketplaces/plugins/add.go | 90 +++++ .../skills/marketplaces/plugins/get.go | 69 ++++ .../skills/marketplaces/plugins/list.go | 128 +++++++ .../skills/marketplaces/plugins/remove.go | 69 ++++ v1/resources/skills/marketplaces/sync.go | 102 +++++ v1/resources/skills/marketplaces/update.go | 107 ++++++ v1/resources/skills/participants/get.go | 92 +++++ v1/resources/skills/participants/list.go | 127 +++++++ v1/resources/skills/plugins/archive.go | 55 +++ v1/resources/skills/plugins/create.go | 79 ++++ v1/resources/skills/plugins/get.go | 55 +++ v1/resources/skills/plugins/list.go | 116 ++++++ v1/resources/skills/plugins/skills/add.go | 63 ++++ v1/resources/skills/plugins/skills/get.go | 37 ++ v1/resources/skills/plugins/skills/list.go | 96 +++++ v1/resources/skills/plugins/skills/remove.go | 37 ++ v1/resources/skills/plugins/skills/update.go | 61 +++ v1/resources/skills/plugins/sync.go | 72 ++++ v1/resources/skills/plugins/update.go | 79 ++++ v1/resources/skills/publish_consumer_skill.go | 293 +++++++++++++++ v1/resources/skills/templates/create.go | 108 ++++++ v1/resources/skills/templates/delete.go | 86 +++++ v1/resources/skills/templates/get.go | 86 +++++ v1/resources/skills/templates/items/create.go | 92 +++++ v1/resources/skills/templates/items/delete.go | 70 ++++ v1/resources/skills/templates/items/get.go | 70 ++++ v1/resources/skills/templates/items/list.go | 105 ++++++ v1/resources/skills/templates/list.go | 147 ++++++++ v1/resources/skills/templates/update.go | 107 ++++++ v1/resources/skills/update.go | 320 ++++++++++++++++ v1/resources/skills/versions/get.go | 31 ++ v1/resources/skills/versions/list.go | 66 ++++ v1/resources/skills/versions/snapshot/get.go | 45 +++ v1/resources/stores/create.go | 54 +++ v1/resources/stores/delete.go | 32 ++ v1/resources/stores/get.go | 32 ++ v1/resources/stores/items/get.go | 196 ++++++++++ v1/resources/stores/items/list.go | 259 +++++++++++++ v1/resources/stores/items/modify.go | 231 ++++++++++++ v1/resources/stores/list.go | 89 +++++ v1/resources/stores/participants/get.go | 91 +++++ v1/resources/stores/participants/list.go | 126 +++++++ v1/resources/stores/permissions/get.go | 31 ++ v1/resources/stores/update.go | 52 +++ .../consumeroauth/authorizations/create.go | 51 +++ v1/resources/toolcalls/create.go | 76 +++- v1/resources/toolcalls/get.go | 76 +++- v1/resources/toolcalls/list.go | 86 ++++- 356 files changed, 31601 insertions(+), 1028 deletions(-) create mode 100644 v1/endpoints/agents.go create mode 100644 v1/endpoints/agents_instances.go create mode 100644 v1/endpoints/assistants.go create mode 100644 v1/endpoints/conversations.go create mode 100644 v1/endpoints/conversations_messages.go create mode 100644 v1/endpoints/documents.go create mode 100644 v1/endpoints/documents_participants.go create mode 100644 v1/endpoints/documents_permissions.go create mode 100644 v1/endpoints/documents_versions.go rename v1/endpoints/{file_links.go => files_links.go} (53%) create mode 100644 v1/endpoints/integrations.go create mode 100644 v1/endpoints/integrations_instance_groups.go create mode 100644 v1/endpoints/integrations_instance_groups_providers.go create mode 100644 v1/endpoints/integrations_instances.go create mode 100644 v1/endpoints/integrations_instances_providers.go create mode 100644 v1/endpoints/integrations_providers.go create mode 100644 v1/endpoints/integrations_setup_sessions.go create mode 100644 v1/endpoints/management/agents.go create mode 100644 v1/endpoints/management/agents_instances.go create mode 100644 v1/endpoints/management/assistants.go create mode 100644 v1/endpoints/management/conversations.go create mode 100644 v1/endpoints/management/conversations_messages.go create mode 100644 v1/endpoints/management/documents.go create mode 100644 v1/endpoints/management/documents_participants.go create mode 100644 v1/endpoints/management/documents_permissions.go create mode 100644 v1/endpoints/management/documents_versions.go rename v1/endpoints/management/{file_links.go => files_links.go} (54%) create mode 100644 v1/endpoints/management/integrations.go create mode 100644 v1/endpoints/management/integrations_instance_groups.go create mode 100644 v1/endpoints/management/integrations_instance_groups_providers.go create mode 100644 v1/endpoints/management/integrations_instances.go create mode 100644 v1/endpoints/management/integrations_instances_providers.go create mode 100644 v1/endpoints/management/integrations_providers.go create mode 100644 v1/endpoints/management/integrations_setup_sessions.go create mode 100644 v1/endpoints/management/portals_access.go create mode 100644 v1/endpoints/management/portals_access_requests.go create mode 100644 v1/endpoints/management/portals_auth_app.go create mode 100644 v1/endpoints/management/portals_auth_sso_tenants.go create mode 100644 v1/endpoints/management/portals_auth_sso_tenants_connections.go create mode 100644 v1/endpoints/management/portals_consumer_groups.go create mode 100644 v1/endpoints/management/portals_consumer_invites.go create mode 100644 v1/endpoints/management/portals_consumer_profiles.go create mode 100644 v1/endpoints/management/portals_listings.go create mode 100644 v1/endpoints/management/skills.go create mode 100644 v1/endpoints/management/skills_agents.go create mode 100644 v1/endpoints/management/skills_configurations.go create mode 100644 v1/endpoints/management/skills_exports.go create mode 100644 v1/endpoints/management/skills_groups.go create mode 100644 v1/endpoints/management/skills_groups_items.go create mode 100644 v1/endpoints/management/skills_items.go create mode 100644 v1/endpoints/management/skills_marketplaces.go create mode 100644 v1/endpoints/management/skills_marketplaces_plugins.go create mode 100644 v1/endpoints/management/skills_participants.go create mode 100644 v1/endpoints/management/skills_plugins.go create mode 100644 v1/endpoints/management/skills_plugins_skills.go create mode 100644 v1/endpoints/management/skills_templates.go create mode 100644 v1/endpoints/management/skills_templates_items.go create mode 100644 v1/endpoints/management/skills_versions.go create mode 100644 v1/endpoints/management/skills_versions_snapshot.go create mode 100644 v1/endpoints/management/stores.go create mode 100644 v1/endpoints/management/stores_items.go create mode 100644 v1/endpoints/management/stores_participants.go create mode 100644 v1/endpoints/management/stores_permissions.go create mode 100644 v1/endpoints/portals_access.go create mode 100644 v1/endpoints/portals_access_requests.go create mode 100644 v1/endpoints/portals_auth_app.go create mode 100644 v1/endpoints/portals_auth_sso_tenants.go create mode 100644 v1/endpoints/portals_auth_sso_tenants_connections.go create mode 100644 v1/endpoints/portals_consumer_groups.go create mode 100644 v1/endpoints/portals_consumer_invites.go create mode 100644 v1/endpoints/portals_consumer_profiles.go create mode 100644 v1/endpoints/portals_listings.go create mode 100644 v1/endpoints/skills.go create mode 100644 v1/endpoints/skills_agents.go create mode 100644 v1/endpoints/skills_configurations.go create mode 100644 v1/endpoints/skills_exports.go create mode 100644 v1/endpoints/skills_groups.go create mode 100644 v1/endpoints/skills_groups_items.go create mode 100644 v1/endpoints/skills_items.go create mode 100644 v1/endpoints/skills_marketplaces.go create mode 100644 v1/endpoints/skills_marketplaces_plugins.go create mode 100644 v1/endpoints/skills_participants.go create mode 100644 v1/endpoints/skills_plugins.go create mode 100644 v1/endpoints/skills_plugins_skills.go create mode 100644 v1/endpoints/skills_templates.go create mode 100644 v1/endpoints/skills_templates_items.go create mode 100644 v1/endpoints/skills_versions.go create mode 100644 v1/endpoints/skills_versions_snapshot.go create mode 100644 v1/endpoints/stores.go create mode 100644 v1/endpoints/stores_items.go create mode 100644 v1/endpoints/stores_participants.go create mode 100644 v1/endpoints/stores_permissions.go create mode 100644 v1/endpoints/test_helpers_consumer_oauth_authorizations.go create mode 100644 v1/resources/agents/get.go create mode 100644 v1/resources/agents/instances/get.go create mode 100644 v1/resources/agents/instances/list.go create mode 100644 v1/resources/agents/list.go create mode 100644 v1/resources/assistants/get.go create mode 100644 v1/resources/assistants/list.go create mode 100644 v1/resources/callbacks/instances/get.go create mode 100644 v1/resources/conversations/create.go create mode 100644 v1/resources/conversations/get.go create mode 100644 v1/resources/conversations/list.go create mode 100644 v1/resources/conversations/messages/create.go create mode 100644 v1/resources/conversations/messages/get.go create mode 100644 v1/resources/conversations/messages/list.go create mode 100644 v1/resources/conversations/update.go create mode 100644 v1/resources/documents/clone.go create mode 100644 v1/resources/documents/create.go create mode 100644 v1/resources/documents/delete.go create mode 100644 v1/resources/documents/get.go create mode 100644 v1/resources/documents/list.go create mode 100644 v1/resources/documents/participants/get.go create mode 100644 v1/resources/documents/participants/list.go create mode 100644 v1/resources/documents/permissions/get.go create mode 100644 v1/resources/documents/update.go create mode 100644 v1/resources/documents/versions/get.go create mode 100644 v1/resources/documents/versions/list.go delete mode 100644 v1/resources/filelinks/create.go delete mode 100644 v1/resources/filelinks/list.go create mode 100644 v1/resources/files/links/create.go rename v1/resources/{filelinks => files/links}/delete.go (55%) rename v1/resources/{filelinks => files/links}/get.go (57%) create mode 100644 v1/resources/files/links/list.go create mode 100644 v1/resources/integrations/create.go create mode 100644 v1/resources/integrations/delete.go create mode 100644 v1/resources/integrations/get.go create mode 100644 v1/resources/integrations/instancegroups/create.go create mode 100644 v1/resources/integrations/instancegroups/create_session.go create mode 100644 v1/resources/integrations/instancegroups/create_session_template.go create mode 100644 v1/resources/integrations/instancegroups/delete.go create mode 100644 v1/resources/integrations/instancegroups/get.go create mode 100644 v1/resources/integrations/instancegroups/list.go create mode 100644 v1/resources/integrations/instancegroups/providers/delete.go create mode 100644 v1/resources/integrations/instancegroups/providers/get.go create mode 100644 v1/resources/integrations/instancegroups/providers/list.go create mode 100644 v1/resources/integrations/instancegroups/providers/set.go create mode 100644 v1/resources/integrations/instancegroups/update.go create mode 100644 v1/resources/integrations/instances/create.go create mode 100644 v1/resources/integrations/instances/create_session.go create mode 100644 v1/resources/integrations/instances/create_session_template.go create mode 100644 v1/resources/integrations/instances/delete.go create mode 100644 v1/resources/integrations/instances/get.go create mode 100644 v1/resources/integrations/instances/list.go create mode 100644 v1/resources/integrations/instances/providers/get.go create mode 100644 v1/resources/integrations/instances/providers/list.go create mode 100644 v1/resources/integrations/instances/providers/set.go create mode 100644 v1/resources/integrations/instances/update.go create mode 100644 v1/resources/integrations/list.go create mode 100644 v1/resources/integrations/providers/create.go create mode 100644 v1/resources/integrations/providers/delete.go create mode 100644 v1/resources/integrations/providers/get.go create mode 100644 v1/resources/integrations/providers/list.go create mode 100644 v1/resources/integrations/providers/update.go create mode 100644 v1/resources/integrations/setupsessions/create.go create mode 100644 v1/resources/integrations/setupsessions/get.go create mode 100644 v1/resources/integrations/setupsessions/list.go create mode 100644 v1/resources/integrations/update.go create mode 100644 v1/resources/portals/access/create.go create mode 100644 v1/resources/portals/access/delete.go create mode 100644 v1/resources/portals/access/get.go create mode 100644 v1/resources/portals/access/list.go create mode 100644 v1/resources/portals/access/update.go create mode 100644 v1/resources/portals/accessrequests/get.go create mode 100644 v1/resources/portals/accessrequests/list.go create mode 100644 v1/resources/portals/accessrequests/update.go create mode 100644 v1/resources/portals/auth/app/get.go create mode 100644 v1/resources/portals/auth/app/update.go create mode 100644 v1/resources/portals/auth/ssotenants/connections/list.go create mode 100644 v1/resources/portals/auth/ssotenants/create.go create mode 100644 v1/resources/portals/auth/ssotenants/list.go create mode 100644 v1/resources/portals/auth/ssotenants/setup.go create mode 100644 v1/resources/portals/consumergroups/create.go create mode 100644 v1/resources/portals/consumergroups/delete.go create mode 100644 v1/resources/portals/consumergroups/get.go create mode 100644 v1/resources/portals/consumergroups/list.go create mode 100644 v1/resources/portals/consumergroups/update.go create mode 100644 v1/resources/portals/consumerinvites/create.go create mode 100644 v1/resources/portals/consumerinvites/get.go create mode 100644 v1/resources/portals/consumerinvites/list.go create mode 100644 v1/resources/portals/consumerprofiles/assign_groups.go create mode 100644 v1/resources/portals/consumerprofiles/get.go create mode 100644 v1/resources/portals/consumerprofiles/list.go create mode 100644 v1/resources/portals/consumerprofiles/unassign_groups.go create mode 100644 v1/resources/portals/listings/create.go create mode 100644 v1/resources/portals/listings/delete.go create mode 100644 v1/resources/portals/listings/get.go create mode 100644 v1/resources/portals/listings/list.go create mode 100644 v1/resources/portals/listings/update.go create mode 100644 v1/resources/skills/agents/create.go create mode 100644 v1/resources/skills/agents/delete.go create mode 100644 v1/resources/skills/agents/get.go create mode 100644 v1/resources/skills/agents/list.go create mode 100644 v1/resources/skills/agents/update.go create mode 100644 v1/resources/skills/configurations/create.go create mode 100644 v1/resources/skills/configurations/delete.go create mode 100644 v1/resources/skills/configurations/get.go create mode 100644 v1/resources/skills/configurations/list.go create mode 100644 v1/resources/skills/configurations/update.go create mode 100644 v1/resources/skills/create.go create mode 100644 v1/resources/skills/delete.go create mode 100644 v1/resources/skills/duplicate.go create mode 100644 v1/resources/skills/exports/create.go create mode 100644 v1/resources/skills/exports/get.go create mode 100644 v1/resources/skills/exports/list.go create mode 100644 v1/resources/skills/fork.go create mode 100644 v1/resources/skills/get.go create mode 100644 v1/resources/skills/groups/create.go create mode 100644 v1/resources/skills/groups/delete.go create mode 100644 v1/resources/skills/groups/get.go create mode 100644 v1/resources/skills/groups/items/create.go create mode 100644 v1/resources/skills/groups/items/delete.go create mode 100644 v1/resources/skills/groups/items/get.go create mode 100644 v1/resources/skills/groups/items/list.go create mode 100644 v1/resources/skills/groups/list.go create mode 100644 v1/resources/skills/groups/update.go create mode 100644 v1/resources/skills/items/create.go create mode 100644 v1/resources/skills/items/delete.go create mode 100644 v1/resources/skills/items/get.go create mode 100644 v1/resources/skills/items/list.go create mode 100644 v1/resources/skills/list.go create mode 100644 v1/resources/skills/marketplaces/archive.go create mode 100644 v1/resources/skills/marketplaces/create.go create mode 100644 v1/resources/skills/marketplaces/get.go create mode 100644 v1/resources/skills/marketplaces/list.go create mode 100644 v1/resources/skills/marketplaces/plugins/add.go create mode 100644 v1/resources/skills/marketplaces/plugins/get.go create mode 100644 v1/resources/skills/marketplaces/plugins/list.go create mode 100644 v1/resources/skills/marketplaces/plugins/remove.go create mode 100644 v1/resources/skills/marketplaces/sync.go create mode 100644 v1/resources/skills/marketplaces/update.go create mode 100644 v1/resources/skills/participants/get.go create mode 100644 v1/resources/skills/participants/list.go create mode 100644 v1/resources/skills/plugins/archive.go create mode 100644 v1/resources/skills/plugins/create.go create mode 100644 v1/resources/skills/plugins/get.go create mode 100644 v1/resources/skills/plugins/list.go create mode 100644 v1/resources/skills/plugins/skills/add.go create mode 100644 v1/resources/skills/plugins/skills/get.go create mode 100644 v1/resources/skills/plugins/skills/list.go create mode 100644 v1/resources/skills/plugins/skills/remove.go create mode 100644 v1/resources/skills/plugins/skills/update.go create mode 100644 v1/resources/skills/plugins/sync.go create mode 100644 v1/resources/skills/plugins/update.go create mode 100644 v1/resources/skills/publish_consumer_skill.go create mode 100644 v1/resources/skills/templates/create.go create mode 100644 v1/resources/skills/templates/delete.go create mode 100644 v1/resources/skills/templates/get.go create mode 100644 v1/resources/skills/templates/items/create.go create mode 100644 v1/resources/skills/templates/items/delete.go create mode 100644 v1/resources/skills/templates/items/get.go create mode 100644 v1/resources/skills/templates/items/list.go create mode 100644 v1/resources/skills/templates/list.go create mode 100644 v1/resources/skills/templates/update.go create mode 100644 v1/resources/skills/update.go create mode 100644 v1/resources/skills/versions/get.go create mode 100644 v1/resources/skills/versions/list.go create mode 100644 v1/resources/skills/versions/snapshot/get.go create mode 100644 v1/resources/stores/create.go create mode 100644 v1/resources/stores/delete.go create mode 100644 v1/resources/stores/get.go create mode 100644 v1/resources/stores/items/get.go create mode 100644 v1/resources/stores/items/list.go create mode 100644 v1/resources/stores/items/modify.go create mode 100644 v1/resources/stores/list.go create mode 100644 v1/resources/stores/participants/get.go create mode 100644 v1/resources/stores/participants/list.go create mode 100644 v1/resources/stores/permissions/get.go create mode 100644 v1/resources/stores/update.go create mode 100644 v1/resources/testhelpers/consumeroauth/authorizations/create.go diff --git a/v1/endpoints/agents.go b/v1/endpoints/agents.go new file mode 100644 index 0000000..a23f53b --- /dev/null +++ b/v1/endpoints/agents.go @@ -0,0 +1,62 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/agents" +) + +// AgentsEndpoint provides access to inspect agents and their linked clients and instances. +type AgentsEndpoint struct { + client *endpoint.Client +} + +// NewAgentsEndpoint creates a new AgentsEndpoint. +func NewAgentsEndpoint(client *endpoint.Client) *AgentsEndpoint { + return &AgentsEndpoint{client: client} +} + +// AgentsEndpointListParams contains optional query parameters for List. +type AgentsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + // CreatedAt - Filter agent creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter agent last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// List returns a paginated list of agents for the instance. +func (e *AgentsEndpoint) List(params *AgentsEndpointListParams) (*agents.AgentsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"agents"}, + Query: query, + } + var result agents.AgentsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific agent by ID. +func (e *AgentsEndpoint) Get(agentId string) (*agents.AgentsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"agents", agentId}, + } + var result agents.AgentsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/agents_instances.go b/v1/endpoints/agents_instances.go new file mode 100644 index 0000000..57ce8ac --- /dev/null +++ b/v1/endpoints/agents_instances.go @@ -0,0 +1,61 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/agents/instances" +) + +// AgentsInstancesEndpoint provides access to inspect agents and their linked clients and instances. +type AgentsInstancesEndpoint struct { + client *endpoint.Client +} + +// NewAgentsInstancesEndpoint creates a new AgentsInstancesEndpoint. +func NewAgentsInstancesEndpoint(client *endpoint.Client) *AgentsInstancesEndpoint { + return &AgentsInstancesEndpoint{client: client} +} + +// AgentsInstancesEndpointListParams contains optional query parameters for List. +type AgentsInstancesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + AgentClientId *any `json:"agent_client_id,omitempty"` + // CreatedAt - Filter agent instance creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter agent instance last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// List returns a paginated list of instances for an agent. +func (e *AgentsInstancesEndpoint) List(agentId string, params *AgentsInstancesEndpointListParams) (*instances.AgentsInstancesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"agents", agentId, "instances"}, + Query: query, + } + var result instances.AgentsInstancesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific agent instance by ID. +func (e *AgentsInstancesEndpoint) Get(agentId string, agentInstanceId string) (*instances.AgentsInstancesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"agents", agentId, "instances", agentInstanceId}, + } + var result instances.AgentsInstancesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/assistants.go b/v1/endpoints/assistants.go new file mode 100644 index 0000000..0bb2d8a --- /dev/null +++ b/v1/endpoints/assistants.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/assistants" +) + +// AssistantsEndpoint provides access to assistant and conversation endpoints +type AssistantsEndpoint struct { + client *endpoint.Client +} + +// NewAssistantsEndpoint creates a new AssistantsEndpoint. +func NewAssistantsEndpoint(client *endpoint.Client) *AssistantsEndpoint { + return &AssistantsEndpoint{client: client} +} + +// AssistantsEndpointListParams contains optional query parameters for List. +type AssistantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List list assistants available in an instance. +func (e *AssistantsEndpoint) List(params *AssistantsEndpointListParams) (*assistants.AssistantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"assistants"}, + Query: query, + } + var result assistants.AssistantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get get an assistant available in an instance. +func (e *AssistantsEndpoint) Get(assistantId string) (*assistants.AssistantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"assistants", assistantId}, + } + var result assistants.AssistantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/callbacks_instances.go b/v1/endpoints/callbacks_instances.go index 3819997..5337b98 100644 --- a/v1/endpoints/callbacks_instances.go +++ b/v1/endpoints/callbacks_instances.go @@ -61,6 +61,18 @@ func (e *CallbacksInstancesEndpoint) List(callbackId string, params *CallbacksIn return &result, nil } +// Get retrieves a specific callback instance by ID. +func (e *CallbacksInstancesEndpoint) Get(callbackId string, callbackInstanceId string) (*instances.CallbacksInstancesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"callbacks", callbackId, "instances", callbackInstanceId}, + } + var result instances.CallbacksInstancesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + // Create attaches a callback to a config and optional auth config. func (e *CallbacksInstancesEndpoint) Create(callbackId string, body *CallbacksInstancesEndpointCreateBody) (*instances.CallbacksInstancesCreateOutput, error) { req := &endpoint.Request{ diff --git a/v1/endpoints/conversations.go b/v1/endpoints/conversations.go new file mode 100644 index 0000000..a1cb585 --- /dev/null +++ b/v1/endpoints/conversations.go @@ -0,0 +1,92 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/conversations" +) + +// ConversationsEndpoint provides access to assistant and conversation endpoints +type ConversationsEndpoint struct { + client *endpoint.Client +} + +// NewConversationsEndpoint creates a new ConversationsEndpoint. +func NewConversationsEndpoint(client *endpoint.Client) *ConversationsEndpoint { + return &ConversationsEndpoint{client: client} +} + +// ConversationsEndpointListParams contains optional query parameters for List. +type ConversationsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + AssistantId *any `json:"assistant_id,omitempty"` +} + +// ConversationsEndpointCreateBody contains the request body for Create. +type ConversationsEndpointCreateBody struct { + AssistantId string `json:"assistant_id"` + Title *string `json:"title,omitempty"` +} + +// ConversationsEndpointUpdateBody contains the request body for Update. +type ConversationsEndpointUpdateBody struct { + Title *string `json:"title,omitempty"` +} + +// List list assistant conversations in an instance. +func (e *ConversationsEndpoint) List(params *ConversationsEndpointListParams) (*conversations.ConversationsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"conversations"}, + Query: query, + } + var result conversations.ConversationsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create create a new assistant conversation in an instance. +func (e *ConversationsEndpoint) Create(body *ConversationsEndpointCreateBody) (*conversations.ConversationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"conversations"}, + Body: body, + } + var result conversations.ConversationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get get a specific assistant conversation. +func (e *ConversationsEndpoint) Get(assistantConversationId string) (*conversations.ConversationsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"conversations", assistantConversationId}, + } + var result conversations.ConversationsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update update a specific assistant conversation. +func (e *ConversationsEndpoint) Update(assistantConversationId string, body *ConversationsEndpointUpdateBody) (*conversations.ConversationsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"conversations", assistantConversationId}, + Body: body, + } + var result conversations.ConversationsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/conversations_messages.go b/v1/endpoints/conversations_messages.go new file mode 100644 index 0000000..fa25413 --- /dev/null +++ b/v1/endpoints/conversations_messages.go @@ -0,0 +1,74 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/conversations/messages" +) + +// ConversationsMessagesEndpoint provides access to assistant and conversation endpoints +type ConversationsMessagesEndpoint struct { + client *endpoint.Client +} + +// NewConversationsMessagesEndpoint creates a new ConversationsMessagesEndpoint. +func NewConversationsMessagesEndpoint(client *endpoint.Client) *ConversationsMessagesEndpoint { + return &ConversationsMessagesEndpoint{client: client} +} + +// ConversationsMessagesEndpointListParams contains optional query parameters for List. +type ConversationsMessagesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// ConversationsMessagesEndpointCreateBody contains the request body for Create. +type ConversationsMessagesEndpointCreateBody struct { + Message map[string]any `json:"message"` + ParentMessageId *string `json:"parent_message_id,omitempty"` + ModelId *string `json:"model_id,omitempty"` +} + +// List list messages in a specific assistant conversation. +func (e *ConversationsMessagesEndpoint) List(assistantConversationId string, params *ConversationsMessagesEndpointListParams) (*messages.ConversationsMessagesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"conversations", assistantConversationId, "messages"}, + Query: query, + } + var result messages.ConversationsMessagesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create create a user message and assistant request in a specific conversation. +func (e *ConversationsMessagesEndpoint) Create(assistantConversationId string, body *ConversationsMessagesEndpointCreateBody) (*messages.ConversationsMessagesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"conversations", assistantConversationId, "messages"}, + Body: body, + } + var result messages.ConversationsMessagesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get get a specific assistant message. +func (e *ConversationsMessagesEndpoint) Get(assistantConversationId string, assistantMessageId string) (*messages.ConversationsMessagesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"conversations", assistantConversationId, "messages", assistantMessageId}, + } + var result messages.ConversationsMessagesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/documents.go b/v1/endpoints/documents.go new file mode 100644 index 0000000..f5b43db --- /dev/null +++ b/v1/endpoints/documents.go @@ -0,0 +1,135 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents" +) + +// DocumentsEndpoint provides access to create and manage instance documents backed by Cargo. +type DocumentsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsEndpoint creates a new DocumentsEndpoint. +func NewDocumentsEndpoint(client *endpoint.Client) *DocumentsEndpoint { + return &DocumentsEndpoint{client: client} +} + +// DocumentsEndpointListParams contains optional query parameters for List. +type DocumentsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document ID + Id *any `json:"id,omitempty"` + // FileId - Filter by file ID + FileId *any `json:"file_id,omitempty"` + // StoreId - Filter by store ID + StoreId *any `json:"store_id,omitempty"` + // ParentDocumentId - Filter by parent document ID + ParentDocumentId *any `json:"parent_document_id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// DocumentsEndpointCreateBody contains the request body for Create. +type DocumentsEndpointCreateBody struct { + Title string `json:"title"` + Content string `json:"content"` +} + +// DocumentsEndpointUpdateBody contains the request body for Update. +type DocumentsEndpointUpdateBody struct { + Title *string `json:"title,omitempty"` + Content *string `json:"content,omitempty"` +} + +// DocumentsEndpointCloneBody contains the request body for Clone. +type DocumentsEndpointCloneBody struct { + TargetDocumentId *string `json:"target_document_id,omitempty"` + Title *string `json:"title,omitempty"` +} + +// List returns a paginated list of documents owned by the instance. +func (e *DocumentsEndpoint) List(params *DocumentsEndpointListParams) (*documents.DocumentsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"documents"}, + Query: query, + } + var result documents.DocumentsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new document for the instance. +func (e *DocumentsEndpoint) Create(body *DocumentsEndpointCreateBody) (*documents.DocumentsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents"}, + Body: body, + } + var result documents.DocumentsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a document by its ID. +func (e *DocumentsEndpoint) Get(documentId string) (*documents.DocumentsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId}, + } + var result documents.DocumentsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific document. +func (e *DocumentsEndpoint) Update(documentId string, body *DocumentsEndpointUpdateBody) (*documents.DocumentsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId}, + Body: body, + } + var result documents.DocumentsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a specific document. +func (e *DocumentsEndpoint) Delete(documentId string) (*documents.DocumentsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId}, + } + var result documents.DocumentsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Clone clones a specific document. +func (e *DocumentsEndpoint) Clone(documentId string, body *DocumentsEndpointCloneBody) (*documents.DocumentsCloneOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId, "clone"}, + Body: body, + } + var result documents.DocumentsCloneOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/documents_participants.go b/v1/endpoints/documents_participants.go new file mode 100644 index 0000000..b39be97 --- /dev/null +++ b/v1/endpoints/documents_participants.go @@ -0,0 +1,60 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents/participants" +) + +// DocumentsParticipantsEndpoint provides access to inspect document participants and their linked Metorial resources. +type DocumentsParticipantsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsParticipantsEndpoint creates a new DocumentsParticipantsEndpoint. +func NewDocumentsParticipantsEndpoint(client *endpoint.Client) *DocumentsParticipantsEndpoint { + return &DocumentsParticipantsEndpoint{client: client} +} + +// DocumentsParticipantsEndpointListParams contains optional query parameters for List. +type DocumentsParticipantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document participant ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// List returns a paginated list of participants for a specific document. +func (e *DocumentsParticipantsEndpoint) List(documentId string, params *DocumentsParticipantsEndpointListParams) (*participants.DocumentsParticipantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"documents", documentId, "participants"}, + Query: query, + } + var result participants.DocumentsParticipantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific document participant by its ID. +func (e *DocumentsParticipantsEndpoint) Get(documentId string, documentParticipantId string) (*participants.DocumentsParticipantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId, "participants", documentParticipantId}, + } + var result participants.DocumentsParticipantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/documents_permissions.go b/v1/endpoints/documents_permissions.go new file mode 100644 index 0000000..e42ef42 --- /dev/null +++ b/v1/endpoints/documents_permissions.go @@ -0,0 +1,28 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents/permissions" +) + +// DocumentsPermissionsEndpoint provides access to create and manage instance documents backed by Cargo. +type DocumentsPermissionsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsPermissionsEndpoint creates a new DocumentsPermissionsEndpoint. +func NewDocumentsPermissionsEndpoint(client *endpoint.Client) *DocumentsPermissionsEndpoint { + return &DocumentsPermissionsEndpoint{client: client} +} + +// Get returns the effective Cargo permissions for the current actor on a specific document. +func (e *DocumentsPermissionsEndpoint) Get(documentId string) (*permissions.DocumentsPermissionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId, "permissions"}, + } + var result permissions.DocumentsPermissionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/documents_versions.go b/v1/endpoints/documents_versions.go new file mode 100644 index 0000000..2c3c7e9 --- /dev/null +++ b/v1/endpoints/documents_versions.go @@ -0,0 +1,60 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents/versions" +) + +// DocumentsVersionsEndpoint provides access to inspect document version history for an instance document. +type DocumentsVersionsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsVersionsEndpoint creates a new DocumentsVersionsEndpoint. +func NewDocumentsVersionsEndpoint(client *endpoint.Client) *DocumentsVersionsEndpoint { + return &DocumentsVersionsEndpoint{client: client} +} + +// DocumentsVersionsEndpointListParams contains optional query parameters for List. +type DocumentsVersionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document version ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // LastEditedAt - Filter Filter by last edit time by date range + LastEditedAt *map[string]any `json:"last_edited_at,omitempty"` +} + +// List returns a paginated list of versions for a specific document. +func (e *DocumentsVersionsEndpoint) List(documentId string, params *DocumentsVersionsEndpointListParams) (*versions.DocumentsVersionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"documents", documentId, "versions"}, + Query: query, + } + var result versions.DocumentsVersionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific document version by its ID. +func (e *DocumentsVersionsEndpoint) Get(documentId string, documentVersionId string) (*versions.DocumentsVersionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"documents", documentId, "versions", documentVersionId}, + } + var result versions.DocumentsVersionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/files.go b/v1/endpoints/files.go index 339c3da..128bc55 100644 --- a/v1/endpoints/files.go +++ b/v1/endpoints/files.go @@ -22,8 +22,20 @@ type FilesEndpointListParams struct { Before *string `json:"before,omitempty"` Cursor *string `json:"cursor,omitempty"` Order *string `json:"order,omitempty"` + // Id - Filter by file ID + Id *any `json:"id,omitempty"` // Purpose - Filter by file purpose - Purpose *string `json:"purpose,omitempty"` + Purpose *any `json:"purpose,omitempty"` + // StoreId - Filter by store ID + StoreId *any `json:"store_id,omitempty"` + // DocumentId - Filter by document ID + DocumentId *any `json:"document_id,omitempty"` + // FileLinkId - Filter by file link ID + FileLinkId *any `json:"file_link_id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` } // List returns a paginated list of files owned by the instance. diff --git a/v1/endpoints/file_links.go b/v1/endpoints/files_links.go similarity index 53% rename from v1/endpoints/file_links.go rename to v1/endpoints/files_links.go index 154c8c1..fd4d4fd 100644 --- a/v1/endpoints/file_links.go +++ b/v1/endpoints/files_links.go @@ -2,21 +2,21 @@ package endpoints import ( "github.com/metorial/metorial-go/v1/internal/endpoint" - "github.com/metorial/metorial-go/v1/resources/filelinks" + "github.com/metorial/metorial-go/v1/resources/files/links" ) -// FileLinksEndpoint provides access to files are private by default. If you want to share a file, you can create a link for it. Links are public and do not require authentication to access, so be careful with what you share. -type FileLinksEndpoint struct { +// FilesLinksEndpoint provides access to files are private by default. If you want to share a file, you can create a link for it. Links are public and do not require authentication to access, so be careful with what you share. +type FilesLinksEndpoint struct { client *endpoint.Client } -// NewFileLinksEndpoint creates a new FileLinksEndpoint. -func NewFileLinksEndpoint(client *endpoint.Client) *FileLinksEndpoint { - return &FileLinksEndpoint{client: client} +// NewFilesLinksEndpoint creates a new FilesLinksEndpoint. +func NewFilesLinksEndpoint(client *endpoint.Client) *FilesLinksEndpoint { + return &FilesLinksEndpoint{client: client} } -// FileLinksEndpointListParams contains optional query parameters for List. -type FileLinksEndpointListParams struct { +// FilesLinksEndpointListParams contains optional query parameters for List. +type FilesLinksEndpointListParams struct { Limit *float64 `json:"limit,omitempty"` After *string `json:"after,omitempty"` Before *string `json:"before,omitempty"` @@ -26,14 +26,14 @@ type FileLinksEndpointListParams struct { FileId *string `json:"file_id,omitempty"` } -// FileLinksEndpointCreateBody contains the request body for Create. -type FileLinksEndpointCreateBody struct { +// FilesLinksEndpointCreateBody contains the request body for Create. +type FilesLinksEndpointCreateBody struct { FileId string `json:"file_id"` ExpiresAt *string `json:"expires_at,omitempty"` } // List returns a paginated list of file links owned by the instance organization. -func (e *FileLinksEndpoint) List(params *FileLinksEndpointListParams) (*filelinks.FileLinksListOutput, error) { +func (e *FilesLinksEndpoint) List(params *FilesLinksEndpointListParams) (*links.FilesLinksListOutput, error) { var query map[string]any if params != nil { query = endpoint.StructToQuery(params) @@ -42,7 +42,7 @@ func (e *FileLinksEndpoint) List(params *FileLinksEndpointListParams) (*filelink Path: []string{"file-links"}, Query: query, } - var result filelinks.FileLinksListOutput + var result links.FilesLinksListOutput if err := e.client.Get(req, &result); err != nil { return nil, err } @@ -50,11 +50,11 @@ func (e *FileLinksEndpoint) List(params *FileLinksEndpointListParams) (*filelink } // Get retrieves the details of a specific file link by its ID. -func (e *FileLinksEndpoint) Get(linkId string) (*filelinks.FileLinksGetOutput, error) { +func (e *FilesLinksEndpoint) Get(linkId string) (*links.FilesLinksGetOutput, error) { req := &endpoint.Request{ Path: []string{"file-links", linkId}, } - var result filelinks.FileLinksGetOutput + var result links.FilesLinksGetOutput if err := e.client.Get(req, &result); err != nil { return nil, err } @@ -62,12 +62,12 @@ func (e *FileLinksEndpoint) Get(linkId string) (*filelinks.FileLinksGetOutput, e } // Create creates a new link for a specific file. -func (e *FileLinksEndpoint) Create(body *FileLinksEndpointCreateBody) (*filelinks.FileLinksCreateOutput, error) { +func (e *FilesLinksEndpoint) Create(body *FilesLinksEndpointCreateBody) (*links.FilesLinksCreateOutput, error) { req := &endpoint.Request{ Path: []string{"file-links"}, Body: body, } - var result filelinks.FileLinksCreateOutput + var result links.FilesLinksCreateOutput if err := e.client.Post(req, &result); err != nil { return nil, err } @@ -75,11 +75,11 @@ func (e *FileLinksEndpoint) Create(body *FileLinksEndpointCreateBody) (*filelink } // Delete deletes a specific file link by its ID. -func (e *FileLinksEndpoint) Delete(linkId string) (*filelinks.FileLinksDeleteOutput, error) { +func (e *FilesLinksEndpoint) Delete(linkId string) (*links.FilesLinksDeleteOutput, error) { req := &endpoint.Request{ Path: []string{"file-links", linkId}, } - var result filelinks.FileLinksDeleteOutput + var result links.FilesLinksDeleteOutput if err := e.client.Delete(req, &result); err != nil { return nil, err } diff --git a/v1/endpoints/integrations.go b/v1/endpoints/integrations.go new file mode 100644 index 0000000..9763966 --- /dev/null +++ b/v1/endpoints/integrations.go @@ -0,0 +1,121 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations" +) + +// IntegrationsEndpoint provides access to integrations define reusable provider contracts that can then be materialized into integration instances. +type IntegrationsEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsEndpoint creates a new IntegrationsEndpoint. +func NewIntegrationsEndpoint(client *endpoint.Client) *IntegrationsEndpoint { + return &IntegrationsEndpoint{client: client} +} + +// IntegrationsEndpointListParams contains optional query parameters for List. +type IntegrationsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + // CreatedAt - Filter integration creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsEndpointCreateBody contains the request body for Create. +type IntegrationsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CanAttachCustomToolFilters *bool `json:"can_attach_custom_tool_filters,omitempty"` + CanAttachCustomProviderConfig *bool `json:"can_attach_custom_provider_config,omitempty"` + CanOverrideToolFilters *bool `json:"can_override_tool_filters,omitempty"` +} + +// IntegrationsEndpointUpdateBody contains the request body for Update. +type IntegrationsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CanAttachCustomToolFilters *bool `json:"can_attach_custom_tool_filters,omitempty"` + CanAttachCustomProviderConfig *bool `json:"can_attach_custom_provider_config,omitempty"` + CanOverrideToolFilters *bool `json:"can_override_tool_filters,omitempty"` +} + +// List returns a paginated list of integrations. +func (e *IntegrationsEndpoint) List(params *IntegrationsEndpointListParams) (*integrations.IntegrationsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integrations"}, + Query: query, + } + var result integrations.IntegrationsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration. +func (e *IntegrationsEndpoint) Get(integrationId string) (*integrations.IntegrationsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integrations", integrationId}, + } + var result integrations.IntegrationsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration. +func (e *IntegrationsEndpoint) Create(body *IntegrationsEndpointCreateBody) (*integrations.IntegrationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integrations"}, + Body: body, + } + var result integrations.IntegrationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration. +func (e *IntegrationsEndpoint) Update(integrationId string, body *IntegrationsEndpointUpdateBody) (*integrations.IntegrationsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integrations", integrationId}, + Body: body, + } + var result integrations.IntegrationsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration. +func (e *IntegrationsEndpoint) Delete(integrationId string) (*integrations.IntegrationsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"integrations", integrationId}, + } + var result integrations.IntegrationsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/integrations_instance_groups.go b/v1/endpoints/integrations_instance_groups.go new file mode 100644 index 0000000..3643860 --- /dev/null +++ b/v1/endpoints/integrations_instance_groups.go @@ -0,0 +1,163 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instancegroups" +) + +// IntegrationsInstanceGroupsEndpoint provides access to integration instance groups combine instance providers into a grouped routed configuration. +type IntegrationsInstanceGroupsEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstanceGroupsEndpoint creates a new IntegrationsInstanceGroupsEndpoint. +func NewIntegrationsInstanceGroupsEndpoint(client *endpoint.Client) *IntegrationsInstanceGroupsEndpoint { + return &IntegrationsInstanceGroupsEndpoint{client: client} +} + +// IntegrationsInstanceGroupsEndpointListParams contains optional query parameters for List. +type IntegrationsInstanceGroupsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance group creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance group last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointCreateSessionTemplateBody contains the request body for CreateSessionTemplate. +type IntegrationsInstanceGroupsEndpointCreateSessionTemplateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointCreateSessionBody contains the request body for CreateSession. +type IntegrationsInstanceGroupsEndpointCreateSessionBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointCreateBody contains the request body for Create. +type IntegrationsInstanceGroupsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointUpdateBody contains the request body for Update. +type IntegrationsInstanceGroupsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// List returns a paginated list of integration instance groups. +func (e *IntegrationsInstanceGroupsEndpoint) List(params *IntegrationsInstanceGroupsEndpointListParams) (*instancegroups.IntegrationsInstanceGroupsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integration-instance-groups"}, + Query: query, + } + var result instancegroups.IntegrationsInstanceGroupsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Get(integrationInstanceGroupId string) (*instancegroups.IntegrationsInstanceGroupsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups", integrationInstanceGroupId}, + } + var result instancegroups.IntegrationsInstanceGroupsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSessionTemplate creates or updates the shared session template for a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) CreateSessionTemplate(integrationInstanceGroupId string, body *IntegrationsInstanceGroupsEndpointCreateSessionTemplateBody) (*instancegroups.IntegrationsInstanceGroupsCreateSessionTemplateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups", integrationInstanceGroupId, "session-template"}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsCreateSessionTemplateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSession creates a session from the shared session template of a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) CreateSession(integrationInstanceGroupId string, body *IntegrationsInstanceGroupsEndpointCreateSessionBody) (*instancegroups.IntegrationsInstanceGroupsCreateSessionOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups", integrationInstanceGroupId, "session"}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsCreateSessionOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Create(body *IntegrationsInstanceGroupsEndpointCreateBody) (*instancegroups.IntegrationsInstanceGroupsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups"}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Update(integrationInstanceGroupId string, body *IntegrationsInstanceGroupsEndpointUpdateBody) (*instancegroups.IntegrationsInstanceGroupsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups", integrationInstanceGroupId}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Delete(integrationInstanceGroupId string) (*instancegroups.IntegrationsInstanceGroupsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups", integrationInstanceGroupId}, + } + var result instancegroups.IntegrationsInstanceGroupsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/integrations_instance_groups_providers.go b/v1/endpoints/integrations_instance_groups_providers.go new file mode 100644 index 0000000..b7352e0 --- /dev/null +++ b/v1/endpoints/integrations_instance_groups_providers.go @@ -0,0 +1,100 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instancegroups/providers" +) + +// IntegrationsInstanceGroupsProvidersEndpoint provides access to integration instance group providers define the effective routed provider set for an integration instance group. +type IntegrationsInstanceGroupsProvidersEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstanceGroupsProvidersEndpoint creates a new IntegrationsInstanceGroupsProvidersEndpoint. +func NewIntegrationsInstanceGroupsProvidersEndpoint(client *endpoint.Client) *IntegrationsInstanceGroupsProvidersEndpoint { + return &IntegrationsInstanceGroupsProvidersEndpoint{client: client} +} + +// IntegrationsInstanceGroupsProvidersEndpointListParams contains optional query parameters for List. +type IntegrationsInstanceGroupsProvidersEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationInstanceGroupId *any `json:"integration_instance_group_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance group provider creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance group provider last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersEndpointSetBody contains the request body for Set. +type IntegrationsInstanceGroupsProvidersEndpointSetBody struct { + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// List returns a paginated list of integration instance group providers. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) List(params *IntegrationsInstanceGroupsProvidersEndpointListParams) (*providers.IntegrationsInstanceGroupsProvidersListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integration-instance-group-providers"}, + Query: query, + } + var result providers.IntegrationsInstanceGroupsProvidersListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance group provider. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) Get(integrationInstanceGroupProviderId string) (*providers.IntegrationsInstanceGroupsProvidersGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-group-providers", integrationInstanceGroupProviderId}, + } + var result providers.IntegrationsInstanceGroupsProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Set creates or updates the effective integration instance group provider materialization. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) Set(integrationInstanceGroupId string, integrationInstanceProviderId string, body *IntegrationsInstanceGroupsProvidersEndpointSetBody) (*providers.IntegrationsInstanceGroupsProvidersSetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-groups", integrationInstanceGroupId, "providers", integrationInstanceProviderId}, + Body: body, + } + var result providers.IntegrationsInstanceGroupsProvidersSetOutput + if err := e.client.Put(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration instance group provider. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) Delete(integrationInstanceGroupProviderId string) (*providers.IntegrationsInstanceGroupsProvidersDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-group-providers", integrationInstanceGroupProviderId}, + } + var result providers.IntegrationsInstanceGroupsProvidersDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/integrations_instances.go b/v1/endpoints/integrations_instances.go new file mode 100644 index 0000000..7a206e7 --- /dev/null +++ b/v1/endpoints/integrations_instances.go @@ -0,0 +1,170 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instances" +) + +// IntegrationsInstancesEndpoint provides access to integration instances materialize an integration for a specific actor, identity, or runtime configuration. +type IntegrationsInstancesEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstancesEndpoint creates a new IntegrationsInstancesEndpoint. +func NewIntegrationsInstancesEndpoint(client *endpoint.Client) *IntegrationsInstancesEndpoint { + return &IntegrationsInstancesEndpoint{client: client} +} + +// IntegrationsInstancesEndpointListParams contains optional query parameters for List. +type IntegrationsInstancesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + IdentityId *any `json:"identity_id,omitempty"` + IdentityCredentialId *any `json:"identity_credential_id,omitempty"` + IdentityActorId *any `json:"identity_actor_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstancesEndpointCreateSessionTemplateBody contains the request body for CreateSessionTemplate. +type IntegrationsInstancesEndpointCreateSessionTemplateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstancesEndpointCreateSessionBody contains the request body for CreateSession. +type IntegrationsInstancesEndpointCreateSessionBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstancesEndpointCreateBody contains the request body for Create. +type IntegrationsInstancesEndpointCreateBody struct { + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// IntegrationsInstancesEndpointUpdateBody contains the request body for Update. +type IntegrationsInstancesEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// List returns a paginated list of integration instances. +func (e *IntegrationsInstancesEndpoint) List(params *IntegrationsInstancesEndpointListParams) (*instances.IntegrationsInstancesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integration-instances"}, + Query: query, + } + var result instances.IntegrationsInstancesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance. +func (e *IntegrationsInstancesEndpoint) Get(integrationInstanceId string) (*instances.IntegrationsInstancesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances", integrationInstanceId}, + } + var result instances.IntegrationsInstancesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSessionTemplate creates or updates the shared session template for a specific integration instance. +func (e *IntegrationsInstancesEndpoint) CreateSessionTemplate(integrationInstanceId string, body *IntegrationsInstancesEndpointCreateSessionTemplateBody) (*instances.IntegrationsInstancesCreateSessionTemplateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances", integrationInstanceId, "session-template"}, + Body: body, + } + var result instances.IntegrationsInstancesCreateSessionTemplateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSession creates a session from the shared session template of a specific integration instance. +func (e *IntegrationsInstancesEndpoint) CreateSession(integrationInstanceId string, body *IntegrationsInstancesEndpointCreateSessionBody) (*instances.IntegrationsInstancesCreateSessionOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances", integrationInstanceId, "session"}, + Body: body, + } + var result instances.IntegrationsInstancesCreateSessionOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration instance. +func (e *IntegrationsInstancesEndpoint) Create(body *IntegrationsInstancesEndpointCreateBody) (*instances.IntegrationsInstancesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances"}, + Body: body, + } + var result instances.IntegrationsInstancesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration instance. +func (e *IntegrationsInstancesEndpoint) Update(integrationInstanceId string, body *IntegrationsInstancesEndpointUpdateBody) (*instances.IntegrationsInstancesUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances", integrationInstanceId}, + Body: body, + } + var result instances.IntegrationsInstancesUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration instance. +func (e *IntegrationsInstancesEndpoint) Delete(integrationInstanceId string) (*instances.IntegrationsInstancesDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances", integrationInstanceId}, + } + var result instances.IntegrationsInstancesDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/integrations_instances_providers.go b/v1/endpoints/integrations_instances_providers.go new file mode 100644 index 0000000..f05b612 --- /dev/null +++ b/v1/endpoints/integrations_instances_providers.go @@ -0,0 +1,91 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instances/providers" +) + +// IntegrationsInstancesProvidersEndpoint provides access to integration instance providers resolve the effective per-instance provider materialization for an integration. +type IntegrationsInstancesProvidersEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstancesProvidersEndpoint creates a new IntegrationsInstancesProvidersEndpoint. +func NewIntegrationsInstancesProvidersEndpoint(client *endpoint.Client) *IntegrationsInstancesProvidersEndpoint { + return &IntegrationsInstancesProvidersEndpoint{client: client} +} + +// IntegrationsInstancesProvidersEndpointListParams contains optional query parameters for List. +type IntegrationsInstancesProvidersEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance provider creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance provider last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstancesProvidersEndpointSetBody contains the request body for Set. +type IntegrationsInstancesProvidersEndpointSetBody struct { + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` + IsOverrideToolFilter *bool `json:"is_override_tool_filter,omitempty"` +} + +// List returns a paginated list of integration instance providers. +func (e *IntegrationsInstancesProvidersEndpoint) List(params *IntegrationsInstancesProvidersEndpointListParams) (*providers.IntegrationsInstancesProvidersListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integration-instance-providers"}, + Query: query, + } + var result providers.IntegrationsInstancesProvidersListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance provider. +func (e *IntegrationsInstancesProvidersEndpoint) Get(integrationInstanceProviderId string) (*providers.IntegrationsInstancesProvidersGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instance-providers", integrationInstanceProviderId}, + } + var result providers.IntegrationsInstancesProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Set creates or updates the effective integration instance provider materialization. +func (e *IntegrationsInstancesProvidersEndpoint) Set(integrationInstanceId string, providerId string, body *IntegrationsInstancesProvidersEndpointSetBody) (*providers.IntegrationsInstancesProvidersSetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-instances", integrationInstanceId, "providers", providerId}, + Body: body, + } + var result providers.IntegrationsInstancesProvidersSetOutput + if err := e.client.Put(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/integrations_providers.go b/v1/endpoints/integrations_providers.go new file mode 100644 index 0000000..8f66b61 --- /dev/null +++ b/v1/endpoints/integrations_providers.go @@ -0,0 +1,131 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/providers" +) + +// IntegrationsProvidersEndpoint provides access to integration providers define the shared provider-level contract for a given integration. +type IntegrationsProvidersEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsProvidersEndpoint creates a new IntegrationsProvidersEndpoint. +func NewIntegrationsProvidersEndpoint(client *endpoint.Client) *IntegrationsProvidersEndpoint { + return &IntegrationsProvidersEndpoint{client: client} +} + +// IntegrationsProvidersEndpointListParams contains optional query parameters for List. +type IntegrationsProvidersEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *any `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *any `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + // CreatedAt - Filter integration provider creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration provider last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsProvidersEndpointCreateBody contains the request body for Create. +type IntegrationsProvidersEndpointCreateBody struct { + IntegrationId string `json:"integration_id"` + ProviderId string `json:"provider_id"` + ProviderDeploymentId string `json:"provider_deployment_id"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// IntegrationsProvidersEndpointUpdateBody contains the request body for Update. +type IntegrationsProvidersEndpointUpdateBody struct { + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// List returns a paginated list of integration providers. +func (e *IntegrationsProvidersEndpoint) List(params *IntegrationsProvidersEndpointListParams) (*providers.IntegrationsProvidersListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integration-providers"}, + Query: query, + } + var result providers.IntegrationsProvidersListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration provider. +func (e *IntegrationsProvidersEndpoint) Get(integrationProviderId string) (*providers.IntegrationsProvidersGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-providers", integrationProviderId}, + } + var result providers.IntegrationsProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration provider. +func (e *IntegrationsProvidersEndpoint) Create(body *IntegrationsProvidersEndpointCreateBody) (*providers.IntegrationsProvidersCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-providers"}, + Body: body, + } + var result providers.IntegrationsProvidersCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration provider. +func (e *IntegrationsProvidersEndpoint) Update(integrationProviderId string, body *IntegrationsProvidersEndpointUpdateBody) (*providers.IntegrationsProvidersUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-providers", integrationProviderId}, + Body: body, + } + var result providers.IntegrationsProvidersUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration provider. +func (e *IntegrationsProvidersEndpoint) Delete(integrationProviderId string) (*providers.IntegrationsProvidersDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-providers", integrationProviderId}, + } + var result providers.IntegrationsProvidersDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/integrations_setup_sessions.go b/v1/endpoints/integrations_setup_sessions.go new file mode 100644 index 0000000..56ed88f --- /dev/null +++ b/v1/endpoints/integrations_setup_sessions.go @@ -0,0 +1,88 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/setupsessions" +) + +// IntegrationsSetupSessionsEndpoint provides access to integration setup sessions orchestrate configuring every provider required by an integration instance. +type IntegrationsSetupSessionsEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsSetupSessionsEndpoint creates a new IntegrationsSetupSessionsEndpoint. +func NewIntegrationsSetupSessionsEndpoint(client *endpoint.Client) *IntegrationsSetupSessionsEndpoint { + return &IntegrationsSetupSessionsEndpoint{client: client} +} + +// IntegrationsSetupSessionsEndpointListParams contains optional query parameters for List. +type IntegrationsSetupSessionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + // CreatedAt - Filter integration setup session creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration setup session last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsSetupSessionsEndpointCreateBody contains the request body for Create. +type IntegrationsSetupSessionsEndpointCreateBody struct { + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + ExpiresAt *string `json:"expires_at,omitempty"` + RedirectUrl *string `json:"redirect_url,omitempty"` + Configuration *map[string]any `json:"configuration,omitempty"` +} + +// List returns a paginated list of integration setup sessions. +func (e *IntegrationsSetupSessionsEndpoint) List(params *IntegrationsSetupSessionsEndpointListParams) (*setupsessions.IntegrationsSetupSessionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"integration-setup-sessions"}, + Query: query, + } + var result setupsessions.IntegrationsSetupSessionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration setup session. +func (e *IntegrationsSetupSessionsEndpoint) Get(integrationSetupSessionId string) (*setupsessions.IntegrationsSetupSessionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-setup-sessions", integrationSetupSessionId}, + } + var result setupsessions.IntegrationsSetupSessionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration setup session and draft integration instance. +func (e *IntegrationsSetupSessionsEndpoint) Create(body *IntegrationsSetupSessionsEndpointCreateBody) (*setupsessions.IntegrationsSetupSessionsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"integration-setup-sessions"}, + Body: body, + } + var result setupsessions.IntegrationsSetupSessionsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/magic_mcp_endpoints.go b/v1/endpoints/magic_mcp_endpoints.go index 39923fb..8d7cb60 100644 --- a/v1/endpoints/magic_mcp_endpoints.go +++ b/v1/endpoints/magic_mcp_endpoints.go @@ -33,8 +33,8 @@ type MagicMcpEndpointsEndpointCreateBody struct { Description *string `json:"description,omitempty"` Metadata *map[string]any `json:"metadata,omitempty"` ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - MagicMcpServerIds *[]string `json:"magic_mcp_server_ids,omitempty"` - Servers *[]map[string]any `json:"servers,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + MagicMcpServers *[]map[string]any `json:"magic_mcp_servers,omitempty"` } // MagicMcpEndpointsEndpointUpdateBody contains the request body for Update. @@ -46,8 +46,7 @@ type MagicMcpEndpointsEndpointUpdateBody struct { // MagicMcpEndpointsEndpointAddServersBody contains the request body for AddServers. type MagicMcpEndpointsEndpointAddServersBody struct { - MagicMcpServerIds *[]string `json:"magic_mcp_server_ids,omitempty"` - Servers *[]map[string]any `json:"servers,omitempty"` + MagicMcpServers *[]map[string]any `json:"magic_mcp_servers,omitempty"` } // MagicMcpEndpointsEndpointRemoveServersBody contains the request body for RemoveServers. diff --git a/v1/endpoints/magic_mcp_servers.go b/v1/endpoints/magic_mcp_servers.go index 43936b5..ea0d3c8 100644 --- a/v1/endpoints/magic_mcp_servers.go +++ b/v1/endpoints/magic_mcp_servers.go @@ -34,19 +34,19 @@ type MagicMcpServersEndpointListParams struct { // MagicMcpServersEndpointCreateBody contains the request body for Create. type MagicMcpServersEndpointCreateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` } // MagicMcpServersEndpointUpdateBody contains the request body for Update. type MagicMcpServersEndpointUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - Aliases *[]string `json:"aliases,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Aliases *[]string `json:"aliases,omitempty"` } // List returns a paginated list of magic MCP servers. diff --git a/v1/endpoints/magic_mcp_servers_providers.go b/v1/endpoints/magic_mcp_servers_providers.go index 53f68bd..36f1cff 100644 --- a/v1/endpoints/magic_mcp_servers_providers.go +++ b/v1/endpoints/magic_mcp_servers_providers.go @@ -5,7 +5,7 @@ import ( "github.com/metorial/metorial-go/v1/resources/magicmcpservers/providers" ) -// MagicMcpServersProvidersEndpoint provides access to magic MCP server providers define which providers are included in the setup session template backing a magic MCP server. +// MagicMcpServersProvidersEndpoint provides access to magic MCP servers are stable MCP entrypoints backed by one Subspace session template. type MagicMcpServersProvidersEndpoint struct { client *endpoint.Client } @@ -17,22 +17,19 @@ func NewMagicMcpServersProvidersEndpoint(client *endpoint.Client) *MagicMcpServe // MagicMcpServersProvidersEndpointListParams contains optional query parameters for List. type MagicMcpServersProvidersEndpointListParams struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - Status *any `json:"status,omitempty"` - // Id - Filter by magic MCP server provider ID(s) - Id *any `json:"id,omitempty"` - // ProviderId - Filter by provider ID(s) - ProviderId *any `json:"provider_id,omitempty"` - // ProviderDeploymentId - Filter by provider deployment ID(s) - ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` - // ProviderConfigId - Filter by provider config ID(s) - ProviderConfigId *any `json:"provider_config_id,omitempty"` - // ProviderAuthConfigId - Filter by provider auth config ID(s) - ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` // CreatedAt - Filter magic MCP server provider creation time by date range CreatedAt *map[string]any `json:"created_at,omitempty"` // UpdatedAt - Filter magic MCP server provider last update time by date range @@ -41,19 +38,22 @@ type MagicMcpServersProvidersEndpointListParams struct { // MagicMcpServersProvidersEndpointCreateBody contains the request body for Create. type MagicMcpServersProvidersEndpointCreateBody struct { - ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` - ProviderConfigId *string `json:"provider_config_id,omitempty"` - ProviderConfigVaultId *string `json:"provider_config_vault_id,omitempty"` - ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` - ToolFilters *any `json:"tool_filters,omitempty"` + ProviderId string `json:"provider_id"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } // MagicMcpServersProvidersEndpointUpdateBody contains the request body for Update. type MagicMcpServersProvidersEndpointUpdateBody struct { - ToolFilters *any `json:"tool_filters,omitempty"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } -// List returns a paginated list of providers configured for a magic MCP server. +// List returns the backing integration instance providers configured for a magic MCP server. func (e *MagicMcpServersProvidersEndpoint) List(magicMcpServerId string, params *MagicMcpServersProvidersEndpointListParams) (*providers.MagicMcpServersProvidersListOutput, error) { var query map[string]any if params != nil { @@ -70,32 +70,32 @@ func (e *MagicMcpServersProvidersEndpoint) List(magicMcpServerId string, params return &result, nil } -// Get retrieves a specific provider configuration from a magic MCP server. -func (e *MagicMcpServersProvidersEndpoint) Get(magicMcpServerId string, magicMcpServerProviderId string) (*providers.MagicMcpServersProvidersGetOutput, error) { +// Create creates a configurable provider row for a magic MCP server. +func (e *MagicMcpServersProvidersEndpoint) Create(magicMcpServerId string, body *MagicMcpServersProvidersEndpointCreateBody) (*providers.MagicMcpServersProvidersCreateOutput, error) { req := &endpoint.Request{ - Path: []string{"magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, + Path: []string{"magic-mcp-servers", magicMcpServerId, "providers"}, + Body: body, } - var result providers.MagicMcpServersProvidersGetOutput - if err := e.client.Get(req, &result); err != nil { + var result providers.MagicMcpServersProvidersCreateOutput + if err := e.client.Post(req, &result); err != nil { return nil, err } return &result, nil } -// Create adds a new provider configuration to a magic MCP server. -func (e *MagicMcpServersProvidersEndpoint) Create(magicMcpServerId string, body *MagicMcpServersProvidersEndpointCreateBody) (*providers.MagicMcpServersProvidersCreateOutput, error) { +// Get retrieves a specific backing integration instance provider for a magic MCP server. +func (e *MagicMcpServersProvidersEndpoint) Get(magicMcpServerId string, magicMcpServerProviderId string) (*providers.MagicMcpServersProvidersGetOutput, error) { req := &endpoint.Request{ - Path: []string{"magic-mcp-servers", magicMcpServerId, "providers"}, - Body: body, + Path: []string{"magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, } - var result providers.MagicMcpServersProvidersCreateOutput - if err := e.client.Post(req, &result); err != nil { + var result providers.MagicMcpServersProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { return nil, err } return &result, nil } -// Update updates a provider configuration in a magic MCP server. +// Update updates a backing integration provider and then sets the corresponding integration instance provider for a magic MCP server. func (e *MagicMcpServersProvidersEndpoint) Update(magicMcpServerId string, magicMcpServerProviderId string, body *MagicMcpServersProvidersEndpointUpdateBody) (*providers.MagicMcpServersProvidersUpdateOutput, error) { req := &endpoint.Request{ Path: []string{"magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, @@ -108,7 +108,7 @@ func (e *MagicMcpServersProvidersEndpoint) Update(magicMcpServerId string, magic return &result, nil } -// Delete removes a provider configuration from a magic MCP server. +// Delete archives a backing integration instance provider from a magic MCP server and removes the shared integration provider when unused. func (e *MagicMcpServersProvidersEndpoint) Delete(magicMcpServerId string, magicMcpServerProviderId string) (*providers.MagicMcpServersProvidersDeleteOutput, error) { req := &endpoint.Request{ Path: []string{"magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, diff --git a/v1/endpoints/management/agents.go b/v1/endpoints/management/agents.go new file mode 100644 index 0000000..f8ddcf8 --- /dev/null +++ b/v1/endpoints/management/agents.go @@ -0,0 +1,62 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/agents" +) + +// AgentsEndpoint provides access to inspect agents and their linked clients and instances. +type AgentsEndpoint struct { + client *endpoint.Client +} + +// NewAgentsEndpoint creates a new AgentsEndpoint. +func NewAgentsEndpoint(client *endpoint.Client) *AgentsEndpoint { + return &AgentsEndpoint{client: client} +} + +// AgentsEndpointListParams contains optional query parameters for List. +type AgentsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + // CreatedAt - Filter agent creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter agent last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// List returns a paginated list of agents for the instance. +func (e *AgentsEndpoint) List(instanceId string, params *AgentsEndpointListParams) (*agents.AgentsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "agents"}, + Query: query, + } + var result agents.AgentsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific agent by ID. +func (e *AgentsEndpoint) Get(instanceId string, agentId string) (*agents.AgentsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "agents", agentId}, + } + var result agents.AgentsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/agents_instances.go b/v1/endpoints/management/agents_instances.go new file mode 100644 index 0000000..bb864bb --- /dev/null +++ b/v1/endpoints/management/agents_instances.go @@ -0,0 +1,61 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/agents/instances" +) + +// AgentsInstancesEndpoint provides access to inspect agents and their linked clients and instances. +type AgentsInstancesEndpoint struct { + client *endpoint.Client +} + +// NewAgentsInstancesEndpoint creates a new AgentsInstancesEndpoint. +func NewAgentsInstancesEndpoint(client *endpoint.Client) *AgentsInstancesEndpoint { + return &AgentsInstancesEndpoint{client: client} +} + +// AgentsInstancesEndpointListParams contains optional query parameters for List. +type AgentsInstancesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + AgentClientId *any `json:"agent_client_id,omitempty"` + // CreatedAt - Filter agent instance creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter agent instance last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// List returns a paginated list of instances for an agent. +func (e *AgentsInstancesEndpoint) List(instanceId string, agentId string, params *AgentsInstancesEndpointListParams) (*instances.AgentsInstancesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "agents", agentId, "instances"}, + Query: query, + } + var result instances.AgentsInstancesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific agent instance by ID. +func (e *AgentsInstancesEndpoint) Get(instanceId string, agentId string, agentInstanceId string) (*instances.AgentsInstancesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "agents", agentId, "instances", agentInstanceId}, + } + var result instances.AgentsInstancesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/assistants.go b/v1/endpoints/management/assistants.go new file mode 100644 index 0000000..2d41fb6 --- /dev/null +++ b/v1/endpoints/management/assistants.go @@ -0,0 +1,54 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/assistants" +) + +// AssistantsEndpoint provides access to assistant and conversation endpoints +type AssistantsEndpoint struct { + client *endpoint.Client +} + +// NewAssistantsEndpoint creates a new AssistantsEndpoint. +func NewAssistantsEndpoint(client *endpoint.Client) *AssistantsEndpoint { + return &AssistantsEndpoint{client: client} +} + +// AssistantsEndpointListParams contains optional query parameters for List. +type AssistantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List list assistants available in an instance. +func (e *AssistantsEndpoint) List(instanceId string, params *AssistantsEndpointListParams) (*assistants.AssistantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "assistants"}, + Query: query, + } + var result assistants.AssistantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get get an assistant available in an instance. +func (e *AssistantsEndpoint) Get(instanceId string, assistantId string) (*assistants.AssistantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "assistants", assistantId}, + } + var result assistants.AssistantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/callbacks_instances.go b/v1/endpoints/management/callbacks_instances.go index f615002..4910d2d 100644 --- a/v1/endpoints/management/callbacks_instances.go +++ b/v1/endpoints/management/callbacks_instances.go @@ -61,6 +61,18 @@ func (e *CallbacksInstancesEndpoint) List(instanceId string, callbackId string, return &result, nil } +// Get retrieves a specific callback instance by ID. +func (e *CallbacksInstancesEndpoint) Get(instanceId string, callbackId string, callbackInstanceId string) (*instances.CallbacksInstancesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "callbacks", callbackId, "instances", callbackInstanceId}, + } + var result instances.CallbacksInstancesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + // Create attaches a callback to a config and optional auth config. func (e *CallbacksInstancesEndpoint) Create(instanceId string, callbackId string, body *CallbacksInstancesEndpointCreateBody) (*instances.CallbacksInstancesCreateOutput, error) { req := &endpoint.Request{ diff --git a/v1/endpoints/management/conversations.go b/v1/endpoints/management/conversations.go new file mode 100644 index 0000000..8b89ce3 --- /dev/null +++ b/v1/endpoints/management/conversations.go @@ -0,0 +1,92 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/conversations" +) + +// ConversationsEndpoint provides access to assistant and conversation endpoints +type ConversationsEndpoint struct { + client *endpoint.Client +} + +// NewConversationsEndpoint creates a new ConversationsEndpoint. +func NewConversationsEndpoint(client *endpoint.Client) *ConversationsEndpoint { + return &ConversationsEndpoint{client: client} +} + +// ConversationsEndpointListParams contains optional query parameters for List. +type ConversationsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + AssistantId *any `json:"assistant_id,omitempty"` +} + +// ConversationsEndpointCreateBody contains the request body for Create. +type ConversationsEndpointCreateBody struct { + AssistantId string `json:"assistant_id"` + Title *string `json:"title,omitempty"` +} + +// ConversationsEndpointUpdateBody contains the request body for Update. +type ConversationsEndpointUpdateBody struct { + Title *string `json:"title,omitempty"` +} + +// List list assistant conversations in an instance. +func (e *ConversationsEndpoint) List(instanceId string, params *ConversationsEndpointListParams) (*conversations.ConversationsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations"}, + Query: query, + } + var result conversations.ConversationsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create create a new assistant conversation in an instance. +func (e *ConversationsEndpoint) Create(instanceId string, body *ConversationsEndpointCreateBody) (*conversations.ConversationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations"}, + Body: body, + } + var result conversations.ConversationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get get a specific assistant conversation. +func (e *ConversationsEndpoint) Get(instanceId string, assistantConversationId string) (*conversations.ConversationsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations", assistantConversationId}, + } + var result conversations.ConversationsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update update a specific assistant conversation. +func (e *ConversationsEndpoint) Update(instanceId string, assistantConversationId string, body *ConversationsEndpointUpdateBody) (*conversations.ConversationsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations", assistantConversationId}, + Body: body, + } + var result conversations.ConversationsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/conversations_messages.go b/v1/endpoints/management/conversations_messages.go new file mode 100644 index 0000000..5e047f3 --- /dev/null +++ b/v1/endpoints/management/conversations_messages.go @@ -0,0 +1,74 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/conversations/messages" +) + +// ConversationsMessagesEndpoint provides access to assistant and conversation endpoints +type ConversationsMessagesEndpoint struct { + client *endpoint.Client +} + +// NewConversationsMessagesEndpoint creates a new ConversationsMessagesEndpoint. +func NewConversationsMessagesEndpoint(client *endpoint.Client) *ConversationsMessagesEndpoint { + return &ConversationsMessagesEndpoint{client: client} +} + +// ConversationsMessagesEndpointListParams contains optional query parameters for List. +type ConversationsMessagesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// ConversationsMessagesEndpointCreateBody contains the request body for Create. +type ConversationsMessagesEndpointCreateBody struct { + Message map[string]any `json:"message"` + ParentMessageId *string `json:"parent_message_id,omitempty"` + ModelId *string `json:"model_id,omitempty"` +} + +// List list messages in a specific assistant conversation. +func (e *ConversationsMessagesEndpoint) List(instanceId string, assistantConversationId string, params *ConversationsMessagesEndpointListParams) (*messages.ConversationsMessagesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations", assistantConversationId, "messages"}, + Query: query, + } + var result messages.ConversationsMessagesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create create a user message and assistant request in a specific conversation. +func (e *ConversationsMessagesEndpoint) Create(instanceId string, assistantConversationId string, body *ConversationsMessagesEndpointCreateBody) (*messages.ConversationsMessagesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations", assistantConversationId, "messages"}, + Body: body, + } + var result messages.ConversationsMessagesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get get a specific assistant message. +func (e *ConversationsMessagesEndpoint) Get(instanceId string, assistantConversationId string, assistantMessageId string) (*messages.ConversationsMessagesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "conversations", assistantConversationId, "messages", assistantMessageId}, + } + var result messages.ConversationsMessagesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/documents.go b/v1/endpoints/management/documents.go new file mode 100644 index 0000000..5cb802c --- /dev/null +++ b/v1/endpoints/management/documents.go @@ -0,0 +1,135 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents" +) + +// DocumentsEndpoint provides access to create and manage instance documents backed by Cargo. +type DocumentsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsEndpoint creates a new DocumentsEndpoint. +func NewDocumentsEndpoint(client *endpoint.Client) *DocumentsEndpoint { + return &DocumentsEndpoint{client: client} +} + +// DocumentsEndpointListParams contains optional query parameters for List. +type DocumentsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document ID + Id *any `json:"id,omitempty"` + // FileId - Filter by file ID + FileId *any `json:"file_id,omitempty"` + // StoreId - Filter by store ID + StoreId *any `json:"store_id,omitempty"` + // ParentDocumentId - Filter by parent document ID + ParentDocumentId *any `json:"parent_document_id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// DocumentsEndpointCreateBody contains the request body for Create. +type DocumentsEndpointCreateBody struct { + Title string `json:"title"` + Content string `json:"content"` +} + +// DocumentsEndpointUpdateBody contains the request body for Update. +type DocumentsEndpointUpdateBody struct { + Title *string `json:"title,omitempty"` + Content *string `json:"content,omitempty"` +} + +// DocumentsEndpointCloneBody contains the request body for Clone. +type DocumentsEndpointCloneBody struct { + TargetDocumentId *string `json:"target_document_id,omitempty"` + Title *string `json:"title,omitempty"` +} + +// List returns a paginated list of documents owned by the instance. +func (e *DocumentsEndpoint) List(instanceId string, params *DocumentsEndpointListParams) (*documents.DocumentsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents"}, + Query: query, + } + var result documents.DocumentsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new document for the instance. +func (e *DocumentsEndpoint) Create(instanceId string, body *DocumentsEndpointCreateBody) (*documents.DocumentsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents"}, + Body: body, + } + var result documents.DocumentsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a document by its ID. +func (e *DocumentsEndpoint) Get(instanceId string, documentId string) (*documents.DocumentsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId}, + } + var result documents.DocumentsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific document. +func (e *DocumentsEndpoint) Update(instanceId string, documentId string, body *DocumentsEndpointUpdateBody) (*documents.DocumentsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId}, + Body: body, + } + var result documents.DocumentsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a specific document. +func (e *DocumentsEndpoint) Delete(instanceId string, documentId string) (*documents.DocumentsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId}, + } + var result documents.DocumentsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Clone clones a specific document. +func (e *DocumentsEndpoint) Clone(instanceId string, documentId string, body *DocumentsEndpointCloneBody) (*documents.DocumentsCloneOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId, "clone"}, + Body: body, + } + var result documents.DocumentsCloneOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/documents_participants.go b/v1/endpoints/management/documents_participants.go new file mode 100644 index 0000000..6ac4704 --- /dev/null +++ b/v1/endpoints/management/documents_participants.go @@ -0,0 +1,60 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents/participants" +) + +// DocumentsParticipantsEndpoint provides access to inspect document participants and their linked Metorial resources. +type DocumentsParticipantsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsParticipantsEndpoint creates a new DocumentsParticipantsEndpoint. +func NewDocumentsParticipantsEndpoint(client *endpoint.Client) *DocumentsParticipantsEndpoint { + return &DocumentsParticipantsEndpoint{client: client} +} + +// DocumentsParticipantsEndpointListParams contains optional query parameters for List. +type DocumentsParticipantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document participant ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// List returns a paginated list of participants for a specific document. +func (e *DocumentsParticipantsEndpoint) List(instanceId string, documentId string, params *DocumentsParticipantsEndpointListParams) (*participants.DocumentsParticipantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId, "participants"}, + Query: query, + } + var result participants.DocumentsParticipantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific document participant by its ID. +func (e *DocumentsParticipantsEndpoint) Get(instanceId string, documentId string, documentParticipantId string) (*participants.DocumentsParticipantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId, "participants", documentParticipantId}, + } + var result participants.DocumentsParticipantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/documents_permissions.go b/v1/endpoints/management/documents_permissions.go new file mode 100644 index 0000000..d893713 --- /dev/null +++ b/v1/endpoints/management/documents_permissions.go @@ -0,0 +1,28 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents/permissions" +) + +// DocumentsPermissionsEndpoint provides access to create and manage instance documents backed by Cargo. +type DocumentsPermissionsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsPermissionsEndpoint creates a new DocumentsPermissionsEndpoint. +func NewDocumentsPermissionsEndpoint(client *endpoint.Client) *DocumentsPermissionsEndpoint { + return &DocumentsPermissionsEndpoint{client: client} +} + +// Get returns the effective Cargo permissions for the current actor on a specific document. +func (e *DocumentsPermissionsEndpoint) Get(instanceId string, documentId string) (*permissions.DocumentsPermissionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId, "permissions"}, + } + var result permissions.DocumentsPermissionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/documents_versions.go b/v1/endpoints/management/documents_versions.go new file mode 100644 index 0000000..35a1d6a --- /dev/null +++ b/v1/endpoints/management/documents_versions.go @@ -0,0 +1,60 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/documents/versions" +) + +// DocumentsVersionsEndpoint provides access to inspect document version history for an instance document. +type DocumentsVersionsEndpoint struct { + client *endpoint.Client +} + +// NewDocumentsVersionsEndpoint creates a new DocumentsVersionsEndpoint. +func NewDocumentsVersionsEndpoint(client *endpoint.Client) *DocumentsVersionsEndpoint { + return &DocumentsVersionsEndpoint{client: client} +} + +// DocumentsVersionsEndpointListParams contains optional query parameters for List. +type DocumentsVersionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document version ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // LastEditedAt - Filter Filter by last edit time by date range + LastEditedAt *map[string]any `json:"last_edited_at,omitempty"` +} + +// List returns a paginated list of versions for a specific document. +func (e *DocumentsVersionsEndpoint) List(instanceId string, documentId string, params *DocumentsVersionsEndpointListParams) (*versions.DocumentsVersionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId, "versions"}, + Query: query, + } + var result versions.DocumentsVersionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific document version by its ID. +func (e *DocumentsVersionsEndpoint) Get(instanceId string, documentId string, documentVersionId string) (*versions.DocumentsVersionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "documents", documentId, "versions", documentVersionId}, + } + var result versions.DocumentsVersionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/files.go b/v1/endpoints/management/files.go index 5125bd9..872beb4 100644 --- a/v1/endpoints/management/files.go +++ b/v1/endpoints/management/files.go @@ -22,8 +22,20 @@ type FilesEndpointListParams struct { Before *string `json:"before,omitempty"` Cursor *string `json:"cursor,omitempty"` Order *string `json:"order,omitempty"` + // Id - Filter by file ID + Id *any `json:"id,omitempty"` // Purpose - Filter by file purpose - Purpose *string `json:"purpose,omitempty"` + Purpose *any `json:"purpose,omitempty"` + // StoreId - Filter by store ID + StoreId *any `json:"store_id,omitempty"` + // DocumentId - Filter by document ID + DocumentId *any `json:"document_id,omitempty"` + // FileLinkId - Filter by file link ID + FileLinkId *any `json:"file_link_id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` } // List returns a paginated list of files owned by the instance. diff --git a/v1/endpoints/management/file_links.go b/v1/endpoints/management/files_links.go similarity index 54% rename from v1/endpoints/management/file_links.go rename to v1/endpoints/management/files_links.go index db0f21d..4c7bb48 100644 --- a/v1/endpoints/management/file_links.go +++ b/v1/endpoints/management/files_links.go @@ -2,21 +2,21 @@ package management import ( "github.com/metorial/metorial-go/v1/internal/endpoint" - "github.com/metorial/metorial-go/v1/resources/filelinks" + "github.com/metorial/metorial-go/v1/resources/files/links" ) -// FileLinksEndpoint provides access to files are private by default. If you want to share a file, you can create a link for it. Links are public and do not require authentication to access, so be careful with what you share. -type FileLinksEndpoint struct { +// FilesLinksEndpoint provides access to files are private by default. If you want to share a file, you can create a link for it. Links are public and do not require authentication to access, so be careful with what you share. +type FilesLinksEndpoint struct { client *endpoint.Client } -// NewFileLinksEndpoint creates a new FileLinksEndpoint. -func NewFileLinksEndpoint(client *endpoint.Client) *FileLinksEndpoint { - return &FileLinksEndpoint{client: client} +// NewFilesLinksEndpoint creates a new FilesLinksEndpoint. +func NewFilesLinksEndpoint(client *endpoint.Client) *FilesLinksEndpoint { + return &FilesLinksEndpoint{client: client} } -// FileLinksEndpointListParams contains optional query parameters for List. -type FileLinksEndpointListParams struct { +// FilesLinksEndpointListParams contains optional query parameters for List. +type FilesLinksEndpointListParams struct { Limit *float64 `json:"limit,omitempty"` After *string `json:"after,omitempty"` Before *string `json:"before,omitempty"` @@ -26,14 +26,14 @@ type FileLinksEndpointListParams struct { FileId *string `json:"file_id,omitempty"` } -// FileLinksEndpointCreateBody contains the request body for Create. -type FileLinksEndpointCreateBody struct { +// FilesLinksEndpointCreateBody contains the request body for Create. +type FilesLinksEndpointCreateBody struct { FileId string `json:"file_id"` ExpiresAt *string `json:"expires_at,omitempty"` } // List returns a paginated list of file links owned by the instance organization. -func (e *FileLinksEndpoint) List(instanceId string, params *FileLinksEndpointListParams) (*filelinks.FileLinksListOutput, error) { +func (e *FilesLinksEndpoint) List(instanceId string, params *FilesLinksEndpointListParams) (*links.FilesLinksListOutput, error) { var query map[string]any if params != nil { query = endpoint.StructToQuery(params) @@ -42,7 +42,7 @@ func (e *FileLinksEndpoint) List(instanceId string, params *FileLinksEndpointLis Path: []string{"instances", instanceId, "file-links"}, Query: query, } - var result filelinks.FileLinksListOutput + var result links.FilesLinksListOutput if err := e.client.Get(req, &result); err != nil { return nil, err } @@ -50,11 +50,11 @@ func (e *FileLinksEndpoint) List(instanceId string, params *FileLinksEndpointLis } // Get retrieves the details of a specific file link by its ID. -func (e *FileLinksEndpoint) Get(instanceId string, linkId string) (*filelinks.FileLinksGetOutput, error) { +func (e *FilesLinksEndpoint) Get(instanceId string, linkId string) (*links.FilesLinksGetOutput, error) { req := &endpoint.Request{ Path: []string{"instances", instanceId, "file-links", linkId}, } - var result filelinks.FileLinksGetOutput + var result links.FilesLinksGetOutput if err := e.client.Get(req, &result); err != nil { return nil, err } @@ -62,12 +62,12 @@ func (e *FileLinksEndpoint) Get(instanceId string, linkId string) (*filelinks.Fi } // Create creates a new link for a specific file. -func (e *FileLinksEndpoint) Create(instanceId string, body *FileLinksEndpointCreateBody) (*filelinks.FileLinksCreateOutput, error) { +func (e *FilesLinksEndpoint) Create(instanceId string, body *FilesLinksEndpointCreateBody) (*links.FilesLinksCreateOutput, error) { req := &endpoint.Request{ Path: []string{"instances", instanceId, "file-links"}, Body: body, } - var result filelinks.FileLinksCreateOutput + var result links.FilesLinksCreateOutput if err := e.client.Post(req, &result); err != nil { return nil, err } @@ -75,11 +75,11 @@ func (e *FileLinksEndpoint) Create(instanceId string, body *FileLinksEndpointCre } // Delete deletes a specific file link by its ID. -func (e *FileLinksEndpoint) Delete(instanceId string, linkId string) (*filelinks.FileLinksDeleteOutput, error) { +func (e *FilesLinksEndpoint) Delete(instanceId string, linkId string) (*links.FilesLinksDeleteOutput, error) { req := &endpoint.Request{ Path: []string{"instances", instanceId, "file-links", linkId}, } - var result filelinks.FileLinksDeleteOutput + var result links.FilesLinksDeleteOutput if err := e.client.Delete(req, &result); err != nil { return nil, err } diff --git a/v1/endpoints/management/integrations.go b/v1/endpoints/management/integrations.go new file mode 100644 index 0000000..a6e6563 --- /dev/null +++ b/v1/endpoints/management/integrations.go @@ -0,0 +1,121 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations" +) + +// IntegrationsEndpoint provides access to integrations define reusable provider contracts that can then be materialized into integration instances. +type IntegrationsEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsEndpoint creates a new IntegrationsEndpoint. +func NewIntegrationsEndpoint(client *endpoint.Client) *IntegrationsEndpoint { + return &IntegrationsEndpoint{client: client} +} + +// IntegrationsEndpointListParams contains optional query parameters for List. +type IntegrationsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + // CreatedAt - Filter integration creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsEndpointCreateBody contains the request body for Create. +type IntegrationsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CanAttachCustomToolFilters *bool `json:"can_attach_custom_tool_filters,omitempty"` + CanAttachCustomProviderConfig *bool `json:"can_attach_custom_provider_config,omitempty"` + CanOverrideToolFilters *bool `json:"can_override_tool_filters,omitempty"` +} + +// IntegrationsEndpointUpdateBody contains the request body for Update. +type IntegrationsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CanAttachCustomToolFilters *bool `json:"can_attach_custom_tool_filters,omitempty"` + CanAttachCustomProviderConfig *bool `json:"can_attach_custom_provider_config,omitempty"` + CanOverrideToolFilters *bool `json:"can_override_tool_filters,omitempty"` +} + +// List returns a paginated list of integrations. +func (e *IntegrationsEndpoint) List(instanceId string, params *IntegrationsEndpointListParams) (*integrations.IntegrationsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integrations"}, + Query: query, + } + var result integrations.IntegrationsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration. +func (e *IntegrationsEndpoint) Get(instanceId string, integrationId string) (*integrations.IntegrationsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integrations", integrationId}, + } + var result integrations.IntegrationsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration. +func (e *IntegrationsEndpoint) Create(instanceId string, body *IntegrationsEndpointCreateBody) (*integrations.IntegrationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integrations"}, + Body: body, + } + var result integrations.IntegrationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration. +func (e *IntegrationsEndpoint) Update(instanceId string, integrationId string, body *IntegrationsEndpointUpdateBody) (*integrations.IntegrationsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integrations", integrationId}, + Body: body, + } + var result integrations.IntegrationsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration. +func (e *IntegrationsEndpoint) Delete(instanceId string, integrationId string) (*integrations.IntegrationsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integrations", integrationId}, + } + var result integrations.IntegrationsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/integrations_instance_groups.go b/v1/endpoints/management/integrations_instance_groups.go new file mode 100644 index 0000000..26b01e7 --- /dev/null +++ b/v1/endpoints/management/integrations_instance_groups.go @@ -0,0 +1,163 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instancegroups" +) + +// IntegrationsInstanceGroupsEndpoint provides access to integration instance groups combine instance providers into a grouped routed configuration. +type IntegrationsInstanceGroupsEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstanceGroupsEndpoint creates a new IntegrationsInstanceGroupsEndpoint. +func NewIntegrationsInstanceGroupsEndpoint(client *endpoint.Client) *IntegrationsInstanceGroupsEndpoint { + return &IntegrationsInstanceGroupsEndpoint{client: client} +} + +// IntegrationsInstanceGroupsEndpointListParams contains optional query parameters for List. +type IntegrationsInstanceGroupsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance group creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance group last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointCreateSessionTemplateBody contains the request body for CreateSessionTemplate. +type IntegrationsInstanceGroupsEndpointCreateSessionTemplateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointCreateSessionBody contains the request body for CreateSession. +type IntegrationsInstanceGroupsEndpointCreateSessionBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointCreateBody contains the request body for Create. +type IntegrationsInstanceGroupsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// IntegrationsInstanceGroupsEndpointUpdateBody contains the request body for Update. +type IntegrationsInstanceGroupsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// List returns a paginated list of integration instance groups. +func (e *IntegrationsInstanceGroupsEndpoint) List(instanceId string, params *IntegrationsInstanceGroupsEndpointListParams) (*instancegroups.IntegrationsInstanceGroupsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups"}, + Query: query, + } + var result instancegroups.IntegrationsInstanceGroupsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Get(instanceId string, integrationInstanceGroupId string) (*instancegroups.IntegrationsInstanceGroupsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups", integrationInstanceGroupId}, + } + var result instancegroups.IntegrationsInstanceGroupsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSessionTemplate creates or updates the shared session template for a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) CreateSessionTemplate(instanceId string, integrationInstanceGroupId string, body *IntegrationsInstanceGroupsEndpointCreateSessionTemplateBody) (*instancegroups.IntegrationsInstanceGroupsCreateSessionTemplateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups", integrationInstanceGroupId, "session-template"}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsCreateSessionTemplateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSession creates a session from the shared session template of a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) CreateSession(instanceId string, integrationInstanceGroupId string, body *IntegrationsInstanceGroupsEndpointCreateSessionBody) (*instancegroups.IntegrationsInstanceGroupsCreateSessionOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups", integrationInstanceGroupId, "session"}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsCreateSessionOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Create(instanceId string, body *IntegrationsInstanceGroupsEndpointCreateBody) (*instancegroups.IntegrationsInstanceGroupsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups"}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Update(instanceId string, integrationInstanceGroupId string, body *IntegrationsInstanceGroupsEndpointUpdateBody) (*instancegroups.IntegrationsInstanceGroupsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups", integrationInstanceGroupId}, + Body: body, + } + var result instancegroups.IntegrationsInstanceGroupsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration instance group. +func (e *IntegrationsInstanceGroupsEndpoint) Delete(instanceId string, integrationInstanceGroupId string) (*instancegroups.IntegrationsInstanceGroupsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups", integrationInstanceGroupId}, + } + var result instancegroups.IntegrationsInstanceGroupsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/integrations_instance_groups_providers.go b/v1/endpoints/management/integrations_instance_groups_providers.go new file mode 100644 index 0000000..ad0f0b5 --- /dev/null +++ b/v1/endpoints/management/integrations_instance_groups_providers.go @@ -0,0 +1,100 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instancegroups/providers" +) + +// IntegrationsInstanceGroupsProvidersEndpoint provides access to integration instance group providers define the effective routed provider set for an integration instance group. +type IntegrationsInstanceGroupsProvidersEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstanceGroupsProvidersEndpoint creates a new IntegrationsInstanceGroupsProvidersEndpoint. +func NewIntegrationsInstanceGroupsProvidersEndpoint(client *endpoint.Client) *IntegrationsInstanceGroupsProvidersEndpoint { + return &IntegrationsInstanceGroupsProvidersEndpoint{client: client} +} + +// IntegrationsInstanceGroupsProvidersEndpointListParams contains optional query parameters for List. +type IntegrationsInstanceGroupsProvidersEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationInstanceGroupId *any `json:"integration_instance_group_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance group provider creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance group provider last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersEndpointSetBody contains the request body for Set. +type IntegrationsInstanceGroupsProvidersEndpointSetBody struct { + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// List returns a paginated list of integration instance group providers. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) List(instanceId string, params *IntegrationsInstanceGroupsProvidersEndpointListParams) (*providers.IntegrationsInstanceGroupsProvidersListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-group-providers"}, + Query: query, + } + var result providers.IntegrationsInstanceGroupsProvidersListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance group provider. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) Get(instanceId string, integrationInstanceGroupProviderId string) (*providers.IntegrationsInstanceGroupsProvidersGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-group-providers", integrationInstanceGroupProviderId}, + } + var result providers.IntegrationsInstanceGroupsProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Set creates or updates the effective integration instance group provider materialization. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) Set(instanceId string, integrationInstanceGroupId string, integrationInstanceProviderId string, body *IntegrationsInstanceGroupsProvidersEndpointSetBody) (*providers.IntegrationsInstanceGroupsProvidersSetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-groups", integrationInstanceGroupId, "providers", integrationInstanceProviderId}, + Body: body, + } + var result providers.IntegrationsInstanceGroupsProvidersSetOutput + if err := e.client.Put(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration instance group provider. +func (e *IntegrationsInstanceGroupsProvidersEndpoint) Delete(instanceId string, integrationInstanceGroupProviderId string) (*providers.IntegrationsInstanceGroupsProvidersDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-group-providers", integrationInstanceGroupProviderId}, + } + var result providers.IntegrationsInstanceGroupsProvidersDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/integrations_instances.go b/v1/endpoints/management/integrations_instances.go new file mode 100644 index 0000000..24ebaac --- /dev/null +++ b/v1/endpoints/management/integrations_instances.go @@ -0,0 +1,170 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instances" +) + +// IntegrationsInstancesEndpoint provides access to integration instances materialize an integration for a specific actor, identity, or runtime configuration. +type IntegrationsInstancesEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstancesEndpoint creates a new IntegrationsInstancesEndpoint. +func NewIntegrationsInstancesEndpoint(client *endpoint.Client) *IntegrationsInstancesEndpoint { + return &IntegrationsInstancesEndpoint{client: client} +} + +// IntegrationsInstancesEndpointListParams contains optional query parameters for List. +type IntegrationsInstancesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + IdentityId *any `json:"identity_id,omitempty"` + IdentityCredentialId *any `json:"identity_credential_id,omitempty"` + IdentityActorId *any `json:"identity_actor_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstancesEndpointCreateSessionTemplateBody contains the request body for CreateSessionTemplate. +type IntegrationsInstancesEndpointCreateSessionTemplateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstancesEndpointCreateSessionBody contains the request body for CreateSession. +type IntegrationsInstancesEndpointCreateSessionBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// IntegrationsInstancesEndpointCreateBody contains the request body for Create. +type IntegrationsInstancesEndpointCreateBody struct { + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// IntegrationsInstancesEndpointUpdateBody contains the request body for Update. +type IntegrationsInstancesEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` +} + +// List returns a paginated list of integration instances. +func (e *IntegrationsInstancesEndpoint) List(instanceId string, params *IntegrationsInstancesEndpointListParams) (*instances.IntegrationsInstancesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances"}, + Query: query, + } + var result instances.IntegrationsInstancesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance. +func (e *IntegrationsInstancesEndpoint) Get(instanceId string, integrationInstanceId string) (*instances.IntegrationsInstancesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances", integrationInstanceId}, + } + var result instances.IntegrationsInstancesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSessionTemplate creates or updates the shared session template for a specific integration instance. +func (e *IntegrationsInstancesEndpoint) CreateSessionTemplate(instanceId string, integrationInstanceId string, body *IntegrationsInstancesEndpointCreateSessionTemplateBody) (*instances.IntegrationsInstancesCreateSessionTemplateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances", integrationInstanceId, "session-template"}, + Body: body, + } + var result instances.IntegrationsInstancesCreateSessionTemplateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// CreateSession creates a session from the shared session template of a specific integration instance. +func (e *IntegrationsInstancesEndpoint) CreateSession(instanceId string, integrationInstanceId string, body *IntegrationsInstancesEndpointCreateSessionBody) (*instances.IntegrationsInstancesCreateSessionOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances", integrationInstanceId, "session"}, + Body: body, + } + var result instances.IntegrationsInstancesCreateSessionOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration instance. +func (e *IntegrationsInstancesEndpoint) Create(instanceId string, body *IntegrationsInstancesEndpointCreateBody) (*instances.IntegrationsInstancesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances"}, + Body: body, + } + var result instances.IntegrationsInstancesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration instance. +func (e *IntegrationsInstancesEndpoint) Update(instanceId string, integrationInstanceId string, body *IntegrationsInstancesEndpointUpdateBody) (*instances.IntegrationsInstancesUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances", integrationInstanceId}, + Body: body, + } + var result instances.IntegrationsInstancesUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration instance. +func (e *IntegrationsInstancesEndpoint) Delete(instanceId string, integrationInstanceId string) (*instances.IntegrationsInstancesDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances", integrationInstanceId}, + } + var result instances.IntegrationsInstancesDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/integrations_instances_providers.go b/v1/endpoints/management/integrations_instances_providers.go new file mode 100644 index 0000000..6b70320 --- /dev/null +++ b/v1/endpoints/management/integrations_instances_providers.go @@ -0,0 +1,91 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/instances/providers" +) + +// IntegrationsInstancesProvidersEndpoint provides access to integration instance providers resolve the effective per-instance provider materialization for an integration. +type IntegrationsInstancesProvidersEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsInstancesProvidersEndpoint creates a new IntegrationsInstancesProvidersEndpoint. +func NewIntegrationsInstancesProvidersEndpoint(client *endpoint.Client) *IntegrationsInstancesProvidersEndpoint { + return &IntegrationsInstancesProvidersEndpoint{client: client} +} + +// IntegrationsInstancesProvidersEndpointListParams contains optional query parameters for List. +type IntegrationsInstancesProvidersEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance provider creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance provider last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsInstancesProvidersEndpointSetBody contains the request body for Set. +type IntegrationsInstancesProvidersEndpointSetBody struct { + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` + IsOverrideToolFilter *bool `json:"is_override_tool_filter,omitempty"` +} + +// List returns a paginated list of integration instance providers. +func (e *IntegrationsInstancesProvidersEndpoint) List(instanceId string, params *IntegrationsInstancesProvidersEndpointListParams) (*providers.IntegrationsInstancesProvidersListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-providers"}, + Query: query, + } + var result providers.IntegrationsInstancesProvidersListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration instance provider. +func (e *IntegrationsInstancesProvidersEndpoint) Get(instanceId string, integrationInstanceProviderId string) (*providers.IntegrationsInstancesProvidersGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instance-providers", integrationInstanceProviderId}, + } + var result providers.IntegrationsInstancesProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Set creates or updates the effective integration instance provider materialization. +func (e *IntegrationsInstancesProvidersEndpoint) Set(instanceId string, integrationInstanceId string, providerId string, body *IntegrationsInstancesProvidersEndpointSetBody) (*providers.IntegrationsInstancesProvidersSetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-instances", integrationInstanceId, "providers", providerId}, + Body: body, + } + var result providers.IntegrationsInstancesProvidersSetOutput + if err := e.client.Put(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/integrations_providers.go b/v1/endpoints/management/integrations_providers.go new file mode 100644 index 0000000..f933811 --- /dev/null +++ b/v1/endpoints/management/integrations_providers.go @@ -0,0 +1,131 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/providers" +) + +// IntegrationsProvidersEndpoint provides access to integration providers define the shared provider-level contract for a given integration. +type IntegrationsProvidersEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsProvidersEndpoint creates a new IntegrationsProvidersEndpoint. +func NewIntegrationsProvidersEndpoint(client *endpoint.Client) *IntegrationsProvidersEndpoint { + return &IntegrationsProvidersEndpoint{client: client} +} + +// IntegrationsProvidersEndpointListParams contains optional query parameters for List. +type IntegrationsProvidersEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *any `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *any `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + // CreatedAt - Filter integration provider creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration provider last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsProvidersEndpointCreateBody contains the request body for Create. +type IntegrationsProvidersEndpointCreateBody struct { + IntegrationId string `json:"integration_id"` + ProviderId string `json:"provider_id"` + ProviderDeploymentId string `json:"provider_deployment_id"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// IntegrationsProvidersEndpointUpdateBody contains the request body for Update. +type IntegrationsProvidersEndpointUpdateBody struct { + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// List returns a paginated list of integration providers. +func (e *IntegrationsProvidersEndpoint) List(instanceId string, params *IntegrationsProvidersEndpointListParams) (*providers.IntegrationsProvidersListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-providers"}, + Query: query, + } + var result providers.IntegrationsProvidersListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration provider. +func (e *IntegrationsProvidersEndpoint) Get(instanceId string, integrationProviderId string) (*providers.IntegrationsProvidersGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-providers", integrationProviderId}, + } + var result providers.IntegrationsProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration provider. +func (e *IntegrationsProvidersEndpoint) Create(instanceId string, body *IntegrationsProvidersEndpointCreateBody) (*providers.IntegrationsProvidersCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-providers"}, + Body: body, + } + var result providers.IntegrationsProvidersCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific integration provider. +func (e *IntegrationsProvidersEndpoint) Update(instanceId string, integrationProviderId string, body *IntegrationsProvidersEndpointUpdateBody) (*providers.IntegrationsProvidersUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-providers", integrationProviderId}, + Body: body, + } + var result providers.IntegrationsProvidersUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific integration provider. +func (e *IntegrationsProvidersEndpoint) Delete(instanceId string, integrationProviderId string) (*providers.IntegrationsProvidersDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-providers", integrationProviderId}, + } + var result providers.IntegrationsProvidersDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/integrations_setup_sessions.go b/v1/endpoints/management/integrations_setup_sessions.go new file mode 100644 index 0000000..a647a19 --- /dev/null +++ b/v1/endpoints/management/integrations_setup_sessions.go @@ -0,0 +1,88 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/integrations/setupsessions" +) + +// IntegrationsSetupSessionsEndpoint provides access to integration setup sessions orchestrate configuring every provider required by an integration instance. +type IntegrationsSetupSessionsEndpoint struct { + client *endpoint.Client +} + +// NewIntegrationsSetupSessionsEndpoint creates a new IntegrationsSetupSessionsEndpoint. +func NewIntegrationsSetupSessionsEndpoint(client *endpoint.Client) *IntegrationsSetupSessionsEndpoint { + return &IntegrationsSetupSessionsEndpoint{client: client} +} + +// IntegrationsSetupSessionsEndpointListParams contains optional query parameters for List. +type IntegrationsSetupSessionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + // CreatedAt - Filter integration setup session creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter integration setup session last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// IntegrationsSetupSessionsEndpointCreateBody contains the request body for Create. +type IntegrationsSetupSessionsEndpointCreateBody struct { + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + ExpiresAt *string `json:"expires_at,omitempty"` + RedirectUrl *string `json:"redirect_url,omitempty"` + Configuration *map[string]any `json:"configuration,omitempty"` +} + +// List returns a paginated list of integration setup sessions. +func (e *IntegrationsSetupSessionsEndpoint) List(instanceId string, params *IntegrationsSetupSessionsEndpointListParams) (*setupsessions.IntegrationsSetupSessionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-setup-sessions"}, + Query: query, + } + var result setupsessions.IntegrationsSetupSessionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific integration setup session. +func (e *IntegrationsSetupSessionsEndpoint) Get(instanceId string, integrationSetupSessionId string) (*setupsessions.IntegrationsSetupSessionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-setup-sessions", integrationSetupSessionId}, + } + var result setupsessions.IntegrationsSetupSessionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new integration setup session and draft integration instance. +func (e *IntegrationsSetupSessionsEndpoint) Create(instanceId string, body *IntegrationsSetupSessionsEndpointCreateBody) (*setupsessions.IntegrationsSetupSessionsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "integration-setup-sessions"}, + Body: body, + } + var result setupsessions.IntegrationsSetupSessionsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/magic_mcp_endpoints.go b/v1/endpoints/management/magic_mcp_endpoints.go index 0f2bdb7..b85455c 100644 --- a/v1/endpoints/management/magic_mcp_endpoints.go +++ b/v1/endpoints/management/magic_mcp_endpoints.go @@ -33,8 +33,8 @@ type MagicMcpEndpointsEndpointCreateBody struct { Description *string `json:"description,omitempty"` Metadata *map[string]any `json:"metadata,omitempty"` ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - MagicMcpServerIds *[]string `json:"magic_mcp_server_ids,omitempty"` - Servers *[]map[string]any `json:"servers,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + MagicMcpServers *[]map[string]any `json:"magic_mcp_servers,omitempty"` } // MagicMcpEndpointsEndpointUpdateBody contains the request body for Update. @@ -46,8 +46,7 @@ type MagicMcpEndpointsEndpointUpdateBody struct { // MagicMcpEndpointsEndpointAddServersBody contains the request body for AddServers. type MagicMcpEndpointsEndpointAddServersBody struct { - MagicMcpServerIds *[]string `json:"magic_mcp_server_ids,omitempty"` - Servers *[]map[string]any `json:"servers,omitempty"` + MagicMcpServers *[]map[string]any `json:"magic_mcp_servers,omitempty"` } // MagicMcpEndpointsEndpointRemoveServersBody contains the request body for RemoveServers. diff --git a/v1/endpoints/management/magic_mcp_servers.go b/v1/endpoints/management/magic_mcp_servers.go index 2cd14a9..a0722b4 100644 --- a/v1/endpoints/management/magic_mcp_servers.go +++ b/v1/endpoints/management/magic_mcp_servers.go @@ -34,19 +34,19 @@ type MagicMcpServersEndpointListParams struct { // MagicMcpServersEndpointCreateBody contains the request body for Create. type MagicMcpServersEndpointCreateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` } // MagicMcpServersEndpointUpdateBody contains the request body for Update. type MagicMcpServersEndpointUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - Aliases *[]string `json:"aliases,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Aliases *[]string `json:"aliases,omitempty"` } // List returns a paginated list of magic MCP servers. diff --git a/v1/endpoints/management/magic_mcp_servers_providers.go b/v1/endpoints/management/magic_mcp_servers_providers.go index a3f0660..3642676 100644 --- a/v1/endpoints/management/magic_mcp_servers_providers.go +++ b/v1/endpoints/management/magic_mcp_servers_providers.go @@ -5,7 +5,7 @@ import ( "github.com/metorial/metorial-go/v1/resources/magicmcpservers/providers" ) -// MagicMcpServersProvidersEndpoint provides access to magic MCP server providers define which providers are included in the setup session template backing a magic MCP server. +// MagicMcpServersProvidersEndpoint provides access to magic MCP servers are stable MCP entrypoints backed by one Subspace session template. type MagicMcpServersProvidersEndpoint struct { client *endpoint.Client } @@ -17,22 +17,19 @@ func NewMagicMcpServersProvidersEndpoint(client *endpoint.Client) *MagicMcpServe // MagicMcpServersProvidersEndpointListParams contains optional query parameters for List. type MagicMcpServersProvidersEndpointListParams struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - Status *any `json:"status,omitempty"` - // Id - Filter by magic MCP server provider ID(s) - Id *any `json:"id,omitempty"` - // ProviderId - Filter by provider ID(s) - ProviderId *any `json:"provider_id,omitempty"` - // ProviderDeploymentId - Filter by provider deployment ID(s) - ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` - // ProviderConfigId - Filter by provider config ID(s) - ProviderConfigId *any `json:"provider_config_id,omitempty"` - // ProviderAuthConfigId - Filter by provider auth config ID(s) - ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` // CreatedAt - Filter magic MCP server provider creation time by date range CreatedAt *map[string]any `json:"created_at,omitempty"` // UpdatedAt - Filter magic MCP server provider last update time by date range @@ -41,19 +38,22 @@ type MagicMcpServersProvidersEndpointListParams struct { // MagicMcpServersProvidersEndpointCreateBody contains the request body for Create. type MagicMcpServersProvidersEndpointCreateBody struct { - ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` - ProviderConfigId *string `json:"provider_config_id,omitempty"` - ProviderConfigVaultId *string `json:"provider_config_vault_id,omitempty"` - ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` - ToolFilters *any `json:"tool_filters,omitempty"` + ProviderId string `json:"provider_id"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } // MagicMcpServersProvidersEndpointUpdateBody contains the request body for Update. type MagicMcpServersProvidersEndpointUpdateBody struct { - ToolFilters *any `json:"tool_filters,omitempty"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } -// List returns a paginated list of providers configured for a magic MCP server. +// List returns the backing integration instance providers configured for a magic MCP server. func (e *MagicMcpServersProvidersEndpoint) List(instanceId string, magicMcpServerId string, params *MagicMcpServersProvidersEndpointListParams) (*providers.MagicMcpServersProvidersListOutput, error) { var query map[string]any if params != nil { @@ -70,32 +70,32 @@ func (e *MagicMcpServersProvidersEndpoint) List(instanceId string, magicMcpServe return &result, nil } -// Get retrieves a specific provider configuration from a magic MCP server. -func (e *MagicMcpServersProvidersEndpoint) Get(instanceId string, magicMcpServerId string, magicMcpServerProviderId string) (*providers.MagicMcpServersProvidersGetOutput, error) { +// Create creates a configurable provider row for a magic MCP server. +func (e *MagicMcpServersProvidersEndpoint) Create(instanceId string, magicMcpServerId string, body *MagicMcpServersProvidersEndpointCreateBody) (*providers.MagicMcpServersProvidersCreateOutput, error) { req := &endpoint.Request{ - Path: []string{"instances", instanceId, "magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, + Path: []string{"instances", instanceId, "magic-mcp-servers", magicMcpServerId, "providers"}, + Body: body, } - var result providers.MagicMcpServersProvidersGetOutput - if err := e.client.Get(req, &result); err != nil { + var result providers.MagicMcpServersProvidersCreateOutput + if err := e.client.Post(req, &result); err != nil { return nil, err } return &result, nil } -// Create adds a new provider configuration to a magic MCP server. -func (e *MagicMcpServersProvidersEndpoint) Create(instanceId string, magicMcpServerId string, body *MagicMcpServersProvidersEndpointCreateBody) (*providers.MagicMcpServersProvidersCreateOutput, error) { +// Get retrieves a specific backing integration instance provider for a magic MCP server. +func (e *MagicMcpServersProvidersEndpoint) Get(instanceId string, magicMcpServerId string, magicMcpServerProviderId string) (*providers.MagicMcpServersProvidersGetOutput, error) { req := &endpoint.Request{ - Path: []string{"instances", instanceId, "magic-mcp-servers", magicMcpServerId, "providers"}, - Body: body, + Path: []string{"instances", instanceId, "magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, } - var result providers.MagicMcpServersProvidersCreateOutput - if err := e.client.Post(req, &result); err != nil { + var result providers.MagicMcpServersProvidersGetOutput + if err := e.client.Get(req, &result); err != nil { return nil, err } return &result, nil } -// Update updates a provider configuration in a magic MCP server. +// Update updates a backing integration provider and then sets the corresponding integration instance provider for a magic MCP server. func (e *MagicMcpServersProvidersEndpoint) Update(instanceId string, magicMcpServerId string, magicMcpServerProviderId string, body *MagicMcpServersProvidersEndpointUpdateBody) (*providers.MagicMcpServersProvidersUpdateOutput, error) { req := &endpoint.Request{ Path: []string{"instances", instanceId, "magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, @@ -108,7 +108,7 @@ func (e *MagicMcpServersProvidersEndpoint) Update(instanceId string, magicMcpSer return &result, nil } -// Delete removes a provider configuration from a magic MCP server. +// Delete archives a backing integration instance provider from a magic MCP server and removes the shared integration provider when unused. func (e *MagicMcpServersProvidersEndpoint) Delete(instanceId string, magicMcpServerId string, magicMcpServerProviderId string) (*providers.MagicMcpServersProvidersDeleteOutput, error) { req := &endpoint.Request{ Path: []string{"instances", instanceId, "magic-mcp-servers", magicMcpServerId, "providers", magicMcpServerProviderId}, diff --git a/v1/endpoints/management/portals.go b/v1/endpoints/management/portals.go index b29786a..5e0b81d 100644 --- a/v1/endpoints/management/portals.go +++ b/v1/endpoints/management/portals.go @@ -26,18 +26,23 @@ type PortalsEndpointListParams struct { // PortalsEndpointCreateBody contains the request body for Create. type PortalsEndpointCreateBody struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` - SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` + SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + AllowConsumerSkillAuthoring *bool `json:"allow_consumer_skill_authoring,omitempty"` + AllowConsumerSkillPublishing *bool `json:"allow_consumer_skill_publishing,omitempty"` } // PortalsEndpointUpdateBody contains the request body for Update. type PortalsEndpointUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` - SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` + SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + AllowConsumerSkillAuthoring *bool `json:"allow_consumer_skill_authoring,omitempty"` + AllowConsumerSkillPublishing *bool `json:"allow_consumer_skill_publishing,omitempty"` + SkillConfiguration *map[string]any `json:"skill_configuration,omitempty"` } // List returns a paginated list of portals. diff --git a/v1/endpoints/management/portals_access.go b/v1/endpoints/management/portals_access.go new file mode 100644 index 0000000..81ca237 --- /dev/null +++ b/v1/endpoints/management/portals_access.go @@ -0,0 +1,118 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/access" +) + +// PortalsAccessEndpoint provides access to manage which consumer groups can access portal provider templates and MCP servers. +type PortalsAccessEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAccessEndpoint creates a new PortalsAccessEndpoint. +func NewPortalsAccessEndpoint(client *endpoint.Client) *PortalsAccessEndpoint { + return &PortalsAccessEndpoint{client: client} +} + +// PortalsAccessEndpointListParams contains optional query parameters for List. +type PortalsAccessEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerGroupId *any `json:"consumer_group_id,omitempty"` + ProviderTemplateId *any `json:"provider_template_id,omitempty"` + MagicMcpServerId *any `json:"magic_mcp_server_id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + SkillTemplateId *any `json:"skill_template_id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + ConsumerAccessListingId *any `json:"consumer_access_listing_id,omitempty"` + Type *any `json:"type,omitempty"` +} + +// PortalsAccessEndpointCreateBody contains the request body for Create. +type PortalsAccessEndpointCreateBody struct { + ConsumerGroupId string `json:"consumer_group_id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access any `json:"access"` +} + +// PortalsAccessEndpointUpdateBody contains the request body for Update. +type PortalsAccessEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` +} + +// List returns a paginated list of consumer access rules for a portal. +func (e *PortalsAccessEndpoint) List(instanceId string, portalId string, params *PortalsAccessEndpointListParams) (*access.PortalsAccessListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access"}, + Query: query, + } + var result access.PortalsAccessListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal access rule by ID. +func (e *PortalsAccessEndpoint) Get(instanceId string, portalId string, accessId string) (*access.PortalsAccessGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access", accessId}, + } + var result access.PortalsAccessGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new consumer access rule for the portal. +func (e *PortalsAccessEndpoint) Create(instanceId string, portalId string, body *PortalsAccessEndpointCreateBody) (*access.PortalsAccessCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access"}, + Body: body, + } + var result access.PortalsAccessCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates the shared listing fields for a portal access rule. +func (e *PortalsAccessEndpoint) Update(instanceId string, portalId string, accessId string, body *PortalsAccessEndpointUpdateBody) (*access.PortalsAccessUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access", accessId}, + Body: body, + } + var result access.PortalsAccessUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a consumer access rule from the portal. +func (e *PortalsAccessEndpoint) Delete(instanceId string, portalId string, accessId string) (*access.PortalsAccessDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access", accessId}, + } + var result access.PortalsAccessDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_access_requests.go b/v1/endpoints/management/portals_access_requests.go new file mode 100644 index 0000000..6347180 --- /dev/null +++ b/v1/endpoints/management/portals_access_requests.go @@ -0,0 +1,77 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/accessrequests" +) + +// PortalsAccessRequestsEndpoint provides access to review and resolve access requests for a portal. +type PortalsAccessRequestsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAccessRequestsEndpoint creates a new PortalsAccessRequestsEndpoint. +func NewPortalsAccessRequestsEndpoint(client *endpoint.Client) *PortalsAccessRequestsEndpoint { + return &PortalsAccessRequestsEndpoint{client: client} +} + +// PortalsAccessRequestsEndpointListParams contains optional query parameters for List. +type PortalsAccessRequestsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + ConsumerProfileId *any `json:"consumer_profile_id,omitempty"` + Search *string `json:"search,omitempty"` +} + +// PortalsAccessRequestsEndpointUpdateBody contains the request body for Update. +type PortalsAccessRequestsEndpointUpdateBody struct { + Status string `json:"status"` + ResolutionMessage *string `json:"resolution_message,omitempty"` + ConsumerGroupId *string `json:"consumer_group_id,omitempty"` +} + +// List returns a paginated list of access requests for a portal. +func (e *PortalsAccessRequestsEndpoint) List(instanceId string, portalId string, params *PortalsAccessRequestsEndpointListParams) (*accessrequests.PortalsAccessRequestsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access-requests"}, + Query: query, + } + var result accessrequests.PortalsAccessRequestsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a access request by ID. +func (e *PortalsAccessRequestsEndpoint) Get(instanceId string, portalId string, accessRequestId string) (*accessrequests.PortalsAccessRequestsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access-requests", accessRequestId}, + } + var result accessrequests.PortalsAccessRequestsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update approves or rejects a access request. +func (e *PortalsAccessRequestsEndpoint) Update(instanceId string, portalId string, accessRequestId string, body *PortalsAccessRequestsEndpointUpdateBody) (*accessrequests.PortalsAccessRequestsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "access-requests", accessRequestId}, + Body: body, + } + var result accessrequests.PortalsAccessRequestsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_auth_app.go b/v1/endpoints/management/portals_auth_app.go new file mode 100644 index 0000000..415408d --- /dev/null +++ b/v1/endpoints/management/portals_auth_app.go @@ -0,0 +1,46 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/auth/app" +) + +// PortalsAuthAppEndpoint provides access to manage the Ares-backed authentication configuration for a portal. +type PortalsAuthAppEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAuthAppEndpoint creates a new PortalsAuthAppEndpoint. +func NewPortalsAuthAppEndpoint(client *endpoint.Client) *PortalsAuthAppEndpoint { + return &PortalsAuthAppEndpoint{client: client} +} + +// PortalsAuthAppEndpointUpdateBody contains the request body for Update. +type PortalsAuthAppEndpointUpdateBody struct { + EmailWhitelist *[]string `json:"email_whitelist,omitempty"` +} + +// Get returns the Ares app configuration for a portal. +func (e *PortalsAuthAppEndpoint) Get(instanceId string, portalId string) (*app.PortalsAuthAppGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "auth", "app"}, + } + var result app.PortalsAuthAppGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates the portal auth app configuration stored on the portal surface. +func (e *PortalsAuthAppEndpoint) Update(instanceId string, portalId string, body *PortalsAuthAppEndpointUpdateBody) (*app.PortalsAuthAppUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "auth", "app"}, + Body: body, + } + var result app.PortalsAuthAppUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_auth_sso_tenants.go b/v1/endpoints/management/portals_auth_sso_tenants.go new file mode 100644 index 0000000..4958d72 --- /dev/null +++ b/v1/endpoints/management/portals_auth_sso_tenants.go @@ -0,0 +1,72 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/auth/ssotenants" +) + +// PortalsAuthSsoTenantsEndpoint provides access to manage the Ares-backed authentication configuration for a portal. +type PortalsAuthSsoTenantsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAuthSsoTenantsEndpoint creates a new PortalsAuthSsoTenantsEndpoint. +func NewPortalsAuthSsoTenantsEndpoint(client *endpoint.Client) *PortalsAuthSsoTenantsEndpoint { + return &PortalsAuthSsoTenantsEndpoint{client: client} +} + +// PortalsAuthSsoTenantsEndpointListParams contains optional query parameters for List. +type PortalsAuthSsoTenantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// PortalsAuthSsoTenantsEndpointCreateBody contains the request body for Create. +type PortalsAuthSsoTenantsEndpointCreateBody struct { + Name string `json:"name"` +} + +// List returns the SSO tenants configured for a portal Ares app. +func (e *PortalsAuthSsoTenantsEndpoint) List(instanceId string, portalId string, params *PortalsAuthSsoTenantsEndpointListParams) (*ssotenants.PortalsAuthSsoTenantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "auth", "sso-tenants"}, + Query: query, + } + var result ssotenants.PortalsAuthSsoTenantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates an SSO tenant for the portal Ares app. +func (e *PortalsAuthSsoTenantsEndpoint) Create(instanceId string, portalId string, body *PortalsAuthSsoTenantsEndpointCreateBody) (*ssotenants.PortalsAuthSsoTenantsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "auth", "sso-tenants"}, + Body: body, + } + var result ssotenants.PortalsAuthSsoTenantsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Setup creates an Ares setup URL for finishing portal SSO tenant configuration. +func (e *PortalsAuthSsoTenantsEndpoint) Setup(instanceId string, portalId string, ssoTenantId string) (*ssotenants.PortalsAuthSsoTenantsSetupOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "auth", "sso-tenants", ssoTenantId, "setup"}, + } + var result ssotenants.PortalsAuthSsoTenantsSetupOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_auth_sso_tenants_connections.go b/v1/endpoints/management/portals_auth_sso_tenants_connections.go new file mode 100644 index 0000000..7f50283 --- /dev/null +++ b/v1/endpoints/management/portals_auth_sso_tenants_connections.go @@ -0,0 +1,42 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/auth/ssotenants/connections" +) + +// PortalsAuthSsoTenantsConnectionsEndpoint provides access to manage the Ares-backed authentication configuration for a portal. +type PortalsAuthSsoTenantsConnectionsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAuthSsoTenantsConnectionsEndpoint creates a new PortalsAuthSsoTenantsConnectionsEndpoint. +func NewPortalsAuthSsoTenantsConnectionsEndpoint(client *endpoint.Client) *PortalsAuthSsoTenantsConnectionsEndpoint { + return &PortalsAuthSsoTenantsConnectionsEndpoint{client: client} +} + +// PortalsAuthSsoTenantsConnectionsEndpointListParams contains optional query parameters for List. +type PortalsAuthSsoTenantsConnectionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns SSO connections that belong to a portal SSO tenant. +func (e *PortalsAuthSsoTenantsConnectionsEndpoint) List(instanceId string, portalId string, ssoTenantId string, params *PortalsAuthSsoTenantsConnectionsEndpointListParams) (*connections.PortalsAuthSsoTenantsConnectionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "auth", "sso-tenants", ssoTenantId, "connections"}, + Query: query, + } + var result connections.PortalsAuthSsoTenantsConnectionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_consumer_groups.go b/v1/endpoints/management/portals_consumer_groups.go new file mode 100644 index 0000000..bd3de62 --- /dev/null +++ b/v1/endpoints/management/portals_consumer_groups.go @@ -0,0 +1,110 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/consumergroups" +) + +// PortalsConsumerGroupsEndpoint provides access to manage the consumer groups that drive portal visibility and access rules. +type PortalsConsumerGroupsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsConsumerGroupsEndpoint creates a new PortalsConsumerGroupsEndpoint. +func NewPortalsConsumerGroupsEndpoint(client *endpoint.Client) *PortalsConsumerGroupsEndpoint { + return &PortalsConsumerGroupsEndpoint{client: client} +} + +// PortalsConsumerGroupsEndpointListParams contains optional query parameters for List. +type PortalsConsumerGroupsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Search *string `json:"search,omitempty"` +} + +// PortalsConsumerGroupsEndpointCreateBody contains the request body for Create. +type PortalsConsumerGroupsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + SsoGroupIds *[]string `json:"sso_group_ids,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// PortalsConsumerGroupsEndpointUpdateBody contains the request body for Update. +type PortalsConsumerGroupsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + SsoGroupIds *[]string `json:"sso_group_ids,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// List returns a paginated list of consumer groups for a portal. +func (e *PortalsConsumerGroupsEndpoint) List(instanceId string, portalId string, params *PortalsConsumerGroupsEndpointListParams) (*consumergroups.PortalsConsumerGroupsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-groups"}, + Query: query, + } + var result consumergroups.PortalsConsumerGroupsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal consumer group by ID. +func (e *PortalsConsumerGroupsEndpoint) Get(instanceId string, portalId string, consumerGroupId string) (*consumergroups.PortalsConsumerGroupsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-groups", consumerGroupId}, + } + var result consumergroups.PortalsConsumerGroupsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new consumer group for the portal. +func (e *PortalsConsumerGroupsEndpoint) Create(instanceId string, portalId string, body *PortalsConsumerGroupsEndpointCreateBody) (*consumergroups.PortalsConsumerGroupsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-groups"}, + Body: body, + } + var result consumergroups.PortalsConsumerGroupsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a consumer group for the portal. +func (e *PortalsConsumerGroupsEndpoint) Update(instanceId string, portalId string, consumerGroupId string, body *PortalsConsumerGroupsEndpointUpdateBody) (*consumergroups.PortalsConsumerGroupsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-groups", consumerGroupId}, + Body: body, + } + var result consumergroups.PortalsConsumerGroupsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a consumer group for the portal. +func (e *PortalsConsumerGroupsEndpoint) Delete(instanceId string, portalId string, consumerGroupId string) (*consumergroups.PortalsConsumerGroupsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-groups", consumerGroupId}, + } + var result consumergroups.PortalsConsumerGroupsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_consumer_invites.go b/v1/endpoints/management/portals_consumer_invites.go new file mode 100644 index 0000000..2b0bb20 --- /dev/null +++ b/v1/endpoints/management/portals_consumer_invites.go @@ -0,0 +1,76 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/consumerinvites" +) + +// PortalsConsumerInvitesEndpoint provides access to list and inspect consumer invites for a portal. +type PortalsConsumerInvitesEndpoint struct { + client *endpoint.Client +} + +// NewPortalsConsumerInvitesEndpoint creates a new PortalsConsumerInvitesEndpoint. +func NewPortalsConsumerInvitesEndpoint(client *endpoint.Client) *PortalsConsumerInvitesEndpoint { + return &PortalsConsumerInvitesEndpoint{client: client} +} + +// PortalsConsumerInvitesEndpointListParams contains optional query parameters for List. +type PortalsConsumerInvitesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` +} + +// PortalsConsumerInvitesEndpointCreateBody contains the request body for Create. +type PortalsConsumerInvitesEndpointCreateBody struct { + Name string `json:"name"` + Email string `json:"email"` + Message *string `json:"message,omitempty"` +} + +// List returns a paginated list of invites for a portal. +func (e *PortalsConsumerInvitesEndpoint) List(instanceId string, portalId string, params *PortalsConsumerInvitesEndpointListParams) (*consumerinvites.PortalsConsumerInvitesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-invites"}, + Query: query, + } + var result consumerinvites.PortalsConsumerInvitesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create invites a consumer to a portal. +func (e *PortalsConsumerInvitesEndpoint) Create(instanceId string, portalId string, body *PortalsConsumerInvitesEndpointCreateBody) (*consumerinvites.PortalsConsumerInvitesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-invites"}, + Body: body, + } + var result consumerinvites.PortalsConsumerInvitesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal consumer invite by ID. +func (e *PortalsConsumerInvitesEndpoint) Get(instanceId string, portalId string, consumerInviteId string) (*consumerinvites.PortalsConsumerInvitesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-invites", consumerInviteId}, + } + var result consumerinvites.PortalsConsumerInvitesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_consumer_profiles.go b/v1/endpoints/management/portals_consumer_profiles.go new file mode 100644 index 0000000..e843b65 --- /dev/null +++ b/v1/endpoints/management/portals_consumer_profiles.go @@ -0,0 +1,93 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/consumerprofiles" +) + +// PortalsConsumerProfilesEndpoint provides access to manage the consumers and effective group assignments for a portal. +type PortalsConsumerProfilesEndpoint struct { + client *endpoint.Client +} + +// NewPortalsConsumerProfilesEndpoint creates a new PortalsConsumerProfilesEndpoint. +func NewPortalsConsumerProfilesEndpoint(client *endpoint.Client) *PortalsConsumerProfilesEndpoint { + return &PortalsConsumerProfilesEndpoint{client: client} +} + +// PortalsConsumerProfilesEndpointListParams contains optional query parameters for List. +type PortalsConsumerProfilesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerGroupId *string `json:"consumer_group_id,omitempty"` + Status *any `json:"status,omitempty"` +} + +// PortalsConsumerProfilesEndpointAssignGroupsBody contains the request body for AssignGroups. +type PortalsConsumerProfilesEndpointAssignGroupsBody struct { + GroupIds []string `json:"group_ids"` +} + +// PortalsConsumerProfilesEndpointUnassignGroupsBody contains the request body for UnassignGroups. +type PortalsConsumerProfilesEndpointUnassignGroupsBody struct { + GroupIds []string `json:"group_ids"` +} + +// List returns a paginated list of consumer profiles for a portal. +func (e *PortalsConsumerProfilesEndpoint) List(instanceId string, portalId string, params *PortalsConsumerProfilesEndpointListParams) (*consumerprofiles.PortalsConsumerProfilesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-profile"}, + Query: query, + } + var result consumerprofiles.PortalsConsumerProfilesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal consumer profile by ID. +func (e *PortalsConsumerProfilesEndpoint) Get(instanceId string, portalId string, consumerProfileId string) (*consumerprofiles.PortalsConsumerProfilesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-profile", consumerProfileId}, + } + var result consumerprofiles.PortalsConsumerProfilesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// AssignGroups assigns one or more groups to a portal consumer profile. +func (e *PortalsConsumerProfilesEndpoint) AssignGroups(instanceId string, portalId string, consumerProfileId string, body *PortalsConsumerProfilesEndpointAssignGroupsBody) (*consumerprofiles.PortalsConsumerProfilesAssignGroupsOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-profile", consumerProfileId, "assign-groups"}, + Body: body, + } + var result consumerprofiles.PortalsConsumerProfilesAssignGroupsOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// UnassignGroups removes one or more groups from a portal consumer profile. +func (e *PortalsConsumerProfilesEndpoint) UnassignGroups(instanceId string, portalId string, consumerProfileId string, body *PortalsConsumerProfilesEndpointUnassignGroupsBody) (*consumerprofiles.PortalsConsumerProfilesUnassignGroupsOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "consumer-profile", consumerProfileId, "unassign-groups"}, + Body: body, + } + var result consumerprofiles.PortalsConsumerProfilesUnassignGroupsOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/portals_listings.go b/v1/endpoints/management/portals_listings.go new file mode 100644 index 0000000..fb9d53e --- /dev/null +++ b/v1/endpoints/management/portals_listings.go @@ -0,0 +1,116 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/listings" +) + +// PortalsListingsEndpoint provides access to read the shared listings available on a portal surface. +type PortalsListingsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsListingsEndpoint creates a new PortalsListingsEndpoint. +func NewPortalsListingsEndpoint(client *endpoint.Client) *PortalsListingsEndpoint { + return &PortalsListingsEndpoint{client: client} +} + +// PortalsListingsEndpointListParams contains optional query parameters for List. +type PortalsListingsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerSurfaceProviderGroupId *any `json:"consumer_surface_provider_group_id,omitempty"` + ProviderTemplateId *any `json:"provider_template_id,omitempty"` + MagicMcpServerId *any `json:"magic_mcp_server_id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + SkillTemplateId *any `json:"skill_template_id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + Type *any `json:"type,omitempty"` +} + +// PortalsListingsEndpointCreateBody contains the request body for Create. +type PortalsListingsEndpointCreateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access any `json:"access"` +} + +// PortalsListingsEndpointUpdateBody contains the request body for Update. +type PortalsListingsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` +} + +// List returns a paginated list of shared listings for a portal. +func (e *PortalsListingsEndpoint) List(instanceId string, portalId string, params *PortalsListingsEndpointListParams) (*listings.PortalsListingsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "listings"}, + Query: query, + } + var result listings.PortalsListingsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves one shared listing for a portal. +func (e *PortalsListingsEndpoint) Get(instanceId string, portalId string, listingId string) (*listings.PortalsListingsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "listings", listingId}, + } + var result listings.PortalsListingsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a shared listing for a portal. +func (e *PortalsListingsEndpoint) Create(instanceId string, portalId string, body *PortalsListingsEndpointCreateBody) (*listings.PortalsListingsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "listings"}, + Body: body, + } + var result listings.PortalsListingsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates listing metadata for a portal listing. +func (e *PortalsListingsEndpoint) Update(instanceId string, portalId string, listingId string, body *PortalsListingsEndpointUpdateBody) (*listings.PortalsListingsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "listings", listingId}, + Body: body, + } + var result listings.PortalsListingsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a portal listing and all consumer access attached to it. +func (e *PortalsListingsEndpoint) Delete(instanceId string, portalId string, listingId string) (*listings.PortalsListingsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "portals", portalId, "listings", listingId}, + } + var result listings.PortalsListingsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/provider_deployments_auth_configs.go b/v1/endpoints/management/provider_deployments_auth_configs.go index d4fb0c2..e7d3ad2 100644 --- a/v1/endpoints/management/provider_deployments_auth_configs.go +++ b/v1/endpoints/management/provider_deployments_auth_configs.go @@ -30,6 +30,10 @@ type ProviderDeploymentsAuthConfigsEndpointListParams struct { ProviderId *any `json:"provider_id,omitempty"` // ProviderDeploymentId - Filter by provider deployment ID(s) ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + // AvailableForUse - Only return auth configs that are not owned by another integration instance provider. + AvailableForUse *bool `json:"available_for_use,omitempty"` + // AvailableForProviderDeploymentId - Only return auth configs that are not locked to a different provider deployment. + AvailableForProviderDeploymentId *string `json:"available_for_provider_deployment_id,omitempty"` // ProviderAuthCredentialsId - Filter by auth credentials ID(s) ProviderAuthCredentialsId *any `json:"provider_auth_credentials_id,omitempty"` // ProviderAuthMethodId - Filter by auth method ID(s) diff --git a/v1/endpoints/management/provider_deployments_configs.go b/v1/endpoints/management/provider_deployments_configs.go index f01ab4c..1ad2941 100644 --- a/v1/endpoints/management/provider_deployments_configs.go +++ b/v1/endpoints/management/provider_deployments_configs.go @@ -32,6 +32,10 @@ type ProviderDeploymentsConfigsEndpointListParams struct { ProviderSpecificationId *any `json:"provider_specification_id,omitempty"` // ProviderDeploymentId - Filter by provider deployment ID(s) ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + // AvailableForUse - Only return configs that are not owned by another integration instance provider. + AvailableForUse *bool `json:"available_for_use,omitempty"` + // AvailableForProviderDeploymentId - Only return configs that are not locked to a different provider deployment. + AvailableForProviderDeploymentId *string `json:"available_for_provider_deployment_id,omitempty"` // ProviderConfigVaultId - Filter by config vault ID(s) ProviderConfigVaultId *any `json:"provider_config_vault_id,omitempty"` // ActorId - Filter by actor ID(s) diff --git a/v1/endpoints/management/provider_templates.go b/v1/endpoints/management/provider_templates.go index 3480811..2898a1d 100644 --- a/v1/endpoints/management/provider_templates.go +++ b/v1/endpoints/management/provider_templates.go @@ -17,33 +17,31 @@ func NewProviderTemplatesEndpoint(client *endpoint.Client) *ProviderTemplatesEnd // ProviderTemplatesEndpointListParams contains optional query parameters for List. type ProviderTemplatesEndpointListParams struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - Id *any `json:"id,omitempty"` - ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` - Search *string `json:"search,omitempty"` - Status *any `json:"status,omitempty"` + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` } // ProviderTemplatesEndpointCreateBody contains the request body for Create. type ProviderTemplatesEndpointCreateBody struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ToolFilers *any `json:"tool_filers,omitempty"` - ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` - ProviderDeployment *map[string]any `json:"provider_deployment,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers []map[string]any `json:"providers"` } // ProviderTemplatesEndpointUpdateBody contains the request body for Update. type ProviderTemplatesEndpointUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ToolFilters *any `json:"tool_filters,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` } // List returns a paginated list of provider templates. diff --git a/v1/endpoints/management/sessions.go b/v1/endpoints/management/sessions.go index 794391c..6d718e9 100644 --- a/v1/endpoints/management/sessions.go +++ b/v1/endpoints/management/sessions.go @@ -26,6 +26,14 @@ type SessionsEndpointListParams struct { Status *any `json:"status,omitempty"` // Id - Filter by session ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` // SessionTemplateId - Filter by session template ID(s) SessionTemplateId *any `json:"session_template_id,omitempty"` // SessionProviderId - Filter by session provider ID(s) diff --git a/v1/endpoints/management/sessions_connections.go b/v1/endpoints/management/sessions_connections.go index 6567c89..4ad38d8 100644 --- a/v1/endpoints/management/sessions_connections.go +++ b/v1/endpoints/management/sessions_connections.go @@ -28,6 +28,16 @@ type SessionsConnectionsEndpointListParams struct { ConnectionState *any `json:"connection_state,omitempty"` // Id - Filter by session connection ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by connected agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // SessionId - Filter by session ID(s) SessionId *any `json:"session_id,omitempty"` // SessionProviderId - Filter by session provider ID(s) diff --git a/v1/endpoints/management/sessions_participants.go b/v1/endpoints/management/sessions_participants.go index 39ab673..e39838c 100644 --- a/v1/endpoints/management/sessions_participants.go +++ b/v1/endpoints/management/sessions_participants.go @@ -26,6 +26,16 @@ type SessionsParticipantsEndpointListParams struct { Type *any `json:"type,omitempty"` // Id - Filter by participant ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by connected agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // SessionId - Filter by session ID(s) SessionId *any `json:"session_id,omitempty"` // SessionConnectionId - Filter by session connection ID(s) diff --git a/v1/endpoints/management/skills.go b/v1/endpoints/management/skills.go new file mode 100644 index 0000000..611cc71 --- /dev/null +++ b/v1/endpoints/management/skills.go @@ -0,0 +1,192 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills" +) + +// SkillsEndpoint provides access to skills group provider and integration capabilities into reusable, owned compositions. +type SkillsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsEndpoint creates a new SkillsEndpoint. +func NewSkillsEndpoint(client *endpoint.Client) *SkillsEndpoint { + return &SkillsEndpoint{client: client} +} + +// SkillsEndpointListParams contains optional query parameters for List. +type SkillsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + // CreatedAt - Filter skill creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsEndpointCreateBody contains the request body for Create. +type SkillsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + TemplateId *string `json:"template_id,omitempty"` +} + +// SkillsEndpointUpdateBody contains the request body for Update. +type SkillsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` +} + +// SkillsEndpointForkBody contains the request body for Fork. +type SkillsEndpointForkBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` +} + +// SkillsEndpointDuplicateBody contains the request body for Duplicate. +type SkillsEndpointDuplicateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// List returns a paginated list of skills. +func (e *SkillsEndpoint) List(instanceId string, params *SkillsEndpointListParams) (*skills.SkillsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills"}, + Query: query, + } + var result skills.SkillsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill. +func (e *SkillsEndpoint) Get(instanceId string, skillId string) (*skills.SkillsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId}, + } + var result skills.SkillsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new skill. +func (e *SkillsEndpoint) Create(instanceId string, body *SkillsEndpointCreateBody) (*skills.SkillsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills"}, + Body: body, + } + var result skills.SkillsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific skill. +func (e *SkillsEndpoint) Update(instanceId string, skillId string, body *SkillsEndpointUpdateBody) (*skills.SkillsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId}, + Body: body, + } + var result skills.SkillsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific skill. +func (e *SkillsEndpoint) Delete(instanceId string, skillId string) (*skills.SkillsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId}, + } + var result skills.SkillsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Fork forks a skill for the current consumer. Non-consumer callers duplicate the skill instead. +func (e *SkillsEndpoint) Fork(instanceId string, skillId string, body *SkillsEndpointForkBody) (*skills.SkillsForkOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "fork"}, + Body: body, + } + var result skills.SkillsForkOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// PublishConsumerSkill publishes a consumer-owned skill to the consumer groups they belong to. +func (e *SkillsEndpoint) PublishConsumerSkill(instanceId string, skillId string) (*skills.SkillsPublishConsumerSkillOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "publish"}, + } + var result skills.SkillsPublishConsumerSkillOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Duplicate duplicates a skill. +func (e *SkillsEndpoint) Duplicate(instanceId string, skillId string, body *SkillsEndpointDuplicateBody) (*skills.SkillsDuplicateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "duplicate"}, + Body: body, + } + var result skills.SkillsDuplicateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_agents.go b/v1/endpoints/management/skills_agents.go new file mode 100644 index 0000000..90703b2 --- /dev/null +++ b/v1/endpoints/management/skills_agents.go @@ -0,0 +1,106 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/agents" +) + +// SkillsAgentsEndpoint provides access to manage sub-agents attached to a skill. +type SkillsAgentsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsAgentsEndpoint creates a new SkillsAgentsEndpoint. +func NewSkillsAgentsEndpoint(client *endpoint.Client) *SkillsAgentsEndpoint { + return &SkillsAgentsEndpoint{client: client} +} + +// SkillsAgentsEndpointCreateBody contains the request body for Create. +type SkillsAgentsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Content *string `json:"content,omitempty"` +} + +// SkillsAgentsEndpointListParams contains optional query parameters for List. +type SkillsAgentsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + IncludeArchived *bool `json:"include_archived,omitempty"` +} + +// SkillsAgentsEndpointUpdateBody contains the request body for Update. +type SkillsAgentsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// Create creates a new agent document in the skill agents directory. +func (e *SkillsAgentsEndpoint) Create(instanceId string, skillId string, body *SkillsAgentsEndpointCreateBody) (*agents.SkillsAgentsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "agents"}, + Body: body, + } + var result agents.SkillsAgentsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// List returns a paginated list of agents for a specific skill. +func (e *SkillsAgentsEndpoint) List(instanceId string, skillId string, params *SkillsAgentsEndpointListParams) (*agents.SkillsAgentsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "agents"}, + Query: query, + } + var result agents.SkillsAgentsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific agent within a skill. +func (e *SkillsAgentsEndpoint) Get(instanceId string, skillId string, skillAgentId string) (*agents.SkillsAgentsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "agents", skillAgentId}, + } + var result agents.SkillsAgentsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates the name or description for a specific skill agent. +func (e *SkillsAgentsEndpoint) Update(instanceId string, skillId string, skillAgentId string, body *SkillsAgentsEndpointUpdateBody) (*agents.SkillsAgentsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "agents", skillAgentId}, + Body: body, + } + var result agents.SkillsAgentsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific skill agent and removes its linked store item. +func (e *SkillsAgentsEndpoint) Delete(instanceId string, skillId string, skillAgentId string) (*agents.SkillsAgentsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "agents", skillAgentId}, + } + var result agents.SkillsAgentsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_configurations.go b/v1/endpoints/management/skills_configurations.go new file mode 100644 index 0000000..1eacdcd --- /dev/null +++ b/v1/endpoints/management/skills_configurations.go @@ -0,0 +1,106 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/configurations" +) + +// SkillsConfigurationsEndpoint provides access to manage configuration profiles for skill execution. +type SkillsConfigurationsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsConfigurationsEndpoint creates a new SkillsConfigurationsEndpoint. +func NewSkillsConfigurationsEndpoint(client *endpoint.Client) *SkillsConfigurationsEndpoint { + return &SkillsConfigurationsEndpoint{client: client} +} + +// SkillsConfigurationsEndpointCreateBody contains the request body for Create. +type SkillsConfigurationsEndpointCreateBody struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + +// SkillsConfigurationsEndpointListParams contains optional query parameters for List. +type SkillsConfigurationsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// SkillsConfigurationsEndpointUpdateBody contains the request body for Update. +type SkillsConfigurationsEndpointUpdateBody struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + +// Create creates a new non-default skill configuration. +func (e *SkillsConfigurationsEndpoint) Create(instanceId string, body *SkillsConfigurationsEndpointCreateBody) (*configurations.SkillsConfigurationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", "configurations"}, + Body: body, + } + var result configurations.SkillsConfigurationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// List returns a paginated list of visible skill configurations. +func (e *SkillsConfigurationsEndpoint) List(instanceId string, params *SkillsConfigurationsEndpointListParams) (*configurations.SkillsConfigurationsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", "configurations"}, + Query: query, + } + var result configurations.SkillsConfigurationsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill configuration by ID, or the default. +func (e *SkillsConfigurationsEndpoint) Get(instanceId string, skillConfigurationId string) (*configurations.SkillsConfigurationsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", "configurations", skillConfigurationId}, + } + var result configurations.SkillsConfigurationsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific skill configuration. Updating default creates it first if needed. +func (e *SkillsConfigurationsEndpoint) Update(instanceId string, skillConfigurationId string, body *SkillsConfigurationsEndpointUpdateBody) (*configurations.SkillsConfigurationsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", "configurations", skillConfigurationId}, + Body: body, + } + var result configurations.SkillsConfigurationsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete soft deletes a specific non-internal skill configuration. +func (e *SkillsConfigurationsEndpoint) Delete(instanceId string, skillConfigurationId string) (*configurations.SkillsConfigurationsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", "configurations", skillConfigurationId}, + } + var result configurations.SkillsConfigurationsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_exports.go b/v1/endpoints/management/skills_exports.go new file mode 100644 index 0000000..0ac396e --- /dev/null +++ b/v1/endpoints/management/skills_exports.go @@ -0,0 +1,78 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/exports" +) + +// SkillsExportsEndpoint provides access to export skills, skill plugins, and skill marketplaces as zip files. +type SkillsExportsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsExportsEndpoint creates a new SkillsExportsEndpoint. +func NewSkillsExportsEndpoint(client *endpoint.Client) *SkillsExportsEndpoint { + return &SkillsExportsEndpoint{client: client} +} + +// SkillsExportsEndpointListParams contains optional query parameters for List. +type SkillsExportsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + Target *any `json:"target,omitempty"` + Status *any `json:"status,omitempty"` +} + +// SkillsExportsEndpointCreateBody contains the request body for Create. +type SkillsExportsEndpointCreateBody struct { + Target string `json:"target"` + SkillId *string `json:"skill_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` +} + +// List returns a paginated list of skill exports. +func (e *SkillsExportsEndpoint) List(instanceId string, params *SkillsExportsEndpointListParams) (*exports.SkillsExportsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-exports"}, + Query: query, + } + var result exports.SkillsExportsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill export. +func (e *SkillsExportsEndpoint) Get(instanceId string, skillExportId string) (*exports.SkillsExportsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-exports", skillExportId}, + } + var result exports.SkillsExportsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill, plugin, or marketplace export. +func (e *SkillsExportsEndpoint) Create(instanceId string, body *SkillsExportsEndpointCreateBody) (*exports.SkillsExportsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-exports"}, + Body: body, + } + var result exports.SkillsExportsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_groups.go b/v1/endpoints/management/skills_groups.go new file mode 100644 index 0000000..573036e --- /dev/null +++ b/v1/endpoints/management/skills_groups.go @@ -0,0 +1,116 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/groups" +) + +// SkillsGroupsEndpoint provides access to skill groups organize skills into reusable collections. +type SkillsGroupsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsGroupsEndpoint creates a new SkillsGroupsEndpoint. +func NewSkillsGroupsEndpoint(client *endpoint.Client) *SkillsGroupsEndpoint { + return &SkillsGroupsEndpoint{client: client} +} + +// SkillsGroupsEndpointListParams contains optional query parameters for List. +type SkillsGroupsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + // CreatedAt - Filter skill group creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill group last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsGroupsEndpointCreateBody contains the request body for Create. +type SkillsGroupsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + SkillIds *[]string `json:"skill_ids,omitempty"` +} + +// SkillsGroupsEndpointUpdateBody contains the request body for Update. +type SkillsGroupsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + SkillIds *[]string `json:"skill_ids,omitempty"` +} + +// List returns a paginated list of skill groups. +func (e *SkillsGroupsEndpoint) List(instanceId string, params *SkillsGroupsEndpointListParams) (*groups.SkillsGroupsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups"}, + Query: query, + } + var result groups.SkillsGroupsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill group. +func (e *SkillsGroupsEndpoint) Get(instanceId string, skillGroupId string) (*groups.SkillsGroupsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId}, + } + var result groups.SkillsGroupsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill group. +func (e *SkillsGroupsEndpoint) Create(instanceId string, body *SkillsGroupsEndpointCreateBody) (*groups.SkillsGroupsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups"}, + Body: body, + } + var result groups.SkillsGroupsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill group. +func (e *SkillsGroupsEndpoint) Update(instanceId string, skillGroupId string, body *SkillsGroupsEndpointUpdateBody) (*groups.SkillsGroupsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId}, + Body: body, + } + var result groups.SkillsGroupsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill group. +func (e *SkillsGroupsEndpoint) Delete(instanceId string, skillGroupId string) (*groups.SkillsGroupsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId}, + } + var result groups.SkillsGroupsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_groups_items.go b/v1/endpoints/management/skills_groups_items.go new file mode 100644 index 0000000..587736f --- /dev/null +++ b/v1/endpoints/management/skills_groups_items.go @@ -0,0 +1,89 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/groups/items" +) + +// SkillsGroupsItemsEndpoint provides access to skill group items link groups to skills. +type SkillsGroupsItemsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsGroupsItemsEndpoint creates a new SkillsGroupsItemsEndpoint. +func NewSkillsGroupsItemsEndpoint(client *endpoint.Client) *SkillsGroupsItemsEndpoint { + return &SkillsGroupsItemsEndpoint{client: client} +} + +// SkillsGroupsItemsEndpointListParams contains optional query parameters for List. +type SkillsGroupsItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + // CreatedAt - Filter skill group item creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` +} + +// SkillsGroupsItemsEndpointCreateBody contains the request body for Create. +type SkillsGroupsItemsEndpointCreateBody struct { + SkillId string `json:"skill_id"` +} + +// List returns a paginated list of items for a skill group. +func (e *SkillsGroupsItemsEndpoint) List(instanceId string, skillGroupId string, params *SkillsGroupsItemsEndpointListParams) (*items.SkillsGroupsItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId, "items"}, + Query: query, + } + var result items.SkillsGroupsItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill group item. +func (e *SkillsGroupsItemsEndpoint) Get(instanceId string, skillGroupId string, skillGroupItemId string) (*items.SkillsGroupsItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId, "items", skillGroupItemId}, + } + var result items.SkillsGroupsItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create adds a skill to a skill group. +func (e *SkillsGroupsItemsEndpoint) Create(instanceId string, skillGroupId string, body *SkillsGroupsItemsEndpointCreateBody) (*items.SkillsGroupsItemsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId, "items"}, + Body: body, + } + var result items.SkillsGroupsItemsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill group item. +func (e *SkillsGroupsItemsEndpoint) Delete(instanceId string, skillGroupId string, skillGroupItemId string) (*items.SkillsGroupsItemsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-groups", skillGroupId, "items", skillGroupItemId}, + } + var result items.SkillsGroupsItemsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_items.go b/v1/endpoints/management/skills_items.go new file mode 100644 index 0000000..f531a78 --- /dev/null +++ b/v1/endpoints/management/skills_items.go @@ -0,0 +1,85 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/items" +) + +// SkillsItemsEndpoint provides access to skill items attach integrations and providers to skills. +type SkillsItemsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsItemsEndpoint creates a new SkillsItemsEndpoint. +func NewSkillsItemsEndpoint(client *endpoint.Client) *SkillsItemsEndpoint { + return &SkillsItemsEndpoint{client: client} +} + +// SkillsItemsEndpointListParams contains optional query parameters for List. +type SkillsItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + // CreatedAt - Filter skill item creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` +} + +// List returns a paginated list of items for a skill. +func (e *SkillsItemsEndpoint) List(instanceId string, skillId string, params *SkillsItemsEndpointListParams) (*items.SkillsItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "items"}, + Query: query, + } + var result items.SkillsItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill item. +func (e *SkillsItemsEndpoint) Get(instanceId string, skillId string, skillItemId string) (*items.SkillsItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "items", skillItemId}, + } + var result items.SkillsItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new item on a skill. +func (e *SkillsItemsEndpoint) Create(instanceId string, skillId string) (*items.SkillsItemsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "items"}, + } + var result items.SkillsItemsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill item. +func (e *SkillsItemsEndpoint) Delete(instanceId string, skillId string, skillItemId string) (*items.SkillsItemsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "items", skillItemId}, + } + var result items.SkillsItemsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_marketplaces.go b/v1/endpoints/management/skills_marketplaces.go new file mode 100644 index 0000000..db776d6 --- /dev/null +++ b/v1/endpoints/management/skills_marketplaces.go @@ -0,0 +1,128 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/marketplaces" +) + +// SkillsMarketplacesEndpoint provides access to manage skill marketplaces for an instance. +type SkillsMarketplacesEndpoint struct { + client *endpoint.Client +} + +// NewSkillsMarketplacesEndpoint creates a new SkillsMarketplacesEndpoint. +func NewSkillsMarketplacesEndpoint(client *endpoint.Client) *SkillsMarketplacesEndpoint { + return &SkillsMarketplacesEndpoint{client: client} +} + +// SkillsMarketplacesEndpointListParams contains optional query parameters for List. +type SkillsMarketplacesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + Search *string `json:"search,omitempty"` + // CreatedAt - Filter skill marketplace creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill marketplace last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsMarketplacesEndpointCreateBody contains the request body for Create. +type SkillsMarketplacesEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// SkillsMarketplacesEndpointUpdateBody contains the request body for Update. +type SkillsMarketplacesEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// List returns a paginated list of skill marketplaces. +func (e *SkillsMarketplacesEndpoint) List(instanceId string, params *SkillsMarketplacesEndpointListParams) (*marketplaces.SkillsMarketplacesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces"}, + Query: query, + } + var result marketplaces.SkillsMarketplacesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Get(instanceId string, skillMarketplaceId string) (*marketplaces.SkillsMarketplacesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId}, + } + var result marketplaces.SkillsMarketplacesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Create(instanceId string, body *SkillsMarketplacesEndpointCreateBody) (*marketplaces.SkillsMarketplacesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces"}, + Body: body, + } + var result marketplaces.SkillsMarketplacesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Update(instanceId string, skillMarketplaceId string, body *SkillsMarketplacesEndpointUpdateBody) (*marketplaces.SkillsMarketplacesUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId}, + Body: body, + } + var result marketplaces.SkillsMarketplacesUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Archive archives a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Archive(instanceId string, skillMarketplaceId string) (*marketplaces.SkillsMarketplacesArchiveOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId}, + } + var result marketplaces.SkillsMarketplacesArchiveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Sync forces a skill marketplace sync. +func (e *SkillsMarketplacesEndpoint) Sync(instanceId string, skillMarketplaceId string) (*marketplaces.SkillsMarketplacesSyncOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId, "sync"}, + } + var result marketplaces.SkillsMarketplacesSyncOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_marketplaces_plugins.go b/v1/endpoints/management/skills_marketplaces_plugins.go new file mode 100644 index 0000000..1705585 --- /dev/null +++ b/v1/endpoints/management/skills_marketplaces_plugins.go @@ -0,0 +1,94 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/marketplaces/plugins" +) + +// SkillsMarketplacesPluginsEndpoint provides access to manage plugin links for skill marketplaces. +type SkillsMarketplacesPluginsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsMarketplacesPluginsEndpoint creates a new SkillsMarketplacesPluginsEndpoint. +func NewSkillsMarketplacesPluginsEndpoint(client *endpoint.Client) *SkillsMarketplacesPluginsEndpoint { + return &SkillsMarketplacesPluginsEndpoint{client: client} +} + +// SkillsMarketplacesPluginsEndpointListParams contains optional query parameters for List. +type SkillsMarketplacesPluginsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillPluginId *any `json:"skill_plugin_id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill marketplace plugin creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill marketplace plugin last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsMarketplacesPluginsEndpointAddBody contains the request body for Add. +type SkillsMarketplacesPluginsEndpointAddBody struct { + SkillPluginId string `json:"skill_plugin_id"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Identifier *string `json:"identifier,omitempty"` +} + +// List returns plugins linked to a skill marketplace. +func (e *SkillsMarketplacesPluginsEndpoint) List(instanceId string, skillMarketplaceId string, params *SkillsMarketplacesPluginsEndpointListParams) (*plugins.SkillsMarketplacesPluginsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId, "plugins"}, + Query: query, + } + var result plugins.SkillsMarketplacesPluginsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Add adds a skill plugin to a skill marketplace. +func (e *SkillsMarketplacesPluginsEndpoint) Add(instanceId string, skillMarketplaceId string, body *SkillsMarketplacesPluginsEndpointAddBody) (*plugins.SkillsMarketplacesPluginsAddOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId, "plugins"}, + Body: body, + } + var result plugins.SkillsMarketplacesPluginsAddOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill marketplace plugin link. +func (e *SkillsMarketplacesPluginsEndpoint) Get(instanceId string, skillMarketplaceId string, skillMarketplacePluginId string) (*plugins.SkillsMarketplacesPluginsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId, "plugins", skillMarketplacePluginId}, + } + var result plugins.SkillsMarketplacesPluginsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Remove removes a skill plugin from a skill marketplace. +func (e *SkillsMarketplacesPluginsEndpoint) Remove(instanceId string, skillMarketplaceId string, skillMarketplacePluginId string) (*plugins.SkillsMarketplacesPluginsRemoveOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-marketplaces", skillMarketplaceId, "plugins", skillMarketplacePluginId}, + } + var result plugins.SkillsMarketplacesPluginsRemoveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_participants.go b/v1/endpoints/management/skills_participants.go new file mode 100644 index 0000000..f4d899c --- /dev/null +++ b/v1/endpoints/management/skills_participants.go @@ -0,0 +1,54 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/participants" +) + +// SkillsParticipantsEndpoint provides access to inspect participants associated with an instance skill. +type SkillsParticipantsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsParticipantsEndpoint creates a new SkillsParticipantsEndpoint. +func NewSkillsParticipantsEndpoint(client *endpoint.Client) *SkillsParticipantsEndpoint { + return &SkillsParticipantsEndpoint{client: client} +} + +// SkillsParticipantsEndpointListParams contains optional query parameters for List. +type SkillsParticipantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of participants for a specific skill. +func (e *SkillsParticipantsEndpoint) List(instanceId string, skillId string, params *SkillsParticipantsEndpointListParams) (*participants.SkillsParticipantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "participants"}, + Query: query, + } + var result participants.SkillsParticipantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific participant within a skill. +func (e *SkillsParticipantsEndpoint) Get(instanceId string, skillId string, skillParticipantId string) (*participants.SkillsParticipantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "participants", skillParticipantId}, + } + var result participants.SkillsParticipantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_plugins.go b/v1/endpoints/management/skills_plugins.go new file mode 100644 index 0000000..e381bb3 --- /dev/null +++ b/v1/endpoints/management/skills_plugins.go @@ -0,0 +1,134 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/plugins" +) + +// SkillsPluginsEndpoint provides access to manage skill plugins for an instance. +type SkillsPluginsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsPluginsEndpoint creates a new SkillsPluginsEndpoint. +func NewSkillsPluginsEndpoint(client *endpoint.Client) *SkillsPluginsEndpoint { + return &SkillsPluginsEndpoint{client: client} +} + +// SkillsPluginsEndpointListParams contains optional query parameters for List. +type SkillsPluginsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + Status *any `json:"status,omitempty"` + Category *string `json:"category,omitempty"` + Search *string `json:"search,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill plugin creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill plugin last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsPluginsEndpointCreateBody contains the request body for Create. +type SkillsPluginsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// SkillsPluginsEndpointUpdateBody contains the request body for Update. +type SkillsPluginsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// List returns a paginated list of skill plugins. +func (e *SkillsPluginsEndpoint) List(instanceId string, params *SkillsPluginsEndpointListParams) (*plugins.SkillsPluginsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins"}, + Query: query, + } + var result plugins.SkillsPluginsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill plugin. +func (e *SkillsPluginsEndpoint) Get(instanceId string, skillPluginId string) (*plugins.SkillsPluginsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId}, + } + var result plugins.SkillsPluginsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill plugin. +func (e *SkillsPluginsEndpoint) Create(instanceId string, body *SkillsPluginsEndpointCreateBody) (*plugins.SkillsPluginsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins"}, + Body: body, + } + var result plugins.SkillsPluginsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill plugin. +func (e *SkillsPluginsEndpoint) Update(instanceId string, skillPluginId string, body *SkillsPluginsEndpointUpdateBody) (*plugins.SkillsPluginsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId}, + Body: body, + } + var result plugins.SkillsPluginsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Archive archives a skill plugin. +func (e *SkillsPluginsEndpoint) Archive(instanceId string, skillPluginId string) (*plugins.SkillsPluginsArchiveOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId}, + } + var result plugins.SkillsPluginsArchiveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Sync forces a skill plugin sync. +func (e *SkillsPluginsEndpoint) Sync(instanceId string, skillPluginId string) (*plugins.SkillsPluginsSyncOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId, "sync"}, + } + var result plugins.SkillsPluginsSyncOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_plugins_skills.go b/v1/endpoints/management/skills_plugins_skills.go new file mode 100644 index 0000000..597ece9 --- /dev/null +++ b/v1/endpoints/management/skills_plugins_skills.go @@ -0,0 +1,122 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/plugins/skills" +) + +// SkillsPluginsSkillsEndpoint provides access to manage skill links for skill plugins. +type SkillsPluginsSkillsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsPluginsSkillsEndpoint creates a new SkillsPluginsSkillsEndpoint. +func NewSkillsPluginsSkillsEndpoint(client *endpoint.Client) *SkillsPluginsSkillsEndpoint { + return &SkillsPluginsSkillsEndpoint{client: client} +} + +// SkillsPluginsSkillsEndpointListParams contains optional query parameters for List. +type SkillsPluginsSkillsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill plugin skill creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill plugin skill last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsPluginsSkillsEndpointAddBody contains the request body for Add. +type SkillsPluginsSkillsEndpointAddBody struct { + SkillId string `json:"skill_id"` + Identifier *string `json:"identifier,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// SkillsPluginsSkillsEndpointUpdateBody contains the request body for Update. +type SkillsPluginsSkillsEndpointUpdateBody struct { + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// List returns skills linked to a skill plugin. +func (e *SkillsPluginsSkillsEndpoint) List(instanceId string, skillPluginId string, params *SkillsPluginsSkillsEndpointListParams) (*skills.SkillsPluginsSkillsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId, "skills"}, + Query: query, + } + var result skills.SkillsPluginsSkillsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Add adds a skill to a skill plugin. +func (e *SkillsPluginsSkillsEndpoint) Add(instanceId string, skillPluginId string, body *SkillsPluginsSkillsEndpointAddBody) (*skills.SkillsPluginsSkillsAddOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId, "skills"}, + Body: body, + } + var result skills.SkillsPluginsSkillsAddOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill plugin skill link. +func (e *SkillsPluginsSkillsEndpoint) Get(instanceId string, skillPluginId string, skillPluginSkillId string) (*skills.SkillsPluginsSkillsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId, "skills", skillPluginSkillId}, + } + var result skills.SkillsPluginsSkillsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill plugin skill link. +func (e *SkillsPluginsSkillsEndpoint) Update(instanceId string, skillPluginId string, skillPluginSkillId string, body *SkillsPluginsSkillsEndpointUpdateBody) (*skills.SkillsPluginsSkillsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId, "skills", skillPluginSkillId}, + Body: body, + } + var result skills.SkillsPluginsSkillsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Remove removes a skill from a skill plugin. +func (e *SkillsPluginsSkillsEndpoint) Remove(instanceId string, skillPluginId string, skillPluginSkillId string) (*skills.SkillsPluginsSkillsRemoveOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-plugins", skillPluginId, "skills", skillPluginSkillId}, + } + var result skills.SkillsPluginsSkillsRemoveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_templates.go b/v1/endpoints/management/skills_templates.go new file mode 100644 index 0000000..3dcda22 --- /dev/null +++ b/v1/endpoints/management/skills_templates.go @@ -0,0 +1,117 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/templates" +) + +// SkillsTemplatesEndpoint provides access to skill templates define reusable starting points for skills. +type SkillsTemplatesEndpoint struct { + client *endpoint.Client +} + +// NewSkillsTemplatesEndpoint creates a new SkillsTemplatesEndpoint. +func NewSkillsTemplatesEndpoint(client *endpoint.Client) *SkillsTemplatesEndpoint { + return &SkillsTemplatesEndpoint{client: client} +} + +// SkillsTemplatesEndpointListParams contains optional query parameters for List. +type SkillsTemplatesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Owner *any `json:"owner,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + // CreatedAt - Filter skill template creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill template last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsTemplatesEndpointCreateBody contains the request body for Create. +type SkillsTemplatesEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + FromSkillId *string `json:"from_skill_Id,omitempty"` +} + +// SkillsTemplatesEndpointUpdateBody contains the request body for Update. +type SkillsTemplatesEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// List returns a paginated list of skill templates. +func (e *SkillsTemplatesEndpoint) List(instanceId string, params *SkillsTemplatesEndpointListParams) (*templates.SkillsTemplatesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template"}, + Query: query, + } + var result templates.SkillsTemplatesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill template. +func (e *SkillsTemplatesEndpoint) Get(instanceId string, skillTemplateId string) (*templates.SkillsTemplatesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId}, + } + var result templates.SkillsTemplatesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill template. +func (e *SkillsTemplatesEndpoint) Create(instanceId string, body *SkillsTemplatesEndpointCreateBody) (*templates.SkillsTemplatesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template"}, + Body: body, + } + var result templates.SkillsTemplatesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill template. +func (e *SkillsTemplatesEndpoint) Update(instanceId string, skillTemplateId string, body *SkillsTemplatesEndpointUpdateBody) (*templates.SkillsTemplatesUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId}, + Body: body, + } + var result templates.SkillsTemplatesUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill template. +func (e *SkillsTemplatesEndpoint) Delete(instanceId string, skillTemplateId string) (*templates.SkillsTemplatesDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId}, + } + var result templates.SkillsTemplatesDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_templates_items.go b/v1/endpoints/management/skills_templates_items.go new file mode 100644 index 0000000..b1cb372 --- /dev/null +++ b/v1/endpoints/management/skills_templates_items.go @@ -0,0 +1,78 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/templates/items" +) + +// SkillsTemplatesItemsEndpoint provides access to skill template items link template definitions to provider and integration items. +type SkillsTemplatesItemsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsTemplatesItemsEndpoint creates a new SkillsTemplatesItemsEndpoint. +func NewSkillsTemplatesItemsEndpoint(client *endpoint.Client) *SkillsTemplatesItemsEndpoint { + return &SkillsTemplatesItemsEndpoint{client: client} +} + +// SkillsTemplatesItemsEndpointListParams contains optional query parameters for List. +type SkillsTemplatesItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of items for a skill template. +func (e *SkillsTemplatesItemsEndpoint) List(instanceId string, skillTemplateId string, params *SkillsTemplatesItemsEndpointListParams) (*items.SkillsTemplatesItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId, "items"}, + Query: query, + } + var result items.SkillsTemplatesItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill template item. +func (e *SkillsTemplatesItemsEndpoint) Get(instanceId string, skillTemplateId string, skillTemplateItemId string) (*items.SkillsTemplatesItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId, "items", skillTemplateItemId}, + } + var result items.SkillsTemplatesItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create adds a provider or integration item to a skill template. +func (e *SkillsTemplatesItemsEndpoint) Create(instanceId string, skillTemplateId string) (*items.SkillsTemplatesItemsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId, "items"}, + } + var result items.SkillsTemplatesItemsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a skill template item. +func (e *SkillsTemplatesItemsEndpoint) Delete(instanceId string, skillTemplateId string, skillTemplateItemId string) (*items.SkillsTemplatesItemsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skill-template", skillTemplateId, "items", skillTemplateItemId}, + } + var result items.SkillsTemplatesItemsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_versions.go b/v1/endpoints/management/skills_versions.go new file mode 100644 index 0000000..94c08b5 --- /dev/null +++ b/v1/endpoints/management/skills_versions.go @@ -0,0 +1,54 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/versions" +) + +// SkillsVersionsEndpoint provides access to inspect version history and snapshots for a skill. +type SkillsVersionsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsVersionsEndpoint creates a new SkillsVersionsEndpoint. +func NewSkillsVersionsEndpoint(client *endpoint.Client) *SkillsVersionsEndpoint { + return &SkillsVersionsEndpoint{client: client} +} + +// SkillsVersionsEndpointListParams contains optional query parameters for List. +type SkillsVersionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of versions for a specific skill. +func (e *SkillsVersionsEndpoint) List(instanceId string, skillId string, params *SkillsVersionsEndpointListParams) (*versions.SkillsVersionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "versions"}, + Query: query, + } + var result versions.SkillsVersionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill version by its ID. +func (e *SkillsVersionsEndpoint) Get(instanceId string, skillId string, skillVersionId string) (*versions.SkillsVersionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "versions", skillVersionId}, + } + var result versions.SkillsVersionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/skills_versions_snapshot.go b/v1/endpoints/management/skills_versions_snapshot.go new file mode 100644 index 0000000..8db88b0 --- /dev/null +++ b/v1/endpoints/management/skills_versions_snapshot.go @@ -0,0 +1,28 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/versions/snapshot" +) + +// SkillsVersionsSnapshotEndpoint provides access to inspect version history and snapshots for a skill. +type SkillsVersionsSnapshotEndpoint struct { + client *endpoint.Client +} + +// NewSkillsVersionsSnapshotEndpoint creates a new SkillsVersionsSnapshotEndpoint. +func NewSkillsVersionsSnapshotEndpoint(client *endpoint.Client) *SkillsVersionsSnapshotEndpoint { + return &SkillsVersionsSnapshotEndpoint{client: client} +} + +// Get retrieves the store-backed snapshot for a specific skill version. +func (e *SkillsVersionsSnapshotEndpoint) Get(instanceId string, skillId string, skillVersionId string) (*snapshot.SkillsVersionsSnapshotGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "skills", skillId, "versions", skillVersionId, "snapshot"}, + } + var result snapshot.SkillsVersionsSnapshotGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/stores.go b/v1/endpoints/management/stores.go new file mode 100644 index 0000000..af2668c --- /dev/null +++ b/v1/endpoints/management/stores.go @@ -0,0 +1,112 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores" +) + +// StoresEndpoint provides access to create and manage instance stores backed by Cargo. +type StoresEndpoint struct { + client *endpoint.Client +} + +// NewStoresEndpoint creates a new StoresEndpoint. +func NewStoresEndpoint(client *endpoint.Client) *StoresEndpoint { + return &StoresEndpoint{client: client} +} + +// StoresEndpointListParams contains optional query parameters for List. +type StoresEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by store ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// StoresEndpointCreateBody contains the request body for Create. +type StoresEndpointCreateBody struct { + Name string `json:"name"` + Access *string `json:"access,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + ParentId *string `json:"parent_id,omitempty"` +} + +// StoresEndpointUpdateBody contains the request body for Update. +type StoresEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Access *string `json:"access,omitempty"` +} + +// List returns a paginated list of stores owned by the instance. +func (e *StoresEndpoint) List(instanceId string, params *StoresEndpointListParams) (*stores.StoresListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores"}, + Query: query, + } + var result stores.StoresListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new store for the instance. +func (e *StoresEndpoint) Create(instanceId string, body *StoresEndpointCreateBody) (*stores.StoresCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores"}, + Body: body, + } + var result stores.StoresCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a store by its ID. +func (e *StoresEndpoint) Get(instanceId string, storeId string) (*stores.StoresGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId}, + } + var result stores.StoresGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific store. +func (e *StoresEndpoint) Update(instanceId string, storeId string, body *StoresEndpointUpdateBody) (*stores.StoresUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId}, + Body: body, + } + var result stores.StoresUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a specific store. +func (e *StoresEndpoint) Delete(instanceId string, storeId string) (*stores.StoresDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId}, + } + var result stores.StoresDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/stores_items.go b/v1/endpoints/management/stores_items.go new file mode 100644 index 0000000..9f592d5 --- /dev/null +++ b/v1/endpoints/management/stores_items.go @@ -0,0 +1,84 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores/items" +) + +// StoresItemsEndpoint provides access to create and manage instance stores backed by Cargo. +type StoresItemsEndpoint struct { + client *endpoint.Client +} + +// NewStoresItemsEndpoint creates a new StoresItemsEndpoint. +func NewStoresItemsEndpoint(client *endpoint.Client) *StoresItemsEndpoint { + return &StoresItemsEndpoint{client: client} +} + +// StoresItemsEndpointModifyBody contains the request body for Modify. +type StoresItemsEndpointModifyBody struct { + Operations []map[string]any `json:"operations"` +} + +// StoresItemsEndpointListParams contains optional query parameters for List. +type StoresItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by store item ID + Id *any `json:"id,omitempty"` + // FileId - Filter by file ID + FileId *any `json:"file_id,omitempty"` + // DocumentId - Filter by document ID + DocumentId *any `json:"document_id,omitempty"` + // Type - Filter by store item type. Repeat `type` to include multiple values. Defaults to `file` and `document`. + Type *any `json:"type,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// Modify applies bulk item operations to a specific store. +func (e *StoresItemsEndpoint) Modify(instanceId string, storeId string, body *StoresItemsEndpointModifyBody) (*items.StoresItemsModifyOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId, "items"}, + Body: body, + } + var result items.StoresItemsModifyOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// List returns a paginated list of items for a specific store. +func (e *StoresItemsEndpoint) List(instanceId string, storeId string, params *StoresItemsEndpointListParams) (*items.StoresItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId, "items"}, + Query: query, + } + var result items.StoresItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific item within a store. +func (e *StoresItemsEndpoint) Get(instanceId string, storeId string, itemId string) (*items.StoresItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId, "items", itemId}, + } + var result items.StoresItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/stores_participants.go b/v1/endpoints/management/stores_participants.go new file mode 100644 index 0000000..5c0e38d --- /dev/null +++ b/v1/endpoints/management/stores_participants.go @@ -0,0 +1,54 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores/participants" +) + +// StoresParticipantsEndpoint provides access to inspect participants assigned to an instance store. +type StoresParticipantsEndpoint struct { + client *endpoint.Client +} + +// NewStoresParticipantsEndpoint creates a new StoresParticipantsEndpoint. +func NewStoresParticipantsEndpoint(client *endpoint.Client) *StoresParticipantsEndpoint { + return &StoresParticipantsEndpoint{client: client} +} + +// StoresParticipantsEndpointListParams contains optional query parameters for List. +type StoresParticipantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of participants for a specific store. +func (e *StoresParticipantsEndpoint) List(instanceId string, storeId string, params *StoresParticipantsEndpointListParams) (*participants.StoresParticipantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId, "participants"}, + Query: query, + } + var result participants.StoresParticipantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific participant within a store. +func (e *StoresParticipantsEndpoint) Get(instanceId string, storeId string, storeParticipantId string) (*participants.StoresParticipantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId, "participants", storeParticipantId}, + } + var result participants.StoresParticipantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/stores_permissions.go b/v1/endpoints/management/stores_permissions.go new file mode 100644 index 0000000..cd35f79 --- /dev/null +++ b/v1/endpoints/management/stores_permissions.go @@ -0,0 +1,28 @@ +package management + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores/permissions" +) + +// StoresPermissionsEndpoint provides access to create and manage instance stores backed by Cargo. +type StoresPermissionsEndpoint struct { + client *endpoint.Client +} + +// NewStoresPermissionsEndpoint creates a new StoresPermissionsEndpoint. +func NewStoresPermissionsEndpoint(client *endpoint.Client) *StoresPermissionsEndpoint { + return &StoresPermissionsEndpoint{client: client} +} + +// Get returns the effective Cargo permissions for the current actor on a specific store. +func (e *StoresPermissionsEndpoint) Get(instanceId string, storeId string) (*permissions.StoresPermissionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"instances", instanceId, "stores", storeId, "permissions"}, + } + var result permissions.StoresPermissionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/management/tool_calls.go b/v1/endpoints/management/tool_calls.go index b92ae76..bce543b 100644 --- a/v1/endpoints/management/tool_calls.go +++ b/v1/endpoints/management/tool_calls.go @@ -34,6 +34,16 @@ type ToolCallsEndpointListParams struct { ProviderConfigId *any `json:"provider_config_id,omitempty"` // ProviderAuthConfigId - Filter by provider auth config ID(s) ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + // AgentId - Filter by agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // ToolId - Filter by tool ID(s) ToolId *any `json:"tool_id,omitempty"` // CreatedAt - Filter tool call creation time by date range diff --git a/v1/endpoints/portals.go b/v1/endpoints/portals.go index fb233ba..db21ee5 100644 --- a/v1/endpoints/portals.go +++ b/v1/endpoints/portals.go @@ -26,18 +26,23 @@ type PortalsEndpointListParams struct { // PortalsEndpointCreateBody contains the request body for Create. type PortalsEndpointCreateBody struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` - SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` + SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + AllowConsumerSkillAuthoring *bool `json:"allow_consumer_skill_authoring,omitempty"` + AllowConsumerSkillPublishing *bool `json:"allow_consumer_skill_publishing,omitempty"` } // PortalsEndpointUpdateBody contains the request body for Update. type PortalsEndpointUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` - SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + AllowedRedirectUrlFilters *[]map[string]any `json:"allowed_redirect_url_filters,omitempty"` + SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + AllowConsumerSkillAuthoring *bool `json:"allow_consumer_skill_authoring,omitempty"` + AllowConsumerSkillPublishing *bool `json:"allow_consumer_skill_publishing,omitempty"` + SkillConfiguration *map[string]any `json:"skill_configuration,omitempty"` } // List returns a paginated list of portals. diff --git a/v1/endpoints/portals_access.go b/v1/endpoints/portals_access.go new file mode 100644 index 0000000..dc8f59a --- /dev/null +++ b/v1/endpoints/portals_access.go @@ -0,0 +1,118 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/access" +) + +// PortalsAccessEndpoint provides access to manage which consumer groups can access portal provider templates and MCP servers. +type PortalsAccessEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAccessEndpoint creates a new PortalsAccessEndpoint. +func NewPortalsAccessEndpoint(client *endpoint.Client) *PortalsAccessEndpoint { + return &PortalsAccessEndpoint{client: client} +} + +// PortalsAccessEndpointListParams contains optional query parameters for List. +type PortalsAccessEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerGroupId *any `json:"consumer_group_id,omitempty"` + ProviderTemplateId *any `json:"provider_template_id,omitempty"` + MagicMcpServerId *any `json:"magic_mcp_server_id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + SkillTemplateId *any `json:"skill_template_id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + ConsumerAccessListingId *any `json:"consumer_access_listing_id,omitempty"` + Type *any `json:"type,omitempty"` +} + +// PortalsAccessEndpointCreateBody contains the request body for Create. +type PortalsAccessEndpointCreateBody struct { + ConsumerGroupId string `json:"consumer_group_id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access any `json:"access"` +} + +// PortalsAccessEndpointUpdateBody contains the request body for Update. +type PortalsAccessEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` +} + +// List returns a paginated list of consumer access rules for a portal. +func (e *PortalsAccessEndpoint) List(portalId string, params *PortalsAccessEndpointListParams) (*access.PortalsAccessListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access"}, + Query: query, + } + var result access.PortalsAccessListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal access rule by ID. +func (e *PortalsAccessEndpoint) Get(portalId string, accessId string) (*access.PortalsAccessGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access", accessId}, + } + var result access.PortalsAccessGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new consumer access rule for the portal. +func (e *PortalsAccessEndpoint) Create(portalId string, body *PortalsAccessEndpointCreateBody) (*access.PortalsAccessCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access"}, + Body: body, + } + var result access.PortalsAccessCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates the shared listing fields for a portal access rule. +func (e *PortalsAccessEndpoint) Update(portalId string, accessId string, body *PortalsAccessEndpointUpdateBody) (*access.PortalsAccessUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access", accessId}, + Body: body, + } + var result access.PortalsAccessUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a consumer access rule from the portal. +func (e *PortalsAccessEndpoint) Delete(portalId string, accessId string) (*access.PortalsAccessDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access", accessId}, + } + var result access.PortalsAccessDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_access_requests.go b/v1/endpoints/portals_access_requests.go new file mode 100644 index 0000000..fec8ed7 --- /dev/null +++ b/v1/endpoints/portals_access_requests.go @@ -0,0 +1,77 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/accessrequests" +) + +// PortalsAccessRequestsEndpoint provides access to review and resolve access requests for a portal. +type PortalsAccessRequestsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAccessRequestsEndpoint creates a new PortalsAccessRequestsEndpoint. +func NewPortalsAccessRequestsEndpoint(client *endpoint.Client) *PortalsAccessRequestsEndpoint { + return &PortalsAccessRequestsEndpoint{client: client} +} + +// PortalsAccessRequestsEndpointListParams contains optional query parameters for List. +type PortalsAccessRequestsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + ConsumerProfileId *any `json:"consumer_profile_id,omitempty"` + Search *string `json:"search,omitempty"` +} + +// PortalsAccessRequestsEndpointUpdateBody contains the request body for Update. +type PortalsAccessRequestsEndpointUpdateBody struct { + Status string `json:"status"` + ResolutionMessage *string `json:"resolution_message,omitempty"` + ConsumerGroupId *string `json:"consumer_group_id,omitempty"` +} + +// List returns a paginated list of access requests for a portal. +func (e *PortalsAccessRequestsEndpoint) List(portalId string, params *PortalsAccessRequestsEndpointListParams) (*accessrequests.PortalsAccessRequestsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access-requests"}, + Query: query, + } + var result accessrequests.PortalsAccessRequestsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a access request by ID. +func (e *PortalsAccessRequestsEndpoint) Get(portalId string, accessRequestId string) (*accessrequests.PortalsAccessRequestsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access-requests", accessRequestId}, + } + var result accessrequests.PortalsAccessRequestsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update approves or rejects a access request. +func (e *PortalsAccessRequestsEndpoint) Update(portalId string, accessRequestId string, body *PortalsAccessRequestsEndpointUpdateBody) (*accessrequests.PortalsAccessRequestsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "access-requests", accessRequestId}, + Body: body, + } + var result accessrequests.PortalsAccessRequestsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_auth_app.go b/v1/endpoints/portals_auth_app.go new file mode 100644 index 0000000..7b50de1 --- /dev/null +++ b/v1/endpoints/portals_auth_app.go @@ -0,0 +1,46 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/auth/app" +) + +// PortalsAuthAppEndpoint provides access to manage the Ares-backed authentication configuration for a portal. +type PortalsAuthAppEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAuthAppEndpoint creates a new PortalsAuthAppEndpoint. +func NewPortalsAuthAppEndpoint(client *endpoint.Client) *PortalsAuthAppEndpoint { + return &PortalsAuthAppEndpoint{client: client} +} + +// PortalsAuthAppEndpointUpdateBody contains the request body for Update. +type PortalsAuthAppEndpointUpdateBody struct { + EmailWhitelist *[]string `json:"email_whitelist,omitempty"` +} + +// Get returns the Ares app configuration for a portal. +func (e *PortalsAuthAppEndpoint) Get(portalId string) (*app.PortalsAuthAppGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "auth", "app"}, + } + var result app.PortalsAuthAppGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates the portal auth app configuration stored on the portal surface. +func (e *PortalsAuthAppEndpoint) Update(portalId string, body *PortalsAuthAppEndpointUpdateBody) (*app.PortalsAuthAppUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "auth", "app"}, + Body: body, + } + var result app.PortalsAuthAppUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_auth_sso_tenants.go b/v1/endpoints/portals_auth_sso_tenants.go new file mode 100644 index 0000000..31ff542 --- /dev/null +++ b/v1/endpoints/portals_auth_sso_tenants.go @@ -0,0 +1,72 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/auth/ssotenants" +) + +// PortalsAuthSsoTenantsEndpoint provides access to manage the Ares-backed authentication configuration for a portal. +type PortalsAuthSsoTenantsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAuthSsoTenantsEndpoint creates a new PortalsAuthSsoTenantsEndpoint. +func NewPortalsAuthSsoTenantsEndpoint(client *endpoint.Client) *PortalsAuthSsoTenantsEndpoint { + return &PortalsAuthSsoTenantsEndpoint{client: client} +} + +// PortalsAuthSsoTenantsEndpointListParams contains optional query parameters for List. +type PortalsAuthSsoTenantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// PortalsAuthSsoTenantsEndpointCreateBody contains the request body for Create. +type PortalsAuthSsoTenantsEndpointCreateBody struct { + Name string `json:"name"` +} + +// List returns the SSO tenants configured for a portal Ares app. +func (e *PortalsAuthSsoTenantsEndpoint) List(portalId string, params *PortalsAuthSsoTenantsEndpointListParams) (*ssotenants.PortalsAuthSsoTenantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "auth", "sso-tenants"}, + Query: query, + } + var result ssotenants.PortalsAuthSsoTenantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates an SSO tenant for the portal Ares app. +func (e *PortalsAuthSsoTenantsEndpoint) Create(portalId string, body *PortalsAuthSsoTenantsEndpointCreateBody) (*ssotenants.PortalsAuthSsoTenantsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "auth", "sso-tenants"}, + Body: body, + } + var result ssotenants.PortalsAuthSsoTenantsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Setup creates an Ares setup URL for finishing portal SSO tenant configuration. +func (e *PortalsAuthSsoTenantsEndpoint) Setup(portalId string, ssoTenantId string) (*ssotenants.PortalsAuthSsoTenantsSetupOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "auth", "sso-tenants", ssoTenantId, "setup"}, + } + var result ssotenants.PortalsAuthSsoTenantsSetupOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_auth_sso_tenants_connections.go b/v1/endpoints/portals_auth_sso_tenants_connections.go new file mode 100644 index 0000000..e3c03de --- /dev/null +++ b/v1/endpoints/portals_auth_sso_tenants_connections.go @@ -0,0 +1,42 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/auth/ssotenants/connections" +) + +// PortalsAuthSsoTenantsConnectionsEndpoint provides access to manage the Ares-backed authentication configuration for a portal. +type PortalsAuthSsoTenantsConnectionsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsAuthSsoTenantsConnectionsEndpoint creates a new PortalsAuthSsoTenantsConnectionsEndpoint. +func NewPortalsAuthSsoTenantsConnectionsEndpoint(client *endpoint.Client) *PortalsAuthSsoTenantsConnectionsEndpoint { + return &PortalsAuthSsoTenantsConnectionsEndpoint{client: client} +} + +// PortalsAuthSsoTenantsConnectionsEndpointListParams contains optional query parameters for List. +type PortalsAuthSsoTenantsConnectionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns SSO connections that belong to a portal SSO tenant. +func (e *PortalsAuthSsoTenantsConnectionsEndpoint) List(portalId string, ssoTenantId string, params *PortalsAuthSsoTenantsConnectionsEndpointListParams) (*connections.PortalsAuthSsoTenantsConnectionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "auth", "sso-tenants", ssoTenantId, "connections"}, + Query: query, + } + var result connections.PortalsAuthSsoTenantsConnectionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_consumer_groups.go b/v1/endpoints/portals_consumer_groups.go new file mode 100644 index 0000000..b054918 --- /dev/null +++ b/v1/endpoints/portals_consumer_groups.go @@ -0,0 +1,110 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/consumergroups" +) + +// PortalsConsumerGroupsEndpoint provides access to manage the consumer groups that drive portal visibility and access rules. +type PortalsConsumerGroupsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsConsumerGroupsEndpoint creates a new PortalsConsumerGroupsEndpoint. +func NewPortalsConsumerGroupsEndpoint(client *endpoint.Client) *PortalsConsumerGroupsEndpoint { + return &PortalsConsumerGroupsEndpoint{client: client} +} + +// PortalsConsumerGroupsEndpointListParams contains optional query parameters for List. +type PortalsConsumerGroupsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Search *string `json:"search,omitempty"` +} + +// PortalsConsumerGroupsEndpointCreateBody contains the request body for Create. +type PortalsConsumerGroupsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + SsoGroupIds *[]string `json:"sso_group_ids,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// PortalsConsumerGroupsEndpointUpdateBody contains the request body for Update. +type PortalsConsumerGroupsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + SsoGroupIds *[]string `json:"sso_group_ids,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// List returns a paginated list of consumer groups for a portal. +func (e *PortalsConsumerGroupsEndpoint) List(portalId string, params *PortalsConsumerGroupsEndpointListParams) (*consumergroups.PortalsConsumerGroupsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-groups"}, + Query: query, + } + var result consumergroups.PortalsConsumerGroupsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal consumer group by ID. +func (e *PortalsConsumerGroupsEndpoint) Get(portalId string, consumerGroupId string) (*consumergroups.PortalsConsumerGroupsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-groups", consumerGroupId}, + } + var result consumergroups.PortalsConsumerGroupsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new consumer group for the portal. +func (e *PortalsConsumerGroupsEndpoint) Create(portalId string, body *PortalsConsumerGroupsEndpointCreateBody) (*consumergroups.PortalsConsumerGroupsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-groups"}, + Body: body, + } + var result consumergroups.PortalsConsumerGroupsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a consumer group for the portal. +func (e *PortalsConsumerGroupsEndpoint) Update(portalId string, consumerGroupId string, body *PortalsConsumerGroupsEndpointUpdateBody) (*consumergroups.PortalsConsumerGroupsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-groups", consumerGroupId}, + Body: body, + } + var result consumergroups.PortalsConsumerGroupsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a consumer group for the portal. +func (e *PortalsConsumerGroupsEndpoint) Delete(portalId string, consumerGroupId string) (*consumergroups.PortalsConsumerGroupsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-groups", consumerGroupId}, + } + var result consumergroups.PortalsConsumerGroupsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_consumer_invites.go b/v1/endpoints/portals_consumer_invites.go new file mode 100644 index 0000000..998b44f --- /dev/null +++ b/v1/endpoints/portals_consumer_invites.go @@ -0,0 +1,76 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/consumerinvites" +) + +// PortalsConsumerInvitesEndpoint provides access to list and inspect consumer invites for a portal. +type PortalsConsumerInvitesEndpoint struct { + client *endpoint.Client +} + +// NewPortalsConsumerInvitesEndpoint creates a new PortalsConsumerInvitesEndpoint. +func NewPortalsConsumerInvitesEndpoint(client *endpoint.Client) *PortalsConsumerInvitesEndpoint { + return &PortalsConsumerInvitesEndpoint{client: client} +} + +// PortalsConsumerInvitesEndpointListParams contains optional query parameters for List. +type PortalsConsumerInvitesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` +} + +// PortalsConsumerInvitesEndpointCreateBody contains the request body for Create. +type PortalsConsumerInvitesEndpointCreateBody struct { + Name string `json:"name"` + Email string `json:"email"` + Message *string `json:"message,omitempty"` +} + +// List returns a paginated list of invites for a portal. +func (e *PortalsConsumerInvitesEndpoint) List(portalId string, params *PortalsConsumerInvitesEndpointListParams) (*consumerinvites.PortalsConsumerInvitesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-invites"}, + Query: query, + } + var result consumerinvites.PortalsConsumerInvitesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create invites a consumer to a portal. +func (e *PortalsConsumerInvitesEndpoint) Create(portalId string, body *PortalsConsumerInvitesEndpointCreateBody) (*consumerinvites.PortalsConsumerInvitesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-invites"}, + Body: body, + } + var result consumerinvites.PortalsConsumerInvitesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal consumer invite by ID. +func (e *PortalsConsumerInvitesEndpoint) Get(portalId string, consumerInviteId string) (*consumerinvites.PortalsConsumerInvitesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-invites", consumerInviteId}, + } + var result consumerinvites.PortalsConsumerInvitesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_consumer_profiles.go b/v1/endpoints/portals_consumer_profiles.go new file mode 100644 index 0000000..b6fcb3f --- /dev/null +++ b/v1/endpoints/portals_consumer_profiles.go @@ -0,0 +1,93 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/consumerprofiles" +) + +// PortalsConsumerProfilesEndpoint provides access to manage the consumers and effective group assignments for a portal. +type PortalsConsumerProfilesEndpoint struct { + client *endpoint.Client +} + +// NewPortalsConsumerProfilesEndpoint creates a new PortalsConsumerProfilesEndpoint. +func NewPortalsConsumerProfilesEndpoint(client *endpoint.Client) *PortalsConsumerProfilesEndpoint { + return &PortalsConsumerProfilesEndpoint{client: client} +} + +// PortalsConsumerProfilesEndpointListParams contains optional query parameters for List. +type PortalsConsumerProfilesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerGroupId *string `json:"consumer_group_id,omitempty"` + Status *any `json:"status,omitempty"` +} + +// PortalsConsumerProfilesEndpointAssignGroupsBody contains the request body for AssignGroups. +type PortalsConsumerProfilesEndpointAssignGroupsBody struct { + GroupIds []string `json:"group_ids"` +} + +// PortalsConsumerProfilesEndpointUnassignGroupsBody contains the request body for UnassignGroups. +type PortalsConsumerProfilesEndpointUnassignGroupsBody struct { + GroupIds []string `json:"group_ids"` +} + +// List returns a paginated list of consumer profiles for a portal. +func (e *PortalsConsumerProfilesEndpoint) List(portalId string, params *PortalsConsumerProfilesEndpointListParams) (*consumerprofiles.PortalsConsumerProfilesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-profile"}, + Query: query, + } + var result consumerprofiles.PortalsConsumerProfilesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a portal consumer profile by ID. +func (e *PortalsConsumerProfilesEndpoint) Get(portalId string, consumerProfileId string) (*consumerprofiles.PortalsConsumerProfilesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-profile", consumerProfileId}, + } + var result consumerprofiles.PortalsConsumerProfilesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// AssignGroups assigns one or more groups to a portal consumer profile. +func (e *PortalsConsumerProfilesEndpoint) AssignGroups(portalId string, consumerProfileId string, body *PortalsConsumerProfilesEndpointAssignGroupsBody) (*consumerprofiles.PortalsConsumerProfilesAssignGroupsOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-profile", consumerProfileId, "assign-groups"}, + Body: body, + } + var result consumerprofiles.PortalsConsumerProfilesAssignGroupsOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// UnassignGroups removes one or more groups from a portal consumer profile. +func (e *PortalsConsumerProfilesEndpoint) UnassignGroups(portalId string, consumerProfileId string, body *PortalsConsumerProfilesEndpointUnassignGroupsBody) (*consumerprofiles.PortalsConsumerProfilesUnassignGroupsOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "consumer-profile", consumerProfileId, "unassign-groups"}, + Body: body, + } + var result consumerprofiles.PortalsConsumerProfilesUnassignGroupsOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/portals_listings.go b/v1/endpoints/portals_listings.go new file mode 100644 index 0000000..f06a701 --- /dev/null +++ b/v1/endpoints/portals_listings.go @@ -0,0 +1,116 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/portals/listings" +) + +// PortalsListingsEndpoint provides access to read the shared listings available on a portal surface. +type PortalsListingsEndpoint struct { + client *endpoint.Client +} + +// NewPortalsListingsEndpoint creates a new PortalsListingsEndpoint. +func NewPortalsListingsEndpoint(client *endpoint.Client) *PortalsListingsEndpoint { + return &PortalsListingsEndpoint{client: client} +} + +// PortalsListingsEndpointListParams contains optional query parameters for List. +type PortalsListingsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerSurfaceProviderGroupId *any `json:"consumer_surface_provider_group_id,omitempty"` + ProviderTemplateId *any `json:"provider_template_id,omitempty"` + MagicMcpServerId *any `json:"magic_mcp_server_id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + SkillTemplateId *any `json:"skill_template_id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + Type *any `json:"type,omitempty"` +} + +// PortalsListingsEndpointCreateBody contains the request body for Create. +type PortalsListingsEndpointCreateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access any `json:"access"` +} + +// PortalsListingsEndpointUpdateBody contains the request body for Update. +type PortalsListingsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` +} + +// List returns a paginated list of shared listings for a portal. +func (e *PortalsListingsEndpoint) List(portalId string, params *PortalsListingsEndpointListParams) (*listings.PortalsListingsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"portals", portalId, "listings"}, + Query: query, + } + var result listings.PortalsListingsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves one shared listing for a portal. +func (e *PortalsListingsEndpoint) Get(portalId string, listingId string) (*listings.PortalsListingsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "listings", listingId}, + } + var result listings.PortalsListingsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a shared listing for a portal. +func (e *PortalsListingsEndpoint) Create(portalId string, body *PortalsListingsEndpointCreateBody) (*listings.PortalsListingsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "listings"}, + Body: body, + } + var result listings.PortalsListingsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates listing metadata for a portal listing. +func (e *PortalsListingsEndpoint) Update(portalId string, listingId string, body *PortalsListingsEndpointUpdateBody) (*listings.PortalsListingsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "listings", listingId}, + Body: body, + } + var result listings.PortalsListingsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a portal listing and all consumer access attached to it. +func (e *PortalsListingsEndpoint) Delete(portalId string, listingId string) (*listings.PortalsListingsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"portals", portalId, "listings", listingId}, + } + var result listings.PortalsListingsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/provider_deployments_auth_configs.go b/v1/endpoints/provider_deployments_auth_configs.go index cc56b24..8b8ed1d 100644 --- a/v1/endpoints/provider_deployments_auth_configs.go +++ b/v1/endpoints/provider_deployments_auth_configs.go @@ -30,6 +30,10 @@ type ProviderDeploymentsAuthConfigsEndpointListParams struct { ProviderId *any `json:"provider_id,omitempty"` // ProviderDeploymentId - Filter by provider deployment ID(s) ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + // AvailableForUse - Only return auth configs that are not owned by another integration instance provider. + AvailableForUse *bool `json:"available_for_use,omitempty"` + // AvailableForProviderDeploymentId - Only return auth configs that are not locked to a different provider deployment. + AvailableForProviderDeploymentId *string `json:"available_for_provider_deployment_id,omitempty"` // ProviderAuthCredentialsId - Filter by auth credentials ID(s) ProviderAuthCredentialsId *any `json:"provider_auth_credentials_id,omitempty"` // ProviderAuthMethodId - Filter by auth method ID(s) diff --git a/v1/endpoints/provider_deployments_configs.go b/v1/endpoints/provider_deployments_configs.go index 622f62c..ea69051 100644 --- a/v1/endpoints/provider_deployments_configs.go +++ b/v1/endpoints/provider_deployments_configs.go @@ -32,6 +32,10 @@ type ProviderDeploymentsConfigsEndpointListParams struct { ProviderSpecificationId *any `json:"provider_specification_id,omitempty"` // ProviderDeploymentId - Filter by provider deployment ID(s) ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + // AvailableForUse - Only return configs that are not owned by another integration instance provider. + AvailableForUse *bool `json:"available_for_use,omitempty"` + // AvailableForProviderDeploymentId - Only return configs that are not locked to a different provider deployment. + AvailableForProviderDeploymentId *string `json:"available_for_provider_deployment_id,omitempty"` // ProviderConfigVaultId - Filter by config vault ID(s) ProviderConfigVaultId *any `json:"provider_config_vault_id,omitempty"` // ActorId - Filter by actor ID(s) diff --git a/v1/endpoints/provider_templates.go b/v1/endpoints/provider_templates.go index bfd093f..a8cae23 100644 --- a/v1/endpoints/provider_templates.go +++ b/v1/endpoints/provider_templates.go @@ -17,33 +17,31 @@ func NewProviderTemplatesEndpoint(client *endpoint.Client) *ProviderTemplatesEnd // ProviderTemplatesEndpointListParams contains optional query parameters for List. type ProviderTemplatesEndpointListParams struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - Id *any `json:"id,omitempty"` - ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` - Search *string `json:"search,omitempty"` - Status *any `json:"status,omitempty"` + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` } // ProviderTemplatesEndpointCreateBody contains the request body for Create. type ProviderTemplatesEndpointCreateBody struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ToolFilers *any `json:"tool_filers,omitempty"` - ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` - ProviderDeployment *map[string]any `json:"provider_deployment,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers []map[string]any `json:"providers"` } // ProviderTemplatesEndpointUpdateBody contains the request body for Update. type ProviderTemplatesEndpointUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ToolFilters *any `json:"tool_filters,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]map[string]any `json:"providers,omitempty"` } // List returns a paginated list of provider templates. diff --git a/v1/endpoints/sessions.go b/v1/endpoints/sessions.go index 4115fae..ae335bb 100644 --- a/v1/endpoints/sessions.go +++ b/v1/endpoints/sessions.go @@ -26,6 +26,14 @@ type SessionsEndpointListParams struct { Status *any `json:"status,omitempty"` // Id - Filter by session ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` // SessionTemplateId - Filter by session template ID(s) SessionTemplateId *any `json:"session_template_id,omitempty"` // SessionProviderId - Filter by session provider ID(s) diff --git a/v1/endpoints/sessions_connections.go b/v1/endpoints/sessions_connections.go index a69868c..3c9e1d1 100644 --- a/v1/endpoints/sessions_connections.go +++ b/v1/endpoints/sessions_connections.go @@ -28,6 +28,16 @@ type SessionsConnectionsEndpointListParams struct { ConnectionState *any `json:"connection_state,omitempty"` // Id - Filter by session connection ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by connected agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // SessionId - Filter by session ID(s) SessionId *any `json:"session_id,omitempty"` // SessionProviderId - Filter by session provider ID(s) diff --git a/v1/endpoints/sessions_participants.go b/v1/endpoints/sessions_participants.go index 0062007..768d45d 100644 --- a/v1/endpoints/sessions_participants.go +++ b/v1/endpoints/sessions_participants.go @@ -26,6 +26,16 @@ type SessionsParticipantsEndpointListParams struct { Type *any `json:"type,omitempty"` // Id - Filter by participant ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by connected agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // SessionId - Filter by session ID(s) SessionId *any `json:"session_id,omitempty"` // SessionConnectionId - Filter by session connection ID(s) diff --git a/v1/endpoints/skills.go b/v1/endpoints/skills.go new file mode 100644 index 0000000..a288ded --- /dev/null +++ b/v1/endpoints/skills.go @@ -0,0 +1,192 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills" +) + +// SkillsEndpoint provides access to skills group provider and integration capabilities into reusable, owned compositions. +type SkillsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsEndpoint creates a new SkillsEndpoint. +func NewSkillsEndpoint(client *endpoint.Client) *SkillsEndpoint { + return &SkillsEndpoint{client: client} +} + +// SkillsEndpointListParams contains optional query parameters for List. +type SkillsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + // CreatedAt - Filter skill creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsEndpointCreateBody contains the request body for Create. +type SkillsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + TemplateId *string `json:"template_id,omitempty"` +} + +// SkillsEndpointUpdateBody contains the request body for Update. +type SkillsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` +} + +// SkillsEndpointForkBody contains the request body for Fork. +type SkillsEndpointForkBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` +} + +// SkillsEndpointDuplicateBody contains the request body for Duplicate. +type SkillsEndpointDuplicateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// List returns a paginated list of skills. +func (e *SkillsEndpoint) List(params *SkillsEndpointListParams) (*skills.SkillsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skills"}, + Query: query, + } + var result skills.SkillsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill. +func (e *SkillsEndpoint) Get(skillId string) (*skills.SkillsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId}, + } + var result skills.SkillsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new skill. +func (e *SkillsEndpoint) Create(body *SkillsEndpointCreateBody) (*skills.SkillsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills"}, + Body: body, + } + var result skills.SkillsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific skill. +func (e *SkillsEndpoint) Update(skillId string, body *SkillsEndpointUpdateBody) (*skills.SkillsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId}, + Body: body, + } + var result skills.SkillsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific skill. +func (e *SkillsEndpoint) Delete(skillId string) (*skills.SkillsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId}, + } + var result skills.SkillsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Fork forks a skill for the current consumer. Non-consumer callers duplicate the skill instead. +func (e *SkillsEndpoint) Fork(skillId string, body *SkillsEndpointForkBody) (*skills.SkillsForkOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "fork"}, + Body: body, + } + var result skills.SkillsForkOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// PublishConsumerSkill publishes a consumer-owned skill to the consumer groups they belong to. +func (e *SkillsEndpoint) PublishConsumerSkill(skillId string) (*skills.SkillsPublishConsumerSkillOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "publish"}, + } + var result skills.SkillsPublishConsumerSkillOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Duplicate duplicates a skill. +func (e *SkillsEndpoint) Duplicate(skillId string, body *SkillsEndpointDuplicateBody) (*skills.SkillsDuplicateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "duplicate"}, + Body: body, + } + var result skills.SkillsDuplicateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_agents.go b/v1/endpoints/skills_agents.go new file mode 100644 index 0000000..6b70a7e --- /dev/null +++ b/v1/endpoints/skills_agents.go @@ -0,0 +1,106 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/agents" +) + +// SkillsAgentsEndpoint provides access to manage sub-agents attached to a skill. +type SkillsAgentsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsAgentsEndpoint creates a new SkillsAgentsEndpoint. +func NewSkillsAgentsEndpoint(client *endpoint.Client) *SkillsAgentsEndpoint { + return &SkillsAgentsEndpoint{client: client} +} + +// SkillsAgentsEndpointCreateBody contains the request body for Create. +type SkillsAgentsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Content *string `json:"content,omitempty"` +} + +// SkillsAgentsEndpointListParams contains optional query parameters for List. +type SkillsAgentsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + IncludeArchived *bool `json:"include_archived,omitempty"` +} + +// SkillsAgentsEndpointUpdateBody contains the request body for Update. +type SkillsAgentsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// Create creates a new agent document in the skill agents directory. +func (e *SkillsAgentsEndpoint) Create(skillId string, body *SkillsAgentsEndpointCreateBody) (*agents.SkillsAgentsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "agents"}, + Body: body, + } + var result agents.SkillsAgentsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// List returns a paginated list of agents for a specific skill. +func (e *SkillsAgentsEndpoint) List(skillId string, params *SkillsAgentsEndpointListParams) (*agents.SkillsAgentsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skills", skillId, "agents"}, + Query: query, + } + var result agents.SkillsAgentsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific agent within a skill. +func (e *SkillsAgentsEndpoint) Get(skillId string, skillAgentId string) (*agents.SkillsAgentsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "agents", skillAgentId}, + } + var result agents.SkillsAgentsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates the name or description for a specific skill agent. +func (e *SkillsAgentsEndpoint) Update(skillId string, skillAgentId string, body *SkillsAgentsEndpointUpdateBody) (*agents.SkillsAgentsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "agents", skillAgentId}, + Body: body, + } + var result agents.SkillsAgentsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a specific skill agent and removes its linked store item. +func (e *SkillsAgentsEndpoint) Delete(skillId string, skillAgentId string) (*agents.SkillsAgentsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "agents", skillAgentId}, + } + var result agents.SkillsAgentsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_configurations.go b/v1/endpoints/skills_configurations.go new file mode 100644 index 0000000..c5f8596 --- /dev/null +++ b/v1/endpoints/skills_configurations.go @@ -0,0 +1,106 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/configurations" +) + +// SkillsConfigurationsEndpoint provides access to manage configuration profiles for skill execution. +type SkillsConfigurationsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsConfigurationsEndpoint creates a new SkillsConfigurationsEndpoint. +func NewSkillsConfigurationsEndpoint(client *endpoint.Client) *SkillsConfigurationsEndpoint { + return &SkillsConfigurationsEndpoint{client: client} +} + +// SkillsConfigurationsEndpointCreateBody contains the request body for Create. +type SkillsConfigurationsEndpointCreateBody struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + +// SkillsConfigurationsEndpointListParams contains optional query parameters for List. +type SkillsConfigurationsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// SkillsConfigurationsEndpointUpdateBody contains the request body for Update. +type SkillsConfigurationsEndpointUpdateBody struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + +// Create creates a new non-default skill configuration. +func (e *SkillsConfigurationsEndpoint) Create(body *SkillsConfigurationsEndpointCreateBody) (*configurations.SkillsConfigurationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", "configurations"}, + Body: body, + } + var result configurations.SkillsConfigurationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// List returns a paginated list of visible skill configurations. +func (e *SkillsConfigurationsEndpoint) List(params *SkillsConfigurationsEndpointListParams) (*configurations.SkillsConfigurationsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skills", "configurations"}, + Query: query, + } + var result configurations.SkillsConfigurationsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill configuration by ID, or the default. +func (e *SkillsConfigurationsEndpoint) Get(skillConfigurationId string) (*configurations.SkillsConfigurationsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", "configurations", skillConfigurationId}, + } + var result configurations.SkillsConfigurationsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific skill configuration. Updating default creates it first if needed. +func (e *SkillsConfigurationsEndpoint) Update(skillConfigurationId string, body *SkillsConfigurationsEndpointUpdateBody) (*configurations.SkillsConfigurationsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", "configurations", skillConfigurationId}, + Body: body, + } + var result configurations.SkillsConfigurationsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete soft deletes a specific non-internal skill configuration. +func (e *SkillsConfigurationsEndpoint) Delete(skillConfigurationId string) (*configurations.SkillsConfigurationsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", "configurations", skillConfigurationId}, + } + var result configurations.SkillsConfigurationsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_exports.go b/v1/endpoints/skills_exports.go new file mode 100644 index 0000000..0b0eb33 --- /dev/null +++ b/v1/endpoints/skills_exports.go @@ -0,0 +1,78 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/exports" +) + +// SkillsExportsEndpoint provides access to export skills, skill plugins, and skill marketplaces as zip files. +type SkillsExportsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsExportsEndpoint creates a new SkillsExportsEndpoint. +func NewSkillsExportsEndpoint(client *endpoint.Client) *SkillsExportsEndpoint { + return &SkillsExportsEndpoint{client: client} +} + +// SkillsExportsEndpointListParams contains optional query parameters for List. +type SkillsExportsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + Target *any `json:"target,omitempty"` + Status *any `json:"status,omitempty"` +} + +// SkillsExportsEndpointCreateBody contains the request body for Create. +type SkillsExportsEndpointCreateBody struct { + Target string `json:"target"` + SkillId *string `json:"skill_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` +} + +// List returns a paginated list of skill exports. +func (e *SkillsExportsEndpoint) List(params *SkillsExportsEndpointListParams) (*exports.SkillsExportsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-exports"}, + Query: query, + } + var result exports.SkillsExportsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill export. +func (e *SkillsExportsEndpoint) Get(skillExportId string) (*exports.SkillsExportsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-exports", skillExportId}, + } + var result exports.SkillsExportsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill, plugin, or marketplace export. +func (e *SkillsExportsEndpoint) Create(body *SkillsExportsEndpointCreateBody) (*exports.SkillsExportsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-exports"}, + Body: body, + } + var result exports.SkillsExportsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_groups.go b/v1/endpoints/skills_groups.go new file mode 100644 index 0000000..a8d5cfb --- /dev/null +++ b/v1/endpoints/skills_groups.go @@ -0,0 +1,116 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/groups" +) + +// SkillsGroupsEndpoint provides access to skill groups organize skills into reusable collections. +type SkillsGroupsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsGroupsEndpoint creates a new SkillsGroupsEndpoint. +func NewSkillsGroupsEndpoint(client *endpoint.Client) *SkillsGroupsEndpoint { + return &SkillsGroupsEndpoint{client: client} +} + +// SkillsGroupsEndpointListParams contains optional query parameters for List. +type SkillsGroupsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + // CreatedAt - Filter skill group creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill group last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsGroupsEndpointCreateBody contains the request body for Create. +type SkillsGroupsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + SkillIds *[]string `json:"skill_ids,omitempty"` +} + +// SkillsGroupsEndpointUpdateBody contains the request body for Update. +type SkillsGroupsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + SkillIds *[]string `json:"skill_ids,omitempty"` +} + +// List returns a paginated list of skill groups. +func (e *SkillsGroupsEndpoint) List(params *SkillsGroupsEndpointListParams) (*groups.SkillsGroupsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-groups"}, + Query: query, + } + var result groups.SkillsGroupsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill group. +func (e *SkillsGroupsEndpoint) Get(skillGroupId string) (*groups.SkillsGroupsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId}, + } + var result groups.SkillsGroupsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill group. +func (e *SkillsGroupsEndpoint) Create(body *SkillsGroupsEndpointCreateBody) (*groups.SkillsGroupsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups"}, + Body: body, + } + var result groups.SkillsGroupsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill group. +func (e *SkillsGroupsEndpoint) Update(skillGroupId string, body *SkillsGroupsEndpointUpdateBody) (*groups.SkillsGroupsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId}, + Body: body, + } + var result groups.SkillsGroupsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill group. +func (e *SkillsGroupsEndpoint) Delete(skillGroupId string) (*groups.SkillsGroupsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId}, + } + var result groups.SkillsGroupsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_groups_items.go b/v1/endpoints/skills_groups_items.go new file mode 100644 index 0000000..13591b8 --- /dev/null +++ b/v1/endpoints/skills_groups_items.go @@ -0,0 +1,89 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/groups/items" +) + +// SkillsGroupsItemsEndpoint provides access to skill group items link groups to skills. +type SkillsGroupsItemsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsGroupsItemsEndpoint creates a new SkillsGroupsItemsEndpoint. +func NewSkillsGroupsItemsEndpoint(client *endpoint.Client) *SkillsGroupsItemsEndpoint { + return &SkillsGroupsItemsEndpoint{client: client} +} + +// SkillsGroupsItemsEndpointListParams contains optional query parameters for List. +type SkillsGroupsItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + // CreatedAt - Filter skill group item creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` +} + +// SkillsGroupsItemsEndpointCreateBody contains the request body for Create. +type SkillsGroupsItemsEndpointCreateBody struct { + SkillId string `json:"skill_id"` +} + +// List returns a paginated list of items for a skill group. +func (e *SkillsGroupsItemsEndpoint) List(skillGroupId string, params *SkillsGroupsItemsEndpointListParams) (*items.SkillsGroupsItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId, "items"}, + Query: query, + } + var result items.SkillsGroupsItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill group item. +func (e *SkillsGroupsItemsEndpoint) Get(skillGroupId string, skillGroupItemId string) (*items.SkillsGroupsItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId, "items", skillGroupItemId}, + } + var result items.SkillsGroupsItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create adds a skill to a skill group. +func (e *SkillsGroupsItemsEndpoint) Create(skillGroupId string, body *SkillsGroupsItemsEndpointCreateBody) (*items.SkillsGroupsItemsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId, "items"}, + Body: body, + } + var result items.SkillsGroupsItemsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill group item. +func (e *SkillsGroupsItemsEndpoint) Delete(skillGroupId string, skillGroupItemId string) (*items.SkillsGroupsItemsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-groups", skillGroupId, "items", skillGroupItemId}, + } + var result items.SkillsGroupsItemsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_items.go b/v1/endpoints/skills_items.go new file mode 100644 index 0000000..e76383d --- /dev/null +++ b/v1/endpoints/skills_items.go @@ -0,0 +1,85 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/items" +) + +// SkillsItemsEndpoint provides access to skill items attach integrations and providers to skills. +type SkillsItemsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsItemsEndpoint creates a new SkillsItemsEndpoint. +func NewSkillsItemsEndpoint(client *endpoint.Client) *SkillsItemsEndpoint { + return &SkillsItemsEndpoint{client: client} +} + +// SkillsItemsEndpointListParams contains optional query parameters for List. +type SkillsItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + // CreatedAt - Filter skill item creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` +} + +// List returns a paginated list of items for a skill. +func (e *SkillsItemsEndpoint) List(skillId string, params *SkillsItemsEndpointListParams) (*items.SkillsItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skills", skillId, "items"}, + Query: query, + } + var result items.SkillsItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill item. +func (e *SkillsItemsEndpoint) Get(skillId string, skillItemId string) (*items.SkillsItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "items", skillItemId}, + } + var result items.SkillsItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new item on a skill. +func (e *SkillsItemsEndpoint) Create(skillId string) (*items.SkillsItemsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "items"}, + } + var result items.SkillsItemsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill item. +func (e *SkillsItemsEndpoint) Delete(skillId string, skillItemId string) (*items.SkillsItemsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "items", skillItemId}, + } + var result items.SkillsItemsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_marketplaces.go b/v1/endpoints/skills_marketplaces.go new file mode 100644 index 0000000..d4a7302 --- /dev/null +++ b/v1/endpoints/skills_marketplaces.go @@ -0,0 +1,128 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/marketplaces" +) + +// SkillsMarketplacesEndpoint provides access to manage skill marketplaces for an instance. +type SkillsMarketplacesEndpoint struct { + client *endpoint.Client +} + +// NewSkillsMarketplacesEndpoint creates a new SkillsMarketplacesEndpoint. +func NewSkillsMarketplacesEndpoint(client *endpoint.Client) *SkillsMarketplacesEndpoint { + return &SkillsMarketplacesEndpoint{client: client} +} + +// SkillsMarketplacesEndpointListParams contains optional query parameters for List. +type SkillsMarketplacesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + Search *string `json:"search,omitempty"` + // CreatedAt - Filter skill marketplace creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill marketplace last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsMarketplacesEndpointCreateBody contains the request body for Create. +type SkillsMarketplacesEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// SkillsMarketplacesEndpointUpdateBody contains the request body for Update. +type SkillsMarketplacesEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// List returns a paginated list of skill marketplaces. +func (e *SkillsMarketplacesEndpoint) List(params *SkillsMarketplacesEndpointListParams) (*marketplaces.SkillsMarketplacesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-marketplaces"}, + Query: query, + } + var result marketplaces.SkillsMarketplacesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Get(skillMarketplaceId string) (*marketplaces.SkillsMarketplacesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId}, + } + var result marketplaces.SkillsMarketplacesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Create(body *SkillsMarketplacesEndpointCreateBody) (*marketplaces.SkillsMarketplacesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces"}, + Body: body, + } + var result marketplaces.SkillsMarketplacesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Update(skillMarketplaceId string, body *SkillsMarketplacesEndpointUpdateBody) (*marketplaces.SkillsMarketplacesUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId}, + Body: body, + } + var result marketplaces.SkillsMarketplacesUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Archive archives a skill marketplace. +func (e *SkillsMarketplacesEndpoint) Archive(skillMarketplaceId string) (*marketplaces.SkillsMarketplacesArchiveOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId}, + } + var result marketplaces.SkillsMarketplacesArchiveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Sync forces a skill marketplace sync. +func (e *SkillsMarketplacesEndpoint) Sync(skillMarketplaceId string) (*marketplaces.SkillsMarketplacesSyncOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId, "sync"}, + } + var result marketplaces.SkillsMarketplacesSyncOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_marketplaces_plugins.go b/v1/endpoints/skills_marketplaces_plugins.go new file mode 100644 index 0000000..cd21e8f --- /dev/null +++ b/v1/endpoints/skills_marketplaces_plugins.go @@ -0,0 +1,94 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/marketplaces/plugins" +) + +// SkillsMarketplacesPluginsEndpoint provides access to manage plugin links for skill marketplaces. +type SkillsMarketplacesPluginsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsMarketplacesPluginsEndpoint creates a new SkillsMarketplacesPluginsEndpoint. +func NewSkillsMarketplacesPluginsEndpoint(client *endpoint.Client) *SkillsMarketplacesPluginsEndpoint { + return &SkillsMarketplacesPluginsEndpoint{client: client} +} + +// SkillsMarketplacesPluginsEndpointListParams contains optional query parameters for List. +type SkillsMarketplacesPluginsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillPluginId *any `json:"skill_plugin_id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill marketplace plugin creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill marketplace plugin last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsMarketplacesPluginsEndpointAddBody contains the request body for Add. +type SkillsMarketplacesPluginsEndpointAddBody struct { + SkillPluginId string `json:"skill_plugin_id"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Identifier *string `json:"identifier,omitempty"` +} + +// List returns plugins linked to a skill marketplace. +func (e *SkillsMarketplacesPluginsEndpoint) List(skillMarketplaceId string, params *SkillsMarketplacesPluginsEndpointListParams) (*plugins.SkillsMarketplacesPluginsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId, "plugins"}, + Query: query, + } + var result plugins.SkillsMarketplacesPluginsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Add adds a skill plugin to a skill marketplace. +func (e *SkillsMarketplacesPluginsEndpoint) Add(skillMarketplaceId string, body *SkillsMarketplacesPluginsEndpointAddBody) (*plugins.SkillsMarketplacesPluginsAddOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId, "plugins"}, + Body: body, + } + var result plugins.SkillsMarketplacesPluginsAddOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill marketplace plugin link. +func (e *SkillsMarketplacesPluginsEndpoint) Get(skillMarketplaceId string, skillMarketplacePluginId string) (*plugins.SkillsMarketplacesPluginsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId, "plugins", skillMarketplacePluginId}, + } + var result plugins.SkillsMarketplacesPluginsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Remove removes a skill plugin from a skill marketplace. +func (e *SkillsMarketplacesPluginsEndpoint) Remove(skillMarketplaceId string, skillMarketplacePluginId string) (*plugins.SkillsMarketplacesPluginsRemoveOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-marketplaces", skillMarketplaceId, "plugins", skillMarketplacePluginId}, + } + var result plugins.SkillsMarketplacesPluginsRemoveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_participants.go b/v1/endpoints/skills_participants.go new file mode 100644 index 0000000..def8a7b --- /dev/null +++ b/v1/endpoints/skills_participants.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/participants" +) + +// SkillsParticipantsEndpoint provides access to inspect participants associated with an instance skill. +type SkillsParticipantsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsParticipantsEndpoint creates a new SkillsParticipantsEndpoint. +func NewSkillsParticipantsEndpoint(client *endpoint.Client) *SkillsParticipantsEndpoint { + return &SkillsParticipantsEndpoint{client: client} +} + +// SkillsParticipantsEndpointListParams contains optional query parameters for List. +type SkillsParticipantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of participants for a specific skill. +func (e *SkillsParticipantsEndpoint) List(skillId string, params *SkillsParticipantsEndpointListParams) (*participants.SkillsParticipantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skills", skillId, "participants"}, + Query: query, + } + var result participants.SkillsParticipantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific participant within a skill. +func (e *SkillsParticipantsEndpoint) Get(skillId string, skillParticipantId string) (*participants.SkillsParticipantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "participants", skillParticipantId}, + } + var result participants.SkillsParticipantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_plugins.go b/v1/endpoints/skills_plugins.go new file mode 100644 index 0000000..f7c776b --- /dev/null +++ b/v1/endpoints/skills_plugins.go @@ -0,0 +1,134 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/plugins" +) + +// SkillsPluginsEndpoint provides access to manage skill plugins for an instance. +type SkillsPluginsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsPluginsEndpoint creates a new SkillsPluginsEndpoint. +func NewSkillsPluginsEndpoint(client *endpoint.Client) *SkillsPluginsEndpoint { + return &SkillsPluginsEndpoint{client: client} +} + +// SkillsPluginsEndpointListParams contains optional query parameters for List. +type SkillsPluginsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + Status *any `json:"status,omitempty"` + Category *string `json:"category,omitempty"` + Search *string `json:"search,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill plugin creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill plugin last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsPluginsEndpointCreateBody contains the request body for Create. +type SkillsPluginsEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// SkillsPluginsEndpointUpdateBody contains the request body for Update. +type SkillsPluginsEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// List returns a paginated list of skill plugins. +func (e *SkillsPluginsEndpoint) List(params *SkillsPluginsEndpointListParams) (*plugins.SkillsPluginsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-plugins"}, + Query: query, + } + var result plugins.SkillsPluginsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill plugin. +func (e *SkillsPluginsEndpoint) Get(skillPluginId string) (*plugins.SkillsPluginsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId}, + } + var result plugins.SkillsPluginsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill plugin. +func (e *SkillsPluginsEndpoint) Create(body *SkillsPluginsEndpointCreateBody) (*plugins.SkillsPluginsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins"}, + Body: body, + } + var result plugins.SkillsPluginsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill plugin. +func (e *SkillsPluginsEndpoint) Update(skillPluginId string, body *SkillsPluginsEndpointUpdateBody) (*plugins.SkillsPluginsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId}, + Body: body, + } + var result plugins.SkillsPluginsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Archive archives a skill plugin. +func (e *SkillsPluginsEndpoint) Archive(skillPluginId string) (*plugins.SkillsPluginsArchiveOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId}, + } + var result plugins.SkillsPluginsArchiveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Sync forces a skill plugin sync. +func (e *SkillsPluginsEndpoint) Sync(skillPluginId string) (*plugins.SkillsPluginsSyncOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId, "sync"}, + } + var result plugins.SkillsPluginsSyncOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_plugins_skills.go b/v1/endpoints/skills_plugins_skills.go new file mode 100644 index 0000000..661f273 --- /dev/null +++ b/v1/endpoints/skills_plugins_skills.go @@ -0,0 +1,122 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/plugins/skills" +) + +// SkillsPluginsSkillsEndpoint provides access to manage skill links for skill plugins. +type SkillsPluginsSkillsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsPluginsSkillsEndpoint creates a new SkillsPluginsSkillsEndpoint. +func NewSkillsPluginsSkillsEndpoint(client *endpoint.Client) *SkillsPluginsSkillsEndpoint { + return &SkillsPluginsSkillsEndpoint{client: client} +} + +// SkillsPluginsSkillsEndpointListParams contains optional query parameters for List. +type SkillsPluginsSkillsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill plugin skill creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill plugin skill last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsPluginsSkillsEndpointAddBody contains the request body for Add. +type SkillsPluginsSkillsEndpointAddBody struct { + SkillId string `json:"skill_id"` + Identifier *string `json:"identifier,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// SkillsPluginsSkillsEndpointUpdateBody contains the request body for Update. +type SkillsPluginsSkillsEndpointUpdateBody struct { + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// List returns skills linked to a skill plugin. +func (e *SkillsPluginsSkillsEndpoint) List(skillPluginId string, params *SkillsPluginsSkillsEndpointListParams) (*skills.SkillsPluginsSkillsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId, "skills"}, + Query: query, + } + var result skills.SkillsPluginsSkillsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Add adds a skill to a skill plugin. +func (e *SkillsPluginsSkillsEndpoint) Add(skillPluginId string, body *SkillsPluginsSkillsEndpointAddBody) (*skills.SkillsPluginsSkillsAddOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId, "skills"}, + Body: body, + } + var result skills.SkillsPluginsSkillsAddOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a skill plugin skill link. +func (e *SkillsPluginsSkillsEndpoint) Get(skillPluginId string, skillPluginSkillId string) (*skills.SkillsPluginsSkillsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId, "skills", skillPluginSkillId}, + } + var result skills.SkillsPluginsSkillsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill plugin skill link. +func (e *SkillsPluginsSkillsEndpoint) Update(skillPluginId string, skillPluginSkillId string, body *SkillsPluginsSkillsEndpointUpdateBody) (*skills.SkillsPluginsSkillsUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId, "skills", skillPluginSkillId}, + Body: body, + } + var result skills.SkillsPluginsSkillsUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Remove removes a skill from a skill plugin. +func (e *SkillsPluginsSkillsEndpoint) Remove(skillPluginId string, skillPluginSkillId string) (*skills.SkillsPluginsSkillsRemoveOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-plugins", skillPluginId, "skills", skillPluginSkillId}, + } + var result skills.SkillsPluginsSkillsRemoveOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_templates.go b/v1/endpoints/skills_templates.go new file mode 100644 index 0000000..85605d7 --- /dev/null +++ b/v1/endpoints/skills_templates.go @@ -0,0 +1,117 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/templates" +) + +// SkillsTemplatesEndpoint provides access to skill templates define reusable starting points for skills. +type SkillsTemplatesEndpoint struct { + client *endpoint.Client +} + +// NewSkillsTemplatesEndpoint creates a new SkillsTemplatesEndpoint. +func NewSkillsTemplatesEndpoint(client *endpoint.Client) *SkillsTemplatesEndpoint { + return &SkillsTemplatesEndpoint{client: client} +} + +// SkillsTemplatesEndpointListParams contains optional query parameters for List. +type SkillsTemplatesEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Owner *any `json:"owner,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + // CreatedAt - Filter skill template creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter skill template last update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// SkillsTemplatesEndpointCreateBody contains the request body for Create. +type SkillsTemplatesEndpointCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + FromSkillId *string `json:"from_skill_Id,omitempty"` +} + +// SkillsTemplatesEndpointUpdateBody contains the request body for Update. +type SkillsTemplatesEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// List returns a paginated list of skill templates. +func (e *SkillsTemplatesEndpoint) List(params *SkillsTemplatesEndpointListParams) (*templates.SkillsTemplatesListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-template"}, + Query: query, + } + var result templates.SkillsTemplatesListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill template. +func (e *SkillsTemplatesEndpoint) Get(skillTemplateId string) (*templates.SkillsTemplatesGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId}, + } + var result templates.SkillsTemplatesGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a skill template. +func (e *SkillsTemplatesEndpoint) Create(body *SkillsTemplatesEndpointCreateBody) (*templates.SkillsTemplatesCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template"}, + Body: body, + } + var result templates.SkillsTemplatesCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a skill template. +func (e *SkillsTemplatesEndpoint) Update(skillTemplateId string, body *SkillsTemplatesEndpointUpdateBody) (*templates.SkillsTemplatesUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId}, + Body: body, + } + var result templates.SkillsTemplatesUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete archives a skill template. +func (e *SkillsTemplatesEndpoint) Delete(skillTemplateId string) (*templates.SkillsTemplatesDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId}, + } + var result templates.SkillsTemplatesDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_templates_items.go b/v1/endpoints/skills_templates_items.go new file mode 100644 index 0000000..46e222f --- /dev/null +++ b/v1/endpoints/skills_templates_items.go @@ -0,0 +1,78 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/templates/items" +) + +// SkillsTemplatesItemsEndpoint provides access to skill template items link template definitions to provider and integration items. +type SkillsTemplatesItemsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsTemplatesItemsEndpoint creates a new SkillsTemplatesItemsEndpoint. +func NewSkillsTemplatesItemsEndpoint(client *endpoint.Client) *SkillsTemplatesItemsEndpoint { + return &SkillsTemplatesItemsEndpoint{client: client} +} + +// SkillsTemplatesItemsEndpointListParams contains optional query parameters for List. +type SkillsTemplatesItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of items for a skill template. +func (e *SkillsTemplatesItemsEndpoint) List(skillTemplateId string, params *SkillsTemplatesItemsEndpointListParams) (*items.SkillsTemplatesItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId, "items"}, + Query: query, + } + var result items.SkillsTemplatesItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill template item. +func (e *SkillsTemplatesItemsEndpoint) Get(skillTemplateId string, skillTemplateItemId string) (*items.SkillsTemplatesItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId, "items", skillTemplateItemId}, + } + var result items.SkillsTemplatesItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create adds a provider or integration item to a skill template. +func (e *SkillsTemplatesItemsEndpoint) Create(skillTemplateId string) (*items.SkillsTemplatesItemsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId, "items"}, + } + var result items.SkillsTemplatesItemsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a skill template item. +func (e *SkillsTemplatesItemsEndpoint) Delete(skillTemplateId string, skillTemplateItemId string) (*items.SkillsTemplatesItemsDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"skill-template", skillTemplateId, "items", skillTemplateItemId}, + } + var result items.SkillsTemplatesItemsDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_versions.go b/v1/endpoints/skills_versions.go new file mode 100644 index 0000000..200ecec --- /dev/null +++ b/v1/endpoints/skills_versions.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/versions" +) + +// SkillsVersionsEndpoint provides access to inspect version history and snapshots for a skill. +type SkillsVersionsEndpoint struct { + client *endpoint.Client +} + +// NewSkillsVersionsEndpoint creates a new SkillsVersionsEndpoint. +func NewSkillsVersionsEndpoint(client *endpoint.Client) *SkillsVersionsEndpoint { + return &SkillsVersionsEndpoint{client: client} +} + +// SkillsVersionsEndpointListParams contains optional query parameters for List. +type SkillsVersionsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of versions for a specific skill. +func (e *SkillsVersionsEndpoint) List(skillId string, params *SkillsVersionsEndpointListParams) (*versions.SkillsVersionsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"skills", skillId, "versions"}, + Query: query, + } + var result versions.SkillsVersionsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific skill version by its ID. +func (e *SkillsVersionsEndpoint) Get(skillId string, skillVersionId string) (*versions.SkillsVersionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "versions", skillVersionId}, + } + var result versions.SkillsVersionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/skills_versions_snapshot.go b/v1/endpoints/skills_versions_snapshot.go new file mode 100644 index 0000000..f5be912 --- /dev/null +++ b/v1/endpoints/skills_versions_snapshot.go @@ -0,0 +1,28 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/skills/versions/snapshot" +) + +// SkillsVersionsSnapshotEndpoint provides access to inspect version history and snapshots for a skill. +type SkillsVersionsSnapshotEndpoint struct { + client *endpoint.Client +} + +// NewSkillsVersionsSnapshotEndpoint creates a new SkillsVersionsSnapshotEndpoint. +func NewSkillsVersionsSnapshotEndpoint(client *endpoint.Client) *SkillsVersionsSnapshotEndpoint { + return &SkillsVersionsSnapshotEndpoint{client: client} +} + +// Get retrieves the store-backed snapshot for a specific skill version. +func (e *SkillsVersionsSnapshotEndpoint) Get(skillId string, skillVersionId string) (*snapshot.SkillsVersionsSnapshotGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"skills", skillId, "versions", skillVersionId, "snapshot"}, + } + var result snapshot.SkillsVersionsSnapshotGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/stores.go b/v1/endpoints/stores.go new file mode 100644 index 0000000..f4c2dd6 --- /dev/null +++ b/v1/endpoints/stores.go @@ -0,0 +1,112 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores" +) + +// StoresEndpoint provides access to create and manage instance stores backed by Cargo. +type StoresEndpoint struct { + client *endpoint.Client +} + +// NewStoresEndpoint creates a new StoresEndpoint. +func NewStoresEndpoint(client *endpoint.Client) *StoresEndpoint { + return &StoresEndpoint{client: client} +} + +// StoresEndpointListParams contains optional query parameters for List. +type StoresEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by store ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// StoresEndpointCreateBody contains the request body for Create. +type StoresEndpointCreateBody struct { + Name string `json:"name"` + Access *string `json:"access,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + ParentId *string `json:"parent_id,omitempty"` +} + +// StoresEndpointUpdateBody contains the request body for Update. +type StoresEndpointUpdateBody struct { + Name *string `json:"name,omitempty"` + Access *string `json:"access,omitempty"` +} + +// List returns a paginated list of stores owned by the instance. +func (e *StoresEndpoint) List(params *StoresEndpointListParams) (*stores.StoresListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"stores"}, + Query: query, + } + var result stores.StoresListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Create creates a new store for the instance. +func (e *StoresEndpoint) Create(body *StoresEndpointCreateBody) (*stores.StoresCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores"}, + Body: body, + } + var result stores.StoresCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a store by its ID. +func (e *StoresEndpoint) Get(storeId string) (*stores.StoresGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId}, + } + var result stores.StoresGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Update updates a specific store. +func (e *StoresEndpoint) Update(storeId string, body *StoresEndpointUpdateBody) (*stores.StoresUpdateOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId}, + Body: body, + } + var result stores.StoresUpdateOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Delete deletes a specific store. +func (e *StoresEndpoint) Delete(storeId string) (*stores.StoresDeleteOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId}, + } + var result stores.StoresDeleteOutput + if err := e.client.Delete(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/stores_items.go b/v1/endpoints/stores_items.go new file mode 100644 index 0000000..1f5aded --- /dev/null +++ b/v1/endpoints/stores_items.go @@ -0,0 +1,84 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores/items" +) + +// StoresItemsEndpoint provides access to create and manage instance stores backed by Cargo. +type StoresItemsEndpoint struct { + client *endpoint.Client +} + +// NewStoresItemsEndpoint creates a new StoresItemsEndpoint. +func NewStoresItemsEndpoint(client *endpoint.Client) *StoresItemsEndpoint { + return &StoresItemsEndpoint{client: client} +} + +// StoresItemsEndpointModifyBody contains the request body for Modify. +type StoresItemsEndpointModifyBody struct { + Operations []map[string]any `json:"operations"` +} + +// StoresItemsEndpointListParams contains optional query parameters for List. +type StoresItemsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by store item ID + Id *any `json:"id,omitempty"` + // FileId - Filter by file ID + FileId *any `json:"file_id,omitempty"` + // DocumentId - Filter by document ID + DocumentId *any `json:"document_id,omitempty"` + // Type - Filter by store item type. Repeat `type` to include multiple values. Defaults to `file` and `document`. + Type *any `json:"type,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *map[string]any `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *map[string]any `json:"updated_at,omitempty"` +} + +// Modify applies bulk item operations to a specific store. +func (e *StoresItemsEndpoint) Modify(storeId string, body *StoresItemsEndpointModifyBody) (*items.StoresItemsModifyOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId, "items"}, + Body: body, + } + var result items.StoresItemsModifyOutput + if err := e.client.Patch(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// List returns a paginated list of items for a specific store. +func (e *StoresItemsEndpoint) List(storeId string, params *StoresItemsEndpointListParams) (*items.StoresItemsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"stores", storeId, "items"}, + Query: query, + } + var result items.StoresItemsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific item within a store. +func (e *StoresItemsEndpoint) Get(storeId string, itemId string) (*items.StoresItemsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId, "items", itemId}, + } + var result items.StoresItemsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/stores_participants.go b/v1/endpoints/stores_participants.go new file mode 100644 index 0000000..dc18aaf --- /dev/null +++ b/v1/endpoints/stores_participants.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores/participants" +) + +// StoresParticipantsEndpoint provides access to inspect participants assigned to an instance store. +type StoresParticipantsEndpoint struct { + client *endpoint.Client +} + +// NewStoresParticipantsEndpoint creates a new StoresParticipantsEndpoint. +func NewStoresParticipantsEndpoint(client *endpoint.Client) *StoresParticipantsEndpoint { + return &StoresParticipantsEndpoint{client: client} +} + +// StoresParticipantsEndpointListParams contains optional query parameters for List. +type StoresParticipantsEndpointListParams struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// List returns a paginated list of participants for a specific store. +func (e *StoresParticipantsEndpoint) List(storeId string, params *StoresParticipantsEndpointListParams) (*participants.StoresParticipantsListOutput, error) { + var query map[string]any + if params != nil { + query = endpoint.StructToQuery(params) + } + req := &endpoint.Request{ + Path: []string{"stores", storeId, "participants"}, + Query: query, + } + var result participants.StoresParticipantsListOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Get retrieves a specific participant within a store. +func (e *StoresParticipantsEndpoint) Get(storeId string, storeParticipantId string) (*participants.StoresParticipantsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId, "participants", storeParticipantId}, + } + var result participants.StoresParticipantsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/stores_permissions.go b/v1/endpoints/stores_permissions.go new file mode 100644 index 0000000..1236a38 --- /dev/null +++ b/v1/endpoints/stores_permissions.go @@ -0,0 +1,28 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/stores/permissions" +) + +// StoresPermissionsEndpoint provides access to create and manage instance stores backed by Cargo. +type StoresPermissionsEndpoint struct { + client *endpoint.Client +} + +// NewStoresPermissionsEndpoint creates a new StoresPermissionsEndpoint. +func NewStoresPermissionsEndpoint(client *endpoint.Client) *StoresPermissionsEndpoint { + return &StoresPermissionsEndpoint{client: client} +} + +// Get returns the effective Cargo permissions for the current actor on a specific store. +func (e *StoresPermissionsEndpoint) Get(storeId string) (*permissions.StoresPermissionsGetOutput, error) { + req := &endpoint.Request{ + Path: []string{"stores", storeId, "permissions"}, + } + var result permissions.StoresPermissionsGetOutput + if err := e.client.Get(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/test_helpers_consumer_oauth_authorizations.go b/v1/endpoints/test_helpers_consumer_oauth_authorizations.go new file mode 100644 index 0000000..be43cc1 --- /dev/null +++ b/v1/endpoints/test_helpers_consumer_oauth_authorizations.go @@ -0,0 +1,37 @@ +package endpoints + +import ( + "github.com/metorial/metorial-go/v1/internal/endpoint" + "github.com/metorial/metorial-go/v1/resources/testhelpers/consumeroauth/authorizations" +) + +// TestHelpersConsumerOauthAuthorizationsEndpoint provides access to helpers for testing consumer OAuth flows. +type TestHelpersConsumerOauthAuthorizationsEndpoint struct { + client *endpoint.Client +} + +// NewTestHelpersConsumerOauthAuthorizationsEndpoint creates a new TestHelpersConsumerOauthAuthorizationsEndpoint. +func NewTestHelpersConsumerOauthAuthorizationsEndpoint(client *endpoint.Client) *TestHelpersConsumerOauthAuthorizationsEndpoint { + return &TestHelpersConsumerOauthAuthorizationsEndpoint{client: client} +} + +// TestHelpersConsumerOauthAuthorizationsEndpointCreateBody contains the request body for Create. +type TestHelpersConsumerOauthAuthorizationsEndpointCreateBody struct { + InstanceId string `json:"instance_id"` + Url string `json:"url"` + ConsumerProfileId string `json:"consumer_profile_id"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// Create creates a single-use test authorization token for a consumer OAuth authorize URL. +func (e *TestHelpersConsumerOauthAuthorizationsEndpoint) Create(body *TestHelpersConsumerOauthAuthorizationsEndpointCreateBody) (*authorizations.TestHelpersConsumerOauthAuthorizationsCreateOutput, error) { + req := &endpoint.Request{ + Path: []string{"test-helpers", "consumer-oauth-authorizations"}, + Body: body, + } + var result authorizations.TestHelpersConsumerOauthAuthorizationsCreateOutput + if err := e.client.Post(req, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/v1/endpoints/tool_calls.go b/v1/endpoints/tool_calls.go index 50ffe68..c64c517 100644 --- a/v1/endpoints/tool_calls.go +++ b/v1/endpoints/tool_calls.go @@ -34,6 +34,16 @@ type ToolCallsEndpointListParams struct { ProviderConfigId *any `json:"provider_config_id,omitempty"` // ProviderAuthConfigId - Filter by provider auth config ID(s) ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + // AgentId - Filter by agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // ToolId - Filter by tool ID(s) ToolId *any `json:"tool_id,omitempty"` // CreatedAt - Filter tool call creation time by date range diff --git a/v1/resources/agents/get.go b/v1/resources/agents/get.go new file mode 100644 index 0000000..3c4de0b --- /dev/null +++ b/v1/resources/agents/get.go @@ -0,0 +1,36 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// AgentsGetOutput represents the agents get output type. +type AgentsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Metadata *map[string]any `json:"metadata,omitempty"` + ActorId string `json:"actor_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapAgentsGetOutputFromJSON deserializes JSON data into a AgentsGetOutput. +func MapAgentsGetOutputFromJSON(data []byte) (*AgentsGetOutput, error) { + var v AgentsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAgentsGetOutputToJSON serializes a AgentsGetOutput to JSON. +func MapAgentsGetOutputToJSON(v *AgentsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/agents/instances/get.go b/v1/resources/agents/instances/get.go new file mode 100644 index 0000000..b7ba2e3 --- /dev/null +++ b/v1/resources/agents/instances/get.go @@ -0,0 +1,46 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// AgentsInstancesGetOutputAgentClient represents the agents instances get output agent client type. +type AgentsInstancesGetOutputAgentClient struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Name string `json:"name"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + LastConnectedAt *time.Time `json:"last_connected_at,omitempty"` +} + +// AgentsInstancesGetOutput represents the agents instances get output type. +type AgentsInstancesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Name string `json:"name"` + Version *string `json:"version,omitempty"` + Description *string `json:"description,omitempty"` + AgentId string `json:"agent_id"` + AgentClient *AgentsInstancesGetOutputAgentClient `json:"agent_client,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + LastConnectedAt *time.Time `json:"last_connected_at,omitempty"` +} + +// MapAgentsInstancesGetOutputFromJSON deserializes JSON data into a AgentsInstancesGetOutput. +func MapAgentsInstancesGetOutputFromJSON(data []byte) (*AgentsInstancesGetOutput, error) { + var v AgentsInstancesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAgentsInstancesGetOutputToJSON serializes a AgentsInstancesGetOutput to JSON. +func MapAgentsInstancesGetOutputToJSON(v *AgentsInstancesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/agents/instances/list.go b/v1/resources/agents/instances/list.go new file mode 100644 index 0000000..89d99b8 --- /dev/null +++ b/v1/resources/agents/instances/list.go @@ -0,0 +1,104 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// AgentsInstancesListOutputItemsAgentClient represents the agents instances list output items agent client type. +type AgentsInstancesListOutputItemsAgentClient struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Name string `json:"name"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + LastConnectedAt *time.Time `json:"last_connected_at,omitempty"` +} + +// AgentsInstancesListOutputItems represents the agents instances list output items type. +type AgentsInstancesListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Name string `json:"name"` + Version *string `json:"version,omitempty"` + Description *string `json:"description,omitempty"` + AgentId string `json:"agent_id"` + AgentClient *AgentsInstancesListOutputItemsAgentClient `json:"agent_client,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + LastConnectedAt *time.Time `json:"last_connected_at,omitempty"` +} + +// AgentsInstancesListOutputPagination represents the agents instances list output pagination type. +type AgentsInstancesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// AgentsInstancesListOutput represents the agents instances list output type. +type AgentsInstancesListOutput struct { + Items []AgentsInstancesListOutputItems `json:"items"` + Pagination AgentsInstancesListOutputPagination `json:"pagination"` +} + +// MapAgentsInstancesListOutputFromJSON deserializes JSON data into a AgentsInstancesListOutput. +func MapAgentsInstancesListOutputFromJSON(data []byte) (*AgentsInstancesListOutput, error) { + var v AgentsInstancesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAgentsInstancesListOutputToJSON serializes a AgentsInstancesListOutput to JSON. +func MapAgentsInstancesListOutputToJSON(v *AgentsInstancesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// AgentsInstancesListQueryCreatedAt - Filter agent instance creation time by date range +type AgentsInstancesListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for agent instance creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for agent instance creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// AgentsInstancesListQueryUpdatedAt - Filter agent instance last update time by date range +type AgentsInstancesListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for agent instance last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for agent instance last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// AgentsInstancesListQuery represents the agents instances list query type. +type AgentsInstancesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + AgentClientId *any `json:"agent_client_id,omitempty"` + // CreatedAt - Filter agent instance creation time by date range + CreatedAt *AgentsInstancesListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter agent instance last update time by date range + UpdatedAt *AgentsInstancesListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapAgentsInstancesListQueryFromJSON deserializes JSON data into a AgentsInstancesListQuery. +func MapAgentsInstancesListQueryFromJSON(data []byte) (*AgentsInstancesListQuery, error) { + var v AgentsInstancesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAgentsInstancesListQueryToJSON serializes a AgentsInstancesListQuery to JSON. +func MapAgentsInstancesListQueryToJSON(v *AgentsInstancesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/agents/list.go b/v1/resources/agents/list.go new file mode 100644 index 0000000..644f15f --- /dev/null +++ b/v1/resources/agents/list.go @@ -0,0 +1,95 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// AgentsListOutputItems represents the agents list output items type. +type AgentsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Metadata *map[string]any `json:"metadata,omitempty"` + ActorId string `json:"actor_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// AgentsListOutputPagination represents the agents list output pagination type. +type AgentsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// AgentsListOutput represents the agents list output type. +type AgentsListOutput struct { + Items []AgentsListOutputItems `json:"items"` + Pagination AgentsListOutputPagination `json:"pagination"` +} + +// MapAgentsListOutputFromJSON deserializes JSON data into a AgentsListOutput. +func MapAgentsListOutputFromJSON(data []byte) (*AgentsListOutput, error) { + var v AgentsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAgentsListOutputToJSON serializes a AgentsListOutput to JSON. +func MapAgentsListOutputToJSON(v *AgentsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// AgentsListQueryCreatedAt - Filter agent creation time by date range +type AgentsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for agent creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for agent creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// AgentsListQueryUpdatedAt - Filter agent last update time by date range +type AgentsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for agent last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for agent last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// AgentsListQuery represents the agents list query type. +type AgentsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + // CreatedAt - Filter agent creation time by date range + CreatedAt *AgentsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter agent last update time by date range + UpdatedAt *AgentsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapAgentsListQueryFromJSON deserializes JSON data into a AgentsListQuery. +func MapAgentsListQueryFromJSON(data []byte) (*AgentsListQuery, error) { + var v AgentsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAgentsListQueryToJSON serializes a AgentsListQuery to JSON. +func MapAgentsListQueryToJSON(v *AgentsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/assistants/get.go b/v1/resources/assistants/get.go new file mode 100644 index 0000000..b4b90c2 --- /dev/null +++ b/v1/resources/assistants/get.go @@ -0,0 +1,72 @@ +package assistants + +import ( + "encoding/json" + "time" +) + +// AssistantsGetOutputDefaultModelProvider represents the assistants get output default model provider type. +type AssistantsGetOutputDefaultModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// AssistantsGetOutputDefaultModel represents the assistants get output default model type. +type AssistantsGetOutputDefaultModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider AssistantsGetOutputDefaultModelProvider `json:"provider"` +} + +// AssistantsGetOutputAvailableModelsProvider represents the assistants get output available models provider type. +type AssistantsGetOutputAvailableModelsProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// AssistantsGetOutputAvailableModels represents the assistants get output available models type. +type AssistantsGetOutputAvailableModels struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider AssistantsGetOutputAvailableModelsProvider `json:"provider"` +} + +// AssistantsGetOutput represents the assistants get output type. +type AssistantsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + OwnerType string `json:"owner_type"` + OrganizationId *string `json:"organization_id,omitempty"` + DefaultModel *AssistantsGetOutputDefaultModel `json:"default_model,omitempty"` + AvailableModels []AssistantsGetOutputAvailableModels `json:"available_models"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapAssistantsGetOutputFromJSON deserializes JSON data into a AssistantsGetOutput. +func MapAssistantsGetOutputFromJSON(data []byte) (*AssistantsGetOutput, error) { + var v AssistantsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAssistantsGetOutputToJSON serializes a AssistantsGetOutput to JSON. +func MapAssistantsGetOutputToJSON(v *AssistantsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/assistants/list.go b/v1/resources/assistants/list.go new file mode 100644 index 0000000..b2f665b --- /dev/null +++ b/v1/resources/assistants/list.go @@ -0,0 +1,107 @@ +package assistants + +import ( + "encoding/json" + "time" +) + +// AssistantsListOutputItemsDefaultModelProvider represents the assistants list output items default model provider type. +type AssistantsListOutputItemsDefaultModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// AssistantsListOutputItemsDefaultModel represents the assistants list output items default model type. +type AssistantsListOutputItemsDefaultModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider AssistantsListOutputItemsDefaultModelProvider `json:"provider"` +} + +// AssistantsListOutputItemsAvailableModelsProvider represents the assistants list output items available models provider type. +type AssistantsListOutputItemsAvailableModelsProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// AssistantsListOutputItemsAvailableModels represents the assistants list output items available models type. +type AssistantsListOutputItemsAvailableModels struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider AssistantsListOutputItemsAvailableModelsProvider `json:"provider"` +} + +// AssistantsListOutputItems represents the assistants list output items type. +type AssistantsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + OwnerType string `json:"owner_type"` + OrganizationId *string `json:"organization_id,omitempty"` + DefaultModel *AssistantsListOutputItemsDefaultModel `json:"default_model,omitempty"` + AvailableModels []AssistantsListOutputItemsAvailableModels `json:"available_models"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// AssistantsListOutputPagination represents the assistants list output pagination type. +type AssistantsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// AssistantsListOutput represents the assistants list output type. +type AssistantsListOutput struct { + Items []AssistantsListOutputItems `json:"items"` + Pagination AssistantsListOutputPagination `json:"pagination"` +} + +// MapAssistantsListOutputFromJSON deserializes JSON data into a AssistantsListOutput. +func MapAssistantsListOutputFromJSON(data []byte) (*AssistantsListOutput, error) { + var v AssistantsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAssistantsListOutputToJSON serializes a AssistantsListOutput to JSON. +func MapAssistantsListOutputToJSON(v *AssistantsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// AssistantsListQuery represents the assistants list query type. +type AssistantsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapAssistantsListQueryFromJSON deserializes JSON data into a AssistantsListQuery. +func MapAssistantsListQueryFromJSON(data []byte) (*AssistantsListQuery, error) { + var v AssistantsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapAssistantsListQueryToJSON serializes a AssistantsListQuery to JSON. +func MapAssistantsListQueryToJSON(v *AssistantsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/callbacks/instances/get.go b/v1/resources/callbacks/instances/get.go new file mode 100644 index 0000000..54028f0 --- /dev/null +++ b/v1/resources/callbacks/instances/get.go @@ -0,0 +1,187 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// CallbacksInstancesGetOutputDeployment represents the callbacks instances get output deployment type. +type CallbacksInstancesGetOutputDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// CallbacksInstancesGetOutputConfig represents the callbacks instances get output config type. +type CallbacksInstancesGetOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// CallbacksInstancesGetOutputAuthConfig represents the callbacks instances get output auth config type. +type CallbacksInstancesGetOutputAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// CallbacksInstancesGetOutputTriggersProviderTriggerInputSchema represents the callbacks instances get output triggers provider trigger input schema type. +type CallbacksInstancesGetOutputTriggersProviderTriggerInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the trigger payload input shape + Schema map[string]any `json:"schema"` +} + +// CallbacksInstancesGetOutputTriggersProviderTriggerOutputSchema represents the callbacks instances get output triggers provider trigger output schema type. +type CallbacksInstancesGetOutputTriggersProviderTriggerOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the trigger delivery output shape + Schema map[string]any `json:"schema"` +} + +// CallbacksInstancesGetOutputTriggersProviderTriggerInvocationAutoRegistration represents the callbacks instances get output triggers provider trigger invocation auto registration type. +type CallbacksInstancesGetOutputTriggersProviderTriggerInvocationAutoRegistration struct { + // Status - Whether automatic webhook registration is supported + Status string `json:"status"` +} + +// CallbacksInstancesGetOutputTriggersProviderTriggerInvocationAutoUnregistration represents the callbacks instances get output triggers provider trigger invocation auto unregistration type. +type CallbacksInstancesGetOutputTriggersProviderTriggerInvocationAutoUnregistration struct { + // Status - Whether automatic webhook removal is supported + Status string `json:"status"` +} + +// CallbacksInstancesGetOutputTriggersProviderTriggerInvocation represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type CallbacksInstancesGetOutputTriggersProviderTriggerInvocation struct { + Type *string `json:"type,omitempty"` + // IntervalSeconds - Polling interval in seconds for polling-based triggers + IntervalSeconds *float64 `json:"interval_seconds,omitempty"` + AutoRegistration *CallbacksInstancesGetOutputTriggersProviderTriggerInvocationAutoRegistration `json:"auto_registration,omitempty"` + AutoUnregistration *CallbacksInstancesGetOutputTriggersProviderTriggerInvocationAutoUnregistration `json:"auto_unregistration,omitempty"` +} + +// CallbacksInstancesGetOutputTriggersProviderTrigger represents the callbacks instances get output triggers provider trigger type. +type CallbacksInstancesGetOutputTriggersProviderTrigger struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider trigger identifier + Id string `json:"id"` + // Key - Trigger key used when subscribing callbacks + Key string `json:"key"` + // Name - Display name of the trigger + Name string `json:"name"` + // Description - Trigger description + Description *string `json:"description,omitempty"` + InputSchema *CallbacksInstancesGetOutputTriggersProviderTriggerInputSchema `json:"input_schema,omitempty"` + OutputSchema *CallbacksInstancesGetOutputTriggersProviderTriggerOutputSchema `json:"output_schema,omitempty"` + Invocation CallbacksInstancesGetOutputTriggersProviderTriggerInvocation `json:"invocation"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Provider specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// CallbacksInstancesGetOutputTriggers represents the callbacks instances get output triggers type. +type CallbacksInstancesGetOutputTriggers struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique receiver trigger identifier + Id string `json:"id"` + // Source - How this trigger is invoked by the provider backend + Source string `json:"source"` + // PollIntervalSeconds - Polling interval in seconds when the trigger uses polling + PollIntervalSeconds *float64 `json:"poll_interval_seconds,omitempty"` + // NextPollAt - Next scheduled poll timestamp for polling triggers + NextPollAt *time.Time `json:"next_poll_at,omitempty"` + // LastPolledAt - Last successful poll timestamp for polling triggers + LastPolledAt *time.Time `json:"last_polled_at,omitempty"` + // WebhookUrl - Provider webhook URL registered for this trigger when webhook delivery is used + WebhookUrl *string `json:"webhook_url,omitempty"` + // IsWebhookRegistered - Whether webhook registration is currently active for this trigger + IsWebhookRegistered *bool `json:"is_webhook_registered,omitempty"` + ProviderTrigger *CallbacksInstancesGetOutputTriggersProviderTrigger `json:"provider_trigger,omitempty"` +} + +// CallbacksInstancesGetOutput represents the callbacks instances get output type. +type CallbacksInstancesGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique callback instance identifier + Id string `json:"id"` + // Status - Whether the callback instance is currently attached to a deployment/config pair + Status string `json:"status"` + Deployment CallbacksInstancesGetOutputDeployment `json:"deployment"` + Config CallbacksInstancesGetOutputConfig `json:"config"` + AuthConfig *CallbacksInstancesGetOutputAuthConfig `json:"auth_config,omitempty"` + // Triggers - Resolved trigger registrations for this callback instance + Triggers []CallbacksInstancesGetOutputTriggers `json:"triggers"` + // CreatedAt - Timestamp when the callback instance was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the callback instance was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MapCallbacksInstancesGetOutputFromJSON deserializes JSON data into a CallbacksInstancesGetOutput. +func MapCallbacksInstancesGetOutputFromJSON(data []byte) (*CallbacksInstancesGetOutput, error) { + var v CallbacksInstancesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapCallbacksInstancesGetOutputToJSON serializes a CallbacksInstancesGetOutput to JSON. +func MapCallbacksInstancesGetOutputToJSON(v *CallbacksInstancesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/consumers/create.go b/v1/resources/consumers/create.go index c312d84..4338e5d 100644 --- a/v1/resources/consumers/create.go +++ b/v1/resources/consumers/create.go @@ -11,6 +11,7 @@ type ConsumersCreateOutput struct { Id string `json:"id"` Name string `json:"name"` Email string `json:"email"` + ImageUrl string `json:"image_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } diff --git a/v1/resources/consumers/get.go b/v1/resources/consumers/get.go index d901604..1ac143e 100644 --- a/v1/resources/consumers/get.go +++ b/v1/resources/consumers/get.go @@ -11,6 +11,7 @@ type ConsumersGetOutput struct { Id string `json:"id"` Name string `json:"name"` Email string `json:"email"` + ImageUrl string `json:"image_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } diff --git a/v1/resources/consumers/get_member_consumer.go b/v1/resources/consumers/get_member_consumer.go index b47530d..9aaec25 100644 --- a/v1/resources/consumers/get_member_consumer.go +++ b/v1/resources/consumers/get_member_consumer.go @@ -5,49 +5,16 @@ import ( "time" ) -// ConsumersGetMemberConsumerOutputProfileGroupsGroup represents the consumers get member consumer output profile groups group type. -type ConsumersGetMemberConsumerOutputProfileGroupsGroup struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - IsDefault bool `json:"is_default"` - SsoGroupIds []string `json:"sso_group_ids"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - -// ConsumersGetMemberConsumerOutputProfileGroups represents the consumers get member consumer output profile groups type. -type ConsumersGetMemberConsumerOutputProfileGroups struct { - Object string `json:"object"` - Group ConsumersGetMemberConsumerOutputProfileGroupsGroup `json:"group"` - AssignedVia string `json:"assigned_via"` -} - -// ConsumersGetMemberConsumerOutputProfile represents the consumers get member consumer output profile type. -type ConsumersGetMemberConsumerOutputProfile struct { - Object string `json:"object"` - Id string `json:"id"` - Name string `json:"name"` - Email string `json:"email"` - ImageUrl string `json:"image_url"` - Groups *[]ConsumersGetMemberConsumerOutputProfileGroups `json:"groups,omitempty"` - ConsumerId string `json:"consumer_id"` - Status string `json:"status"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - // ConsumersGetMemberConsumerOutput represents the consumers get member consumer output type. type ConsumersGetMemberConsumerOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Name string `json:"name"` - Email string `json:"email"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` - Profile ConsumersGetMemberConsumerOutputProfile `json:"profile"` + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Profile map[string]any `json:"profile"` } // MapConsumersGetMemberConsumerOutputFromJSON deserializes JSON data into a ConsumersGetMemberConsumerOutput. diff --git a/v1/resources/consumers/list.go b/v1/resources/consumers/list.go index 67583f0..739196f 100644 --- a/v1/resources/consumers/list.go +++ b/v1/resources/consumers/list.go @@ -11,6 +11,7 @@ type ConsumersListOutputItems struct { Id string `json:"id"` Name string `json:"name"` Email string `json:"email"` + ImageUrl string `json:"image_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } diff --git a/v1/resources/consumers/profiles/get.go b/v1/resources/consumers/profiles/get.go index 9e00ce4..f9484f3 100644 --- a/v1/resources/consumers/profiles/get.go +++ b/v1/resources/consumers/profiles/get.go @@ -32,11 +32,11 @@ type ConsumersProfilesGetOutput struct { Name string `json:"name"` Email string `json:"email"` ImageUrl string `json:"image_url"` - Groups *[]ConsumersProfilesGetOutputGroups `json:"groups,omitempty"` ConsumerId string `json:"consumer_id"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` + Groups *[]ConsumersProfilesGetOutputGroups `json:"groups,omitempty"` } // MapConsumersProfilesGetOutputFromJSON deserializes JSON data into a ConsumersProfilesGetOutput. diff --git a/v1/resources/consumers/profiles/list.go b/v1/resources/consumers/profiles/list.go index df0ba76..a78d299 100644 --- a/v1/resources/consumers/profiles/list.go +++ b/v1/resources/consumers/profiles/list.go @@ -2,43 +2,8 @@ package profiles import ( "encoding/json" - "time" ) -// ConsumersProfilesListOutputItemsGroupsGroup represents the consumers profiles list output items groups group type. -type ConsumersProfilesListOutputItemsGroupsGroup struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - IsDefault bool `json:"is_default"` - SsoGroupIds []string `json:"sso_group_ids"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - -// ConsumersProfilesListOutputItemsGroups represents the consumers profiles list output items groups type. -type ConsumersProfilesListOutputItemsGroups struct { - Object string `json:"object"` - Group ConsumersProfilesListOutputItemsGroupsGroup `json:"group"` - AssignedVia string `json:"assigned_via"` -} - -// ConsumersProfilesListOutputItems represents the consumers profiles list output items type. -type ConsumersProfilesListOutputItems struct { - Object string `json:"object"` - Id string `json:"id"` - Name string `json:"name"` - Email string `json:"email"` - ImageUrl string `json:"image_url"` - Groups *[]ConsumersProfilesListOutputItemsGroups `json:"groups,omitempty"` - ConsumerId string `json:"consumer_id"` - Status string `json:"status"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - // ConsumersProfilesListOutputPagination represents the consumers profiles list output pagination type. type ConsumersProfilesListOutputPagination struct { HasMoreBefore bool `json:"has_more_before"` @@ -47,7 +12,7 @@ type ConsumersProfilesListOutputPagination struct { // ConsumersProfilesListOutput represents the consumers profiles list output type. type ConsumersProfilesListOutput struct { - Items []ConsumersProfilesListOutputItems `json:"items"` + Items []map[string]any `json:"items"` Pagination ConsumersProfilesListOutputPagination `json:"pagination"` } diff --git a/v1/resources/consumers/update.go b/v1/resources/consumers/update.go index bf7e513..4b34992 100644 --- a/v1/resources/consumers/update.go +++ b/v1/resources/consumers/update.go @@ -11,6 +11,7 @@ type ConsumersUpdateOutput struct { Id string `json:"id"` Name string `json:"name"` Email string `json:"email"` + ImageUrl string `json:"image_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } diff --git a/v1/resources/consumersurfaces/get.go b/v1/resources/consumersurfaces/get.go index a38af17..e85c764 100644 --- a/v1/resources/consumersurfaces/get.go +++ b/v1/resources/consumersurfaces/get.go @@ -5,6 +5,15 @@ import ( "time" ) +// ConsumerSurfacesGetOutputSkillConfiguration represents the consumer surfaces get output skill configuration type. +type ConsumerSurfacesGetOutputSkillConfiguration struct { + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` +} + // ConsumerSurfacesGetOutputAuth represents the consumer surfaces get output auth type. type ConsumerSurfacesGetOutputAuth struct { Object string `json:"object"` @@ -14,14 +23,17 @@ type ConsumerSurfacesGetOutputAuth struct { // ConsumerSurfacesGetOutput represents the consumer surfaces get output type. type ConsumerSurfacesGetOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Auth ConsumerSurfacesGetOutputAuth `json:"auth"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration ConsumerSurfacesGetOutputSkillConfiguration `json:"skill_configuration"` + Auth ConsumerSurfacesGetOutputAuth `json:"auth"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapConsumerSurfacesGetOutputFromJSON deserializes JSON data into a ConsumerSurfacesGetOutput. diff --git a/v1/resources/consumersurfaces/list.go b/v1/resources/consumersurfaces/list.go index 3796a8d..99c96ef 100644 --- a/v1/resources/consumersurfaces/list.go +++ b/v1/resources/consumersurfaces/list.go @@ -5,6 +5,15 @@ import ( "time" ) +// ConsumerSurfacesListOutputItemsSkillConfiguration represents the consumer surfaces list output items skill configuration type. +type ConsumerSurfacesListOutputItemsSkillConfiguration struct { + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` +} + // ConsumerSurfacesListOutputItemsAuth represents the consumer surfaces list output items auth type. type ConsumerSurfacesListOutputItemsAuth struct { Object string `json:"object"` @@ -14,14 +23,17 @@ type ConsumerSurfacesListOutputItemsAuth struct { // ConsumerSurfacesListOutputItems represents the consumer surfaces list output items type. type ConsumerSurfacesListOutputItems struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Auth ConsumerSurfacesListOutputItemsAuth `json:"auth"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration ConsumerSurfacesListOutputItemsSkillConfiguration `json:"skill_configuration"` + Auth ConsumerSurfacesListOutputItemsAuth `json:"auth"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // ConsumerSurfacesListOutputPagination represents the consumer surfaces list output pagination type. diff --git a/v1/resources/conversations/create.go b/v1/resources/conversations/create.go new file mode 100644 index 0000000..1c75e59 --- /dev/null +++ b/v1/resources/conversations/create.go @@ -0,0 +1,167 @@ +package conversations + +import ( + "encoding/json" + "time" +) + +// ConversationsCreateOutputCreatedByActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsCreateOutputCreatedByActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsCreateOutputCreatedByActorOrganizationActor represents the conversations create output created by actor organization actor type. +type ConversationsCreateOutputCreatedByActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsCreateOutputCreatedByActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsCreateOutputCreatedByActorConsumer represents the conversations create output created by actor consumer type. +type ConversationsCreateOutputCreatedByActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsCreateOutputCreatedByActor represents the conversations create output created by actor type. +type ConversationsCreateOutputCreatedByActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsCreateOutputCreatedByActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsCreateOutputCreatedByActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsCreateOutputAssistantDefaultModelProvider represents the conversations create output assistant default model provider type. +type ConversationsCreateOutputAssistantDefaultModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsCreateOutputAssistantDefaultModel represents the conversations create output assistant default model type. +type ConversationsCreateOutputAssistantDefaultModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsCreateOutputAssistantDefaultModelProvider `json:"provider"` +} + +// ConversationsCreateOutputAssistantAvailableModelsProvider represents the conversations create output assistant available models provider type. +type ConversationsCreateOutputAssistantAvailableModelsProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsCreateOutputAssistantAvailableModels represents the conversations create output assistant available models type. +type ConversationsCreateOutputAssistantAvailableModels struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsCreateOutputAssistantAvailableModelsProvider `json:"provider"` +} + +// ConversationsCreateOutputAssistant represents the conversations create output assistant type. +type ConversationsCreateOutputAssistant struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + OwnerType string `json:"owner_type"` + OrganizationId *string `json:"organization_id,omitempty"` + DefaultModel *ConversationsCreateOutputAssistantDefaultModel `json:"default_model,omitempty"` + AvailableModels []ConversationsCreateOutputAssistantAvailableModels `json:"available_models"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsCreateOutput represents the conversations create output type. +type ConversationsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Title *string `json:"title,omitempty"` + AssistantId string `json:"assistant_id"` + InstanceId string `json:"instance_id"` + OrganizationId string `json:"organization_id"` + CreatedByActor ConversationsCreateOutputCreatedByActor `json:"created_by_actor"` + RootMessageId string `json:"root_message_id"` + Assistant ConversationsCreateOutputAssistant `json:"assistant"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapConversationsCreateOutputFromJSON deserializes JSON data into a ConversationsCreateOutput. +func MapConversationsCreateOutputFromJSON(data []byte) (*ConversationsCreateOutput, error) { + var v ConversationsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsCreateOutputToJSON serializes a ConversationsCreateOutput to JSON. +func MapConversationsCreateOutputToJSON(v *ConversationsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// ConversationsCreateBody represents the conversations create body type. +type ConversationsCreateBody struct { + AssistantId string `json:"assistant_id"` + Title *string `json:"title,omitempty"` +} + +// MapConversationsCreateBodyFromJSON deserializes JSON data into a ConversationsCreateBody. +func MapConversationsCreateBodyFromJSON(data []byte) (*ConversationsCreateBody, error) { + var v ConversationsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsCreateBodyToJSON serializes a ConversationsCreateBody to JSON. +func MapConversationsCreateBodyToJSON(v *ConversationsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/conversations/get.go b/v1/resources/conversations/get.go new file mode 100644 index 0000000..27ff477 --- /dev/null +++ b/v1/resources/conversations/get.go @@ -0,0 +1,147 @@ +package conversations + +import ( + "encoding/json" + "time" +) + +// ConversationsGetOutputCreatedByActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsGetOutputCreatedByActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsGetOutputCreatedByActorOrganizationActor represents the conversations get output created by actor organization actor type. +type ConversationsGetOutputCreatedByActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsGetOutputCreatedByActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsGetOutputCreatedByActorConsumer represents the conversations get output created by actor consumer type. +type ConversationsGetOutputCreatedByActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsGetOutputCreatedByActor represents the conversations get output created by actor type. +type ConversationsGetOutputCreatedByActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsGetOutputCreatedByActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsGetOutputCreatedByActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsGetOutputAssistantDefaultModelProvider represents the conversations get output assistant default model provider type. +type ConversationsGetOutputAssistantDefaultModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsGetOutputAssistantDefaultModel represents the conversations get output assistant default model type. +type ConversationsGetOutputAssistantDefaultModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsGetOutputAssistantDefaultModelProvider `json:"provider"` +} + +// ConversationsGetOutputAssistantAvailableModelsProvider represents the conversations get output assistant available models provider type. +type ConversationsGetOutputAssistantAvailableModelsProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsGetOutputAssistantAvailableModels represents the conversations get output assistant available models type. +type ConversationsGetOutputAssistantAvailableModels struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsGetOutputAssistantAvailableModelsProvider `json:"provider"` +} + +// ConversationsGetOutputAssistant represents the conversations get output assistant type. +type ConversationsGetOutputAssistant struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + OwnerType string `json:"owner_type"` + OrganizationId *string `json:"organization_id,omitempty"` + DefaultModel *ConversationsGetOutputAssistantDefaultModel `json:"default_model,omitempty"` + AvailableModels []ConversationsGetOutputAssistantAvailableModels `json:"available_models"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsGetOutput represents the conversations get output type. +type ConversationsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Title *string `json:"title,omitempty"` + AssistantId string `json:"assistant_id"` + InstanceId string `json:"instance_id"` + OrganizationId string `json:"organization_id"` + CreatedByActor ConversationsGetOutputCreatedByActor `json:"created_by_actor"` + RootMessageId string `json:"root_message_id"` + Assistant ConversationsGetOutputAssistant `json:"assistant"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapConversationsGetOutputFromJSON deserializes JSON data into a ConversationsGetOutput. +func MapConversationsGetOutputFromJSON(data []byte) (*ConversationsGetOutput, error) { + var v ConversationsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsGetOutputToJSON serializes a ConversationsGetOutput to JSON. +func MapConversationsGetOutputToJSON(v *ConversationsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/conversations/list.go b/v1/resources/conversations/list.go new file mode 100644 index 0000000..a791782 --- /dev/null +++ b/v1/resources/conversations/list.go @@ -0,0 +1,183 @@ +package conversations + +import ( + "encoding/json" + "time" +) + +// ConversationsListOutputItemsCreatedByActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsListOutputItemsCreatedByActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsListOutputItemsCreatedByActorOrganizationActor represents the conversations list output items created by actor organization actor type. +type ConversationsListOutputItemsCreatedByActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsListOutputItemsCreatedByActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsListOutputItemsCreatedByActorConsumer represents the conversations list output items created by actor consumer type. +type ConversationsListOutputItemsCreatedByActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsListOutputItemsCreatedByActor represents the conversations list output items created by actor type. +type ConversationsListOutputItemsCreatedByActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsListOutputItemsCreatedByActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsListOutputItemsCreatedByActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsListOutputItemsAssistantDefaultModelProvider represents the conversations list output items assistant default model provider type. +type ConversationsListOutputItemsAssistantDefaultModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsListOutputItemsAssistantDefaultModel represents the conversations list output items assistant default model type. +type ConversationsListOutputItemsAssistantDefaultModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsListOutputItemsAssistantDefaultModelProvider `json:"provider"` +} + +// ConversationsListOutputItemsAssistantAvailableModelsProvider represents the conversations list output items assistant available models provider type. +type ConversationsListOutputItemsAssistantAvailableModelsProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsListOutputItemsAssistantAvailableModels represents the conversations list output items assistant available models type. +type ConversationsListOutputItemsAssistantAvailableModels struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsListOutputItemsAssistantAvailableModelsProvider `json:"provider"` +} + +// ConversationsListOutputItemsAssistant represents the conversations list output items assistant type. +type ConversationsListOutputItemsAssistant struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + OwnerType string `json:"owner_type"` + OrganizationId *string `json:"organization_id,omitempty"` + DefaultModel *ConversationsListOutputItemsAssistantDefaultModel `json:"default_model,omitempty"` + AvailableModels []ConversationsListOutputItemsAssistantAvailableModels `json:"available_models"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsListOutputItems represents the conversations list output items type. +type ConversationsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Title *string `json:"title,omitempty"` + AssistantId string `json:"assistant_id"` + InstanceId string `json:"instance_id"` + OrganizationId string `json:"organization_id"` + CreatedByActor ConversationsListOutputItemsCreatedByActor `json:"created_by_actor"` + RootMessageId string `json:"root_message_id"` + Assistant ConversationsListOutputItemsAssistant `json:"assistant"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsListOutputPagination represents the conversations list output pagination type. +type ConversationsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// ConversationsListOutput represents the conversations list output type. +type ConversationsListOutput struct { + Items []ConversationsListOutputItems `json:"items"` + Pagination ConversationsListOutputPagination `json:"pagination"` +} + +// MapConversationsListOutputFromJSON deserializes JSON data into a ConversationsListOutput. +func MapConversationsListOutputFromJSON(data []byte) (*ConversationsListOutput, error) { + var v ConversationsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsListOutputToJSON serializes a ConversationsListOutput to JSON. +func MapConversationsListOutputToJSON(v *ConversationsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// ConversationsListQuery represents the conversations list query type. +type ConversationsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + AssistantId *any `json:"assistant_id,omitempty"` +} + +// MapConversationsListQueryFromJSON deserializes JSON data into a ConversationsListQuery. +func MapConversationsListQueryFromJSON(data []byte) (*ConversationsListQuery, error) { + var v ConversationsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsListQueryToJSON serializes a ConversationsListQuery to JSON. +func MapConversationsListQueryToJSON(v *ConversationsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/conversations/messages/create.go b/v1/resources/conversations/messages/create.go new file mode 100644 index 0000000..dcf1631 --- /dev/null +++ b/v1/resources/conversations/messages/create.go @@ -0,0 +1,149 @@ +package messages + +import ( + "encoding/json" + "time" +) + +// ConversationsMessagesCreateOutputModelProvider represents the conversations messages create output model provider type. +type ConversationsMessagesCreateOutputModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsMessagesCreateOutputModel represents the conversations messages create output model type. +type ConversationsMessagesCreateOutputModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsMessagesCreateOutputModelProvider `json:"provider"` +} + +// ConversationsMessagesCreateOutputRequestActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsMessagesCreateOutputRequestActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesCreateOutputRequestActorOrganizationActor represents the conversations messages create output request actor organization actor type. +type ConversationsMessagesCreateOutputRequestActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsMessagesCreateOutputRequestActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesCreateOutputRequestActorConsumer represents the conversations messages create output request actor consumer type. +type ConversationsMessagesCreateOutputRequestActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesCreateOutputRequestActor represents the conversations messages create output request actor type. +type ConversationsMessagesCreateOutputRequestActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsMessagesCreateOutputRequestActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsMessagesCreateOutputRequestActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsMessagesCreateOutputRequest represents the conversations messages create output request type. +type ConversationsMessagesCreateOutputRequest struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Actor *ConversationsMessagesCreateOutputRequestActor `json:"actor,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesCreateOutput represents the conversations messages create output type. +type ConversationsMessagesCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + ConversationItemId string `json:"conversation_item_id"` + Type string `json:"type"` + AssistantId *string `json:"assistant_id,omitempty"` + ParentMessageId *string `json:"parent_message_id,omitempty"` + Model *ConversationsMessagesCreateOutputModel `json:"model,omitempty"` + Request ConversationsMessagesCreateOutputRequest `json:"request"` + Items []map[string]any `json:"items"` + CreatedAt time.Time `json:"created_at"` +} + +// MapConversationsMessagesCreateOutputFromJSON deserializes JSON data into a ConversationsMessagesCreateOutput. +func MapConversationsMessagesCreateOutputFromJSON(data []byte) (*ConversationsMessagesCreateOutput, error) { + var v ConversationsMessagesCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsMessagesCreateOutputToJSON serializes a ConversationsMessagesCreateOutput to JSON. +func MapConversationsMessagesCreateOutputToJSON(v *ConversationsMessagesCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// ConversationsMessagesCreateBodyMessage represents the conversations messages create body message type. +type ConversationsMessagesCreateBodyMessage struct { + Parts []any `json:"parts"` +} + +// ConversationsMessagesCreateBody represents the conversations messages create body type. +type ConversationsMessagesCreateBody struct { + Message ConversationsMessagesCreateBodyMessage `json:"message"` + ParentMessageId *string `json:"parent_message_id,omitempty"` + ModelId *string `json:"model_id,omitempty"` +} + +// MapConversationsMessagesCreateBodyFromJSON deserializes JSON data into a ConversationsMessagesCreateBody. +func MapConversationsMessagesCreateBodyFromJSON(data []byte) (*ConversationsMessagesCreateBody, error) { + var v ConversationsMessagesCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsMessagesCreateBodyToJSON serializes a ConversationsMessagesCreateBody to JSON. +func MapConversationsMessagesCreateBodyToJSON(v *ConversationsMessagesCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/conversations/messages/get.go b/v1/resources/conversations/messages/get.go new file mode 100644 index 0000000..d4dc67f --- /dev/null +++ b/v1/resources/conversations/messages/get.go @@ -0,0 +1,123 @@ +package messages + +import ( + "encoding/json" + "time" +) + +// ConversationsMessagesGetOutputModelProvider represents the conversations messages get output model provider type. +type ConversationsMessagesGetOutputModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsMessagesGetOutputModel represents the conversations messages get output model type. +type ConversationsMessagesGetOutputModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsMessagesGetOutputModelProvider `json:"provider"` +} + +// ConversationsMessagesGetOutputRequestActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsMessagesGetOutputRequestActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesGetOutputRequestActorOrganizationActor represents the conversations messages get output request actor organization actor type. +type ConversationsMessagesGetOutputRequestActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsMessagesGetOutputRequestActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesGetOutputRequestActorConsumer represents the conversations messages get output request actor consumer type. +type ConversationsMessagesGetOutputRequestActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesGetOutputRequestActor represents the conversations messages get output request actor type. +type ConversationsMessagesGetOutputRequestActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsMessagesGetOutputRequestActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsMessagesGetOutputRequestActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsMessagesGetOutputRequest represents the conversations messages get output request type. +type ConversationsMessagesGetOutputRequest struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Actor *ConversationsMessagesGetOutputRequestActor `json:"actor,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesGetOutput represents the conversations messages get output type. +type ConversationsMessagesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + ConversationItemId string `json:"conversation_item_id"` + Type string `json:"type"` + AssistantId *string `json:"assistant_id,omitempty"` + ParentMessageId *string `json:"parent_message_id,omitempty"` + Model *ConversationsMessagesGetOutputModel `json:"model,omitempty"` + Request ConversationsMessagesGetOutputRequest `json:"request"` + Items []map[string]any `json:"items"` + CreatedAt time.Time `json:"created_at"` +} + +// MapConversationsMessagesGetOutputFromJSON deserializes JSON data into a ConversationsMessagesGetOutput. +func MapConversationsMessagesGetOutputFromJSON(data []byte) (*ConversationsMessagesGetOutput, error) { + var v ConversationsMessagesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsMessagesGetOutputToJSON serializes a ConversationsMessagesGetOutput to JSON. +func MapConversationsMessagesGetOutputToJSON(v *ConversationsMessagesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/conversations/messages/list.go b/v1/resources/conversations/messages/list.go new file mode 100644 index 0000000..c026a91 --- /dev/null +++ b/v1/resources/conversations/messages/list.go @@ -0,0 +1,158 @@ +package messages + +import ( + "encoding/json" + "time" +) + +// ConversationsMessagesListOutputItemsModelProvider represents the conversations messages list output items model provider type. +type ConversationsMessagesListOutputItemsModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsMessagesListOutputItemsModel represents the conversations messages list output items model type. +type ConversationsMessagesListOutputItemsModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsMessagesListOutputItemsModelProvider `json:"provider"` +} + +// ConversationsMessagesListOutputItemsRequestActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsMessagesListOutputItemsRequestActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesListOutputItemsRequestActorOrganizationActor represents the conversations messages list output items request actor organization actor type. +type ConversationsMessagesListOutputItemsRequestActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsMessagesListOutputItemsRequestActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesListOutputItemsRequestActorConsumer represents the conversations messages list output items request actor consumer type. +type ConversationsMessagesListOutputItemsRequestActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesListOutputItemsRequestActor represents the conversations messages list output items request actor type. +type ConversationsMessagesListOutputItemsRequestActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsMessagesListOutputItemsRequestActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsMessagesListOutputItemsRequestActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsMessagesListOutputItemsRequest represents the conversations messages list output items request type. +type ConversationsMessagesListOutputItemsRequest struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Actor *ConversationsMessagesListOutputItemsRequestActor `json:"actor,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsMessagesListOutputItems represents the conversations messages list output items type. +type ConversationsMessagesListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + ConversationItemId string `json:"conversation_item_id"` + Type string `json:"type"` + AssistantId *string `json:"assistant_id,omitempty"` + ParentMessageId *string `json:"parent_message_id,omitempty"` + Model *ConversationsMessagesListOutputItemsModel `json:"model,omitempty"` + Request ConversationsMessagesListOutputItemsRequest `json:"request"` + Items []map[string]any `json:"items"` + CreatedAt time.Time `json:"created_at"` +} + +// ConversationsMessagesListOutputPagination represents the conversations messages list output pagination type. +type ConversationsMessagesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// ConversationsMessagesListOutput represents the conversations messages list output type. +type ConversationsMessagesListOutput struct { + Items []ConversationsMessagesListOutputItems `json:"items"` + Pagination ConversationsMessagesListOutputPagination `json:"pagination"` +} + +// MapConversationsMessagesListOutputFromJSON deserializes JSON data into a ConversationsMessagesListOutput. +func MapConversationsMessagesListOutputFromJSON(data []byte) (*ConversationsMessagesListOutput, error) { + var v ConversationsMessagesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsMessagesListOutputToJSON serializes a ConversationsMessagesListOutput to JSON. +func MapConversationsMessagesListOutputToJSON(v *ConversationsMessagesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// ConversationsMessagesListQuery represents the conversations messages list query type. +type ConversationsMessagesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapConversationsMessagesListQueryFromJSON deserializes JSON data into a ConversationsMessagesListQuery. +func MapConversationsMessagesListQueryFromJSON(data []byte) (*ConversationsMessagesListQuery, error) { + var v ConversationsMessagesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsMessagesListQueryToJSON serializes a ConversationsMessagesListQuery to JSON. +func MapConversationsMessagesListQueryToJSON(v *ConversationsMessagesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/conversations/update.go b/v1/resources/conversations/update.go new file mode 100644 index 0000000..2a816f1 --- /dev/null +++ b/v1/resources/conversations/update.go @@ -0,0 +1,166 @@ +package conversations + +import ( + "encoding/json" + "time" +) + +// ConversationsUpdateOutputCreatedByActorOrganizationActorTeams - The teams the actor belongs to +type ConversationsUpdateOutputCreatedByActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsUpdateOutputCreatedByActorOrganizationActor represents the conversations update output created by actor organization actor type. +type ConversationsUpdateOutputCreatedByActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []ConversationsUpdateOutputCreatedByActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsUpdateOutputCreatedByActorConsumer represents the conversations update output created by actor consumer type. +type ConversationsUpdateOutputCreatedByActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsUpdateOutputCreatedByActor represents the conversations update output created by actor type. +type ConversationsUpdateOutputCreatedByActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *ConversationsUpdateOutputCreatedByActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *ConversationsUpdateOutputCreatedByActorConsumer `json:"consumer,omitempty"` +} + +// ConversationsUpdateOutputAssistantDefaultModelProvider represents the conversations update output assistant default model provider type. +type ConversationsUpdateOutputAssistantDefaultModelProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsUpdateOutputAssistantDefaultModel represents the conversations update output assistant default model type. +type ConversationsUpdateOutputAssistantDefaultModel struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsUpdateOutputAssistantDefaultModelProvider `json:"provider"` +} + +// ConversationsUpdateOutputAssistantAvailableModelsProvider represents the conversations update output assistant available models provider type. +type ConversationsUpdateOutputAssistantAvailableModelsProvider struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ImageUrl string `json:"image_url"` +} + +// ConversationsUpdateOutputAssistantAvailableModels represents the conversations update output assistant available models type. +type ConversationsUpdateOutputAssistantAvailableModels struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + ContextWindow float64 `json:"context_window"` + Provider ConversationsUpdateOutputAssistantAvailableModelsProvider `json:"provider"` +} + +// ConversationsUpdateOutputAssistant represents the conversations update output assistant type. +type ConversationsUpdateOutputAssistant struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + OwnerType string `json:"owner_type"` + OrganizationId *string `json:"organization_id,omitempty"` + DefaultModel *ConversationsUpdateOutputAssistantDefaultModel `json:"default_model,omitempty"` + AvailableModels []ConversationsUpdateOutputAssistantAvailableModels `json:"available_models"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// ConversationsUpdateOutput represents the conversations update output type. +type ConversationsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Title *string `json:"title,omitempty"` + AssistantId string `json:"assistant_id"` + InstanceId string `json:"instance_id"` + OrganizationId string `json:"organization_id"` + CreatedByActor ConversationsUpdateOutputCreatedByActor `json:"created_by_actor"` + RootMessageId string `json:"root_message_id"` + Assistant ConversationsUpdateOutputAssistant `json:"assistant"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapConversationsUpdateOutputFromJSON deserializes JSON data into a ConversationsUpdateOutput. +func MapConversationsUpdateOutputFromJSON(data []byte) (*ConversationsUpdateOutput, error) { + var v ConversationsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsUpdateOutputToJSON serializes a ConversationsUpdateOutput to JSON. +func MapConversationsUpdateOutputToJSON(v *ConversationsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// ConversationsUpdateBody represents the conversations update body type. +type ConversationsUpdateBody struct { + Title *string `json:"title,omitempty"` +} + +// MapConversationsUpdateBodyFromJSON deserializes JSON data into a ConversationsUpdateBody. +func MapConversationsUpdateBodyFromJSON(data []byte) (*ConversationsUpdateBody, error) { + var v ConversationsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapConversationsUpdateBodyToJSON serializes a ConversationsUpdateBody to JSON. +func MapConversationsUpdateBodyToJSON(v *ConversationsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/clone.go b/v1/resources/documents/clone.go new file mode 100644 index 0000000..721a7a3 --- /dev/null +++ b/v1/resources/documents/clone.go @@ -0,0 +1,116 @@ +package documents + +import ( + "encoding/json" + "time" +) + +// DocumentsCloneOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type DocumentsCloneOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsCloneOutputCreatedByOrganizationActor represents the documents clone output created by organization actor type. +type DocumentsCloneOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsCloneOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsCloneOutputCreatedByConsumer represents the documents clone output created by consumer type. +type DocumentsCloneOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsCloneOutputCreatedBy represents the documents clone output created by type. +type DocumentsCloneOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsCloneOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsCloneOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// DocumentsCloneOutput represents the documents clone output type. +type DocumentsCloneOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *DocumentsCloneOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapDocumentsCloneOutputFromJSON deserializes JSON data into a DocumentsCloneOutput. +func MapDocumentsCloneOutputFromJSON(data []byte) (*DocumentsCloneOutput, error) { + var v DocumentsCloneOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsCloneOutputToJSON serializes a DocumentsCloneOutput to JSON. +func MapDocumentsCloneOutputToJSON(v *DocumentsCloneOutput) ([]byte, error) { + return json.Marshal(v) +} + +// DocumentsCloneBody represents the documents clone body type. +type DocumentsCloneBody struct { + TargetDocumentId *string `json:"target_document_id,omitempty"` + Title *string `json:"title,omitempty"` +} + +// MapDocumentsCloneBodyFromJSON deserializes JSON data into a DocumentsCloneBody. +func MapDocumentsCloneBodyFromJSON(data []byte) (*DocumentsCloneBody, error) { + var v DocumentsCloneBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsCloneBodyToJSON serializes a DocumentsCloneBody to JSON. +func MapDocumentsCloneBodyToJSON(v *DocumentsCloneBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/create.go b/v1/resources/documents/create.go new file mode 100644 index 0000000..bf8ce43 --- /dev/null +++ b/v1/resources/documents/create.go @@ -0,0 +1,116 @@ +package documents + +import ( + "encoding/json" + "time" +) + +// DocumentsCreateOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type DocumentsCreateOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsCreateOutputCreatedByOrganizationActor represents the documents create output created by organization actor type. +type DocumentsCreateOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsCreateOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsCreateOutputCreatedByConsumer represents the documents create output created by consumer type. +type DocumentsCreateOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsCreateOutputCreatedBy represents the documents create output created by type. +type DocumentsCreateOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsCreateOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsCreateOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// DocumentsCreateOutput represents the documents create output type. +type DocumentsCreateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *DocumentsCreateOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapDocumentsCreateOutputFromJSON deserializes JSON data into a DocumentsCreateOutput. +func MapDocumentsCreateOutputFromJSON(data []byte) (*DocumentsCreateOutput, error) { + var v DocumentsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsCreateOutputToJSON serializes a DocumentsCreateOutput to JSON. +func MapDocumentsCreateOutputToJSON(v *DocumentsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// DocumentsCreateBody represents the documents create body type. +type DocumentsCreateBody struct { + Title string `json:"title"` + Content string `json:"content"` +} + +// MapDocumentsCreateBodyFromJSON deserializes JSON data into a DocumentsCreateBody. +func MapDocumentsCreateBodyFromJSON(data []byte) (*DocumentsCreateBody, error) { + var v DocumentsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsCreateBodyToJSON serializes a DocumentsCreateBody to JSON. +func MapDocumentsCreateBodyToJSON(v *DocumentsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/delete.go b/v1/resources/documents/delete.go new file mode 100644 index 0000000..e998d8b --- /dev/null +++ b/v1/resources/documents/delete.go @@ -0,0 +1,96 @@ +package documents + +import ( + "encoding/json" + "time" +) + +// DocumentsDeleteOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type DocumentsDeleteOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsDeleteOutputCreatedByOrganizationActor represents the documents delete output created by organization actor type. +type DocumentsDeleteOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsDeleteOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsDeleteOutputCreatedByConsumer represents the documents delete output created by consumer type. +type DocumentsDeleteOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsDeleteOutputCreatedBy represents the documents delete output created by type. +type DocumentsDeleteOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsDeleteOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsDeleteOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// DocumentsDeleteOutput represents the documents delete output type. +type DocumentsDeleteOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *DocumentsDeleteOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapDocumentsDeleteOutputFromJSON deserializes JSON data into a DocumentsDeleteOutput. +func MapDocumentsDeleteOutputFromJSON(data []byte) (*DocumentsDeleteOutput, error) { + var v DocumentsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsDeleteOutputToJSON serializes a DocumentsDeleteOutput to JSON. +func MapDocumentsDeleteOutputToJSON(v *DocumentsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/get.go b/v1/resources/documents/get.go new file mode 100644 index 0000000..ac3156a --- /dev/null +++ b/v1/resources/documents/get.go @@ -0,0 +1,96 @@ +package documents + +import ( + "encoding/json" + "time" +) + +// DocumentsGetOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type DocumentsGetOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsGetOutputCreatedByOrganizationActor represents the documents get output created by organization actor type. +type DocumentsGetOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsGetOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsGetOutputCreatedByConsumer represents the documents get output created by consumer type. +type DocumentsGetOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsGetOutputCreatedBy represents the documents get output created by type. +type DocumentsGetOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsGetOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsGetOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// DocumentsGetOutput represents the documents get output type. +type DocumentsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *DocumentsGetOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapDocumentsGetOutputFromJSON deserializes JSON data into a DocumentsGetOutput. +func MapDocumentsGetOutputFromJSON(data []byte) (*DocumentsGetOutput, error) { + var v DocumentsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsGetOutputToJSON serializes a DocumentsGetOutput to JSON. +func MapDocumentsGetOutputToJSON(v *DocumentsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/list.go b/v1/resources/documents/list.go new file mode 100644 index 0000000..15ecde2 --- /dev/null +++ b/v1/resources/documents/list.go @@ -0,0 +1,159 @@ +package documents + +import ( + "encoding/json" + "time" +) + +// DocumentsListOutputItemsCreatedByOrganizationActorTeams - The teams the actor belongs to +type DocumentsListOutputItemsCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsListOutputItemsCreatedByOrganizationActor represents the documents list output items created by organization actor type. +type DocumentsListOutputItemsCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsListOutputItemsCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsListOutputItemsCreatedByConsumer represents the documents list output items created by consumer type. +type DocumentsListOutputItemsCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsListOutputItemsCreatedBy represents the documents list output items created by type. +type DocumentsListOutputItemsCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsListOutputItemsCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsListOutputItemsCreatedByConsumer `json:"consumer,omitempty"` +} + +// DocumentsListOutputItems represents the documents list output items type. +type DocumentsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *DocumentsListOutputItemsCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsListOutputPagination represents the documents list output pagination type. +type DocumentsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// DocumentsListOutput represents the documents list output type. +type DocumentsListOutput struct { + Items []DocumentsListOutputItems `json:"items"` + Pagination DocumentsListOutputPagination `json:"pagination"` +} + +// MapDocumentsListOutputFromJSON deserializes JSON data into a DocumentsListOutput. +func MapDocumentsListOutputFromJSON(data []byte) (*DocumentsListOutput, error) { + var v DocumentsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsListOutputToJSON serializes a DocumentsListOutput to JSON. +func MapDocumentsListOutputToJSON(v *DocumentsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// DocumentsListQueryCreatedAt - Filter Filter by creation time by date range +type DocumentsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for Filter by creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// DocumentsListQueryUpdatedAt - Filter Filter by update time by date range +type DocumentsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for Filter by update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by update time + Lt *time.Time `json:"lt,omitempty"` +} + +// DocumentsListQuery represents the documents list query type. +type DocumentsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document ID + Id *any `json:"id,omitempty"` + // FileId - Filter by file ID + FileId *any `json:"file_id,omitempty"` + // StoreId - Filter by store ID + StoreId *any `json:"store_id,omitempty"` + // ParentDocumentId - Filter by parent document ID + ParentDocumentId *any `json:"parent_document_id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *DocumentsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *DocumentsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapDocumentsListQueryFromJSON deserializes JSON data into a DocumentsListQuery. +func MapDocumentsListQueryFromJSON(data []byte) (*DocumentsListQuery, error) { + var v DocumentsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsListQueryToJSON serializes a DocumentsListQuery to JSON. +func MapDocumentsListQueryToJSON(v *DocumentsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/participants/get.go b/v1/resources/documents/participants/get.go new file mode 100644 index 0000000..d903862 --- /dev/null +++ b/v1/resources/documents/participants/get.go @@ -0,0 +1,93 @@ +package participants + +import ( + "encoding/json" + "time" +) + +// DocumentsParticipantsGetOutputActorOrganizationActorTeams - The teams the actor belongs to +type DocumentsParticipantsGetOutputActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsParticipantsGetOutputActorOrganizationActor represents the documents participants get output actor organization actor type. +type DocumentsParticipantsGetOutputActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsParticipantsGetOutputActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsParticipantsGetOutputActorConsumer represents the documents participants get output actor consumer type. +type DocumentsParticipantsGetOutputActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsParticipantsGetOutputActor represents the documents participants get output actor type. +type DocumentsParticipantsGetOutputActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsParticipantsGetOutputActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsParticipantsGetOutputActorConsumer `json:"consumer,omitempty"` +} + +// DocumentsParticipantsGetOutput represents the documents participants get output type. +type DocumentsParticipantsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Role string `json:"role"` + EditCount float64 `json:"edit_count"` + LastEditedAt *time.Time `json:"last_edited_at,omitempty"` + LastViewedAt *time.Time `json:"last_viewed_at,omitempty"` + Actor DocumentsParticipantsGetOutputActor `json:"actor"` + CreatedAt time.Time `json:"created_at"` +} + +// MapDocumentsParticipantsGetOutputFromJSON deserializes JSON data into a DocumentsParticipantsGetOutput. +func MapDocumentsParticipantsGetOutputFromJSON(data []byte) (*DocumentsParticipantsGetOutput, error) { + var v DocumentsParticipantsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsParticipantsGetOutputToJSON serializes a DocumentsParticipantsGetOutput to JSON. +func MapDocumentsParticipantsGetOutputToJSON(v *DocumentsParticipantsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/participants/list.go b/v1/resources/documents/participants/list.go new file mode 100644 index 0000000..4796ad6 --- /dev/null +++ b/v1/resources/documents/participants/list.go @@ -0,0 +1,150 @@ +package participants + +import ( + "encoding/json" + "time" +) + +// DocumentsParticipantsListOutputItemsActorOrganizationActorTeams - The teams the actor belongs to +type DocumentsParticipantsListOutputItemsActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsParticipantsListOutputItemsActorOrganizationActor represents the documents participants list output items actor organization actor type. +type DocumentsParticipantsListOutputItemsActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsParticipantsListOutputItemsActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsParticipantsListOutputItemsActorConsumer represents the documents participants list output items actor consumer type. +type DocumentsParticipantsListOutputItemsActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsParticipantsListOutputItemsActor represents the documents participants list output items actor type. +type DocumentsParticipantsListOutputItemsActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsParticipantsListOutputItemsActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsParticipantsListOutputItemsActorConsumer `json:"consumer,omitempty"` +} + +// DocumentsParticipantsListOutputItems represents the documents participants list output items type. +type DocumentsParticipantsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Role string `json:"role"` + EditCount float64 `json:"edit_count"` + LastEditedAt *time.Time `json:"last_edited_at,omitempty"` + LastViewedAt *time.Time `json:"last_viewed_at,omitempty"` + Actor DocumentsParticipantsListOutputItemsActor `json:"actor"` + CreatedAt time.Time `json:"created_at"` +} + +// DocumentsParticipantsListOutputPagination represents the documents participants list output pagination type. +type DocumentsParticipantsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// DocumentsParticipantsListOutput represents the documents participants list output type. +type DocumentsParticipantsListOutput struct { + Items []DocumentsParticipantsListOutputItems `json:"items"` + Pagination DocumentsParticipantsListOutputPagination `json:"pagination"` +} + +// MapDocumentsParticipantsListOutputFromJSON deserializes JSON data into a DocumentsParticipantsListOutput. +func MapDocumentsParticipantsListOutputFromJSON(data []byte) (*DocumentsParticipantsListOutput, error) { + var v DocumentsParticipantsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsParticipantsListOutputToJSON serializes a DocumentsParticipantsListOutput to JSON. +func MapDocumentsParticipantsListOutputToJSON(v *DocumentsParticipantsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// DocumentsParticipantsListQueryCreatedAt - Filter Filter by creation time by date range +type DocumentsParticipantsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for Filter by creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// DocumentsParticipantsListQueryUpdatedAt - Filter Filter by update time by date range +type DocumentsParticipantsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for Filter by update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by update time + Lt *time.Time `json:"lt,omitempty"` +} + +// DocumentsParticipantsListQuery represents the documents participants list query type. +type DocumentsParticipantsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document participant ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *DocumentsParticipantsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *DocumentsParticipantsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapDocumentsParticipantsListQueryFromJSON deserializes JSON data into a DocumentsParticipantsListQuery. +func MapDocumentsParticipantsListQueryFromJSON(data []byte) (*DocumentsParticipantsListQuery, error) { + var v DocumentsParticipantsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsParticipantsListQueryToJSON serializes a DocumentsParticipantsListQuery to JSON. +func MapDocumentsParticipantsListQueryToJSON(v *DocumentsParticipantsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/permissions/get.go b/v1/resources/documents/permissions/get.go new file mode 100644 index 0000000..af17b62 --- /dev/null +++ b/v1/resources/documents/permissions/get.go @@ -0,0 +1,32 @@ +package permissions + +import ( + "encoding/json" +) + +// DocumentsPermissionsGetOutput represents the documents permissions get output type. +type DocumentsPermissionsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + DocumentId string `json:"document_id"` + IsOwner bool `json:"is_owner"` + HasFullAccess bool `json:"has_full_access"` + Permissions []string `json:"permissions"` + RelevantStoreIds []string `json:"relevant_store_ids"` + ReadableStoreIds []string `json:"readable_store_ids"` + WritableStoreIds []string `json:"writable_store_ids"` +} + +// MapDocumentsPermissionsGetOutputFromJSON deserializes JSON data into a DocumentsPermissionsGetOutput. +func MapDocumentsPermissionsGetOutputFromJSON(data []byte) (*DocumentsPermissionsGetOutput, error) { + var v DocumentsPermissionsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsPermissionsGetOutputToJSON serializes a DocumentsPermissionsGetOutput to JSON. +func MapDocumentsPermissionsGetOutputToJSON(v *DocumentsPermissionsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/update.go b/v1/resources/documents/update.go new file mode 100644 index 0000000..54f9df2 --- /dev/null +++ b/v1/resources/documents/update.go @@ -0,0 +1,116 @@ +package documents + +import ( + "encoding/json" + "time" +) + +// DocumentsUpdateOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type DocumentsUpdateOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsUpdateOutputCreatedByOrganizationActor represents the documents update output created by organization actor type. +type DocumentsUpdateOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsUpdateOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsUpdateOutputCreatedByConsumer represents the documents update output created by consumer type. +type DocumentsUpdateOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsUpdateOutputCreatedBy represents the documents update output created by type. +type DocumentsUpdateOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsUpdateOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsUpdateOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// DocumentsUpdateOutput represents the documents update output type. +type DocumentsUpdateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *DocumentsUpdateOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapDocumentsUpdateOutputFromJSON deserializes JSON data into a DocumentsUpdateOutput. +func MapDocumentsUpdateOutputFromJSON(data []byte) (*DocumentsUpdateOutput, error) { + var v DocumentsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsUpdateOutputToJSON serializes a DocumentsUpdateOutput to JSON. +func MapDocumentsUpdateOutputToJSON(v *DocumentsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// DocumentsUpdateBody represents the documents update body type. +type DocumentsUpdateBody struct { + Title *string `json:"title,omitempty"` + Content *string `json:"content,omitempty"` +} + +// MapDocumentsUpdateBodyFromJSON deserializes JSON data into a DocumentsUpdateBody. +func MapDocumentsUpdateBodyFromJSON(data []byte) (*DocumentsUpdateBody, error) { + var v DocumentsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsUpdateBodyToJSON serializes a DocumentsUpdateBody to JSON. +func MapDocumentsUpdateBodyToJSON(v *DocumentsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/versions/get.go b/v1/resources/documents/versions/get.go new file mode 100644 index 0000000..e2ca558 --- /dev/null +++ b/v1/resources/documents/versions/get.go @@ -0,0 +1,94 @@ +package versions + +import ( + "encoding/json" + "time" +) + +// DocumentsVersionsGetOutputEditorsOrganizationActorTeams - The teams the actor belongs to +type DocumentsVersionsGetOutputEditorsOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsVersionsGetOutputEditorsOrganizationActor represents the documents versions get output editors organization actor type. +type DocumentsVersionsGetOutputEditorsOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsVersionsGetOutputEditorsOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsVersionsGetOutputEditorsConsumer represents the documents versions get output editors consumer type. +type DocumentsVersionsGetOutputEditorsConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsVersionsGetOutputEditors represents the documents versions get output editors type. +type DocumentsVersionsGetOutputEditors struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsVersionsGetOutputEditorsOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsVersionsGetOutputEditorsConsumer `json:"consumer,omitempty"` +} + +// DocumentsVersionsGetOutput represents the documents versions get output type. +type DocumentsVersionsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + DocumentId string `json:"document_id"` + VersionNumber float64 `json:"version_number"` + PreviousVersionId *string `json:"previous_version_id,omitempty"` + ListEditedAt *time.Time `json:"list_edited_at,omitempty"` + Content string `json:"content"` + Editors []DocumentsVersionsGetOutputEditors `json:"editors"` + CreatedAt time.Time `json:"created_at"` +} + +// MapDocumentsVersionsGetOutputFromJSON deserializes JSON data into a DocumentsVersionsGetOutput. +func MapDocumentsVersionsGetOutputFromJSON(data []byte) (*DocumentsVersionsGetOutput, error) { + var v DocumentsVersionsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsVersionsGetOutputToJSON serializes a DocumentsVersionsGetOutput to JSON. +func MapDocumentsVersionsGetOutputToJSON(v *DocumentsVersionsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/documents/versions/list.go b/v1/resources/documents/versions/list.go new file mode 100644 index 0000000..441ce90 --- /dev/null +++ b/v1/resources/documents/versions/list.go @@ -0,0 +1,151 @@ +package versions + +import ( + "encoding/json" + "time" +) + +// DocumentsVersionsListOutputItemsEditorsOrganizationActorTeams - The teams the actor belongs to +type DocumentsVersionsListOutputItemsEditorsOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsVersionsListOutputItemsEditorsOrganizationActor represents the documents versions list output items editors organization actor type. +type DocumentsVersionsListOutputItemsEditorsOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []DocumentsVersionsListOutputItemsEditorsOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsVersionsListOutputItemsEditorsConsumer represents the documents versions list output items editors consumer type. +type DocumentsVersionsListOutputItemsEditorsConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// DocumentsVersionsListOutputItemsEditors represents the documents versions list output items editors type. +type DocumentsVersionsListOutputItemsEditors struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *DocumentsVersionsListOutputItemsEditorsOrganizationActor `json:"organization_actor,omitempty"` + Consumer *DocumentsVersionsListOutputItemsEditorsConsumer `json:"consumer,omitempty"` +} + +// DocumentsVersionsListOutputItems represents the documents versions list output items type. +type DocumentsVersionsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + DocumentId string `json:"document_id"` + VersionNumber float64 `json:"version_number"` + PreviousVersionId *string `json:"previous_version_id,omitempty"` + ListEditedAt *time.Time `json:"list_edited_at,omitempty"` + Content string `json:"content"` + Editors []DocumentsVersionsListOutputItemsEditors `json:"editors"` + CreatedAt time.Time `json:"created_at"` +} + +// DocumentsVersionsListOutputPagination represents the documents versions list output pagination type. +type DocumentsVersionsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// DocumentsVersionsListOutput represents the documents versions list output type. +type DocumentsVersionsListOutput struct { + Items []DocumentsVersionsListOutputItems `json:"items"` + Pagination DocumentsVersionsListOutputPagination `json:"pagination"` +} + +// MapDocumentsVersionsListOutputFromJSON deserializes JSON data into a DocumentsVersionsListOutput. +func MapDocumentsVersionsListOutputFromJSON(data []byte) (*DocumentsVersionsListOutput, error) { + var v DocumentsVersionsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsVersionsListOutputToJSON serializes a DocumentsVersionsListOutput to JSON. +func MapDocumentsVersionsListOutputToJSON(v *DocumentsVersionsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// DocumentsVersionsListQueryCreatedAt - Filter Filter by creation time by date range +type DocumentsVersionsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for Filter by creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// DocumentsVersionsListQueryLastEditedAt - Filter Filter by last edit time by date range +type DocumentsVersionsListQueryLastEditedAt struct { + // Gt - Only include records after this timestamp for Filter by last edit time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by last edit time + Lt *time.Time `json:"lt,omitempty"` +} + +// DocumentsVersionsListQuery represents the documents versions list query type. +type DocumentsVersionsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by document version ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *DocumentsVersionsListQueryCreatedAt `json:"created_at,omitempty"` + // LastEditedAt - Filter Filter by last edit time by date range + LastEditedAt *DocumentsVersionsListQueryLastEditedAt `json:"last_edited_at,omitempty"` +} + +// MapDocumentsVersionsListQueryFromJSON deserializes JSON data into a DocumentsVersionsListQuery. +func MapDocumentsVersionsListQueryFromJSON(data []byte) (*DocumentsVersionsListQuery, error) { + var v DocumentsVersionsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapDocumentsVersionsListQueryToJSON serializes a DocumentsVersionsListQuery to JSON. +func MapDocumentsVersionsListQueryToJSON(v *DocumentsVersionsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/filelinks/create.go b/v1/resources/filelinks/create.go deleted file mode 100644 index cfeb041..0000000 --- a/v1/resources/filelinks/create.go +++ /dev/null @@ -1,56 +0,0 @@ -package filelinks - -import ( - "encoding/json" - "time" -) - -// FileLinksCreateOutput represents the file links create output type. -type FileLinksCreateOutput struct { - // Object - String representing the object's type - Object string `json:"object"` - // Id - The links's unique identifier - Id string `json:"id"` - // FileId - The file's unique identifier - FileId string `json:"file_id"` - // Url - The file's public URL - Url string `json:"url"` - // CreatedAt - The links's creation date - CreatedAt time.Time `json:"created_at"` - // ExpiresAt - The file's expiration date - ExpiresAt *time.Time `json:"expires_at,omitempty"` -} - -// MapFileLinksCreateOutputFromJSON deserializes JSON data into a FileLinksCreateOutput. -func MapFileLinksCreateOutputFromJSON(data []byte) (*FileLinksCreateOutput, error) { - var v FileLinksCreateOutput - if err := json.Unmarshal(data, &v); err != nil { - return nil, err - } - return &v, nil -} - -// MapFileLinksCreateOutputToJSON serializes a FileLinksCreateOutput to JSON. -func MapFileLinksCreateOutputToJSON(v *FileLinksCreateOutput) ([]byte, error) { - return json.Marshal(v) -} - -// FileLinksCreateBody represents the file links create body type. -type FileLinksCreateBody struct { - FileId string `json:"file_id"` - ExpiresAt *time.Time `json:"expires_at,omitempty"` -} - -// MapFileLinksCreateBodyFromJSON deserializes JSON data into a FileLinksCreateBody. -func MapFileLinksCreateBodyFromJSON(data []byte) (*FileLinksCreateBody, error) { - var v FileLinksCreateBody - if err := json.Unmarshal(data, &v); err != nil { - return nil, err - } - return &v, nil -} - -// MapFileLinksCreateBodyToJSON serializes a FileLinksCreateBody to JSON. -func MapFileLinksCreateBodyToJSON(v *FileLinksCreateBody) ([]byte, error) { - return json.Marshal(v) -} diff --git a/v1/resources/filelinks/list.go b/v1/resources/filelinks/list.go deleted file mode 100644 index 2831edb..0000000 --- a/v1/resources/filelinks/list.go +++ /dev/null @@ -1,73 +0,0 @@ -package filelinks - -import ( - "encoding/json" - "time" -) - -// FileLinksListOutputItems represents the file links list output items type. -type FileLinksListOutputItems struct { - // Object - String representing the object's type - Object string `json:"object"` - // Id - The links's unique identifier - Id string `json:"id"` - // FileId - The file's unique identifier - FileId string `json:"file_id"` - // Url - The file's public URL - Url string `json:"url"` - // CreatedAt - The links's creation date - CreatedAt time.Time `json:"created_at"` - // ExpiresAt - The file's expiration date - ExpiresAt *time.Time `json:"expires_at,omitempty"` -} - -// FileLinksListOutputPagination represents the file links list output pagination type. -type FileLinksListOutputPagination struct { - HasMoreBefore bool `json:"has_more_before"` - HasMoreAfter bool `json:"has_more_after"` -} - -// FileLinksListOutput represents the file links list output type. -type FileLinksListOutput struct { - Items []FileLinksListOutputItems `json:"items"` - Pagination FileLinksListOutputPagination `json:"pagination"` -} - -// MapFileLinksListOutputFromJSON deserializes JSON data into a FileLinksListOutput. -func MapFileLinksListOutputFromJSON(data []byte) (*FileLinksListOutput, error) { - var v FileLinksListOutput - if err := json.Unmarshal(data, &v); err != nil { - return nil, err - } - return &v, nil -} - -// MapFileLinksListOutputToJSON serializes a FileLinksListOutput to JSON. -func MapFileLinksListOutputToJSON(v *FileLinksListOutput) ([]byte, error) { - return json.Marshal(v) -} - -// FileLinksListQuery represents the file links list query type. -type FileLinksListQuery struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - // FileId - Filter by file ID - FileId *string `json:"file_id,omitempty"` -} - -// MapFileLinksListQueryFromJSON deserializes JSON data into a FileLinksListQuery. -func MapFileLinksListQueryFromJSON(data []byte) (*FileLinksListQuery, error) { - var v FileLinksListQuery - if err := json.Unmarshal(data, &v); err != nil { - return nil, err - } - return &v, nil -} - -// MapFileLinksListQueryToJSON serializes a FileLinksListQuery to JSON. -func MapFileLinksListQueryToJSON(v *FileLinksListQuery) ([]byte, error) { - return json.Marshal(v) -} diff --git a/v1/resources/files/delete.go b/v1/resources/files/delete.go index eb69d7e..64d24ba 100644 --- a/v1/resources/files/delete.go +++ b/v1/resources/files/delete.go @@ -5,12 +5,64 @@ import ( "time" ) -// FilesDeleteOutputPurpose represents the files delete output purpose type. -type FilesDeleteOutputPurpose struct { - // Name - The file's purpose name +// FilesDeleteOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type FilesDeleteOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesDeleteOutputCreatedByOrganizationActor represents the files delete output created by organization actor type. +type FilesDeleteOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name Name string `json:"name"` - // Identifier - The file's purpose identifier - Identifier string `json:"identifier"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []FilesDeleteOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesDeleteOutputCreatedByConsumer represents the files delete output created by consumer type. +type FilesDeleteOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesDeleteOutputCreatedBy represents the files delete output created by type. +type FilesDeleteOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *FilesDeleteOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *FilesDeleteOutputCreatedByConsumer `json:"consumer,omitempty"` } // FilesDeleteOutput represents the files delete output type. @@ -28,8 +80,10 @@ type FilesDeleteOutput struct { // FileType - The file's MIME type FileType string `json:"file_type"` // Title - The file's title - Title *string `json:"title,omitempty"` - Purpose FilesDeleteOutputPurpose `json:"purpose"` + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *FilesDeleteOutputCreatedBy `json:"created_by,omitempty"` // CreatedAt - The files's creation date CreatedAt time.Time `json:"created_at"` // UpdatedAt - The files's last update date diff --git a/v1/resources/files/get.go b/v1/resources/files/get.go index 01e9f2f..10b0d99 100644 --- a/v1/resources/files/get.go +++ b/v1/resources/files/get.go @@ -5,12 +5,64 @@ import ( "time" ) -// FilesGetOutputPurpose represents the files get output purpose type. -type FilesGetOutputPurpose struct { - // Name - The file's purpose name +// FilesGetOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type FilesGetOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesGetOutputCreatedByOrganizationActor represents the files get output created by organization actor type. +type FilesGetOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name Name string `json:"name"` - // Identifier - The file's purpose identifier - Identifier string `json:"identifier"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []FilesGetOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesGetOutputCreatedByConsumer represents the files get output created by consumer type. +type FilesGetOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesGetOutputCreatedBy represents the files get output created by type. +type FilesGetOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *FilesGetOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *FilesGetOutputCreatedByConsumer `json:"consumer,omitempty"` } // FilesGetOutput represents the files get output type. @@ -28,8 +80,10 @@ type FilesGetOutput struct { // FileType - The file's MIME type FileType string `json:"file_type"` // Title - The file's title - Title *string `json:"title,omitempty"` - Purpose FilesGetOutputPurpose `json:"purpose"` + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *FilesGetOutputCreatedBy `json:"created_by,omitempty"` // CreatedAt - The files's creation date CreatedAt time.Time `json:"created_at"` // UpdatedAt - The files's last update date diff --git a/v1/resources/files/links/create.go b/v1/resources/files/links/create.go new file mode 100644 index 0000000..fc817df --- /dev/null +++ b/v1/resources/files/links/create.go @@ -0,0 +1,56 @@ +package links + +import ( + "encoding/json" + "time" +) + +// FilesLinksCreateOutput represents the files links create output type. +type FilesLinksCreateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The links's unique identifier + Id string `json:"id"` + // FileId - The file's unique identifier + FileId string `json:"file_id"` + // Url - The file's public URL + Url string `json:"url"` + // CreatedAt - The links's creation date + CreatedAt time.Time `json:"created_at"` + // ExpiresAt - The file's expiration date + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// MapFilesLinksCreateOutputFromJSON deserializes JSON data into a FilesLinksCreateOutput. +func MapFilesLinksCreateOutputFromJSON(data []byte) (*FilesLinksCreateOutput, error) { + var v FilesLinksCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapFilesLinksCreateOutputToJSON serializes a FilesLinksCreateOutput to JSON. +func MapFilesLinksCreateOutputToJSON(v *FilesLinksCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// FilesLinksCreateBody represents the files links create body type. +type FilesLinksCreateBody struct { + FileId string `json:"file_id"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// MapFilesLinksCreateBodyFromJSON deserializes JSON data into a FilesLinksCreateBody. +func MapFilesLinksCreateBodyFromJSON(data []byte) (*FilesLinksCreateBody, error) { + var v FilesLinksCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapFilesLinksCreateBodyToJSON serializes a FilesLinksCreateBody to JSON. +func MapFilesLinksCreateBodyToJSON(v *FilesLinksCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/filelinks/delete.go b/v1/resources/files/links/delete.go similarity index 55% rename from v1/resources/filelinks/delete.go rename to v1/resources/files/links/delete.go index e9501b2..71a1977 100644 --- a/v1/resources/filelinks/delete.go +++ b/v1/resources/files/links/delete.go @@ -1,12 +1,12 @@ -package filelinks +package links import ( "encoding/json" "time" ) -// FileLinksDeleteOutput represents the file links delete output type. -type FileLinksDeleteOutput struct { +// FilesLinksDeleteOutput represents the files links delete output type. +type FilesLinksDeleteOutput struct { // Object - String representing the object's type Object string `json:"object"` // Id - The links's unique identifier @@ -21,16 +21,16 @@ type FileLinksDeleteOutput struct { ExpiresAt *time.Time `json:"expires_at,omitempty"` } -// MapFileLinksDeleteOutputFromJSON deserializes JSON data into a FileLinksDeleteOutput. -func MapFileLinksDeleteOutputFromJSON(data []byte) (*FileLinksDeleteOutput, error) { - var v FileLinksDeleteOutput +// MapFilesLinksDeleteOutputFromJSON deserializes JSON data into a FilesLinksDeleteOutput. +func MapFilesLinksDeleteOutputFromJSON(data []byte) (*FilesLinksDeleteOutput, error) { + var v FilesLinksDeleteOutput if err := json.Unmarshal(data, &v); err != nil { return nil, err } return &v, nil } -// MapFileLinksDeleteOutputToJSON serializes a FileLinksDeleteOutput to JSON. -func MapFileLinksDeleteOutputToJSON(v *FileLinksDeleteOutput) ([]byte, error) { +// MapFilesLinksDeleteOutputToJSON serializes a FilesLinksDeleteOutput to JSON. +func MapFilesLinksDeleteOutputToJSON(v *FilesLinksDeleteOutput) ([]byte, error) { return json.Marshal(v) } diff --git a/v1/resources/filelinks/get.go b/v1/resources/files/links/get.go similarity index 57% rename from v1/resources/filelinks/get.go rename to v1/resources/files/links/get.go index dc3314c..d470757 100644 --- a/v1/resources/filelinks/get.go +++ b/v1/resources/files/links/get.go @@ -1,12 +1,12 @@ -package filelinks +package links import ( "encoding/json" "time" ) -// FileLinksGetOutput represents the file links get output type. -type FileLinksGetOutput struct { +// FilesLinksGetOutput represents the files links get output type. +type FilesLinksGetOutput struct { // Object - String representing the object's type Object string `json:"object"` // Id - The links's unique identifier @@ -21,16 +21,16 @@ type FileLinksGetOutput struct { ExpiresAt *time.Time `json:"expires_at,omitempty"` } -// MapFileLinksGetOutputFromJSON deserializes JSON data into a FileLinksGetOutput. -func MapFileLinksGetOutputFromJSON(data []byte) (*FileLinksGetOutput, error) { - var v FileLinksGetOutput +// MapFilesLinksGetOutputFromJSON deserializes JSON data into a FilesLinksGetOutput. +func MapFilesLinksGetOutputFromJSON(data []byte) (*FilesLinksGetOutput, error) { + var v FilesLinksGetOutput if err := json.Unmarshal(data, &v); err != nil { return nil, err } return &v, nil } -// MapFileLinksGetOutputToJSON serializes a FileLinksGetOutput to JSON. -func MapFileLinksGetOutputToJSON(v *FileLinksGetOutput) ([]byte, error) { +// MapFilesLinksGetOutputToJSON serializes a FilesLinksGetOutput to JSON. +func MapFilesLinksGetOutputToJSON(v *FilesLinksGetOutput) ([]byte, error) { return json.Marshal(v) } diff --git a/v1/resources/files/links/list.go b/v1/resources/files/links/list.go new file mode 100644 index 0000000..92d197c --- /dev/null +++ b/v1/resources/files/links/list.go @@ -0,0 +1,73 @@ +package links + +import ( + "encoding/json" + "time" +) + +// FilesLinksListOutputItems represents the files links list output items type. +type FilesLinksListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The links's unique identifier + Id string `json:"id"` + // FileId - The file's unique identifier + FileId string `json:"file_id"` + // Url - The file's public URL + Url string `json:"url"` + // CreatedAt - The links's creation date + CreatedAt time.Time `json:"created_at"` + // ExpiresAt - The file's expiration date + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// FilesLinksListOutputPagination represents the files links list output pagination type. +type FilesLinksListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// FilesLinksListOutput represents the files links list output type. +type FilesLinksListOutput struct { + Items []FilesLinksListOutputItems `json:"items"` + Pagination FilesLinksListOutputPagination `json:"pagination"` +} + +// MapFilesLinksListOutputFromJSON deserializes JSON data into a FilesLinksListOutput. +func MapFilesLinksListOutputFromJSON(data []byte) (*FilesLinksListOutput, error) { + var v FilesLinksListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapFilesLinksListOutputToJSON serializes a FilesLinksListOutput to JSON. +func MapFilesLinksListOutputToJSON(v *FilesLinksListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// FilesLinksListQuery represents the files links list query type. +type FilesLinksListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // FileId - Filter by file ID + FileId *string `json:"file_id,omitempty"` +} + +// MapFilesLinksListQueryFromJSON deserializes JSON data into a FilesLinksListQuery. +func MapFilesLinksListQueryFromJSON(data []byte) (*FilesLinksListQuery, error) { + var v FilesLinksListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapFilesLinksListQueryToJSON serializes a FilesLinksListQuery to JSON. +func MapFilesLinksListQueryToJSON(v *FilesLinksListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/files/list.go b/v1/resources/files/list.go index 2b68d47..30b7b75 100644 --- a/v1/resources/files/list.go +++ b/v1/resources/files/list.go @@ -5,12 +5,64 @@ import ( "time" ) -// FilesListOutputItemsPurpose represents the files list output items purpose type. -type FilesListOutputItemsPurpose struct { - // Name - The file's purpose name +// FilesListOutputItemsCreatedByOrganizationActorTeams - The teams the actor belongs to +type FilesListOutputItemsCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name Name string `json:"name"` - // Identifier - The file's purpose identifier - Identifier string `json:"identifier"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesListOutputItemsCreatedByOrganizationActor represents the files list output items created by organization actor type. +type FilesListOutputItemsCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []FilesListOutputItemsCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesListOutputItemsCreatedByConsumer represents the files list output items created by consumer type. +type FilesListOutputItemsCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// FilesListOutputItemsCreatedBy represents the files list output items created by type. +type FilesListOutputItemsCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *FilesListOutputItemsCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *FilesListOutputItemsCreatedByConsumer `json:"consumer,omitempty"` } // FilesListOutputItems represents the files list output items type. @@ -28,8 +80,10 @@ type FilesListOutputItems struct { // FileType - The file's MIME type FileType string `json:"file_type"` // Title - The file's title - Title *string `json:"title,omitempty"` - Purpose FilesListOutputItemsPurpose `json:"purpose"` + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *FilesListOutputItemsCreatedBy `json:"created_by,omitempty"` // CreatedAt - The files's creation date CreatedAt time.Time `json:"created_at"` // UpdatedAt - The files's last update date @@ -62,6 +116,22 @@ func MapFilesListOutputToJSON(v *FilesListOutput) ([]byte, error) { return json.Marshal(v) } +// FilesListQueryCreatedAt - Filter Filter by creation time by date range +type FilesListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for Filter by creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// FilesListQueryUpdatedAt - Filter Filter by update time by date range +type FilesListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for Filter by update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by update time + Lt *time.Time `json:"lt,omitempty"` +} + // FilesListQuery represents the files list query type. type FilesListQuery struct { Limit *float64 `json:"limit,omitempty"` @@ -69,8 +139,20 @@ type FilesListQuery struct { Before *string `json:"before,omitempty"` Cursor *string `json:"cursor,omitempty"` Order *string `json:"order,omitempty"` + // Id - Filter by file ID + Id *any `json:"id,omitempty"` // Purpose - Filter by file purpose - Purpose *string `json:"purpose,omitempty"` + Purpose *any `json:"purpose,omitempty"` + // StoreId - Filter by store ID + StoreId *any `json:"store_id,omitempty"` + // DocumentId - Filter by document ID + DocumentId *any `json:"document_id,omitempty"` + // FileLinkId - Filter by file link ID + FileLinkId *any `json:"file_link_id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *FilesListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *FilesListQueryUpdatedAt `json:"updated_at,omitempty"` } // MapFilesListQueryFromJSON deserializes JSON data into a FilesListQuery. diff --git a/v1/resources/integrations/create.go b/v1/resources/integrations/create.go new file mode 100644 index 0000000..b4c85e9 --- /dev/null +++ b/v1/resources/integrations/create.go @@ -0,0 +1,127 @@ +package integrations + +import ( + "encoding/json" + "time" +) + +// IntegrationsCreateOutputConfiguration represents the integrations create output configuration type. +type IntegrationsCreateOutputConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// IntegrationsCreateOutputImplementation represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsCreateOutputImplementation struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` +} + +// IntegrationsCreateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsCreateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsCreateOutputProvidersConfig represents the integrations create output providers config type. +type IntegrationsCreateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsCreateOutputProviders represents the integrations create output providers type. +type IntegrationsCreateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsCreateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsCreateOutputProvidersConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsCreateOutput represents the integrations create output type. +type IntegrationsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration IntegrationsCreateOutputConfiguration `json:"configuration"` + Implementation *IntegrationsCreateOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsCreateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsCreateOutputFromJSON deserializes JSON data into a IntegrationsCreateOutput. +func MapIntegrationsCreateOutputFromJSON(data []byte) (*IntegrationsCreateOutput, error) { + var v IntegrationsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsCreateOutputToJSON serializes a IntegrationsCreateOutput to JSON. +func MapIntegrationsCreateOutputToJSON(v *IntegrationsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsCreateBody represents the integrations create body type. +type IntegrationsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CanAttachCustomToolFilters *bool `json:"can_attach_custom_tool_filters,omitempty"` + CanAttachCustomProviderConfig *bool `json:"can_attach_custom_provider_config,omitempty"` + CanOverrideToolFilters *bool `json:"can_override_tool_filters,omitempty"` +} + +// MapIntegrationsCreateBodyFromJSON deserializes JSON data into a IntegrationsCreateBody. +func MapIntegrationsCreateBodyFromJSON(data []byte) (*IntegrationsCreateBody, error) { + var v IntegrationsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsCreateBodyToJSON serializes a IntegrationsCreateBody to JSON. +func MapIntegrationsCreateBodyToJSON(v *IntegrationsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/delete.go b/v1/resources/integrations/delete.go new file mode 100644 index 0000000..35ddf8e --- /dev/null +++ b/v1/resources/integrations/delete.go @@ -0,0 +1,103 @@ +package integrations + +import ( + "encoding/json" + "time" +) + +// IntegrationsDeleteOutputConfiguration represents the integrations delete output configuration type. +type IntegrationsDeleteOutputConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// IntegrationsDeleteOutputImplementation represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsDeleteOutputImplementation struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` +} + +// IntegrationsDeleteOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsDeleteOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsDeleteOutputProvidersConfig represents the integrations delete output providers config type. +type IntegrationsDeleteOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsDeleteOutputProviders represents the integrations delete output providers type. +type IntegrationsDeleteOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsDeleteOutputProvidersToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsDeleteOutputProvidersConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsDeleteOutput represents the integrations delete output type. +type IntegrationsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration IntegrationsDeleteOutputConfiguration `json:"configuration"` + Implementation *IntegrationsDeleteOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsDeleteOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsDeleteOutputFromJSON deserializes JSON data into a IntegrationsDeleteOutput. +func MapIntegrationsDeleteOutputFromJSON(data []byte) (*IntegrationsDeleteOutput, error) { + var v IntegrationsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsDeleteOutputToJSON serializes a IntegrationsDeleteOutput to JSON. +func MapIntegrationsDeleteOutputToJSON(v *IntegrationsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/get.go b/v1/resources/integrations/get.go new file mode 100644 index 0000000..cabb290 --- /dev/null +++ b/v1/resources/integrations/get.go @@ -0,0 +1,103 @@ +package integrations + +import ( + "encoding/json" + "time" +) + +// IntegrationsGetOutputConfiguration represents the integrations get output configuration type. +type IntegrationsGetOutputConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// IntegrationsGetOutputImplementation represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsGetOutputImplementation struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` +} + +// IntegrationsGetOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsGetOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsGetOutputProvidersConfig represents the integrations get output providers config type. +type IntegrationsGetOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsGetOutputProviders represents the integrations get output providers type. +type IntegrationsGetOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsGetOutputProvidersToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsGetOutputProvidersConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsGetOutput represents the integrations get output type. +type IntegrationsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration IntegrationsGetOutputConfiguration `json:"configuration"` + Implementation *IntegrationsGetOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsGetOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsGetOutputFromJSON deserializes JSON data into a IntegrationsGetOutput. +func MapIntegrationsGetOutputFromJSON(data []byte) (*IntegrationsGetOutput, error) { + var v IntegrationsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsGetOutputToJSON serializes a IntegrationsGetOutput to JSON. +func MapIntegrationsGetOutputToJSON(v *IntegrationsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/create.go b/v1/resources/integrations/instancegroups/create.go new file mode 100644 index 0000000..baabc04 --- /dev/null +++ b/v1/resources/integrations/instancegroups/create.go @@ -0,0 +1,98 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsCreateOutputImplementation represents the integrations instance groups create output implementation type. +type IntegrationsInstanceGroupsCreateOutputImplementation struct { + Type string `json:"type"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// IntegrationsInstanceGroupsCreateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsCreateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsCreateOutputProviders represents the integrations instance groups create output providers type. +type IntegrationsInstanceGroupsCreateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsCreateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsCreateOutput represents the integrations instance groups create output type. +type IntegrationsInstanceGroupsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Implementation *IntegrationsInstanceGroupsCreateOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstanceGroupsCreateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsCreateOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsCreateOutput. +func MapIntegrationsInstanceGroupsCreateOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsCreateOutput, error) { + var v IntegrationsInstanceGroupsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsCreateOutputToJSON serializes a IntegrationsInstanceGroupsCreateOutput to JSON. +func MapIntegrationsInstanceGroupsCreateOutputToJSON(v *IntegrationsInstanceGroupsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsCreateBodyProviders represents the integrations instance groups create body providers type. +type IntegrationsInstanceGroupsCreateBodyProviders struct { + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// IntegrationsInstanceGroupsCreateBody represents the integrations instance groups create body type. +type IntegrationsInstanceGroupsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]IntegrationsInstanceGroupsCreateBodyProviders `json:"providers,omitempty"` +} + +// MapIntegrationsInstanceGroupsCreateBodyFromJSON deserializes JSON data into a IntegrationsInstanceGroupsCreateBody. +func MapIntegrationsInstanceGroupsCreateBodyFromJSON(data []byte) (*IntegrationsInstanceGroupsCreateBody, error) { + var v IntegrationsInstanceGroupsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsCreateBodyToJSON serializes a IntegrationsInstanceGroupsCreateBody to JSON. +func MapIntegrationsInstanceGroupsCreateBodyToJSON(v *IntegrationsInstanceGroupsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/create_session.go b/v1/resources/integrations/instancegroups/create_session.go new file mode 100644 index 0000000..78abd26 --- /dev/null +++ b/v1/resources/integrations/instancegroups/create_session.go @@ -0,0 +1,179 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsCreateSessionOutputUsage represents the integrations instance groups create session output usage type. +type IntegrationsInstanceGroupsCreateSessionOutputUsage struct { + // TotalProductiveClientMessageCount - Total productive client messages + TotalProductiveClientMessageCount float64 `json:"total_productive_client_message_count"` + // TotalProductiveProviderMessageCount - Total productive provider messages + TotalProductiveProviderMessageCount float64 `json:"total_productive_provider_message_count"` +} + +// IntegrationsInstanceGroupsCreateSessionOutputProvidersUsage - Usage statistics +type IntegrationsInstanceGroupsCreateSessionOutputProvidersUsage struct { + // TotalProductiveClientMessageCount - Total productive client messages + TotalProductiveClientMessageCount float64 `json:"total_productive_client_message_count"` + // TotalProductiveProviderMessageCount - Total productive provider messages + TotalProductiveProviderMessageCount float64 `json:"total_productive_provider_message_count"` +} + +// IntegrationsInstanceGroupsCreateSessionOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsCreateSessionOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsCreateSessionOutputProvidersDeployment represents the integrations instance groups create session output providers deployment type. +type IntegrationsInstanceGroupsCreateSessionOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstanceGroupsCreateSessionOutputProvidersConfig represents the integrations instance groups create session output providers config type. +type IntegrationsInstanceGroupsCreateSessionOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstanceGroupsCreateSessionOutputProvidersAuthConfig represents the integrations instance groups create session output providers auth config type. +type IntegrationsInstanceGroupsCreateSessionOutputProvidersAuthConfig struct { + Object string `json:"object"` + Id string `json:"id"` +} + +// IntegrationsInstanceGroupsCreateSessionOutputProviders represents the integrations instance groups create session output providers type. +type IntegrationsInstanceGroupsCreateSessionOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session provider identifier + Id string `json:"id"` + // Status - Provider status + Status string `json:"status"` + // Usage - Usage statistics + Usage IntegrationsInstanceGroupsCreateSessionOutputProvidersUsage `json:"usage"` + // ToolFilter - Tool filter configuration + ToolFilter IntegrationsInstanceGroupsCreateSessionOutputProvidersToolFilter `json:"tool_filter"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // SessionId - Parent session ID + SessionId string `json:"session_id"` + // FromTemplateId - Source template ID + FromTemplateId *string `json:"from_template_id,omitempty"` + // FromTemplateProviderId - Source template provider ID + FromTemplateProviderId *string `json:"from_template_provider_id,omitempty"` + Deployment IntegrationsInstanceGroupsCreateSessionOutputProvidersDeployment `json:"deployment"` + Config IntegrationsInstanceGroupsCreateSessionOutputProvidersConfig `json:"config"` + AuthConfig *IntegrationsInstanceGroupsCreateSessionOutputProvidersAuthConfig `json:"auth_config,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstanceGroupsCreateSessionOutput represents the integrations instance groups create session output type. +type IntegrationsInstanceGroupsCreateSessionOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session identifier + Id string `json:"id"` + // Status - Session status + Status string `json:"status"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ConnectionState - Session connection state + ConnectionState string `json:"connection_state"` + // ConnectionUrl - MCP connection URL for this session + ConnectionUrl string `json:"connection_url"` + // ClientSecret - Session-scoped fine grained client secret token + ClientSecret *string `json:"client_secret,omitempty"` + Usage IntegrationsInstanceGroupsCreateSessionOutputUsage `json:"usage"` + // Providers - Session providers + Providers []IntegrationsInstanceGroupsCreateSessionOutputProviders `json:"providers"` + // FromTemplatesIds - Template IDs this session was created from + FromTemplatesIds []string `json:"from_templates_ids"` + // HasErrors - Whether the session has any errors + HasErrors bool `json:"has_errors"` + // HasWarnings - Whether the session has any warnings + HasWarnings bool `json:"has_warnings"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MapIntegrationsInstanceGroupsCreateSessionOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsCreateSessionOutput. +func MapIntegrationsInstanceGroupsCreateSessionOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsCreateSessionOutput, error) { + var v IntegrationsInstanceGroupsCreateSessionOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsCreateSessionOutputToJSON serializes a IntegrationsInstanceGroupsCreateSessionOutput to JSON. +func MapIntegrationsInstanceGroupsCreateSessionOutputToJSON(v *IntegrationsInstanceGroupsCreateSessionOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsCreateSessionBody represents the integrations instance groups create session body type. +type IntegrationsInstanceGroupsCreateSessionBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// MapIntegrationsInstanceGroupsCreateSessionBodyFromJSON deserializes JSON data into a IntegrationsInstanceGroupsCreateSessionBody. +func MapIntegrationsInstanceGroupsCreateSessionBodyFromJSON(data []byte) (*IntegrationsInstanceGroupsCreateSessionBody, error) { + var v IntegrationsInstanceGroupsCreateSessionBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsCreateSessionBodyToJSON serializes a IntegrationsInstanceGroupsCreateSessionBody to JSON. +func MapIntegrationsInstanceGroupsCreateSessionBodyToJSON(v *IntegrationsInstanceGroupsCreateSessionBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/create_session_template.go b/v1/resources/integrations/instancegroups/create_session_template.go new file mode 100644 index 0000000..bd0de9b --- /dev/null +++ b/v1/resources/integrations/instancegroups/create_session_template.go @@ -0,0 +1,146 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersDeployment represents the integrations instance groups create session template output providers deployment type. +type IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersConfig represents the integrations instance groups create session template output providers config type. +type IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersAuthConfig represents the integrations instance groups create session template output providers auth config type. +type IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersAuthConfig struct { + Object string `json:"object"` + Id string `json:"id"` +} + +// IntegrationsInstanceGroupsCreateSessionTemplateOutputProviders represents the integrations instance groups create session template output providers type. +type IntegrationsInstanceGroupsCreateSessionTemplateOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session template provider identifier + Id string `json:"id"` + // Status - Provider status + Status string `json:"status"` + // ToolFilter - Tool filter configuration + ToolFilter IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersToolFilter `json:"tool_filter"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // SessionTemplateId - Parent session template ID + SessionTemplateId string `json:"session_template_id"` + Deployment IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersDeployment `json:"deployment"` + Config IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersConfig `json:"config"` + AuthConfig *IntegrationsInstanceGroupsCreateSessionTemplateOutputProvidersAuthConfig `json:"auth_config,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstanceGroupsCreateSessionTemplateOutput represents the integrations instance groups create session template output type. +type IntegrationsInstanceGroupsCreateSessionTemplateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session template identifier + Id string `json:"id"` + // Status - Status of the session template + Status string `json:"status"` + // Name - Template name + Name string `json:"name"` + // Description - Template description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` + // Providers - Template providers + Providers []IntegrationsInstanceGroupsCreateSessionTemplateOutputProviders `json:"providers"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MapIntegrationsInstanceGroupsCreateSessionTemplateOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsCreateSessionTemplateOutput. +func MapIntegrationsInstanceGroupsCreateSessionTemplateOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsCreateSessionTemplateOutput, error) { + var v IntegrationsInstanceGroupsCreateSessionTemplateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsCreateSessionTemplateOutputToJSON serializes a IntegrationsInstanceGroupsCreateSessionTemplateOutput to JSON. +func MapIntegrationsInstanceGroupsCreateSessionTemplateOutputToJSON(v *IntegrationsInstanceGroupsCreateSessionTemplateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsCreateSessionTemplateBody represents the integrations instance groups create session template body type. +type IntegrationsInstanceGroupsCreateSessionTemplateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// MapIntegrationsInstanceGroupsCreateSessionTemplateBodyFromJSON deserializes JSON data into a IntegrationsInstanceGroupsCreateSessionTemplateBody. +func MapIntegrationsInstanceGroupsCreateSessionTemplateBodyFromJSON(data []byte) (*IntegrationsInstanceGroupsCreateSessionTemplateBody, error) { + var v IntegrationsInstanceGroupsCreateSessionTemplateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsCreateSessionTemplateBodyToJSON serializes a IntegrationsInstanceGroupsCreateSessionTemplateBody to JSON. +func MapIntegrationsInstanceGroupsCreateSessionTemplateBodyToJSON(v *IntegrationsInstanceGroupsCreateSessionTemplateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/delete.go b/v1/resources/integrations/instancegroups/delete.go new file mode 100644 index 0000000..dc3c3bf --- /dev/null +++ b/v1/resources/integrations/instancegroups/delete.go @@ -0,0 +1,70 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsDeleteOutputImplementation represents the integrations instance groups delete output implementation type. +type IntegrationsInstanceGroupsDeleteOutputImplementation struct { + Type string `json:"type"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// IntegrationsInstanceGroupsDeleteOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsDeleteOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsDeleteOutputProviders represents the integrations instance groups delete output providers type. +type IntegrationsInstanceGroupsDeleteOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsDeleteOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsDeleteOutput represents the integrations instance groups delete output type. +type IntegrationsInstanceGroupsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Implementation *IntegrationsInstanceGroupsDeleteOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstanceGroupsDeleteOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsDeleteOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsDeleteOutput. +func MapIntegrationsInstanceGroupsDeleteOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsDeleteOutput, error) { + var v IntegrationsInstanceGroupsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsDeleteOutputToJSON serializes a IntegrationsInstanceGroupsDeleteOutput to JSON. +func MapIntegrationsInstanceGroupsDeleteOutputToJSON(v *IntegrationsInstanceGroupsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/get.go b/v1/resources/integrations/instancegroups/get.go new file mode 100644 index 0000000..1e5dccc --- /dev/null +++ b/v1/resources/integrations/instancegroups/get.go @@ -0,0 +1,70 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsGetOutputImplementation represents the integrations instance groups get output implementation type. +type IntegrationsInstanceGroupsGetOutputImplementation struct { + Type string `json:"type"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// IntegrationsInstanceGroupsGetOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsGetOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsGetOutputProviders represents the integrations instance groups get output providers type. +type IntegrationsInstanceGroupsGetOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsGetOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsGetOutput represents the integrations instance groups get output type. +type IntegrationsInstanceGroupsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Implementation *IntegrationsInstanceGroupsGetOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstanceGroupsGetOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsGetOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsGetOutput. +func MapIntegrationsInstanceGroupsGetOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsGetOutput, error) { + var v IntegrationsInstanceGroupsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsGetOutputToJSON serializes a IntegrationsInstanceGroupsGetOutput to JSON. +func MapIntegrationsInstanceGroupsGetOutputToJSON(v *IntegrationsInstanceGroupsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/list.go b/v1/resources/integrations/instancegroups/list.go new file mode 100644 index 0000000..c51093e --- /dev/null +++ b/v1/resources/integrations/instancegroups/list.go @@ -0,0 +1,136 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsListOutputItemsImplementation represents the integrations instance groups list output items implementation type. +type IntegrationsInstanceGroupsListOutputItemsImplementation struct { + Type string `json:"type"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// IntegrationsInstanceGroupsListOutputItemsProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsListOutputItemsProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsListOutputItemsProviders represents the integrations instance groups list output items providers type. +type IntegrationsInstanceGroupsListOutputItemsProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsListOutputItemsProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsListOutputItems represents the integrations instance groups list output items type. +type IntegrationsInstanceGroupsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Implementation *IntegrationsInstanceGroupsListOutputItemsImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstanceGroupsListOutputItemsProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsListOutputPagination represents the integrations instance groups list output pagination type. +type IntegrationsInstanceGroupsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsInstanceGroupsListOutput represents the integrations instance groups list output type. +type IntegrationsInstanceGroupsListOutput struct { + Items []IntegrationsInstanceGroupsListOutputItems `json:"items"` + Pagination IntegrationsInstanceGroupsListOutputPagination `json:"pagination"` +} + +// MapIntegrationsInstanceGroupsListOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsListOutput. +func MapIntegrationsInstanceGroupsListOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsListOutput, error) { + var v IntegrationsInstanceGroupsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsListOutputToJSON serializes a IntegrationsInstanceGroupsListOutput to JSON. +func MapIntegrationsInstanceGroupsListOutputToJSON(v *IntegrationsInstanceGroupsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsListQueryCreatedAt - Filter integration instance group creation time by date range +type IntegrationsInstanceGroupsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration instance group creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance group creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstanceGroupsListQueryUpdatedAt - Filter integration instance group last update time by date range +type IntegrationsInstanceGroupsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration instance group last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance group last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstanceGroupsListQuery represents the integrations instance groups list query type. +type IntegrationsInstanceGroupsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance group creation time by date range + CreatedAt *IntegrationsInstanceGroupsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance group last update time by date range + UpdatedAt *IntegrationsInstanceGroupsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsListQueryFromJSON deserializes JSON data into a IntegrationsInstanceGroupsListQuery. +func MapIntegrationsInstanceGroupsListQueryFromJSON(data []byte) (*IntegrationsInstanceGroupsListQuery, error) { + var v IntegrationsInstanceGroupsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsListQueryToJSON serializes a IntegrationsInstanceGroupsListQuery to JSON. +func MapIntegrationsInstanceGroupsListQueryToJSON(v *IntegrationsInstanceGroupsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/providers/delete.go b/v1/resources/integrations/instancegroups/providers/delete.go new file mode 100644 index 0000000..40816cc --- /dev/null +++ b/v1/resources/integrations/instancegroups/providers/delete.go @@ -0,0 +1,49 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsProvidersDeleteOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsProvidersDeleteOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersDeleteOutput represents the integrations instance groups providers delete output type. +type IntegrationsInstanceGroupsProvidersDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsProvidersDeleteOutputToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsProvidersDeleteOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsProvidersDeleteOutput. +func MapIntegrationsInstanceGroupsProvidersDeleteOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsProvidersDeleteOutput, error) { + var v IntegrationsInstanceGroupsProvidersDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsProvidersDeleteOutputToJSON serializes a IntegrationsInstanceGroupsProvidersDeleteOutput to JSON. +func MapIntegrationsInstanceGroupsProvidersDeleteOutputToJSON(v *IntegrationsInstanceGroupsProvidersDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/providers/get.go b/v1/resources/integrations/instancegroups/providers/get.go new file mode 100644 index 0000000..348f11f --- /dev/null +++ b/v1/resources/integrations/instancegroups/providers/get.go @@ -0,0 +1,49 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsProvidersGetOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsProvidersGetOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersGetOutput represents the integrations instance groups providers get output type. +type IntegrationsInstanceGroupsProvidersGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsProvidersGetOutputToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsProvidersGetOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsProvidersGetOutput. +func MapIntegrationsInstanceGroupsProvidersGetOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsProvidersGetOutput, error) { + var v IntegrationsInstanceGroupsProvidersGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsProvidersGetOutputToJSON serializes a IntegrationsInstanceGroupsProvidersGetOutput to JSON. +func MapIntegrationsInstanceGroupsProvidersGetOutputToJSON(v *IntegrationsInstanceGroupsProvidersGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/providers/list.go b/v1/resources/integrations/instancegroups/providers/list.go new file mode 100644 index 0000000..d769165 --- /dev/null +++ b/v1/resources/integrations/instancegroups/providers/list.go @@ -0,0 +1,116 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsProvidersListOutputItemsToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsProvidersListOutputItemsToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersListOutputItems represents the integrations instance groups providers list output items type. +type IntegrationsInstanceGroupsProvidersListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsProvidersListOutputItemsToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersListOutputPagination represents the integrations instance groups providers list output pagination type. +type IntegrationsInstanceGroupsProvidersListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsInstanceGroupsProvidersListOutput represents the integrations instance groups providers list output type. +type IntegrationsInstanceGroupsProvidersListOutput struct { + Items []IntegrationsInstanceGroupsProvidersListOutputItems `json:"items"` + Pagination IntegrationsInstanceGroupsProvidersListOutputPagination `json:"pagination"` +} + +// MapIntegrationsInstanceGroupsProvidersListOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsProvidersListOutput. +func MapIntegrationsInstanceGroupsProvidersListOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsProvidersListOutput, error) { + var v IntegrationsInstanceGroupsProvidersListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsProvidersListOutputToJSON serializes a IntegrationsInstanceGroupsProvidersListOutput to JSON. +func MapIntegrationsInstanceGroupsProvidersListOutputToJSON(v *IntegrationsInstanceGroupsProvidersListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsProvidersListQueryCreatedAt - Filter integration instance group provider creation time by date range +type IntegrationsInstanceGroupsProvidersListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration instance group provider creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance group provider creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersListQueryUpdatedAt - Filter integration instance group provider last update time by date range +type IntegrationsInstanceGroupsProvidersListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration instance group provider last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance group provider last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersListQuery represents the integrations instance groups providers list query type. +type IntegrationsInstanceGroupsProvidersListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationInstanceGroupId *any `json:"integration_instance_group_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance group provider creation time by date range + CreatedAt *IntegrationsInstanceGroupsProvidersListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance group provider last update time by date range + UpdatedAt *IntegrationsInstanceGroupsProvidersListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsProvidersListQueryFromJSON deserializes JSON data into a IntegrationsInstanceGroupsProvidersListQuery. +func MapIntegrationsInstanceGroupsProvidersListQueryFromJSON(data []byte) (*IntegrationsInstanceGroupsProvidersListQuery, error) { + var v IntegrationsInstanceGroupsProvidersListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsProvidersListQueryToJSON serializes a IntegrationsInstanceGroupsProvidersListQuery to JSON. +func MapIntegrationsInstanceGroupsProvidersListQueryToJSON(v *IntegrationsInstanceGroupsProvidersListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/providers/set.go b/v1/resources/integrations/instancegroups/providers/set.go new file mode 100644 index 0000000..b59e60e --- /dev/null +++ b/v1/resources/integrations/instancegroups/providers/set.go @@ -0,0 +1,68 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsProvidersSetOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsProvidersSetOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsProvidersSetOutput represents the integrations instance groups providers set output type. +type IntegrationsInstanceGroupsProvidersSetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsProvidersSetOutputToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsProvidersSetOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsProvidersSetOutput. +func MapIntegrationsInstanceGroupsProvidersSetOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsProvidersSetOutput, error) { + var v IntegrationsInstanceGroupsProvidersSetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsProvidersSetOutputToJSON serializes a IntegrationsInstanceGroupsProvidersSetOutput to JSON. +func MapIntegrationsInstanceGroupsProvidersSetOutputToJSON(v *IntegrationsInstanceGroupsProvidersSetOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsProvidersSetBody represents the integrations instance groups providers set body type. +type IntegrationsInstanceGroupsProvidersSetBody struct { + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// MapIntegrationsInstanceGroupsProvidersSetBodyFromJSON deserializes JSON data into a IntegrationsInstanceGroupsProvidersSetBody. +func MapIntegrationsInstanceGroupsProvidersSetBodyFromJSON(data []byte) (*IntegrationsInstanceGroupsProvidersSetBody, error) { + var v IntegrationsInstanceGroupsProvidersSetBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsProvidersSetBodyToJSON serializes a IntegrationsInstanceGroupsProvidersSetBody to JSON. +func MapIntegrationsInstanceGroupsProvidersSetBodyToJSON(v *IntegrationsInstanceGroupsProvidersSetBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instancegroups/update.go b/v1/resources/integrations/instancegroups/update.go new file mode 100644 index 0000000..3de1b2f --- /dev/null +++ b/v1/resources/integrations/instancegroups/update.go @@ -0,0 +1,98 @@ +package instancegroups + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstanceGroupsUpdateOutputImplementation represents the integrations instance groups update output implementation type. +type IntegrationsInstanceGroupsUpdateOutputImplementation struct { + Type string `json:"type"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// IntegrationsInstanceGroupsUpdateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstanceGroupsUpdateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstanceGroupsUpdateOutputProviders represents the integrations instance groups update output providers type. +type IntegrationsInstanceGroupsUpdateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceGroupId string `json:"integration_instance_group_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + IntegrationProviderId *string `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstanceGroupsUpdateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstanceGroupsUpdateOutput represents the integrations instance groups update output type. +type IntegrationsInstanceGroupsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Implementation *IntegrationsInstanceGroupsUpdateOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstanceGroupsUpdateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstanceGroupsUpdateOutputFromJSON deserializes JSON data into a IntegrationsInstanceGroupsUpdateOutput. +func MapIntegrationsInstanceGroupsUpdateOutputFromJSON(data []byte) (*IntegrationsInstanceGroupsUpdateOutput, error) { + var v IntegrationsInstanceGroupsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsUpdateOutputToJSON serializes a IntegrationsInstanceGroupsUpdateOutput to JSON. +func MapIntegrationsInstanceGroupsUpdateOutputToJSON(v *IntegrationsInstanceGroupsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstanceGroupsUpdateBodyProviders represents the integrations instance groups update body providers type. +type IntegrationsInstanceGroupsUpdateBodyProviders struct { + IntegrationInstanceProviderId string `json:"integration_instance_provider_id"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// IntegrationsInstanceGroupsUpdateBody represents the integrations instance groups update body type. +type IntegrationsInstanceGroupsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]IntegrationsInstanceGroupsUpdateBodyProviders `json:"providers,omitempty"` +} + +// MapIntegrationsInstanceGroupsUpdateBodyFromJSON deserializes JSON data into a IntegrationsInstanceGroupsUpdateBody. +func MapIntegrationsInstanceGroupsUpdateBodyFromJSON(data []byte) (*IntegrationsInstanceGroupsUpdateBody, error) { + var v IntegrationsInstanceGroupsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstanceGroupsUpdateBodyToJSON serializes a IntegrationsInstanceGroupsUpdateBody to JSON. +func MapIntegrationsInstanceGroupsUpdateBodyToJSON(v *IntegrationsInstanceGroupsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/create.go b/v1/resources/integrations/instances/create.go new file mode 100644 index 0000000..175f70b --- /dev/null +++ b/v1/resources/integrations/instances/create.go @@ -0,0 +1,228 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesCreateOutputImplementation represents the integrations instances create output implementation type. +type IntegrationsInstancesCreateOutputImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsInstancesCreateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesCreateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesCreateOutputProvidersProvider represents the integrations instances create output providers provider type. +type IntegrationsInstancesCreateOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateOutputProvidersIntegrationProviderProviderVersion represents the integrations instances create output providers integration provider provider version type. +type IntegrationsInstancesCreateOutputProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesCreateOutputProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesCreateOutputProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesCreateOutputProvidersIntegrationProviderConfig represents the integrations instances create output providers integration provider config type. +type IntegrationsInstancesCreateOutputProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateOutputProvidersIntegrationProvider represents the integrations instances create output providers integration provider type. +type IntegrationsInstancesCreateOutputProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesCreateOutputProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesCreateOutputProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesCreateOutputProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesCreateOutputProvidersConfig represents the integrations instances create output providers config type. +type IntegrationsInstancesCreateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateOutputProvidersAuthConfig represents the integrations instances create output providers auth config type. +type IntegrationsInstancesCreateOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateOutputProviders represents the integrations instances create output providers type. +type IntegrationsInstancesCreateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesCreateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesCreateOutputProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesCreateOutputProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesCreateOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesCreateOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesCreateOutput represents the integrations instances create output type. +type IntegrationsInstancesCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsInstancesCreateOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstancesCreateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstancesCreateOutputFromJSON deserializes JSON data into a IntegrationsInstancesCreateOutput. +func MapIntegrationsInstancesCreateOutputFromJSON(data []byte) (*IntegrationsInstancesCreateOutput, error) { + var v IntegrationsInstancesCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesCreateOutputToJSON serializes a IntegrationsInstancesCreateOutput to JSON. +func MapIntegrationsInstancesCreateOutputToJSON(v *IntegrationsInstancesCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesCreateBodyProviders represents the integrations instances create body providers type. +type IntegrationsInstancesCreateBodyProviders struct { + ProviderId string `json:"provider_id"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` + IsOverrideToolFilter *bool `json:"is_override_tool_filter,omitempty"` +} + +// IntegrationsInstancesCreateBody represents the integrations instances create body type. +type IntegrationsInstancesCreateBody struct { + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Providers *[]IntegrationsInstancesCreateBodyProviders `json:"providers,omitempty"` +} + +// MapIntegrationsInstancesCreateBodyFromJSON deserializes JSON data into a IntegrationsInstancesCreateBody. +func MapIntegrationsInstancesCreateBodyFromJSON(data []byte) (*IntegrationsInstancesCreateBody, error) { + var v IntegrationsInstancesCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesCreateBodyToJSON serializes a IntegrationsInstancesCreateBody to JSON. +func MapIntegrationsInstancesCreateBodyToJSON(v *IntegrationsInstancesCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/create_session.go b/v1/resources/integrations/instances/create_session.go new file mode 100644 index 0000000..8dbcc66 --- /dev/null +++ b/v1/resources/integrations/instances/create_session.go @@ -0,0 +1,179 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesCreateSessionOutputUsage represents the integrations instances create session output usage type. +type IntegrationsInstancesCreateSessionOutputUsage struct { + // TotalProductiveClientMessageCount - Total productive client messages + TotalProductiveClientMessageCount float64 `json:"total_productive_client_message_count"` + // TotalProductiveProviderMessageCount - Total productive provider messages + TotalProductiveProviderMessageCount float64 `json:"total_productive_provider_message_count"` +} + +// IntegrationsInstancesCreateSessionOutputProvidersUsage - Usage statistics +type IntegrationsInstancesCreateSessionOutputProvidersUsage struct { + // TotalProductiveClientMessageCount - Total productive client messages + TotalProductiveClientMessageCount float64 `json:"total_productive_client_message_count"` + // TotalProductiveProviderMessageCount - Total productive provider messages + TotalProductiveProviderMessageCount float64 `json:"total_productive_provider_message_count"` +} + +// IntegrationsInstancesCreateSessionOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesCreateSessionOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesCreateSessionOutputProvidersDeployment represents the integrations instances create session output providers deployment type. +type IntegrationsInstancesCreateSessionOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateSessionOutputProvidersConfig represents the integrations instances create session output providers config type. +type IntegrationsInstancesCreateSessionOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateSessionOutputProvidersAuthConfig represents the integrations instances create session output providers auth config type. +type IntegrationsInstancesCreateSessionOutputProvidersAuthConfig struct { + Object string `json:"object"` + Id string `json:"id"` +} + +// IntegrationsInstancesCreateSessionOutputProviders represents the integrations instances create session output providers type. +type IntegrationsInstancesCreateSessionOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session provider identifier + Id string `json:"id"` + // Status - Provider status + Status string `json:"status"` + // Usage - Usage statistics + Usage IntegrationsInstancesCreateSessionOutputProvidersUsage `json:"usage"` + // ToolFilter - Tool filter configuration + ToolFilter IntegrationsInstancesCreateSessionOutputProvidersToolFilter `json:"tool_filter"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // SessionId - Parent session ID + SessionId string `json:"session_id"` + // FromTemplateId - Source template ID + FromTemplateId *string `json:"from_template_id,omitempty"` + // FromTemplateProviderId - Source template provider ID + FromTemplateProviderId *string `json:"from_template_provider_id,omitempty"` + Deployment IntegrationsInstancesCreateSessionOutputProvidersDeployment `json:"deployment"` + Config IntegrationsInstancesCreateSessionOutputProvidersConfig `json:"config"` + AuthConfig *IntegrationsInstancesCreateSessionOutputProvidersAuthConfig `json:"auth_config,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateSessionOutput represents the integrations instances create session output type. +type IntegrationsInstancesCreateSessionOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session identifier + Id string `json:"id"` + // Status - Session status + Status string `json:"status"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ConnectionState - Session connection state + ConnectionState string `json:"connection_state"` + // ConnectionUrl - MCP connection URL for this session + ConnectionUrl string `json:"connection_url"` + // ClientSecret - Session-scoped fine grained client secret token + ClientSecret *string `json:"client_secret,omitempty"` + Usage IntegrationsInstancesCreateSessionOutputUsage `json:"usage"` + // Providers - Session providers + Providers []IntegrationsInstancesCreateSessionOutputProviders `json:"providers"` + // FromTemplatesIds - Template IDs this session was created from + FromTemplatesIds []string `json:"from_templates_ids"` + // HasErrors - Whether the session has any errors + HasErrors bool `json:"has_errors"` + // HasWarnings - Whether the session has any warnings + HasWarnings bool `json:"has_warnings"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MapIntegrationsInstancesCreateSessionOutputFromJSON deserializes JSON data into a IntegrationsInstancesCreateSessionOutput. +func MapIntegrationsInstancesCreateSessionOutputFromJSON(data []byte) (*IntegrationsInstancesCreateSessionOutput, error) { + var v IntegrationsInstancesCreateSessionOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesCreateSessionOutputToJSON serializes a IntegrationsInstancesCreateSessionOutput to JSON. +func MapIntegrationsInstancesCreateSessionOutputToJSON(v *IntegrationsInstancesCreateSessionOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesCreateSessionBody represents the integrations instances create session body type. +type IntegrationsInstancesCreateSessionBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// MapIntegrationsInstancesCreateSessionBodyFromJSON deserializes JSON data into a IntegrationsInstancesCreateSessionBody. +func MapIntegrationsInstancesCreateSessionBodyFromJSON(data []byte) (*IntegrationsInstancesCreateSessionBody, error) { + var v IntegrationsInstancesCreateSessionBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesCreateSessionBodyToJSON serializes a IntegrationsInstancesCreateSessionBody to JSON. +func MapIntegrationsInstancesCreateSessionBodyToJSON(v *IntegrationsInstancesCreateSessionBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/create_session_template.go b/v1/resources/integrations/instances/create_session_template.go new file mode 100644 index 0000000..b4a44f8 --- /dev/null +++ b/v1/resources/integrations/instances/create_session_template.go @@ -0,0 +1,146 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesCreateSessionTemplateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesCreateSessionTemplateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesCreateSessionTemplateOutputProvidersDeployment represents the integrations instances create session template output providers deployment type. +type IntegrationsInstancesCreateSessionTemplateOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateSessionTemplateOutputProvidersConfig represents the integrations instances create session template output providers config type. +type IntegrationsInstancesCreateSessionTemplateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateSessionTemplateOutputProvidersAuthConfig represents the integrations instances create session template output providers auth config type. +type IntegrationsInstancesCreateSessionTemplateOutputProvidersAuthConfig struct { + Object string `json:"object"` + Id string `json:"id"` +} + +// IntegrationsInstancesCreateSessionTemplateOutputProviders represents the integrations instances create session template output providers type. +type IntegrationsInstancesCreateSessionTemplateOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session template provider identifier + Id string `json:"id"` + // Status - Provider status + Status string `json:"status"` + // ToolFilter - Tool filter configuration + ToolFilter IntegrationsInstancesCreateSessionTemplateOutputProvidersToolFilter `json:"tool_filter"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // SessionTemplateId - Parent session template ID + SessionTemplateId string `json:"session_template_id"` + Deployment IntegrationsInstancesCreateSessionTemplateOutputProvidersDeployment `json:"deployment"` + Config IntegrationsInstancesCreateSessionTemplateOutputProvidersConfig `json:"config"` + AuthConfig *IntegrationsInstancesCreateSessionTemplateOutputProvidersAuthConfig `json:"auth_config,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesCreateSessionTemplateOutput represents the integrations instances create session template output type. +type IntegrationsInstancesCreateSessionTemplateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session template identifier + Id string `json:"id"` + // Status - Status of the session template + Status string `json:"status"` + // Name - Template name + Name string `json:"name"` + // Description - Template description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` + // Providers - Template providers + Providers []IntegrationsInstancesCreateSessionTemplateOutputProviders `json:"providers"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MapIntegrationsInstancesCreateSessionTemplateOutputFromJSON deserializes JSON data into a IntegrationsInstancesCreateSessionTemplateOutput. +func MapIntegrationsInstancesCreateSessionTemplateOutputFromJSON(data []byte) (*IntegrationsInstancesCreateSessionTemplateOutput, error) { + var v IntegrationsInstancesCreateSessionTemplateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesCreateSessionTemplateOutputToJSON serializes a IntegrationsInstancesCreateSessionTemplateOutput to JSON. +func MapIntegrationsInstancesCreateSessionTemplateOutputToJSON(v *IntegrationsInstancesCreateSessionTemplateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesCreateSessionTemplateBody represents the integrations instances create session template body type. +type IntegrationsInstancesCreateSessionTemplateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// MapIntegrationsInstancesCreateSessionTemplateBodyFromJSON deserializes JSON data into a IntegrationsInstancesCreateSessionTemplateBody. +func MapIntegrationsInstancesCreateSessionTemplateBodyFromJSON(data []byte) (*IntegrationsInstancesCreateSessionTemplateBody, error) { + var v IntegrationsInstancesCreateSessionTemplateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesCreateSessionTemplateBodyToJSON serializes a IntegrationsInstancesCreateSessionTemplateBody to JSON. +func MapIntegrationsInstancesCreateSessionTemplateBodyToJSON(v *IntegrationsInstancesCreateSessionTemplateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/delete.go b/v1/resources/integrations/instances/delete.go new file mode 100644 index 0000000..3e41454 --- /dev/null +++ b/v1/resources/integrations/instances/delete.go @@ -0,0 +1,194 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesDeleteOutputImplementation represents the integrations instances delete output implementation type. +type IntegrationsInstancesDeleteOutputImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsInstancesDeleteOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesDeleteOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesDeleteOutputProvidersProvider represents the integrations instances delete output providers provider type. +type IntegrationsInstancesDeleteOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesDeleteOutputProvidersIntegrationProviderProviderVersion represents the integrations instances delete output providers integration provider provider version type. +type IntegrationsInstancesDeleteOutputProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesDeleteOutputProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesDeleteOutputProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesDeleteOutputProvidersIntegrationProviderConfig represents the integrations instances delete output providers integration provider config type. +type IntegrationsInstancesDeleteOutputProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesDeleteOutputProvidersIntegrationProvider represents the integrations instances delete output providers integration provider type. +type IntegrationsInstancesDeleteOutputProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesDeleteOutputProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesDeleteOutputProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesDeleteOutputProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesDeleteOutputProvidersConfig represents the integrations instances delete output providers config type. +type IntegrationsInstancesDeleteOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesDeleteOutputProvidersAuthConfig represents the integrations instances delete output providers auth config type. +type IntegrationsInstancesDeleteOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesDeleteOutputProviders represents the integrations instances delete output providers type. +type IntegrationsInstancesDeleteOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesDeleteOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesDeleteOutputProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesDeleteOutputProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesDeleteOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesDeleteOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesDeleteOutput represents the integrations instances delete output type. +type IntegrationsInstancesDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsInstancesDeleteOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstancesDeleteOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstancesDeleteOutputFromJSON deserializes JSON data into a IntegrationsInstancesDeleteOutput. +func MapIntegrationsInstancesDeleteOutputFromJSON(data []byte) (*IntegrationsInstancesDeleteOutput, error) { + var v IntegrationsInstancesDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesDeleteOutputToJSON serializes a IntegrationsInstancesDeleteOutput to JSON. +func MapIntegrationsInstancesDeleteOutputToJSON(v *IntegrationsInstancesDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/get.go b/v1/resources/integrations/instances/get.go new file mode 100644 index 0000000..68fca46 --- /dev/null +++ b/v1/resources/integrations/instances/get.go @@ -0,0 +1,194 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesGetOutputImplementation represents the integrations instances get output implementation type. +type IntegrationsInstancesGetOutputImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsInstancesGetOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesGetOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesGetOutputProvidersProvider represents the integrations instances get output providers provider type. +type IntegrationsInstancesGetOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesGetOutputProvidersIntegrationProviderProviderVersion represents the integrations instances get output providers integration provider provider version type. +type IntegrationsInstancesGetOutputProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesGetOutputProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesGetOutputProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesGetOutputProvidersIntegrationProviderConfig represents the integrations instances get output providers integration provider config type. +type IntegrationsInstancesGetOutputProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesGetOutputProvidersIntegrationProvider represents the integrations instances get output providers integration provider type. +type IntegrationsInstancesGetOutputProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesGetOutputProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesGetOutputProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesGetOutputProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesGetOutputProvidersConfig represents the integrations instances get output providers config type. +type IntegrationsInstancesGetOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesGetOutputProvidersAuthConfig represents the integrations instances get output providers auth config type. +type IntegrationsInstancesGetOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesGetOutputProviders represents the integrations instances get output providers type. +type IntegrationsInstancesGetOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesGetOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesGetOutputProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesGetOutputProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesGetOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesGetOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesGetOutput represents the integrations instances get output type. +type IntegrationsInstancesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsInstancesGetOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstancesGetOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstancesGetOutputFromJSON deserializes JSON data into a IntegrationsInstancesGetOutput. +func MapIntegrationsInstancesGetOutputFromJSON(data []byte) (*IntegrationsInstancesGetOutput, error) { + var v IntegrationsInstancesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesGetOutputToJSON serializes a IntegrationsInstancesGetOutput to JSON. +func MapIntegrationsInstancesGetOutputToJSON(v *IntegrationsInstancesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/list.go b/v1/resources/integrations/instances/list.go new file mode 100644 index 0000000..7914847 --- /dev/null +++ b/v1/resources/integrations/instances/list.go @@ -0,0 +1,262 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesListOutputItemsImplementation represents the integrations instances list output items implementation type. +type IntegrationsInstancesListOutputItemsImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsInstancesListOutputItemsProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesListOutputItemsProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesListOutputItemsProvidersProvider represents the integrations instances list output items providers provider type. +type IntegrationsInstancesListOutputItemsProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesListOutputItemsProvidersIntegrationProviderProviderVersion represents the integrations instances list output items providers integration provider provider version type. +type IntegrationsInstancesListOutputItemsProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesListOutputItemsProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesListOutputItemsProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesListOutputItemsProvidersIntegrationProviderConfig represents the integrations instances list output items providers integration provider config type. +type IntegrationsInstancesListOutputItemsProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesListOutputItemsProvidersIntegrationProvider represents the integrations instances list output items providers integration provider type. +type IntegrationsInstancesListOutputItemsProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesListOutputItemsProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesListOutputItemsProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesListOutputItemsProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesListOutputItemsProvidersConfig represents the integrations instances list output items providers config type. +type IntegrationsInstancesListOutputItemsProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesListOutputItemsProvidersAuthConfig represents the integrations instances list output items providers auth config type. +type IntegrationsInstancesListOutputItemsProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesListOutputItemsProviders represents the integrations instances list output items providers type. +type IntegrationsInstancesListOutputItemsProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesListOutputItemsProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesListOutputItemsProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesListOutputItemsProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesListOutputItemsProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesListOutputItemsProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesListOutputItems represents the integrations instances list output items type. +type IntegrationsInstancesListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsInstancesListOutputItemsImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstancesListOutputItemsProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesListOutputPagination represents the integrations instances list output pagination type. +type IntegrationsInstancesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsInstancesListOutput represents the integrations instances list output type. +type IntegrationsInstancesListOutput struct { + Items []IntegrationsInstancesListOutputItems `json:"items"` + Pagination IntegrationsInstancesListOutputPagination `json:"pagination"` +} + +// MapIntegrationsInstancesListOutputFromJSON deserializes JSON data into a IntegrationsInstancesListOutput. +func MapIntegrationsInstancesListOutputFromJSON(data []byte) (*IntegrationsInstancesListOutput, error) { + var v IntegrationsInstancesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesListOutputToJSON serializes a IntegrationsInstancesListOutput to JSON. +func MapIntegrationsInstancesListOutputToJSON(v *IntegrationsInstancesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesListQueryCreatedAt - Filter integration instance creation time by date range +type IntegrationsInstancesListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration instance creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstancesListQueryUpdatedAt - Filter integration instance last update time by date range +type IntegrationsInstancesListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration instance last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstancesListQuery represents the integrations instances list query type. +type IntegrationsInstancesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + IdentityId *any `json:"identity_id,omitempty"` + IdentityCredentialId *any `json:"identity_credential_id,omitempty"` + IdentityActorId *any `json:"identity_actor_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance creation time by date range + CreatedAt *IntegrationsInstancesListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance last update time by date range + UpdatedAt *IntegrationsInstancesListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsInstancesListQueryFromJSON deserializes JSON data into a IntegrationsInstancesListQuery. +func MapIntegrationsInstancesListQueryFromJSON(data []byte) (*IntegrationsInstancesListQuery, error) { + var v IntegrationsInstancesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesListQueryToJSON serializes a IntegrationsInstancesListQuery to JSON. +func MapIntegrationsInstancesListQueryToJSON(v *IntegrationsInstancesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/providers/get.go b/v1/resources/integrations/instances/providers/get.go new file mode 100644 index 0000000..b018d50 --- /dev/null +++ b/v1/resources/integrations/instances/providers/get.go @@ -0,0 +1,170 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesProvidersGetOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesProvidersGetOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesProvidersGetOutputProvider represents the integrations instances providers get output provider type. +type IntegrationsInstancesProvidersGetOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersGetOutputIntegrationProviderProviderVersion represents the integrations instances providers get output integration provider provider version type. +type IntegrationsInstancesProvidersGetOutputIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesProvidersGetOutputIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesProvidersGetOutputIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesProvidersGetOutputIntegrationProviderConfig represents the integrations instances providers get output integration provider config type. +type IntegrationsInstancesProvidersGetOutputIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersGetOutputIntegrationProvider represents the integrations instances providers get output integration provider type. +type IntegrationsInstancesProvidersGetOutputIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesProvidersGetOutputIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesProvidersGetOutputIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesProvidersGetOutputIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesProvidersGetOutputConfig represents the integrations instances providers get output config type. +type IntegrationsInstancesProvidersGetOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersGetOutputAuthConfig represents the integrations instances providers get output auth config type. +type IntegrationsInstancesProvidersGetOutputAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersGetOutput represents the integrations instances providers get output type. +type IntegrationsInstancesProvidersGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesProvidersGetOutputToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesProvidersGetOutputProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesProvidersGetOutputIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesProvidersGetOutputConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesProvidersGetOutputAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstancesProvidersGetOutputFromJSON deserializes JSON data into a IntegrationsInstancesProvidersGetOutput. +func MapIntegrationsInstancesProvidersGetOutputFromJSON(data []byte) (*IntegrationsInstancesProvidersGetOutput, error) { + var v IntegrationsInstancesProvidersGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesProvidersGetOutputToJSON serializes a IntegrationsInstancesProvidersGetOutput to JSON. +func MapIntegrationsInstancesProvidersGetOutputToJSON(v *IntegrationsInstancesProvidersGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/providers/list.go b/v1/resources/integrations/instances/providers/list.go new file mode 100644 index 0000000..207db17 --- /dev/null +++ b/v1/resources/integrations/instances/providers/list.go @@ -0,0 +1,236 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesProvidersListOutputItemsToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesProvidersListOutputItemsToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesProvidersListOutputItemsProvider represents the integrations instances providers list output items provider type. +type IntegrationsInstancesProvidersListOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersListOutputItemsIntegrationProviderProviderVersion represents the integrations instances providers list output items integration provider provider version type. +type IntegrationsInstancesProvidersListOutputItemsIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesProvidersListOutputItemsIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesProvidersListOutputItemsIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesProvidersListOutputItemsIntegrationProviderConfig represents the integrations instances providers list output items integration provider config type. +type IntegrationsInstancesProvidersListOutputItemsIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersListOutputItemsIntegrationProvider represents the integrations instances providers list output items integration provider type. +type IntegrationsInstancesProvidersListOutputItemsIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesProvidersListOutputItemsIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesProvidersListOutputItemsIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesProvidersListOutputItemsIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesProvidersListOutputItemsConfig represents the integrations instances providers list output items config type. +type IntegrationsInstancesProvidersListOutputItemsConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersListOutputItemsAuthConfig represents the integrations instances providers list output items auth config type. +type IntegrationsInstancesProvidersListOutputItemsAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersListOutputItems represents the integrations instances providers list output items type. +type IntegrationsInstancesProvidersListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesProvidersListOutputItemsToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesProvidersListOutputItemsProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesProvidersListOutputItemsIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesProvidersListOutputItemsConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesProvidersListOutputItemsAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesProvidersListOutputPagination represents the integrations instances providers list output pagination type. +type IntegrationsInstancesProvidersListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsInstancesProvidersListOutput represents the integrations instances providers list output type. +type IntegrationsInstancesProvidersListOutput struct { + Items []IntegrationsInstancesProvidersListOutputItems `json:"items"` + Pagination IntegrationsInstancesProvidersListOutputPagination `json:"pagination"` +} + +// MapIntegrationsInstancesProvidersListOutputFromJSON deserializes JSON data into a IntegrationsInstancesProvidersListOutput. +func MapIntegrationsInstancesProvidersListOutputFromJSON(data []byte) (*IntegrationsInstancesProvidersListOutput, error) { + var v IntegrationsInstancesProvidersListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesProvidersListOutputToJSON serializes a IntegrationsInstancesProvidersListOutput to JSON. +func MapIntegrationsInstancesProvidersListOutputToJSON(v *IntegrationsInstancesProvidersListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesProvidersListQueryCreatedAt - Filter integration instance provider creation time by date range +type IntegrationsInstancesProvidersListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration instance provider creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance provider creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstancesProvidersListQueryUpdatedAt - Filter integration instance provider last update time by date range +type IntegrationsInstancesProvidersListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration instance provider last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration instance provider last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsInstancesProvidersListQuery represents the integrations instances providers list query type. +type IntegrationsInstancesProvidersListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + SessionTemplateId *any `json:"session_template_id,omitempty"` + // CreatedAt - Filter integration instance provider creation time by date range + CreatedAt *IntegrationsInstancesProvidersListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration instance provider last update time by date range + UpdatedAt *IntegrationsInstancesProvidersListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsInstancesProvidersListQueryFromJSON deserializes JSON data into a IntegrationsInstancesProvidersListQuery. +func MapIntegrationsInstancesProvidersListQueryFromJSON(data []byte) (*IntegrationsInstancesProvidersListQuery, error) { + var v IntegrationsInstancesProvidersListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesProvidersListQueryToJSON serializes a IntegrationsInstancesProvidersListQuery to JSON. +func MapIntegrationsInstancesProvidersListQueryToJSON(v *IntegrationsInstancesProvidersListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/providers/set.go b/v1/resources/integrations/instances/providers/set.go new file mode 100644 index 0000000..9ec0a59 --- /dev/null +++ b/v1/resources/integrations/instances/providers/set.go @@ -0,0 +1,193 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesProvidersSetOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesProvidersSetOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesProvidersSetOutputProvider represents the integrations instances providers set output provider type. +type IntegrationsInstancesProvidersSetOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersSetOutputIntegrationProviderProviderVersion represents the integrations instances providers set output integration provider provider version type. +type IntegrationsInstancesProvidersSetOutputIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesProvidersSetOutputIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesProvidersSetOutputIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesProvidersSetOutputIntegrationProviderConfig represents the integrations instances providers set output integration provider config type. +type IntegrationsInstancesProvidersSetOutputIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersSetOutputIntegrationProvider represents the integrations instances providers set output integration provider type. +type IntegrationsInstancesProvidersSetOutputIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesProvidersSetOutputIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesProvidersSetOutputIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesProvidersSetOutputIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesProvidersSetOutputConfig represents the integrations instances providers set output config type. +type IntegrationsInstancesProvidersSetOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersSetOutputAuthConfig represents the integrations instances providers set output auth config type. +type IntegrationsInstancesProvidersSetOutputAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesProvidersSetOutput represents the integrations instances providers set output type. +type IntegrationsInstancesProvidersSetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesProvidersSetOutputToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesProvidersSetOutputProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesProvidersSetOutputIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesProvidersSetOutputConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesProvidersSetOutputAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstancesProvidersSetOutputFromJSON deserializes JSON data into a IntegrationsInstancesProvidersSetOutput. +func MapIntegrationsInstancesProvidersSetOutputFromJSON(data []byte) (*IntegrationsInstancesProvidersSetOutput, error) { + var v IntegrationsInstancesProvidersSetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesProvidersSetOutputToJSON serializes a IntegrationsInstancesProvidersSetOutput to JSON. +func MapIntegrationsInstancesProvidersSetOutputToJSON(v *IntegrationsInstancesProvidersSetOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesProvidersSetBody represents the integrations instances providers set body type. +type IntegrationsInstancesProvidersSetBody struct { + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` + IsOverrideToolFilter *bool `json:"is_override_tool_filter,omitempty"` +} + +// MapIntegrationsInstancesProvidersSetBodyFromJSON deserializes JSON data into a IntegrationsInstancesProvidersSetBody. +func MapIntegrationsInstancesProvidersSetBodyFromJSON(data []byte) (*IntegrationsInstancesProvidersSetBody, error) { + var v IntegrationsInstancesProvidersSetBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesProvidersSetBodyToJSON serializes a IntegrationsInstancesProvidersSetBody to JSON. +func MapIntegrationsInstancesProvidersSetBodyToJSON(v *IntegrationsInstancesProvidersSetBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/instances/update.go b/v1/resources/integrations/instances/update.go new file mode 100644 index 0000000..f46b555 --- /dev/null +++ b/v1/resources/integrations/instances/update.go @@ -0,0 +1,227 @@ +package instances + +import ( + "encoding/json" + "time" +) + +// IntegrationsInstancesUpdateOutputImplementation represents the integrations instances update output implementation type. +type IntegrationsInstancesUpdateOutputImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsInstancesUpdateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesUpdateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesUpdateOutputProvidersProvider represents the integrations instances update output providers provider type. +type IntegrationsInstancesUpdateOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesUpdateOutputProvidersIntegrationProviderProviderVersion represents the integrations instances update output providers integration provider provider version type. +type IntegrationsInstancesUpdateOutputProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsInstancesUpdateOutputProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsInstancesUpdateOutputProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsInstancesUpdateOutputProvidersIntegrationProviderConfig represents the integrations instances update output providers integration provider config type. +type IntegrationsInstancesUpdateOutputProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesUpdateOutputProvidersIntegrationProvider represents the integrations instances update output providers integration provider type. +type IntegrationsInstancesUpdateOutputProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsInstancesUpdateOutputProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesUpdateOutputProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsInstancesUpdateOutputProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesUpdateOutputProvidersConfig represents the integrations instances update output providers config type. +type IntegrationsInstancesUpdateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesUpdateOutputProvidersAuthConfig represents the integrations instances update output providers auth config type. +type IntegrationsInstancesUpdateOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsInstancesUpdateOutputProviders represents the integrations instances update output providers type. +type IntegrationsInstancesUpdateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsInstancesUpdateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsInstancesUpdateOutputProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsInstancesUpdateOutputProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsInstancesUpdateOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsInstancesUpdateOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsInstancesUpdateOutput represents the integrations instances update output type. +type IntegrationsInstancesUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsInstancesUpdateOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsInstancesUpdateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsInstancesUpdateOutputFromJSON deserializes JSON data into a IntegrationsInstancesUpdateOutput. +func MapIntegrationsInstancesUpdateOutputFromJSON(data []byte) (*IntegrationsInstancesUpdateOutput, error) { + var v IntegrationsInstancesUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesUpdateOutputToJSON serializes a IntegrationsInstancesUpdateOutput to JSON. +func MapIntegrationsInstancesUpdateOutputToJSON(v *IntegrationsInstancesUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsInstancesUpdateBodyProviders represents the integrations instances update body providers type. +type IntegrationsInstancesUpdateBodyProviders struct { + ProviderId string `json:"provider_id"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` + IsOverrideToolFilter *bool `json:"is_override_tool_filter,omitempty"` +} + +// IntegrationsInstancesUpdateBody represents the integrations instances update body type. +type IntegrationsInstancesUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Providers *[]IntegrationsInstancesUpdateBodyProviders `json:"providers,omitempty"` +} + +// MapIntegrationsInstancesUpdateBodyFromJSON deserializes JSON data into a IntegrationsInstancesUpdateBody. +func MapIntegrationsInstancesUpdateBodyFromJSON(data []byte) (*IntegrationsInstancesUpdateBody, error) { + var v IntegrationsInstancesUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsInstancesUpdateBodyToJSON serializes a IntegrationsInstancesUpdateBody to JSON. +func MapIntegrationsInstancesUpdateBodyToJSON(v *IntegrationsInstancesUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/list.go b/v1/resources/integrations/list.go new file mode 100644 index 0000000..44dca03 --- /dev/null +++ b/v1/resources/integrations/list.go @@ -0,0 +1,163 @@ +package integrations + +import ( + "encoding/json" + "time" +) + +// IntegrationsListOutputItemsConfiguration represents the integrations list output items configuration type. +type IntegrationsListOutputItemsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// IntegrationsListOutputItemsImplementation represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsListOutputItemsImplementation struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` +} + +// IntegrationsListOutputItemsProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsListOutputItemsProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsListOutputItemsProvidersConfig represents the integrations list output items providers config type. +type IntegrationsListOutputItemsProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsListOutputItemsProviders represents the integrations list output items providers type. +type IntegrationsListOutputItemsProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsListOutputItemsProvidersToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsListOutputItemsProvidersConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsListOutputItems represents the integrations list output items type. +type IntegrationsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration IntegrationsListOutputItemsConfiguration `json:"configuration"` + Implementation *IntegrationsListOutputItemsImplementation `json:"implementation,omitempty"` + Providers []IntegrationsListOutputItemsProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsListOutputPagination represents the integrations list output pagination type. +type IntegrationsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsListOutput represents the integrations list output type. +type IntegrationsListOutput struct { + Items []IntegrationsListOutputItems `json:"items"` + Pagination IntegrationsListOutputPagination `json:"pagination"` +} + +// MapIntegrationsListOutputFromJSON deserializes JSON data into a IntegrationsListOutput. +func MapIntegrationsListOutputFromJSON(data []byte) (*IntegrationsListOutput, error) { + var v IntegrationsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsListOutputToJSON serializes a IntegrationsListOutput to JSON. +func MapIntegrationsListOutputToJSON(v *IntegrationsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsListQueryCreatedAt - Filter integration creation time by date range +type IntegrationsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsListQueryUpdatedAt - Filter integration last update time by date range +type IntegrationsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsListQuery represents the integrations list query type. +type IntegrationsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + // CreatedAt - Filter integration creation time by date range + CreatedAt *IntegrationsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration last update time by date range + UpdatedAt *IntegrationsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsListQueryFromJSON deserializes JSON data into a IntegrationsListQuery. +func MapIntegrationsListQueryFromJSON(data []byte) (*IntegrationsListQuery, error) { + var v IntegrationsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsListQueryToJSON serializes a IntegrationsListQuery to JSON. +func MapIntegrationsListQueryToJSON(v *IntegrationsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/providers/create.go b/v1/resources/integrations/providers/create.go new file mode 100644 index 0000000..dbad193 --- /dev/null +++ b/v1/resources/integrations/providers/create.go @@ -0,0 +1,99 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsProvidersCreateOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsProvidersCreateOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsProvidersCreateOutputConfig represents the integrations providers create output config type. +type IntegrationsProvidersCreateOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsProvidersCreateOutput represents the integrations providers create output type. +type IntegrationsProvidersCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsProvidersCreateOutputToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsProvidersCreateOutputConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsProvidersCreateOutputFromJSON deserializes JSON data into a IntegrationsProvidersCreateOutput. +func MapIntegrationsProvidersCreateOutputFromJSON(data []byte) (*IntegrationsProvidersCreateOutput, error) { + var v IntegrationsProvidersCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersCreateOutputToJSON serializes a IntegrationsProvidersCreateOutput to JSON. +func MapIntegrationsProvidersCreateOutputToJSON(v *IntegrationsProvidersCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsProvidersCreateBody represents the integrations providers create body type. +type IntegrationsProvidersCreateBody struct { + IntegrationId string `json:"integration_id"` + ProviderId string `json:"provider_id"` + ProviderDeploymentId string `json:"provider_deployment_id"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// MapIntegrationsProvidersCreateBodyFromJSON deserializes JSON data into a IntegrationsProvidersCreateBody. +func MapIntegrationsProvidersCreateBodyFromJSON(data []byte) (*IntegrationsProvidersCreateBody, error) { + var v IntegrationsProvidersCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersCreateBodyToJSON serializes a IntegrationsProvidersCreateBody to JSON. +func MapIntegrationsProvidersCreateBodyToJSON(v *IntegrationsProvidersCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/providers/delete.go b/v1/resources/integrations/providers/delete.go new file mode 100644 index 0000000..e7da6d4 --- /dev/null +++ b/v1/resources/integrations/providers/delete.go @@ -0,0 +1,71 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsProvidersDeleteOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsProvidersDeleteOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsProvidersDeleteOutputConfig represents the integrations providers delete output config type. +type IntegrationsProvidersDeleteOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsProvidersDeleteOutput represents the integrations providers delete output type. +type IntegrationsProvidersDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsProvidersDeleteOutputToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsProvidersDeleteOutputConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsProvidersDeleteOutputFromJSON deserializes JSON data into a IntegrationsProvidersDeleteOutput. +func MapIntegrationsProvidersDeleteOutputFromJSON(data []byte) (*IntegrationsProvidersDeleteOutput, error) { + var v IntegrationsProvidersDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersDeleteOutputToJSON serializes a IntegrationsProvidersDeleteOutput to JSON. +func MapIntegrationsProvidersDeleteOutputToJSON(v *IntegrationsProvidersDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/providers/get.go b/v1/resources/integrations/providers/get.go new file mode 100644 index 0000000..8334c10 --- /dev/null +++ b/v1/resources/integrations/providers/get.go @@ -0,0 +1,71 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsProvidersGetOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsProvidersGetOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsProvidersGetOutputConfig represents the integrations providers get output config type. +type IntegrationsProvidersGetOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsProvidersGetOutput represents the integrations providers get output type. +type IntegrationsProvidersGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsProvidersGetOutputToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsProvidersGetOutputConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsProvidersGetOutputFromJSON deserializes JSON data into a IntegrationsProvidersGetOutput. +func MapIntegrationsProvidersGetOutputFromJSON(data []byte) (*IntegrationsProvidersGetOutput, error) { + var v IntegrationsProvidersGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersGetOutputToJSON serializes a IntegrationsProvidersGetOutput to JSON. +func MapIntegrationsProvidersGetOutputToJSON(v *IntegrationsProvidersGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/providers/list.go b/v1/resources/integrations/providers/list.go new file mode 100644 index 0000000..0e6c120 --- /dev/null +++ b/v1/resources/integrations/providers/list.go @@ -0,0 +1,135 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsProvidersListOutputItemsToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsProvidersListOutputItemsToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsProvidersListOutputItemsConfig represents the integrations providers list output items config type. +type IntegrationsProvidersListOutputItemsConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsProvidersListOutputItems represents the integrations providers list output items type. +type IntegrationsProvidersListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsProvidersListOutputItemsToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsProvidersListOutputItemsConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsProvidersListOutputPagination represents the integrations providers list output pagination type. +type IntegrationsProvidersListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsProvidersListOutput represents the integrations providers list output type. +type IntegrationsProvidersListOutput struct { + Items []IntegrationsProvidersListOutputItems `json:"items"` + Pagination IntegrationsProvidersListOutputPagination `json:"pagination"` +} + +// MapIntegrationsProvidersListOutputFromJSON deserializes JSON data into a IntegrationsProvidersListOutput. +func MapIntegrationsProvidersListOutputFromJSON(data []byte) (*IntegrationsProvidersListOutput, error) { + var v IntegrationsProvidersListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersListOutputToJSON serializes a IntegrationsProvidersListOutput to JSON. +func MapIntegrationsProvidersListOutputToJSON(v *IntegrationsProvidersListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsProvidersListQueryCreatedAt - Filter integration provider creation time by date range +type IntegrationsProvidersListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration provider creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration provider creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsProvidersListQueryUpdatedAt - Filter integration provider last update time by date range +type IntegrationsProvidersListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration provider last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration provider last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsProvidersListQuery represents the integrations providers list query type. +type IntegrationsProvidersListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *any `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *any `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + // CreatedAt - Filter integration provider creation time by date range + CreatedAt *IntegrationsProvidersListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration provider last update time by date range + UpdatedAt *IntegrationsProvidersListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsProvidersListQueryFromJSON deserializes JSON data into a IntegrationsProvidersListQuery. +func MapIntegrationsProvidersListQueryFromJSON(data []byte) (*IntegrationsProvidersListQuery, error) { + var v IntegrationsProvidersListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersListQueryToJSON serializes a IntegrationsProvidersListQuery to JSON. +func MapIntegrationsProvidersListQueryToJSON(v *IntegrationsProvidersListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/providers/update.go b/v1/resources/integrations/providers/update.go new file mode 100644 index 0000000..48b16f9 --- /dev/null +++ b/v1/resources/integrations/providers/update.go @@ -0,0 +1,97 @@ +package providers + +import ( + "encoding/json" + "time" +) + +// IntegrationsProvidersUpdateOutputToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsProvidersUpdateOutputToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsProvidersUpdateOutputConfig represents the integrations providers update output config type. +type IntegrationsProvidersUpdateOutputConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsProvidersUpdateOutput represents the integrations providers update output type. +type IntegrationsProvidersUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsProvidersUpdateOutputToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsProvidersUpdateOutputConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsProvidersUpdateOutputFromJSON deserializes JSON data into a IntegrationsProvidersUpdateOutput. +func MapIntegrationsProvidersUpdateOutputFromJSON(data []byte) (*IntegrationsProvidersUpdateOutput, error) { + var v IntegrationsProvidersUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersUpdateOutputToJSON serializes a IntegrationsProvidersUpdateOutput to JSON. +func MapIntegrationsProvidersUpdateOutputToJSON(v *IntegrationsProvidersUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsProvidersUpdateBody represents the integrations providers update body type. +type IntegrationsProvidersUpdateBody struct { + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + +// MapIntegrationsProvidersUpdateBodyFromJSON deserializes JSON data into a IntegrationsProvidersUpdateBody. +func MapIntegrationsProvidersUpdateBodyFromJSON(data []byte) (*IntegrationsProvidersUpdateBody, error) { + var v IntegrationsProvidersUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsProvidersUpdateBodyToJSON serializes a IntegrationsProvidersUpdateBody to JSON. +func MapIntegrationsProvidersUpdateBodyToJSON(v *IntegrationsProvidersUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/setupsessions/create.go b/v1/resources/integrations/setupsessions/create.go new file mode 100644 index 0000000..66a83b3 --- /dev/null +++ b/v1/resources/integrations/setupsessions/create.go @@ -0,0 +1,278 @@ +package setupsessions + +import ( + "encoding/json" + "time" +) + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceImplementation represents the integrations setup sessions create output integration instance implementation type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersProvider represents the integrations setup sessions create output integration instance providers provider type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderProviderVersion represents the integrations setup sessions create output integration instance providers integration provider provider version type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderConfig represents the integrations setup sessions create output integration instance providers integration provider config type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProvider represents the integrations setup sessions create output integration instance providers integration provider type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersConfig represents the integrations setup sessions create output integration instance providers config type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersAuthConfig represents the integrations setup sessions create output integration instance providers auth config type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstanceProviders represents the integrations setup sessions create output integration instance providers type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstanceProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsSetupSessionsCreateOutputIntegrationInstanceProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsCreateOutputIntegrationInstance represents the integrations setup sessions create output integration instance type. +type IntegrationsSetupSessionsCreateOutputIntegrationInstance struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsSetupSessionsCreateOutputIntegrationInstanceImplementation `json:"implementation,omitempty"` + Providers []IntegrationsSetupSessionsCreateOutputIntegrationInstanceProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsCreateOutput represents the integrations setup sessions create output type. +type IntegrationsSetupSessionsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Url string `json:"url"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration *map[string]any `json:"configuration,omitempty"` + RedirectUrl *string `json:"redirect_url,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstance IntegrationsSetupSessionsCreateOutputIntegrationInstance `json:"integration_instance"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ExpiresAt time.Time `json:"expires_at"` +} + +// MapIntegrationsSetupSessionsCreateOutputFromJSON deserializes JSON data into a IntegrationsSetupSessionsCreateOutput. +func MapIntegrationsSetupSessionsCreateOutputFromJSON(data []byte) (*IntegrationsSetupSessionsCreateOutput, error) { + var v IntegrationsSetupSessionsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsSetupSessionsCreateOutputToJSON serializes a IntegrationsSetupSessionsCreateOutput to JSON. +func MapIntegrationsSetupSessionsCreateOutputToJSON(v *IntegrationsSetupSessionsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchGroups represents the integrations setup sessions create body configuration provider search groups type. +type IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchGroups struct { + GroupId string `json:"group_id"` +} + +// IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchCollections represents the integrations setup sessions create body configuration provider search collections type. +type IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchCollections struct { + CollectionId string `json:"collection_id"` +} + +// IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchCategories represents the integrations setup sessions create body configuration provider search categories type. +type IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchCategories struct { + CategoryId string `json:"category_id"` +} + +// IntegrationsSetupSessionsCreateBodyConfigurationProviderSearch represents the integrations setup sessions create body configuration provider search type. +type IntegrationsSetupSessionsCreateBodyConfigurationProviderSearch struct { + Groups *[]IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchGroups `json:"groups,omitempty"` + Collections *[]IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchCollections `json:"collections,omitempty"` + Categories *[]IntegrationsSetupSessionsCreateBodyConfigurationProviderSearchCategories `json:"categories,omitempty"` +} + +// IntegrationsSetupSessionsCreateBodyConfigurationToolFilters represents the integrations setup sessions create body configuration tool filters type. +type IntegrationsSetupSessionsCreateBodyConfigurationToolFilters struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// IntegrationsSetupSessionsCreateBodyConfigurationUi represents the integrations setup sessions create body configuration ui type. +type IntegrationsSetupSessionsCreateBodyConfigurationUi struct { + Layout *string `json:"layout,omitempty"` +} + +// IntegrationsSetupSessionsCreateBodyConfiguration represents the integrations setup sessions create body configuration type. +type IntegrationsSetupSessionsCreateBodyConfiguration struct { + ProviderSearch *IntegrationsSetupSessionsCreateBodyConfigurationProviderSearch `json:"provider_search,omitempty"` + ToolFilters *IntegrationsSetupSessionsCreateBodyConfigurationToolFilters `json:"tool_filters,omitempty"` + Ui *IntegrationsSetupSessionsCreateBodyConfigurationUi `json:"ui,omitempty"` +} + +// IntegrationsSetupSessionsCreateBody represents the integrations setup sessions create body type. +type IntegrationsSetupSessionsCreateBody struct { + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` + RedirectUrl *string `json:"redirect_url,omitempty"` + Configuration *IntegrationsSetupSessionsCreateBodyConfiguration `json:"configuration,omitempty"` +} + +// MapIntegrationsSetupSessionsCreateBodyFromJSON deserializes JSON data into a IntegrationsSetupSessionsCreateBody. +func MapIntegrationsSetupSessionsCreateBodyFromJSON(data []byte) (*IntegrationsSetupSessionsCreateBody, error) { + var v IntegrationsSetupSessionsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsSetupSessionsCreateBodyToJSON serializes a IntegrationsSetupSessionsCreateBody to JSON. +func MapIntegrationsSetupSessionsCreateBodyToJSON(v *IntegrationsSetupSessionsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/setupsessions/get.go b/v1/resources/integrations/setupsessions/get.go new file mode 100644 index 0000000..fee7051 --- /dev/null +++ b/v1/resources/integrations/setupsessions/get.go @@ -0,0 +1,212 @@ +package setupsessions + +import ( + "encoding/json" + "time" +) + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceImplementation represents the integrations setup sessions get output integration instance implementation type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersProvider represents the integrations setup sessions get output integration instance providers provider type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderProviderVersion represents the integrations setup sessions get output integration instance providers integration provider provider version type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderConfig represents the integrations setup sessions get output integration instance providers integration provider config type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProvider represents the integrations setup sessions get output integration instance providers integration provider type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersConfig represents the integrations setup sessions get output integration instance providers config type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersAuthConfig represents the integrations setup sessions get output integration instance providers auth config type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstanceProviders represents the integrations setup sessions get output integration instance providers type. +type IntegrationsSetupSessionsGetOutputIntegrationInstanceProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsSetupSessionsGetOutputIntegrationInstanceProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsGetOutputIntegrationInstance represents the integrations setup sessions get output integration instance type. +type IntegrationsSetupSessionsGetOutputIntegrationInstance struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsSetupSessionsGetOutputIntegrationInstanceImplementation `json:"implementation,omitempty"` + Providers []IntegrationsSetupSessionsGetOutputIntegrationInstanceProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsGetOutput represents the integrations setup sessions get output type. +type IntegrationsSetupSessionsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Url string `json:"url"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration *map[string]any `json:"configuration,omitempty"` + RedirectUrl *string `json:"redirect_url,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstance IntegrationsSetupSessionsGetOutputIntegrationInstance `json:"integration_instance"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ExpiresAt time.Time `json:"expires_at"` +} + +// MapIntegrationsSetupSessionsGetOutputFromJSON deserializes JSON data into a IntegrationsSetupSessionsGetOutput. +func MapIntegrationsSetupSessionsGetOutputFromJSON(data []byte) (*IntegrationsSetupSessionsGetOutput, error) { + var v IntegrationsSetupSessionsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsSetupSessionsGetOutputToJSON serializes a IntegrationsSetupSessionsGetOutput to JSON. +func MapIntegrationsSetupSessionsGetOutputToJSON(v *IntegrationsSetupSessionsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/setupsessions/list.go b/v1/resources/integrations/setupsessions/list.go new file mode 100644 index 0000000..3ba3d6d --- /dev/null +++ b/v1/resources/integrations/setupsessions/list.go @@ -0,0 +1,271 @@ +package setupsessions + +import ( + "encoding/json" + "time" +) + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceImplementation represents the integrations setup sessions list output items integration instance implementation type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceImplementation struct { + Type string `json:"type"` + MagicMcpServerId string `json:"magic_mcp_server_id"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersProvider represents the integrations setup sessions list output items integration instance providers provider type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderProviderVersion represents the integrations setup sessions list output items integration instance providers integration provider provider version type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderProviderVersion struct { + Object string `json:"object"` + Id string `json:"id"` + Index float64 `json:"index"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderConfig represents the integrations setup sessions list output items integration instance providers integration provider config type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProvider represents the integrations setup sessions list output items integration instance providers integration provider type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProvider struct { + Object string `json:"object"` + Id string `json:"id"` + ProviderVersion IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderProviderVersion `json:"provider_version"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProviderConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersConfig represents the integrations setup sessions list output items integration instance providers config type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersAuthConfig represents the integrations setup sessions list output items integration instance providers auth config type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProviders represents the integrations setup sessions list output items integration instance providers type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstanceId string `json:"integration_instance_id"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersToolFilter `json:"tool_filter,omitempty"` + IsOverrideToolFilter bool `json:"is_override_tool_filter"` + Provider IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersProvider `json:"provider"` + IntegrationProvider IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersIntegrationProvider `json:"integration_provider"` + Config *IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersConfig `json:"config,omitempty"` + AuthConfig *IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsListOutputItemsIntegrationInstance represents the integrations setup sessions list output items integration instance type. +type IntegrationsSetupSessionsListOutputItemsIntegrationInstance struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationId string `json:"integration_id"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + IdentityId *string `json:"identity_id,omitempty"` + Implementation *IntegrationsSetupSessionsListOutputItemsIntegrationInstanceImplementation `json:"implementation,omitempty"` + Providers []IntegrationsSetupSessionsListOutputItemsIntegrationInstanceProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsSetupSessionsListOutputItems represents the integrations setup sessions list output items type. +type IntegrationsSetupSessionsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Url string `json:"url"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration *map[string]any `json:"configuration,omitempty"` + RedirectUrl *string `json:"redirect_url,omitempty"` + IntegrationId string `json:"integration_id"` + IntegrationInstance IntegrationsSetupSessionsListOutputItemsIntegrationInstance `json:"integration_instance"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ExpiresAt time.Time `json:"expires_at"` +} + +// IntegrationsSetupSessionsListOutputPagination represents the integrations setup sessions list output pagination type. +type IntegrationsSetupSessionsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// IntegrationsSetupSessionsListOutput represents the integrations setup sessions list output type. +type IntegrationsSetupSessionsListOutput struct { + Items []IntegrationsSetupSessionsListOutputItems `json:"items"` + Pagination IntegrationsSetupSessionsListOutputPagination `json:"pagination"` +} + +// MapIntegrationsSetupSessionsListOutputFromJSON deserializes JSON data into a IntegrationsSetupSessionsListOutput. +func MapIntegrationsSetupSessionsListOutputFromJSON(data []byte) (*IntegrationsSetupSessionsListOutput, error) { + var v IntegrationsSetupSessionsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsSetupSessionsListOutputToJSON serializes a IntegrationsSetupSessionsListOutput to JSON. +func MapIntegrationsSetupSessionsListOutputToJSON(v *IntegrationsSetupSessionsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsSetupSessionsListQueryCreatedAt - Filter integration setup session creation time by date range +type IntegrationsSetupSessionsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for integration setup session creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration setup session creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsSetupSessionsListQueryUpdatedAt - Filter integration setup session last update time by date range +type IntegrationsSetupSessionsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for integration setup session last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for integration setup session last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// IntegrationsSetupSessionsListQuery represents the integrations setup sessions list query type. +type IntegrationsSetupSessionsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + IntegrationInstanceId *any `json:"integration_instance_id,omitempty"` + // CreatedAt - Filter integration setup session creation time by date range + CreatedAt *IntegrationsSetupSessionsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter integration setup session last update time by date range + UpdatedAt *IntegrationsSetupSessionsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapIntegrationsSetupSessionsListQueryFromJSON deserializes JSON data into a IntegrationsSetupSessionsListQuery. +func MapIntegrationsSetupSessionsListQueryFromJSON(data []byte) (*IntegrationsSetupSessionsListQuery, error) { + var v IntegrationsSetupSessionsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsSetupSessionsListQueryToJSON serializes a IntegrationsSetupSessionsListQuery to JSON. +func MapIntegrationsSetupSessionsListQueryToJSON(v *IntegrationsSetupSessionsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/integrations/update.go b/v1/resources/integrations/update.go new file mode 100644 index 0000000..1cd37c9 --- /dev/null +++ b/v1/resources/integrations/update.go @@ -0,0 +1,127 @@ +package integrations + +import ( + "encoding/json" + "time" +) + +// IntegrationsUpdateOutputConfiguration represents the integrations update output configuration type. +type IntegrationsUpdateOutputConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// IntegrationsUpdateOutputImplementation represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsUpdateOutputImplementation struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` +} + +// IntegrationsUpdateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type IntegrationsUpdateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// IntegrationsUpdateOutputProvidersConfig represents the integrations update output providers config type. +type IntegrationsUpdateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IntegrationsUpdateOutputProviders represents the integrations update output providers type. +type IntegrationsUpdateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + IntegrationId string `json:"integration_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *IntegrationsUpdateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + ProviderId string `json:"provider_id"` + DeploymentId string `json:"deployment_id"` + AuthMethodId *string `json:"auth_method_id,omitempty"` + AuthCredentialsId *string `json:"auth_credentials_id,omitempty"` + Config *IntegrationsUpdateOutputProvidersConfig `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// IntegrationsUpdateOutput represents the integrations update output type. +type IntegrationsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration IntegrationsUpdateOutputConfiguration `json:"configuration"` + Implementation *IntegrationsUpdateOutputImplementation `json:"implementation,omitempty"` + Providers []IntegrationsUpdateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// MapIntegrationsUpdateOutputFromJSON deserializes JSON data into a IntegrationsUpdateOutput. +func MapIntegrationsUpdateOutputFromJSON(data []byte) (*IntegrationsUpdateOutput, error) { + var v IntegrationsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsUpdateOutputToJSON serializes a IntegrationsUpdateOutput to JSON. +func MapIntegrationsUpdateOutputToJSON(v *IntegrationsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// IntegrationsUpdateBody represents the integrations update body type. +type IntegrationsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CanAttachCustomToolFilters *bool `json:"can_attach_custom_tool_filters,omitempty"` + CanAttachCustomProviderConfig *bool `json:"can_attach_custom_provider_config,omitempty"` + CanOverrideToolFilters *bool `json:"can_override_tool_filters,omitempty"` +} + +// MapIntegrationsUpdateBodyFromJSON deserializes JSON data into a IntegrationsUpdateBody. +func MapIntegrationsUpdateBodyFromJSON(data []byte) (*IntegrationsUpdateBody, error) { + var v IntegrationsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapIntegrationsUpdateBodyToJSON serializes a IntegrationsUpdateBody to JSON. +func MapIntegrationsUpdateBodyToJSON(v *IntegrationsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/magicmcpendpoints/add_servers.go b/v1/resources/magicmcpendpoints/add_servers.go index 31e74e3..96d9105 100644 --- a/v1/resources/magicmcpendpoints/add_servers.go +++ b/v1/resources/magicmcpendpoints/add_servers.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsAddServersOutput represents the magic mcp endpoints add servers output type. type MagicMcpEndpointsAddServersOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpEndpointsAddServersOutputFromJSON deserializes JSON data into a MagicMcpEndpointsAddServersOutput. @@ -37,16 +34,15 @@ func MapMagicMcpEndpointsAddServersOutputToJSON(v *MagicMcpEndpointsAddServersOu return json.Marshal(v) } -// MagicMcpEndpointsAddServersBodyServers represents the magic mcp endpoints add servers body servers type. -type MagicMcpEndpointsAddServersBodyServers struct { +// MagicMcpEndpointsAddServersBodyMagicMcpServers represents the magic mcp endpoints add servers body magic mcp servers type. +type MagicMcpEndpointsAddServersBodyMagicMcpServers struct { MagicMcpServerId string `json:"magic_mcp_server_id"` ToolFilters *any `json:"tool_filters,omitempty"` } // MagicMcpEndpointsAddServersBody represents the magic mcp endpoints add servers body type. type MagicMcpEndpointsAddServersBody struct { - MagicMcpServerIds *[]string `json:"magic_mcp_server_ids,omitempty"` - Servers *[]MagicMcpEndpointsAddServersBodyServers `json:"servers,omitempty"` + MagicMcpServers *[]MagicMcpEndpointsAddServersBodyMagicMcpServers `json:"magic_mcp_servers,omitempty"` } // MapMagicMcpEndpointsAddServersBodyFromJSON deserializes JSON data into a MagicMcpEndpointsAddServersBody. diff --git a/v1/resources/magicmcpendpoints/create.go b/v1/resources/magicmcpendpoints/create.go index e46dbd2..d6d9754 100644 --- a/v1/resources/magicmcpendpoints/create.go +++ b/v1/resources/magicmcpendpoints/create.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsCreateOutput represents the magic mcp endpoints create output type. type MagicMcpEndpointsCreateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpEndpointsCreateOutputFromJSON deserializes JSON data into a MagicMcpEndpointsCreateOutput. @@ -37,20 +34,20 @@ func MapMagicMcpEndpointsCreateOutputToJSON(v *MagicMcpEndpointsCreateOutput) ([ return json.Marshal(v) } -// MagicMcpEndpointsCreateBodyServers represents the magic mcp endpoints create body servers type. -type MagicMcpEndpointsCreateBodyServers struct { +// MagicMcpEndpointsCreateBodyMagicMcpServers represents the magic mcp endpoints create body magic mcp servers type. +type MagicMcpEndpointsCreateBodyMagicMcpServers struct { MagicMcpServerId string `json:"magic_mcp_server_id"` ToolFilters *any `json:"tool_filters,omitempty"` } // MagicMcpEndpointsCreateBody represents the magic mcp endpoints create body type. type MagicMcpEndpointsCreateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - MagicMcpServerIds *[]string `json:"magic_mcp_server_ids,omitempty"` - Servers *[]MagicMcpEndpointsCreateBodyServers `json:"servers,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + MagicMcpServers *[]MagicMcpEndpointsCreateBodyMagicMcpServers `json:"magic_mcp_servers,omitempty"` } // MapMagicMcpEndpointsCreateBodyFromJSON deserializes JSON data into a MagicMcpEndpointsCreateBody. diff --git a/v1/resources/magicmcpendpoints/delete.go b/v1/resources/magicmcpendpoints/delete.go index 7f9260c..8e385bd 100644 --- a/v1/resources/magicmcpendpoints/delete.go +++ b/v1/resources/magicmcpendpoints/delete.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsDeleteOutput represents the magic mcp endpoints delete output type. type MagicMcpEndpointsDeleteOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpEndpointsDeleteOutputFromJSON deserializes JSON data into a MagicMcpEndpointsDeleteOutput. diff --git a/v1/resources/magicmcpendpoints/get.go b/v1/resources/magicmcpendpoints/get.go index aed614c..6ae2aaf 100644 --- a/v1/resources/magicmcpendpoints/get.go +++ b/v1/resources/magicmcpendpoints/get.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsGetOutput represents the magic mcp endpoints get output type. type MagicMcpEndpointsGetOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpEndpointsGetOutputFromJSON deserializes JSON data into a MagicMcpEndpointsGetOutput. diff --git a/v1/resources/magicmcpendpoints/list.go b/v1/resources/magicmcpendpoints/list.go index aa6c162..ccce80b 100644 --- a/v1/resources/magicmcpendpoints/list.go +++ b/v1/resources/magicmcpendpoints/list.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsListOutputItems represents the magic mcp endpoints list output items type. type MagicMcpEndpointsListOutputItems struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MagicMcpEndpointsListOutputPagination represents the magic mcp endpoints list output pagination type. diff --git a/v1/resources/magicmcpendpoints/remove_servers.go b/v1/resources/magicmcpendpoints/remove_servers.go index ccd15de..476423f 100644 --- a/v1/resources/magicmcpendpoints/remove_servers.go +++ b/v1/resources/magicmcpendpoints/remove_servers.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsRemoveServersOutput represents the magic mcp endpoints remove servers output type. type MagicMcpEndpointsRemoveServersOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpEndpointsRemoveServersOutputFromJSON deserializes JSON data into a MagicMcpEndpointsRemoveServersOutput. diff --git a/v1/resources/magicmcpendpoints/update.go b/v1/resources/magicmcpendpoints/update.go index 0b159c5..4517598 100644 --- a/v1/resources/magicmcpendpoints/update.go +++ b/v1/resources/magicmcpendpoints/update.go @@ -7,20 +7,17 @@ import ( // MagicMcpEndpointsUpdateOutput represents the magic mcp endpoints update output type. type MagicMcpEndpointsUpdateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpEndpointsUpdateOutputFromJSON deserializes JSON data into a MagicMcpEndpointsUpdateOutput. diff --git a/v1/resources/magicmcpservers/create.go b/v1/resources/magicmcpservers/create.go index ef50044..83f11ca 100644 --- a/v1/resources/magicmcpservers/create.go +++ b/v1/resources/magicmcpservers/create.go @@ -12,19 +12,223 @@ type MagicMcpServersCreateOutputEndpoints struct { Url string `json:"url"` } +// MagicMcpServersCreateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpServersCreateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpServersCreateOutputProvidersProvider represents the magic mcp servers create output providers provider type. +type MagicMcpServersCreateOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersCreateOutputProvidersDeployment represents the magic mcp servers create output providers deployment type. +type MagicMcpServersCreateOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersCreateOutputProvidersAuthMethodInputSchema represents the magic mcp servers create output providers auth method input schema type. +type MagicMcpServersCreateOutputProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersCreateOutputProvidersAuthMethodOutputSchema represents the magic mcp servers create output providers auth method output schema type. +type MagicMcpServersCreateOutputProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersCreateOutputProvidersAuthMethodScopes represents the magic mcp servers create output providers auth method scopes type. +type MagicMcpServersCreateOutputProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersCreateOutputProvidersAuthMethod represents the magic mcp servers create output providers auth method type. +type MagicMcpServersCreateOutputProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersCreateOutputProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersCreateOutputProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersCreateOutputProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersCreateOutputProvidersAuthCredentials represents the magic mcp servers create output providers auth credentials type. +type MagicMcpServersCreateOutputProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersCreateOutputProvidersConfig represents the magic mcp servers create output providers config type. +type MagicMcpServersCreateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersCreateOutputProvidersAuthConfig represents the magic mcp servers create output providers auth config type. +type MagicMcpServersCreateOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersCreateOutputProviders represents the magic mcp servers create output providers type. +type MagicMcpServersCreateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersCreateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersCreateOutputProvidersProvider `json:"provider"` + Deployment MagicMcpServersCreateOutputProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpServersCreateOutputProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersCreateOutputProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersCreateOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersCreateOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpServersCreateOutput represents the magic mcp servers create output type. type MagicMcpServersCreateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpServersCreateOutputEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpServersCreateOutputEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpServersCreateOutputProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpServersCreateOutputFromJSON deserializes JSON data into a MagicMcpServersCreateOutput. @@ -43,10 +247,11 @@ func MapMagicMcpServersCreateOutputToJSON(v *MagicMcpServersCreateOutput) ([]byt // MagicMcpServersCreateBody represents the magic mcp servers create body type. type MagicMcpServersCreateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` } // MapMagicMcpServersCreateBodyFromJSON deserializes JSON data into a MagicMcpServersCreateBody. diff --git a/v1/resources/magicmcpservers/delete.go b/v1/resources/magicmcpservers/delete.go index 48f56f7..f4df73d 100644 --- a/v1/resources/magicmcpservers/delete.go +++ b/v1/resources/magicmcpservers/delete.go @@ -12,19 +12,223 @@ type MagicMcpServersDeleteOutputEndpoints struct { Url string `json:"url"` } +// MagicMcpServersDeleteOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpServersDeleteOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpServersDeleteOutputProvidersProvider represents the magic mcp servers delete output providers provider type. +type MagicMcpServersDeleteOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersDeleteOutputProvidersDeployment represents the magic mcp servers delete output providers deployment type. +type MagicMcpServersDeleteOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersDeleteOutputProvidersAuthMethodInputSchema represents the magic mcp servers delete output providers auth method input schema type. +type MagicMcpServersDeleteOutputProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersDeleteOutputProvidersAuthMethodOutputSchema represents the magic mcp servers delete output providers auth method output schema type. +type MagicMcpServersDeleteOutputProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersDeleteOutputProvidersAuthMethodScopes represents the magic mcp servers delete output providers auth method scopes type. +type MagicMcpServersDeleteOutputProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersDeleteOutputProvidersAuthMethod represents the magic mcp servers delete output providers auth method type. +type MagicMcpServersDeleteOutputProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersDeleteOutputProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersDeleteOutputProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersDeleteOutputProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersDeleteOutputProvidersAuthCredentials represents the magic mcp servers delete output providers auth credentials type. +type MagicMcpServersDeleteOutputProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersDeleteOutputProvidersConfig represents the magic mcp servers delete output providers config type. +type MagicMcpServersDeleteOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersDeleteOutputProvidersAuthConfig represents the magic mcp servers delete output providers auth config type. +type MagicMcpServersDeleteOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersDeleteOutputProviders represents the magic mcp servers delete output providers type. +type MagicMcpServersDeleteOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersDeleteOutputProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersDeleteOutputProvidersProvider `json:"provider"` + Deployment MagicMcpServersDeleteOutputProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpServersDeleteOutputProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersDeleteOutputProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersDeleteOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersDeleteOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpServersDeleteOutput represents the magic mcp servers delete output type. type MagicMcpServersDeleteOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpServersDeleteOutputEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpServersDeleteOutputEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpServersDeleteOutputProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpServersDeleteOutputFromJSON deserializes JSON data into a MagicMcpServersDeleteOutput. diff --git a/v1/resources/magicmcpservers/get.go b/v1/resources/magicmcpservers/get.go index 890d074..05cd77a 100644 --- a/v1/resources/magicmcpservers/get.go +++ b/v1/resources/magicmcpservers/get.go @@ -12,19 +12,223 @@ type MagicMcpServersGetOutputEndpoints struct { Url string `json:"url"` } +// MagicMcpServersGetOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpServersGetOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpServersGetOutputProvidersProvider represents the magic mcp servers get output providers provider type. +type MagicMcpServersGetOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersGetOutputProvidersDeployment represents the magic mcp servers get output providers deployment type. +type MagicMcpServersGetOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersGetOutputProvidersAuthMethodInputSchema represents the magic mcp servers get output providers auth method input schema type. +type MagicMcpServersGetOutputProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersGetOutputProvidersAuthMethodOutputSchema represents the magic mcp servers get output providers auth method output schema type. +type MagicMcpServersGetOutputProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersGetOutputProvidersAuthMethodScopes represents the magic mcp servers get output providers auth method scopes type. +type MagicMcpServersGetOutputProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersGetOutputProvidersAuthMethod represents the magic mcp servers get output providers auth method type. +type MagicMcpServersGetOutputProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersGetOutputProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersGetOutputProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersGetOutputProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersGetOutputProvidersAuthCredentials represents the magic mcp servers get output providers auth credentials type. +type MagicMcpServersGetOutputProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersGetOutputProvidersConfig represents the magic mcp servers get output providers config type. +type MagicMcpServersGetOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersGetOutputProvidersAuthConfig represents the magic mcp servers get output providers auth config type. +type MagicMcpServersGetOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersGetOutputProviders represents the magic mcp servers get output providers type. +type MagicMcpServersGetOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersGetOutputProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersGetOutputProvidersProvider `json:"provider"` + Deployment MagicMcpServersGetOutputProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpServersGetOutputProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersGetOutputProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersGetOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersGetOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpServersGetOutput represents the magic mcp servers get output type. type MagicMcpServersGetOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpServersGetOutputEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpServersGetOutputEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpServersGetOutputProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpServersGetOutputFromJSON deserializes JSON data into a MagicMcpServersGetOutput. diff --git a/v1/resources/magicmcpservers/list.go b/v1/resources/magicmcpservers/list.go index 9b1ab45..83a977a 100644 --- a/v1/resources/magicmcpservers/list.go +++ b/v1/resources/magicmcpservers/list.go @@ -12,19 +12,223 @@ type MagicMcpServersListOutputItemsEndpoints struct { Url string `json:"url"` } +// MagicMcpServersListOutputItemsProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpServersListOutputItemsProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpServersListOutputItemsProvidersProvider represents the magic mcp servers list output items providers provider type. +type MagicMcpServersListOutputItemsProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersListOutputItemsProvidersDeployment represents the magic mcp servers list output items providers deployment type. +type MagicMcpServersListOutputItemsProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersListOutputItemsProvidersAuthMethodInputSchema represents the magic mcp servers list output items providers auth method input schema type. +type MagicMcpServersListOutputItemsProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersListOutputItemsProvidersAuthMethodOutputSchema represents the magic mcp servers list output items providers auth method output schema type. +type MagicMcpServersListOutputItemsProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersListOutputItemsProvidersAuthMethodScopes represents the magic mcp servers list output items providers auth method scopes type. +type MagicMcpServersListOutputItemsProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersListOutputItemsProvidersAuthMethod represents the magic mcp servers list output items providers auth method type. +type MagicMcpServersListOutputItemsProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersListOutputItemsProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersListOutputItemsProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersListOutputItemsProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersListOutputItemsProvidersAuthCredentials represents the magic mcp servers list output items providers auth credentials type. +type MagicMcpServersListOutputItemsProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersListOutputItemsProvidersConfig represents the magic mcp servers list output items providers config type. +type MagicMcpServersListOutputItemsProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersListOutputItemsProvidersAuthConfig represents the magic mcp servers list output items providers auth config type. +type MagicMcpServersListOutputItemsProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersListOutputItemsProviders represents the magic mcp servers list output items providers type. +type MagicMcpServersListOutputItemsProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersListOutputItemsProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersListOutputItemsProvidersProvider `json:"provider"` + Deployment MagicMcpServersListOutputItemsProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpServersListOutputItemsProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersListOutputItemsProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersListOutputItemsProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersListOutputItemsProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpServersListOutputItems represents the magic mcp servers list output items type. type MagicMcpServersListOutputItems struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpServersListOutputItemsEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpServersListOutputItemsEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpServersListOutputItemsProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MagicMcpServersListOutputPagination represents the magic mcp servers list output pagination type. diff --git a/v1/resources/magicmcpservers/providers/create.go b/v1/resources/magicmcpservers/providers/create.go index 28d9540..c481739 100644 --- a/v1/resources/magicmcpservers/providers/create.go +++ b/v1/resources/magicmcpservers/providers/create.go @@ -13,6 +13,24 @@ type MagicMcpServersProvidersCreateOutputToolFilter struct { Filters *[]any `json:"filters,omitempty"` } +// MagicMcpServersProvidersCreateOutputProvider represents the magic mcp servers providers create output provider type. +type MagicMcpServersProvidersCreateOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersCreateOutputDeployment represents the magic mcp servers providers create output deployment type. type MagicMcpServersProvidersCreateOutputDeployment struct { // Object - String representing the object's type @@ -35,6 +53,93 @@ type MagicMcpServersProvidersCreateOutputDeployment struct { UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersCreateOutputAuthMethodInputSchema represents the magic mcp servers providers create output auth method input schema type. +type MagicMcpServersProvidersCreateOutputAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersCreateOutputAuthMethodOutputSchema represents the magic mcp servers providers create output auth method output schema type. +type MagicMcpServersProvidersCreateOutputAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersCreateOutputAuthMethodScopes represents the magic mcp servers providers create output auth method scopes type. +type MagicMcpServersProvidersCreateOutputAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersProvidersCreateOutputAuthMethod represents the magic mcp servers providers create output auth method type. +type MagicMcpServersProvidersCreateOutputAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersProvidersCreateOutputAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersProvidersCreateOutputAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersProvidersCreateOutputAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersProvidersCreateOutputAuthCredentials represents the magic mcp servers providers create output auth credentials type. +type MagicMcpServersProvidersCreateOutputAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersCreateOutputConfig represents the magic mcp servers providers create output config type. type MagicMcpServersProvidersCreateOutputConfig struct { // Object - String representing the object's type @@ -59,33 +164,49 @@ type MagicMcpServersProvidersCreateOutputConfig struct { // MagicMcpServersProvidersCreateOutputAuthConfig represents the magic mcp servers providers create output auth config type. type MagicMcpServersProvidersCreateOutputAuthConfig struct { - Object string `json:"object"` - Id string `json:"id"` -} - -// MagicMcpServersProvidersCreateOutput represents the magic mcp servers providers create output type. -type MagicMcpServersProvidersCreateOutput struct { // Object - String representing the object's type Object string `json:"object"` - // Id - Unique magic MCP server provider identifier + // Id - Config ID Id string `json:"id"` - // Status - Provider status - Status string `json:"status"` - // ToolFilter - Tool filter configuration - ToolFilter MagicMcpServersProvidersCreateOutputToolFilter `json:"tool_filter"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` // ProviderId - Provider ID ProviderId string `json:"provider_id"` - // MagicMcpServerId - Parent magic MCP server ID - MagicMcpServerId string `json:"magic_mcp_server_id"` - Deployment MagicMcpServersProvidersCreateOutputDeployment `json:"deployment"` - Config MagicMcpServersProvidersCreateOutputConfig `json:"config"` - AuthConfig *MagicMcpServersProvidersCreateOutputAuthConfig `json:"auth_config,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` // UpdatedAt - Timestamp when last updated UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersCreateOutput represents the magic mcp servers providers create output type. +type MagicMcpServersProvidersCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersProvidersCreateOutputToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersProvidersCreateOutputProvider `json:"provider"` + Deployment MagicMcpServersProvidersCreateOutputDeployment `json:"deployment"` + AuthMethod *MagicMcpServersProvidersCreateOutputAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersProvidersCreateOutputAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersProvidersCreateOutputConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersProvidersCreateOutputAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MapMagicMcpServersProvidersCreateOutputFromJSON deserializes JSON data into a MagicMcpServersProvidersCreateOutput. func MapMagicMcpServersProvidersCreateOutputFromJSON(data []byte) (*MagicMcpServersProvidersCreateOutput, error) { var v MagicMcpServersProvidersCreateOutput @@ -102,11 +223,11 @@ func MapMagicMcpServersProvidersCreateOutputToJSON(v *MagicMcpServersProvidersCr // MagicMcpServersProvidersCreateBody represents the magic mcp servers providers create body type. type MagicMcpServersProvidersCreateBody struct { - ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` - ProviderConfigId *string `json:"provider_config_id,omitempty"` - ProviderConfigVaultId *string `json:"provider_config_vault_id,omitempty"` - ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` - ToolFilters *any `json:"tool_filters,omitempty"` + ProviderId string `json:"provider_id"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } // MapMagicMcpServersProvidersCreateBodyFromJSON deserializes JSON data into a MagicMcpServersProvidersCreateBody. diff --git a/v1/resources/magicmcpservers/providers/delete.go b/v1/resources/magicmcpservers/providers/delete.go index c6d478e..5cf5f04 100644 --- a/v1/resources/magicmcpservers/providers/delete.go +++ b/v1/resources/magicmcpservers/providers/delete.go @@ -13,6 +13,24 @@ type MagicMcpServersProvidersDeleteOutputToolFilter struct { Filters *[]any `json:"filters,omitempty"` } +// MagicMcpServersProvidersDeleteOutputProvider represents the magic mcp servers providers delete output provider type. +type MagicMcpServersProvidersDeleteOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersDeleteOutputDeployment represents the magic mcp servers providers delete output deployment type. type MagicMcpServersProvidersDeleteOutputDeployment struct { // Object - String representing the object's type @@ -35,6 +53,93 @@ type MagicMcpServersProvidersDeleteOutputDeployment struct { UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersDeleteOutputAuthMethodInputSchema represents the magic mcp servers providers delete output auth method input schema type. +type MagicMcpServersProvidersDeleteOutputAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersDeleteOutputAuthMethodOutputSchema represents the magic mcp servers providers delete output auth method output schema type. +type MagicMcpServersProvidersDeleteOutputAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersDeleteOutputAuthMethodScopes represents the magic mcp servers providers delete output auth method scopes type. +type MagicMcpServersProvidersDeleteOutputAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersProvidersDeleteOutputAuthMethod represents the magic mcp servers providers delete output auth method type. +type MagicMcpServersProvidersDeleteOutputAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersProvidersDeleteOutputAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersProvidersDeleteOutputAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersProvidersDeleteOutputAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersProvidersDeleteOutputAuthCredentials represents the magic mcp servers providers delete output auth credentials type. +type MagicMcpServersProvidersDeleteOutputAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersDeleteOutputConfig represents the magic mcp servers providers delete output config type. type MagicMcpServersProvidersDeleteOutputConfig struct { // Object - String representing the object's type @@ -59,33 +164,49 @@ type MagicMcpServersProvidersDeleteOutputConfig struct { // MagicMcpServersProvidersDeleteOutputAuthConfig represents the magic mcp servers providers delete output auth config type. type MagicMcpServersProvidersDeleteOutputAuthConfig struct { - Object string `json:"object"` - Id string `json:"id"` -} - -// MagicMcpServersProvidersDeleteOutput represents the magic mcp servers providers delete output type. -type MagicMcpServersProvidersDeleteOutput struct { // Object - String representing the object's type Object string `json:"object"` - // Id - Unique magic MCP server provider identifier + // Id - Config ID Id string `json:"id"` - // Status - Provider status - Status string `json:"status"` - // ToolFilter - Tool filter configuration - ToolFilter MagicMcpServersProvidersDeleteOutputToolFilter `json:"tool_filter"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` // ProviderId - Provider ID ProviderId string `json:"provider_id"` - // MagicMcpServerId - Parent magic MCP server ID - MagicMcpServerId string `json:"magic_mcp_server_id"` - Deployment MagicMcpServersProvidersDeleteOutputDeployment `json:"deployment"` - Config MagicMcpServersProvidersDeleteOutputConfig `json:"config"` - AuthConfig *MagicMcpServersProvidersDeleteOutputAuthConfig `json:"auth_config,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` // UpdatedAt - Timestamp when last updated UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersDeleteOutput represents the magic mcp servers providers delete output type. +type MagicMcpServersProvidersDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersProvidersDeleteOutputToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersProvidersDeleteOutputProvider `json:"provider"` + Deployment MagicMcpServersProvidersDeleteOutputDeployment `json:"deployment"` + AuthMethod *MagicMcpServersProvidersDeleteOutputAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersProvidersDeleteOutputAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersProvidersDeleteOutputConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersProvidersDeleteOutputAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MapMagicMcpServersProvidersDeleteOutputFromJSON deserializes JSON data into a MagicMcpServersProvidersDeleteOutput. func MapMagicMcpServersProvidersDeleteOutputFromJSON(data []byte) (*MagicMcpServersProvidersDeleteOutput, error) { var v MagicMcpServersProvidersDeleteOutput diff --git a/v1/resources/magicmcpservers/providers/get.go b/v1/resources/magicmcpservers/providers/get.go index 3e40eb2..5ad7bd0 100644 --- a/v1/resources/magicmcpservers/providers/get.go +++ b/v1/resources/magicmcpservers/providers/get.go @@ -13,6 +13,24 @@ type MagicMcpServersProvidersGetOutputToolFilter struct { Filters *[]any `json:"filters,omitempty"` } +// MagicMcpServersProvidersGetOutputProvider represents the magic mcp servers providers get output provider type. +type MagicMcpServersProvidersGetOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersGetOutputDeployment represents the magic mcp servers providers get output deployment type. type MagicMcpServersProvidersGetOutputDeployment struct { // Object - String representing the object's type @@ -35,6 +53,93 @@ type MagicMcpServersProvidersGetOutputDeployment struct { UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersGetOutputAuthMethodInputSchema represents the magic mcp servers providers get output auth method input schema type. +type MagicMcpServersProvidersGetOutputAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersGetOutputAuthMethodOutputSchema represents the magic mcp servers providers get output auth method output schema type. +type MagicMcpServersProvidersGetOutputAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersGetOutputAuthMethodScopes represents the magic mcp servers providers get output auth method scopes type. +type MagicMcpServersProvidersGetOutputAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersProvidersGetOutputAuthMethod represents the magic mcp servers providers get output auth method type. +type MagicMcpServersProvidersGetOutputAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersProvidersGetOutputAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersProvidersGetOutputAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersProvidersGetOutputAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersProvidersGetOutputAuthCredentials represents the magic mcp servers providers get output auth credentials type. +type MagicMcpServersProvidersGetOutputAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersGetOutputConfig represents the magic mcp servers providers get output config type. type MagicMcpServersProvidersGetOutputConfig struct { // Object - String representing the object's type @@ -59,33 +164,49 @@ type MagicMcpServersProvidersGetOutputConfig struct { // MagicMcpServersProvidersGetOutputAuthConfig represents the magic mcp servers providers get output auth config type. type MagicMcpServersProvidersGetOutputAuthConfig struct { - Object string `json:"object"` - Id string `json:"id"` -} - -// MagicMcpServersProvidersGetOutput represents the magic mcp servers providers get output type. -type MagicMcpServersProvidersGetOutput struct { // Object - String representing the object's type Object string `json:"object"` - // Id - Unique magic MCP server provider identifier + // Id - Config ID Id string `json:"id"` - // Status - Provider status - Status string `json:"status"` - // ToolFilter - Tool filter configuration - ToolFilter MagicMcpServersProvidersGetOutputToolFilter `json:"tool_filter"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` // ProviderId - Provider ID ProviderId string `json:"provider_id"` - // MagicMcpServerId - Parent magic MCP server ID - MagicMcpServerId string `json:"magic_mcp_server_id"` - Deployment MagicMcpServersProvidersGetOutputDeployment `json:"deployment"` - Config MagicMcpServersProvidersGetOutputConfig `json:"config"` - AuthConfig *MagicMcpServersProvidersGetOutputAuthConfig `json:"auth_config,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` // UpdatedAt - Timestamp when last updated UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersGetOutput represents the magic mcp servers providers get output type. +type MagicMcpServersProvidersGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersProvidersGetOutputToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersProvidersGetOutputProvider `json:"provider"` + Deployment MagicMcpServersProvidersGetOutputDeployment `json:"deployment"` + AuthMethod *MagicMcpServersProvidersGetOutputAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersProvidersGetOutputAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersProvidersGetOutputConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersProvidersGetOutputAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MapMagicMcpServersProvidersGetOutputFromJSON deserializes JSON data into a MagicMcpServersProvidersGetOutput. func MapMagicMcpServersProvidersGetOutputFromJSON(data []byte) (*MagicMcpServersProvidersGetOutput, error) { var v MagicMcpServersProvidersGetOutput diff --git a/v1/resources/magicmcpservers/providers/list.go b/v1/resources/magicmcpservers/providers/list.go index 2d453d4..c6d9628 100644 --- a/v1/resources/magicmcpservers/providers/list.go +++ b/v1/resources/magicmcpservers/providers/list.go @@ -13,6 +13,24 @@ type MagicMcpServersProvidersListOutputItemsToolFilter struct { Filters *[]any `json:"filters,omitempty"` } +// MagicMcpServersProvidersListOutputItemsProvider represents the magic mcp servers providers list output items provider type. +type MagicMcpServersProvidersListOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersListOutputItemsDeployment represents the magic mcp servers providers list output items deployment type. type MagicMcpServersProvidersListOutputItemsDeployment struct { // Object - String representing the object's type @@ -35,6 +53,93 @@ type MagicMcpServersProvidersListOutputItemsDeployment struct { UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersListOutputItemsAuthMethodInputSchema represents the magic mcp servers providers list output items auth method input schema type. +type MagicMcpServersProvidersListOutputItemsAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersListOutputItemsAuthMethodOutputSchema represents the magic mcp servers providers list output items auth method output schema type. +type MagicMcpServersProvidersListOutputItemsAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersListOutputItemsAuthMethodScopes represents the magic mcp servers providers list output items auth method scopes type. +type MagicMcpServersProvidersListOutputItemsAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersProvidersListOutputItemsAuthMethod represents the magic mcp servers providers list output items auth method type. +type MagicMcpServersProvidersListOutputItemsAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersProvidersListOutputItemsAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersProvidersListOutputItemsAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersProvidersListOutputItemsAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersProvidersListOutputItemsAuthCredentials represents the magic mcp servers providers list output items auth credentials type. +type MagicMcpServersProvidersListOutputItemsAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersListOutputItemsConfig represents the magic mcp servers providers list output items config type. type MagicMcpServersProvidersListOutputItemsConfig struct { // Object - String representing the object's type @@ -59,33 +164,49 @@ type MagicMcpServersProvidersListOutputItemsConfig struct { // MagicMcpServersProvidersListOutputItemsAuthConfig represents the magic mcp servers providers list output items auth config type. type MagicMcpServersProvidersListOutputItemsAuthConfig struct { - Object string `json:"object"` - Id string `json:"id"` -} - -// MagicMcpServersProvidersListOutputItems represents the magic mcp servers providers list output items type. -type MagicMcpServersProvidersListOutputItems struct { // Object - String representing the object's type Object string `json:"object"` - // Id - Unique magic MCP server provider identifier + // Id - Config ID Id string `json:"id"` - // Status - Provider status - Status string `json:"status"` - // ToolFilter - Tool filter configuration - ToolFilter MagicMcpServersProvidersListOutputItemsToolFilter `json:"tool_filter"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` // ProviderId - Provider ID ProviderId string `json:"provider_id"` - // MagicMcpServerId - Parent magic MCP server ID - MagicMcpServerId string `json:"magic_mcp_server_id"` - Deployment MagicMcpServersProvidersListOutputItemsDeployment `json:"deployment"` - Config MagicMcpServersProvidersListOutputItemsConfig `json:"config"` - AuthConfig *MagicMcpServersProvidersListOutputItemsAuthConfig `json:"auth_config,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` // UpdatedAt - Timestamp when last updated UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersListOutputItems represents the magic mcp servers providers list output items type. +type MagicMcpServersProvidersListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersProvidersListOutputItemsToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersProvidersListOutputItemsProvider `json:"provider"` + Deployment MagicMcpServersProvidersListOutputItemsDeployment `json:"deployment"` + AuthMethod *MagicMcpServersProvidersListOutputItemsAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersProvidersListOutputItemsAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersProvidersListOutputItemsConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersProvidersListOutputItemsAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpServersProvidersListOutputPagination represents the magic mcp servers providers list output pagination type. type MagicMcpServersProvidersListOutputPagination struct { HasMoreBefore bool `json:"has_more_before"` @@ -130,22 +251,19 @@ type MagicMcpServersProvidersListQueryUpdatedAt struct { // MagicMcpServersProvidersListQuery represents the magic mcp servers providers list query type. type MagicMcpServersProvidersListQuery struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - Status *any `json:"status,omitempty"` - // Id - Filter by magic MCP server provider ID(s) - Id *any `json:"id,omitempty"` - // ProviderId - Filter by provider ID(s) - ProviderId *any `json:"provider_id,omitempty"` - // ProviderDeploymentId - Filter by provider deployment ID(s) - ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` - // ProviderConfigId - Filter by provider config ID(s) - ProviderConfigId *any `json:"provider_config_id,omitempty"` - // ProviderAuthConfigId - Filter by provider auth config ID(s) - ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationProviderId *any `json:"integration_provider_id,omitempty"` + IntegrationInstanceProviderId *any `json:"integration_instance_provider_id,omitempty"` + ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + ProviderConfigId *any `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` // CreatedAt - Filter magic MCP server provider creation time by date range CreatedAt *MagicMcpServersProvidersListQueryCreatedAt `json:"created_at,omitempty"` // UpdatedAt - Filter magic MCP server provider last update time by date range diff --git a/v1/resources/magicmcpservers/providers/update.go b/v1/resources/magicmcpservers/providers/update.go index 821d032..76ec6f7 100644 --- a/v1/resources/magicmcpservers/providers/update.go +++ b/v1/resources/magicmcpservers/providers/update.go @@ -13,6 +13,24 @@ type MagicMcpServersProvidersUpdateOutputToolFilter struct { Filters *[]any `json:"filters,omitempty"` } +// MagicMcpServersProvidersUpdateOutputProvider represents the magic mcp servers providers update output provider type. +type MagicMcpServersProvidersUpdateOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersUpdateOutputDeployment represents the magic mcp servers providers update output deployment type. type MagicMcpServersProvidersUpdateOutputDeployment struct { // Object - String representing the object's type @@ -35,6 +53,93 @@ type MagicMcpServersProvidersUpdateOutputDeployment struct { UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersUpdateOutputAuthMethodInputSchema represents the magic mcp servers providers update output auth method input schema type. +type MagicMcpServersProvidersUpdateOutputAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersUpdateOutputAuthMethodOutputSchema represents the magic mcp servers providers update output auth method output schema type. +type MagicMcpServersProvidersUpdateOutputAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersProvidersUpdateOutputAuthMethodScopes represents the magic mcp servers providers update output auth method scopes type. +type MagicMcpServersProvidersUpdateOutputAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersProvidersUpdateOutputAuthMethod represents the magic mcp servers providers update output auth method type. +type MagicMcpServersProvidersUpdateOutputAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersProvidersUpdateOutputAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersProvidersUpdateOutputAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersProvidersUpdateOutputAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersProvidersUpdateOutputAuthCredentials represents the magic mcp servers providers update output auth credentials type. +type MagicMcpServersProvidersUpdateOutputAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + // MagicMcpServersProvidersUpdateOutputConfig represents the magic mcp servers providers update output config type. type MagicMcpServersProvidersUpdateOutputConfig struct { // Object - String representing the object's type @@ -59,33 +164,49 @@ type MagicMcpServersProvidersUpdateOutputConfig struct { // MagicMcpServersProvidersUpdateOutputAuthConfig represents the magic mcp servers providers update output auth config type. type MagicMcpServersProvidersUpdateOutputAuthConfig struct { - Object string `json:"object"` - Id string `json:"id"` -} - -// MagicMcpServersProvidersUpdateOutput represents the magic mcp servers providers update output type. -type MagicMcpServersProvidersUpdateOutput struct { // Object - String representing the object's type Object string `json:"object"` - // Id - Unique magic MCP server provider identifier + // Id - Config ID Id string `json:"id"` - // Status - Provider status - Status string `json:"status"` - // ToolFilter - Tool filter configuration - ToolFilter MagicMcpServersProvidersUpdateOutputToolFilter `json:"tool_filter"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` // ProviderId - Provider ID ProviderId string `json:"provider_id"` - // MagicMcpServerId - Parent magic MCP server ID - MagicMcpServerId string `json:"magic_mcp_server_id"` - Deployment MagicMcpServersProvidersUpdateOutputDeployment `json:"deployment"` - Config MagicMcpServersProvidersUpdateOutputConfig `json:"config"` - AuthConfig *MagicMcpServersProvidersUpdateOutputAuthConfig `json:"auth_config,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` // UpdatedAt - Timestamp when last updated UpdatedAt time.Time `json:"updated_at"` } +// MagicMcpServersProvidersUpdateOutput represents the magic mcp servers providers update output type. +type MagicMcpServersProvidersUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersProvidersUpdateOutputToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersProvidersUpdateOutputProvider `json:"provider"` + Deployment MagicMcpServersProvidersUpdateOutputDeployment `json:"deployment"` + AuthMethod *MagicMcpServersProvidersUpdateOutputAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersProvidersUpdateOutputAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersProvidersUpdateOutputConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersProvidersUpdateOutputAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MapMagicMcpServersProvidersUpdateOutputFromJSON deserializes JSON data into a MagicMcpServersProvidersUpdateOutput. func MapMagicMcpServersProvidersUpdateOutputFromJSON(data []byte) (*MagicMcpServersProvidersUpdateOutput, error) { var v MagicMcpServersProvidersUpdateOutput @@ -102,7 +223,10 @@ func MapMagicMcpServersProvidersUpdateOutputToJSON(v *MagicMcpServersProvidersUp // MagicMcpServersProvidersUpdateBody represents the magic mcp servers providers update body type. type MagicMcpServersProvidersUpdateBody struct { - ToolFilters *any `json:"tool_filters,omitempty"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + ProviderAuthConfigId *string `json:"provider_auth_config_id,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } // MapMagicMcpServersProvidersUpdateBodyFromJSON deserializes JSON data into a MagicMcpServersProvidersUpdateBody. diff --git a/v1/resources/magicmcpservers/update.go b/v1/resources/magicmcpservers/update.go index 3dcfaf5..2d843e0 100644 --- a/v1/resources/magicmcpservers/update.go +++ b/v1/resources/magicmcpservers/update.go @@ -12,19 +12,223 @@ type MagicMcpServersUpdateOutputEndpoints struct { Url string `json:"url"` } +// MagicMcpServersUpdateOutputProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpServersUpdateOutputProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpServersUpdateOutputProvidersProvider represents the magic mcp servers update output providers provider type. +type MagicMcpServersUpdateOutputProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersUpdateOutputProvidersDeployment represents the magic mcp servers update output providers deployment type. +type MagicMcpServersUpdateOutputProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersUpdateOutputProvidersAuthMethodInputSchema represents the magic mcp servers update output providers auth method input schema type. +type MagicMcpServersUpdateOutputProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersUpdateOutputProvidersAuthMethodOutputSchema represents the magic mcp servers update output providers auth method output schema type. +type MagicMcpServersUpdateOutputProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpServersUpdateOutputProvidersAuthMethodScopes represents the magic mcp servers update output providers auth method scopes type. +type MagicMcpServersUpdateOutputProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpServersUpdateOutputProvidersAuthMethod represents the magic mcp servers update output providers auth method type. +type MagicMcpServersUpdateOutputProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpServersUpdateOutputProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpServersUpdateOutputProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpServersUpdateOutputProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersUpdateOutputProvidersAuthCredentials represents the magic mcp servers update output providers auth credentials type. +type MagicMcpServersUpdateOutputProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersUpdateOutputProvidersConfig represents the magic mcp servers update output providers config type. +type MagicMcpServersUpdateOutputProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersUpdateOutputProvidersAuthConfig represents the magic mcp servers update output providers auth config type. +type MagicMcpServersUpdateOutputProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpServersUpdateOutputProviders represents the magic mcp servers update output providers type. +type MagicMcpServersUpdateOutputProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpServersUpdateOutputProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpServersUpdateOutputProvidersProvider `json:"provider"` + Deployment MagicMcpServersUpdateOutputProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpServersUpdateOutputProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpServersUpdateOutputProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpServersUpdateOutputProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpServersUpdateOutputProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpServersUpdateOutput represents the magic mcp servers update output type. type MagicMcpServersUpdateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpServersUpdateOutputEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpServersUpdateOutputEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpServersUpdateOutputProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapMagicMcpServersUpdateOutputFromJSON deserializes JSON data into a MagicMcpServersUpdateOutput. @@ -43,11 +247,10 @@ func MapMagicMcpServersUpdateOutputToJSON(v *MagicMcpServersUpdateOutput) ([]byt // MagicMcpServersUpdateBody represents the magic mcp servers update body type. type MagicMcpServersUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - Aliases *[]string `json:"aliases,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Aliases *[]string `json:"aliases,omitempty"` } // MapMagicMcpServersUpdateBodyFromJSON deserializes JSON data into a MagicMcpServersUpdateBody. diff --git a/v1/resources/magicmcpsessions/get.go b/v1/resources/magicmcpsessions/get.go index 6b91fcb..0c85c96 100644 --- a/v1/resources/magicmcpsessions/get.go +++ b/v1/resources/magicmcpsessions/get.go @@ -12,37 +12,238 @@ type MagicMcpSessionsGetOutputMagicMcpServerEndpoints struct { Url string `json:"url"` } +// MagicMcpSessionsGetOutputMagicMcpServerProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersProvider represents the magic mcp sessions get output magic mcp server providers provider type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersDeployment represents the magic mcp sessions get output magic mcp server providers deployment type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodInputSchema represents the magic mcp sessions get output magic mcp server providers auth method input schema type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodOutputSchema represents the magic mcp sessions get output magic mcp server providers auth method output schema type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodScopes represents the magic mcp sessions get output magic mcp server providers auth method scopes type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethod represents the magic mcp sessions get output magic mcp server providers auth method type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthCredentials represents the magic mcp sessions get output magic mcp server providers auth credentials type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersConfig represents the magic mcp sessions get output magic mcp server providers config type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthConfig represents the magic mcp sessions get output magic mcp server providers auth config type. +type MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsGetOutputMagicMcpServerProviders represents the magic mcp sessions get output magic mcp server providers type. +type MagicMcpSessionsGetOutputMagicMcpServerProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpSessionsGetOutputMagicMcpServerProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpSessionsGetOutputMagicMcpServerProvidersProvider `json:"provider"` + Deployment MagicMcpSessionsGetOutputMagicMcpServerProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpSessionsGetOutputMagicMcpServerProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpSessionsGetOutputMagicMcpServerProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpSessionsGetOutputMagicMcpServer represents the magic mcp sessions get output magic mcp server type. type MagicMcpSessionsGetOutputMagicMcpServer struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpSessionsGetOutputMagicMcpServerEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpSessionsGetOutputMagicMcpServerEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpSessionsGetOutputMagicMcpServerProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MagicMcpSessionsGetOutputMagicMcpEndpoint represents the magic mcp sessions get output magic mcp endpoint type. type MagicMcpSessionsGetOutputMagicMcpEndpoint struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MagicMcpSessionsGetOutput represents the magic mcp sessions get output type. diff --git a/v1/resources/magicmcpsessions/list.go b/v1/resources/magicmcpsessions/list.go index 5fb8ec1..149cb68 100644 --- a/v1/resources/magicmcpsessions/list.go +++ b/v1/resources/magicmcpsessions/list.go @@ -12,37 +12,238 @@ type MagicMcpSessionsListOutputItemsMagicMcpServerEndpoints struct { Url string `json:"url"` } +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersToolFilter represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersToolFilter struct { + Type *string `json:"type,omitempty"` + IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` + Filters *[]any `json:"filters,omitempty"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersProvider represents the magic mcp sessions list output items magic mcp server providers provider type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersDeployment represents the magic mcp sessions list output items magic mcp server providers deployment type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersDeployment struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Deployment ID + Id string `json:"id"` + // IsDefault - Whether this is the default deployment + IsDefault bool `json:"is_default"` + // Name - Deployment name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodInputSchema represents the magic mcp sessions list output items magic mcp server providers auth method input schema type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodInputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the required auth input fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodOutputSchema represents the magic mcp sessions list output items magic mcp server providers auth method output schema type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodOutputSchema struct { + Type string `json:"type"` + // Schema - JSON Schema defining the auth output fields + Schema map[string]any `json:"schema"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodScopes represents the magic mcp sessions list output items magic mcp server providers auth method scopes type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodScopes struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique scope identifier + Id string `json:"id"` + // Scope - OAuth scope string + Scope string `json:"scope"` + // Name - Display name of the scope + Name string `json:"name"` + // Description - Scope description + Description *string `json:"description,omitempty"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethod represents the magic mcp sessions list output items magic mcp server providers auth method type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethod struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique auth method identifier + Id string `json:"id"` + // Type - Authentication type + Type string `json:"type"` + // Key - Auth method key + Key string `json:"key"` + // Name - Display name + Name string `json:"name"` + // Description - Auth method description + Description *string `json:"description,omitempty"` + // Capabilities - Auth method capabilities + Capabilities map[string]any `json:"capabilities"` + InputSchema *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodInputSchema `json:"input_schema,omitempty"` + OutputSchema *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodOutputSchema `json:"output_schema,omitempty"` + // Scopes - Available OAuth scopes + Scopes *[]MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethodScopes `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // ProviderSpecificationId - Specification ID + ProviderSpecificationId string `json:"provider_specification_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthCredentials represents the magic mcp sessions list output items magic mcp server providers auth credentials type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthCredentials struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique credentials identifier + Id string `json:"id"` + Type string `json:"type"` + // Status - Credentials status + Status string `json:"status"` + // IsDefault - Whether this is the default credentials for the provider + IsDefault bool `json:"is_default"` + // IsManaged - Whether these credentials are managed by Metorial + IsManaged bool `json:"is_managed"` + // Name - Display name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // Scopes - OAuth scopes requested by this credential + Scopes *[]string `json:"scopes,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersConfig represents the magic mcp sessions list output items magic mcp server providers config type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthConfig represents the magic mcp sessions list output items magic mcp server providers auth config type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthConfig struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Config ID + Id string `json:"id"` + // IsDefault - Whether this is the default config + IsDefault bool `json:"is_default"` + // Name - Config name + Name *string `json:"name,omitempty"` + // Description - Description + Description *string `json:"description,omitempty"` + // Metadata - Custom key-value pairs for storing additional information + Metadata *map[string]any `json:"metadata,omitempty"` + // ProviderId - Provider ID + ProviderId string `json:"provider_id"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// MagicMcpSessionsListOutputItemsMagicMcpServerProviders represents the magic mcp sessions list output items magic mcp server providers type. +type MagicMcpSessionsListOutputItemsMagicMcpServerProviders struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + MagicMcpServerId string `json:"magic_mcp_server_id"` + ProviderManagementMode string `json:"provider_management_mode"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + // ToolFilter - Tool filter configuration + ToolFilter *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersToolFilter `json:"tool_filter,omitempty"` + Provider MagicMcpSessionsListOutputItemsMagicMcpServerProvidersProvider `json:"provider"` + Deployment MagicMcpSessionsListOutputItemsMagicMcpServerProvidersDeployment `json:"deployment"` + AuthMethod *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthMethod `json:"auth_method,omitempty"` + AuthCredentials *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthCredentials `json:"auth_credentials,omitempty"` + Config *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersConfig `json:"config,omitempty"` + AuthConfig *MagicMcpSessionsListOutputItemsMagicMcpServerProvidersAuthConfig `json:"auth_config,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + // MagicMcpSessionsListOutputItemsMagicMcpServer represents the magic mcp sessions list output items magic mcp server type. type MagicMcpSessionsListOutputItemsMagicMcpServer struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Source string `json:"source"` - ProviderTemplateId *string `json:"provider_template_id,omitempty"` - Endpoints []MagicMcpSessionsListOutputItemsMagicMcpServerEndpoints `json:"endpoints"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Source string `json:"source"` + ProviderManagementMode string `json:"provider_management_mode"` + Endpoints []MagicMcpSessionsListOutputItemsMagicMcpServerEndpoints `json:"endpoints"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + Providers []MagicMcpSessionsListOutputItemsMagicMcpServerProviders `json:"providers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MagicMcpSessionsListOutputItemsMagicMcpEndpoint represents the magic mcp sessions list output items magic mcp endpoint type. type MagicMcpSessionsListOutputItemsMagicMcpEndpoint struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Slug string `json:"slug"` - Url string `json:"url"` - ConsumerProfileId *string `json:"consumer_profile_id,omitempty"` - SessionTemplateId *string `json:"session_template_id,omitempty"` - SessionId *string `json:"session_id,omitempty"` - Servers []map[string]any `json:"servers"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Url string `json:"url"` + Servers []map[string]any `json:"servers"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MagicMcpSessionsListOutputItems represents the magic mcp sessions list output items type. diff --git a/v1/resources/portals/access/create.go b/v1/resources/portals/access/create.go new file mode 100644 index 0000000..f71adac --- /dev/null +++ b/v1/resources/portals/access/create.go @@ -0,0 +1,149 @@ +package access + +import ( + "encoding/json" + "time" +) + +// PortalsAccessCreateOutputAccessProviderTemplate represents the portals access create output access provider template type. +type PortalsAccessCreateOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessCreateOutputAccessMagicMcpServer represents the portals access create output access magic mcp server type. +type PortalsAccessCreateOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessCreateOutputAccessSkill represents the portals access create output access skill type. +type PortalsAccessCreateOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsAccessCreateOutputAccessSkillTemplate represents the portals access create output access skill template type. +type PortalsAccessCreateOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessCreateOutputAccessSkillGroup represents the portals access create output access skill group type. +type PortalsAccessCreateOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessCreateOutputAccessSkillMarketplace represents the portals access create output access skill marketplace type. +type PortalsAccessCreateOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsAccessCreateOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessCreateOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessCreateOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessCreateOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsAccessCreateOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsAccessCreateOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsAccessCreateOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsAccessCreateOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsAccessCreateOutputConsumerGroup represents the portals access create output consumer group type. +type PortalsAccessCreateOutputConsumerGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessCreateOutput represents the portals access create output type. +type PortalsAccessCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsAccessCreateOutputAccess `json:"access"` + ConsumerGroup PortalsAccessCreateOutputConsumerGroup `json:"consumer_group"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAccessCreateOutputFromJSON deserializes JSON data into a PortalsAccessCreateOutput. +func MapPortalsAccessCreateOutputFromJSON(data []byte) (*PortalsAccessCreateOutput, error) { + var v PortalsAccessCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessCreateOutputToJSON serializes a PortalsAccessCreateOutput to JSON. +func MapPortalsAccessCreateOutputToJSON(v *PortalsAccessCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAccessCreateBodyAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessCreateBodyAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` + SkillId *string `json:"skill_id,omitempty"` + SkillTemplateId *string `json:"skill_template_id,omitempty"` + SkillGroupId *string `json:"skill_group_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` +} + +// PortalsAccessCreateBody represents the portals access create body type. +type PortalsAccessCreateBody struct { + ConsumerGroupId string `json:"consumer_group_id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsAccessCreateBodyAccess `json:"access"` +} + +// MapPortalsAccessCreateBodyFromJSON deserializes JSON data into a PortalsAccessCreateBody. +func MapPortalsAccessCreateBodyFromJSON(data []byte) (*PortalsAccessCreateBody, error) { + var v PortalsAccessCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessCreateBodyToJSON serializes a PortalsAccessCreateBody to JSON. +func MapPortalsAccessCreateBodyToJSON(v *PortalsAccessCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/access/delete.go b/v1/resources/portals/access/delete.go new file mode 100644 index 0000000..6ad43b3 --- /dev/null +++ b/v1/resources/portals/access/delete.go @@ -0,0 +1,114 @@ +package access + +import ( + "encoding/json" + "time" +) + +// PortalsAccessDeleteOutputAccessProviderTemplate represents the portals access delete output access provider template type. +type PortalsAccessDeleteOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessDeleteOutputAccessMagicMcpServer represents the portals access delete output access magic mcp server type. +type PortalsAccessDeleteOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessDeleteOutputAccessSkill represents the portals access delete output access skill type. +type PortalsAccessDeleteOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsAccessDeleteOutputAccessSkillTemplate represents the portals access delete output access skill template type. +type PortalsAccessDeleteOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessDeleteOutputAccessSkillGroup represents the portals access delete output access skill group type. +type PortalsAccessDeleteOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessDeleteOutputAccessSkillMarketplace represents the portals access delete output access skill marketplace type. +type PortalsAccessDeleteOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsAccessDeleteOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessDeleteOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessDeleteOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessDeleteOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsAccessDeleteOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsAccessDeleteOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsAccessDeleteOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsAccessDeleteOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsAccessDeleteOutputConsumerGroup represents the portals access delete output consumer group type. +type PortalsAccessDeleteOutputConsumerGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessDeleteOutput represents the portals access delete output type. +type PortalsAccessDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsAccessDeleteOutputAccess `json:"access"` + ConsumerGroup PortalsAccessDeleteOutputConsumerGroup `json:"consumer_group"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAccessDeleteOutputFromJSON deserializes JSON data into a PortalsAccessDeleteOutput. +func MapPortalsAccessDeleteOutputFromJSON(data []byte) (*PortalsAccessDeleteOutput, error) { + var v PortalsAccessDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessDeleteOutputToJSON serializes a PortalsAccessDeleteOutput to JSON. +func MapPortalsAccessDeleteOutputToJSON(v *PortalsAccessDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/access/get.go b/v1/resources/portals/access/get.go new file mode 100644 index 0000000..1e02619 --- /dev/null +++ b/v1/resources/portals/access/get.go @@ -0,0 +1,114 @@ +package access + +import ( + "encoding/json" + "time" +) + +// PortalsAccessGetOutputAccessProviderTemplate represents the portals access get output access provider template type. +type PortalsAccessGetOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessGetOutputAccessMagicMcpServer represents the portals access get output access magic mcp server type. +type PortalsAccessGetOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessGetOutputAccessSkill represents the portals access get output access skill type. +type PortalsAccessGetOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsAccessGetOutputAccessSkillTemplate represents the portals access get output access skill template type. +type PortalsAccessGetOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessGetOutputAccessSkillGroup represents the portals access get output access skill group type. +type PortalsAccessGetOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessGetOutputAccessSkillMarketplace represents the portals access get output access skill marketplace type. +type PortalsAccessGetOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsAccessGetOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessGetOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessGetOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessGetOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsAccessGetOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsAccessGetOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsAccessGetOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsAccessGetOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsAccessGetOutputConsumerGroup represents the portals access get output consumer group type. +type PortalsAccessGetOutputConsumerGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessGetOutput represents the portals access get output type. +type PortalsAccessGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsAccessGetOutputAccess `json:"access"` + ConsumerGroup PortalsAccessGetOutputConsumerGroup `json:"consumer_group"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAccessGetOutputFromJSON deserializes JSON data into a PortalsAccessGetOutput. +func MapPortalsAccessGetOutputFromJSON(data []byte) (*PortalsAccessGetOutput, error) { + var v PortalsAccessGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessGetOutputToJSON serializes a PortalsAccessGetOutput to JSON. +func MapPortalsAccessGetOutputToJSON(v *PortalsAccessGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/access/list.go b/v1/resources/portals/access/list.go new file mode 100644 index 0000000..7f80b77 --- /dev/null +++ b/v1/resources/portals/access/list.go @@ -0,0 +1,159 @@ +package access + +import ( + "encoding/json" + "time" +) + +// PortalsAccessListOutputItemsAccessProviderTemplate represents the portals access list output items access provider template type. +type PortalsAccessListOutputItemsAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessListOutputItemsAccessMagicMcpServer represents the portals access list output items access magic mcp server type. +type PortalsAccessListOutputItemsAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessListOutputItemsAccessSkill represents the portals access list output items access skill type. +type PortalsAccessListOutputItemsAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsAccessListOutputItemsAccessSkillTemplate represents the portals access list output items access skill template type. +type PortalsAccessListOutputItemsAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessListOutputItemsAccessSkillGroup represents the portals access list output items access skill group type. +type PortalsAccessListOutputItemsAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessListOutputItemsAccessSkillMarketplace represents the portals access list output items access skill marketplace type. +type PortalsAccessListOutputItemsAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsAccessListOutputItemsAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessListOutputItemsAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessListOutputItemsAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessListOutputItemsAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsAccessListOutputItemsAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsAccessListOutputItemsAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsAccessListOutputItemsAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsAccessListOutputItemsAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsAccessListOutputItemsConsumerGroup represents the portals access list output items consumer group type. +type PortalsAccessListOutputItemsConsumerGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessListOutputItems represents the portals access list output items type. +type PortalsAccessListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsAccessListOutputItemsAccess `json:"access"` + ConsumerGroup PortalsAccessListOutputItemsConsumerGroup `json:"consumer_group"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessListOutputPagination represents the portals access list output pagination type. +type PortalsAccessListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsAccessListOutput represents the portals access list output type. +type PortalsAccessListOutput struct { + Items []PortalsAccessListOutputItems `json:"items"` + Pagination PortalsAccessListOutputPagination `json:"pagination"` +} + +// MapPortalsAccessListOutputFromJSON deserializes JSON data into a PortalsAccessListOutput. +func MapPortalsAccessListOutputFromJSON(data []byte) (*PortalsAccessListOutput, error) { + var v PortalsAccessListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessListOutputToJSON serializes a PortalsAccessListOutput to JSON. +func MapPortalsAccessListOutputToJSON(v *PortalsAccessListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAccessListQuery represents the portals access list query type. +type PortalsAccessListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerGroupId *any `json:"consumer_group_id,omitempty"` + ProviderTemplateId *any `json:"provider_template_id,omitempty"` + MagicMcpServerId *any `json:"magic_mcp_server_id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + SkillTemplateId *any `json:"skill_template_id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + ConsumerAccessListingId *any `json:"consumer_access_listing_id,omitempty"` + Type *any `json:"type,omitempty"` +} + +// MapPortalsAccessListQueryFromJSON deserializes JSON data into a PortalsAccessListQuery. +func MapPortalsAccessListQueryFromJSON(data []byte) (*PortalsAccessListQuery, error) { + var v PortalsAccessListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessListQueryToJSON serializes a PortalsAccessListQuery to JSON. +func MapPortalsAccessListQueryToJSON(v *PortalsAccessListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/access/update.go b/v1/resources/portals/access/update.go new file mode 100644 index 0000000..4899772 --- /dev/null +++ b/v1/resources/portals/access/update.go @@ -0,0 +1,135 @@ +package access + +import ( + "encoding/json" + "time" +) + +// PortalsAccessUpdateOutputAccessProviderTemplate represents the portals access update output access provider template type. +type PortalsAccessUpdateOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessUpdateOutputAccessMagicMcpServer represents the portals access update output access magic mcp server type. +type PortalsAccessUpdateOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessUpdateOutputAccessSkill represents the portals access update output access skill type. +type PortalsAccessUpdateOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsAccessUpdateOutputAccessSkillTemplate represents the portals access update output access skill template type. +type PortalsAccessUpdateOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessUpdateOutputAccessSkillGroup represents the portals access update output access skill group type. +type PortalsAccessUpdateOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessUpdateOutputAccessSkillMarketplace represents the portals access update output access skill marketplace type. +type PortalsAccessUpdateOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsAccessUpdateOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessUpdateOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessUpdateOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessUpdateOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsAccessUpdateOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsAccessUpdateOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsAccessUpdateOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsAccessUpdateOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsAccessUpdateOutputConsumerGroup represents the portals access update output consumer group type. +type PortalsAccessUpdateOutputConsumerGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessUpdateOutput represents the portals access update output type. +type PortalsAccessUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsAccessUpdateOutputAccess `json:"access"` + ConsumerGroup PortalsAccessUpdateOutputConsumerGroup `json:"consumer_group"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAccessUpdateOutputFromJSON deserializes JSON data into a PortalsAccessUpdateOutput. +func MapPortalsAccessUpdateOutputFromJSON(data []byte) (*PortalsAccessUpdateOutput, error) { + var v PortalsAccessUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessUpdateOutputToJSON serializes a PortalsAccessUpdateOutput to JSON. +func MapPortalsAccessUpdateOutputToJSON(v *PortalsAccessUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAccessUpdateBody represents the portals access update body type. +type PortalsAccessUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` +} + +// MapPortalsAccessUpdateBodyFromJSON deserializes JSON data into a PortalsAccessUpdateBody. +func MapPortalsAccessUpdateBodyFromJSON(data []byte) (*PortalsAccessUpdateBody, error) { + var v PortalsAccessUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessUpdateBodyToJSON serializes a PortalsAccessUpdateBody to JSON. +func MapPortalsAccessUpdateBodyToJSON(v *PortalsAccessUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/accessrequests/get.go b/v1/resources/portals/accessrequests/get.go new file mode 100644 index 0000000..4f700a2 --- /dev/null +++ b/v1/resources/portals/accessrequests/get.go @@ -0,0 +1,72 @@ +package accessrequests + +import ( + "encoding/json" + "time" +) + +// PortalsAccessRequestsGetOutputConsumerProfile represents the portals access requests get output consumer profile type. +type PortalsAccessRequestsGetOutputConsumerProfile struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` +} + +// PortalsAccessRequestsGetOutputTargetProviderTemplate represents the portals access requests get output target provider template type. +type PortalsAccessRequestsGetOutputTargetProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessRequestsGetOutputTargetMagicMcpServer represents the portals access requests get output target magic mcp server type. +type PortalsAccessRequestsGetOutputTargetMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessRequestsGetOutputTarget represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessRequestsGetOutputTarget struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessRequestsGetOutputTargetProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessRequestsGetOutputTargetMagicMcpServer `json:"magic_mcp_server,omitempty"` +} + +// PortalsAccessRequestsGetOutput represents the portals access requests get output type. +type PortalsAccessRequestsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Message *string `json:"message,omitempty"` + ResolutionMessage *string `json:"resolution_message,omitempty"` + ConsumerProfile PortalsAccessRequestsGetOutputConsumerProfile `json:"consumer_profile"` + Target PortalsAccessRequestsGetOutputTarget `json:"target"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ReviewedAt *time.Time `json:"reviewed_at,omitempty"` +} + +// MapPortalsAccessRequestsGetOutputFromJSON deserializes JSON data into a PortalsAccessRequestsGetOutput. +func MapPortalsAccessRequestsGetOutputFromJSON(data []byte) (*PortalsAccessRequestsGetOutput, error) { + var v PortalsAccessRequestsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessRequestsGetOutputToJSON serializes a PortalsAccessRequestsGetOutput to JSON. +func MapPortalsAccessRequestsGetOutputToJSON(v *PortalsAccessRequestsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/accessrequests/list.go b/v1/resources/portals/accessrequests/list.go new file mode 100644 index 0000000..e1b0818 --- /dev/null +++ b/v1/resources/portals/accessrequests/list.go @@ -0,0 +1,110 @@ +package accessrequests + +import ( + "encoding/json" + "time" +) + +// PortalsAccessRequestsListOutputItemsConsumerProfile represents the portals access requests list output items consumer profile type. +type PortalsAccessRequestsListOutputItemsConsumerProfile struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` +} + +// PortalsAccessRequestsListOutputItemsTargetProviderTemplate represents the portals access requests list output items target provider template type. +type PortalsAccessRequestsListOutputItemsTargetProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessRequestsListOutputItemsTargetMagicMcpServer represents the portals access requests list output items target magic mcp server type. +type PortalsAccessRequestsListOutputItemsTargetMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessRequestsListOutputItemsTarget represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessRequestsListOutputItemsTarget struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessRequestsListOutputItemsTargetProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessRequestsListOutputItemsTargetMagicMcpServer `json:"magic_mcp_server,omitempty"` +} + +// PortalsAccessRequestsListOutputItems represents the portals access requests list output items type. +type PortalsAccessRequestsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Message *string `json:"message,omitempty"` + ResolutionMessage *string `json:"resolution_message,omitempty"` + ConsumerProfile PortalsAccessRequestsListOutputItemsConsumerProfile `json:"consumer_profile"` + Target PortalsAccessRequestsListOutputItemsTarget `json:"target"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ReviewedAt *time.Time `json:"reviewed_at,omitempty"` +} + +// PortalsAccessRequestsListOutputPagination represents the portals access requests list output pagination type. +type PortalsAccessRequestsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsAccessRequestsListOutput represents the portals access requests list output type. +type PortalsAccessRequestsListOutput struct { + Items []PortalsAccessRequestsListOutputItems `json:"items"` + Pagination PortalsAccessRequestsListOutputPagination `json:"pagination"` +} + +// MapPortalsAccessRequestsListOutputFromJSON deserializes JSON data into a PortalsAccessRequestsListOutput. +func MapPortalsAccessRequestsListOutputFromJSON(data []byte) (*PortalsAccessRequestsListOutput, error) { + var v PortalsAccessRequestsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessRequestsListOutputToJSON serializes a PortalsAccessRequestsListOutput to JSON. +func MapPortalsAccessRequestsListOutputToJSON(v *PortalsAccessRequestsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAccessRequestsListQuery represents the portals access requests list query type. +type PortalsAccessRequestsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + ConsumerProfileId *any `json:"consumer_profile_id,omitempty"` + Search *string `json:"search,omitempty"` +} + +// MapPortalsAccessRequestsListQueryFromJSON deserializes JSON data into a PortalsAccessRequestsListQuery. +func MapPortalsAccessRequestsListQueryFromJSON(data []byte) (*PortalsAccessRequestsListQuery, error) { + var v PortalsAccessRequestsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessRequestsListQueryToJSON serializes a PortalsAccessRequestsListQuery to JSON. +func MapPortalsAccessRequestsListQueryToJSON(v *PortalsAccessRequestsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/accessrequests/update.go b/v1/resources/portals/accessrequests/update.go new file mode 100644 index 0000000..ec87ca2 --- /dev/null +++ b/v1/resources/portals/accessrequests/update.go @@ -0,0 +1,93 @@ +package accessrequests + +import ( + "encoding/json" + "time" +) + +// PortalsAccessRequestsUpdateOutputConsumerProfile represents the portals access requests update output consumer profile type. +type PortalsAccessRequestsUpdateOutputConsumerProfile struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` +} + +// PortalsAccessRequestsUpdateOutputTargetProviderTemplate represents the portals access requests update output target provider template type. +type PortalsAccessRequestsUpdateOutputTargetProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAccessRequestsUpdateOutputTargetMagicMcpServer represents the portals access requests update output target magic mcp server type. +type PortalsAccessRequestsUpdateOutputTargetMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsAccessRequestsUpdateOutputTarget represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsAccessRequestsUpdateOutputTarget struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsAccessRequestsUpdateOutputTargetProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsAccessRequestsUpdateOutputTargetMagicMcpServer `json:"magic_mcp_server,omitempty"` +} + +// PortalsAccessRequestsUpdateOutput represents the portals access requests update output type. +type PortalsAccessRequestsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Message *string `json:"message,omitempty"` + ResolutionMessage *string `json:"resolution_message,omitempty"` + ConsumerProfile PortalsAccessRequestsUpdateOutputConsumerProfile `json:"consumer_profile"` + Target PortalsAccessRequestsUpdateOutputTarget `json:"target"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ReviewedAt *time.Time `json:"reviewed_at,omitempty"` +} + +// MapPortalsAccessRequestsUpdateOutputFromJSON deserializes JSON data into a PortalsAccessRequestsUpdateOutput. +func MapPortalsAccessRequestsUpdateOutputFromJSON(data []byte) (*PortalsAccessRequestsUpdateOutput, error) { + var v PortalsAccessRequestsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessRequestsUpdateOutputToJSON serializes a PortalsAccessRequestsUpdateOutput to JSON. +func MapPortalsAccessRequestsUpdateOutputToJSON(v *PortalsAccessRequestsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAccessRequestsUpdateBody represents the portals access requests update body type. +type PortalsAccessRequestsUpdateBody struct { + Status string `json:"status"` + ResolutionMessage *string `json:"resolution_message,omitempty"` + ConsumerGroupId *string `json:"consumer_group_id,omitempty"` +} + +// MapPortalsAccessRequestsUpdateBodyFromJSON deserializes JSON data into a PortalsAccessRequestsUpdateBody. +func MapPortalsAccessRequestsUpdateBodyFromJSON(data []byte) (*PortalsAccessRequestsUpdateBody, error) { + var v PortalsAccessRequestsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAccessRequestsUpdateBodyToJSON serializes a PortalsAccessRequestsUpdateBody to JSON. +func MapPortalsAccessRequestsUpdateBodyToJSON(v *PortalsAccessRequestsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/auth/app/get.go b/v1/resources/portals/auth/app/get.go new file mode 100644 index 0000000..105ccf5 --- /dev/null +++ b/v1/resources/portals/auth/app/get.go @@ -0,0 +1,32 @@ +package app + +import ( + "encoding/json" + "time" +) + +// PortalsAuthAppGetOutput represents the portals auth app get output type. +type PortalsAuthAppGetOutput struct { + Object string `json:"object"` + // Id - The Ares app identifier for this portal. + Id string `json:"id"` + // Slug - The Ares app slug. + Slug *string `json:"slug,omitempty"` + EmailWhitelist []string `json:"email_whitelist"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAuthAppGetOutputFromJSON deserializes JSON data into a PortalsAuthAppGetOutput. +func MapPortalsAuthAppGetOutputFromJSON(data []byte) (*PortalsAuthAppGetOutput, error) { + var v PortalsAuthAppGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthAppGetOutputToJSON serializes a PortalsAuthAppGetOutput to JSON. +func MapPortalsAuthAppGetOutputToJSON(v *PortalsAuthAppGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/auth/app/update.go b/v1/resources/portals/auth/app/update.go new file mode 100644 index 0000000..542ae90 --- /dev/null +++ b/v1/resources/portals/auth/app/update.go @@ -0,0 +1,51 @@ +package app + +import ( + "encoding/json" + "time" +) + +// PortalsAuthAppUpdateOutput represents the portals auth app update output type. +type PortalsAuthAppUpdateOutput struct { + Object string `json:"object"` + // Id - The Ares app identifier for this portal. + Id string `json:"id"` + // Slug - The Ares app slug. + Slug *string `json:"slug,omitempty"` + EmailWhitelist []string `json:"email_whitelist"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAuthAppUpdateOutputFromJSON deserializes JSON data into a PortalsAuthAppUpdateOutput. +func MapPortalsAuthAppUpdateOutputFromJSON(data []byte) (*PortalsAuthAppUpdateOutput, error) { + var v PortalsAuthAppUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthAppUpdateOutputToJSON serializes a PortalsAuthAppUpdateOutput to JSON. +func MapPortalsAuthAppUpdateOutputToJSON(v *PortalsAuthAppUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAuthAppUpdateBody represents the portals auth app update body type. +type PortalsAuthAppUpdateBody struct { + EmailWhitelist *[]string `json:"email_whitelist,omitempty"` +} + +// MapPortalsAuthAppUpdateBodyFromJSON deserializes JSON data into a PortalsAuthAppUpdateBody. +func MapPortalsAuthAppUpdateBodyFromJSON(data []byte) (*PortalsAuthAppUpdateBody, error) { + var v PortalsAuthAppUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthAppUpdateBodyToJSON serializes a PortalsAuthAppUpdateBody to JSON. +func MapPortalsAuthAppUpdateBodyToJSON(v *PortalsAuthAppUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/auth/ssotenants/connections/list.go b/v1/resources/portals/auth/ssotenants/connections/list.go new file mode 100644 index 0000000..4676689 --- /dev/null +++ b/v1/resources/portals/auth/ssotenants/connections/list.go @@ -0,0 +1,65 @@ +package connections + +import ( + "encoding/json" + "time" +) + +// PortalsAuthSsoTenantsConnectionsListOutputItems represents the portals auth sso tenants connections list output items type. +type PortalsAuthSsoTenantsConnectionsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + ProviderType string `json:"provider_type"` + ProviderName *string `json:"provider_name,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// PortalsAuthSsoTenantsConnectionsListOutputPagination represents the portals auth sso tenants connections list output pagination type. +type PortalsAuthSsoTenantsConnectionsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsAuthSsoTenantsConnectionsListOutput represents the portals auth sso tenants connections list output type. +type PortalsAuthSsoTenantsConnectionsListOutput struct { + Items []PortalsAuthSsoTenantsConnectionsListOutputItems `json:"items"` + Pagination PortalsAuthSsoTenantsConnectionsListOutputPagination `json:"pagination"` +} + +// MapPortalsAuthSsoTenantsConnectionsListOutputFromJSON deserializes JSON data into a PortalsAuthSsoTenantsConnectionsListOutput. +func MapPortalsAuthSsoTenantsConnectionsListOutputFromJSON(data []byte) (*PortalsAuthSsoTenantsConnectionsListOutput, error) { + var v PortalsAuthSsoTenantsConnectionsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsConnectionsListOutputToJSON serializes a PortalsAuthSsoTenantsConnectionsListOutput to JSON. +func MapPortalsAuthSsoTenantsConnectionsListOutputToJSON(v *PortalsAuthSsoTenantsConnectionsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAuthSsoTenantsConnectionsListQuery represents the portals auth sso tenants connections list query type. +type PortalsAuthSsoTenantsConnectionsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapPortalsAuthSsoTenantsConnectionsListQueryFromJSON deserializes JSON data into a PortalsAuthSsoTenantsConnectionsListQuery. +func MapPortalsAuthSsoTenantsConnectionsListQueryFromJSON(data []byte) (*PortalsAuthSsoTenantsConnectionsListQuery, error) { + var v PortalsAuthSsoTenantsConnectionsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsConnectionsListQueryToJSON serializes a PortalsAuthSsoTenantsConnectionsListQuery to JSON. +func MapPortalsAuthSsoTenantsConnectionsListQueryToJSON(v *PortalsAuthSsoTenantsConnectionsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/auth/ssotenants/create.go b/v1/resources/portals/auth/ssotenants/create.go new file mode 100644 index 0000000..989db33 --- /dev/null +++ b/v1/resources/portals/auth/ssotenants/create.go @@ -0,0 +1,56 @@ +package ssotenants + +import ( + "encoding/json" + "time" +) + +// PortalsAuthSsoTenantsCreateOutputCounts represents the portals auth sso tenants create output counts type. +type PortalsAuthSsoTenantsCreateOutputCounts struct { + Connections float64 `json:"connections"` +} + +// PortalsAuthSsoTenantsCreateOutput represents the portals auth sso tenants create output type. +type PortalsAuthSsoTenantsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Status string `json:"status"` + ClientId string `json:"client_id"` + Counts PortalsAuthSsoTenantsCreateOutputCounts `json:"counts"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsAuthSsoTenantsCreateOutputFromJSON deserializes JSON data into a PortalsAuthSsoTenantsCreateOutput. +func MapPortalsAuthSsoTenantsCreateOutputFromJSON(data []byte) (*PortalsAuthSsoTenantsCreateOutput, error) { + var v PortalsAuthSsoTenantsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsCreateOutputToJSON serializes a PortalsAuthSsoTenantsCreateOutput to JSON. +func MapPortalsAuthSsoTenantsCreateOutputToJSON(v *PortalsAuthSsoTenantsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAuthSsoTenantsCreateBody represents the portals auth sso tenants create body type. +type PortalsAuthSsoTenantsCreateBody struct { + Name string `json:"name"` +} + +// MapPortalsAuthSsoTenantsCreateBodyFromJSON deserializes JSON data into a PortalsAuthSsoTenantsCreateBody. +func MapPortalsAuthSsoTenantsCreateBodyFromJSON(data []byte) (*PortalsAuthSsoTenantsCreateBody, error) { + var v PortalsAuthSsoTenantsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsCreateBodyToJSON serializes a PortalsAuthSsoTenantsCreateBody to JSON. +func MapPortalsAuthSsoTenantsCreateBodyToJSON(v *PortalsAuthSsoTenantsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/auth/ssotenants/list.go b/v1/resources/portals/auth/ssotenants/list.go new file mode 100644 index 0000000..540f4f8 --- /dev/null +++ b/v1/resources/portals/auth/ssotenants/list.go @@ -0,0 +1,72 @@ +package ssotenants + +import ( + "encoding/json" + "time" +) + +// PortalsAuthSsoTenantsListOutputItemsCounts represents the portals auth sso tenants list output items counts type. +type PortalsAuthSsoTenantsListOutputItemsCounts struct { + Connections float64 `json:"connections"` +} + +// PortalsAuthSsoTenantsListOutputItems represents the portals auth sso tenants list output items type. +type PortalsAuthSsoTenantsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Status string `json:"status"` + ClientId string `json:"client_id"` + Counts PortalsAuthSsoTenantsListOutputItemsCounts `json:"counts"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsAuthSsoTenantsListOutputPagination represents the portals auth sso tenants list output pagination type. +type PortalsAuthSsoTenantsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsAuthSsoTenantsListOutput represents the portals auth sso tenants list output type. +type PortalsAuthSsoTenantsListOutput struct { + Items []PortalsAuthSsoTenantsListOutputItems `json:"items"` + Pagination PortalsAuthSsoTenantsListOutputPagination `json:"pagination"` +} + +// MapPortalsAuthSsoTenantsListOutputFromJSON deserializes JSON data into a PortalsAuthSsoTenantsListOutput. +func MapPortalsAuthSsoTenantsListOutputFromJSON(data []byte) (*PortalsAuthSsoTenantsListOutput, error) { + var v PortalsAuthSsoTenantsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsListOutputToJSON serializes a PortalsAuthSsoTenantsListOutput to JSON. +func MapPortalsAuthSsoTenantsListOutputToJSON(v *PortalsAuthSsoTenantsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsAuthSsoTenantsListQuery represents the portals auth sso tenants list query type. +type PortalsAuthSsoTenantsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapPortalsAuthSsoTenantsListQueryFromJSON deserializes JSON data into a PortalsAuthSsoTenantsListQuery. +func MapPortalsAuthSsoTenantsListQueryFromJSON(data []byte) (*PortalsAuthSsoTenantsListQuery, error) { + var v PortalsAuthSsoTenantsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsListQueryToJSON serializes a PortalsAuthSsoTenantsListQuery to JSON. +func MapPortalsAuthSsoTenantsListQueryToJSON(v *PortalsAuthSsoTenantsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/auth/ssotenants/setup.go b/v1/resources/portals/auth/ssotenants/setup.go new file mode 100644 index 0000000..4ecd021 --- /dev/null +++ b/v1/resources/portals/auth/ssotenants/setup.go @@ -0,0 +1,25 @@ +package ssotenants + +import ( + "encoding/json" +) + +// PortalsAuthSsoTenantsSetupOutput represents the portals auth sso tenants setup output type. +type PortalsAuthSsoTenantsSetupOutput struct { + Object string `json:"object"` + Url string `json:"url"` +} + +// MapPortalsAuthSsoTenantsSetupOutputFromJSON deserializes JSON data into a PortalsAuthSsoTenantsSetupOutput. +func MapPortalsAuthSsoTenantsSetupOutputFromJSON(data []byte) (*PortalsAuthSsoTenantsSetupOutput, error) { + var v PortalsAuthSsoTenantsSetupOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsAuthSsoTenantsSetupOutputToJSON serializes a PortalsAuthSsoTenantsSetupOutput to JSON. +func MapPortalsAuthSsoTenantsSetupOutputToJSON(v *PortalsAuthSsoTenantsSetupOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumergroups/create.go b/v1/resources/portals/consumergroups/create.go new file mode 100644 index 0000000..fc1ba90 --- /dev/null +++ b/v1/resources/portals/consumergroups/create.go @@ -0,0 +1,55 @@ +package consumergroups + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerGroupsCreateOutput represents the portals consumer groups create output type. +type PortalsConsumerGroupsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsConsumerGroupsCreateOutputFromJSON deserializes JSON data into a PortalsConsumerGroupsCreateOutput. +func MapPortalsConsumerGroupsCreateOutputFromJSON(data []byte) (*PortalsConsumerGroupsCreateOutput, error) { + var v PortalsConsumerGroupsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsCreateOutputToJSON serializes a PortalsConsumerGroupsCreateOutput to JSON. +func MapPortalsConsumerGroupsCreateOutputToJSON(v *PortalsConsumerGroupsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerGroupsCreateBody represents the portals consumer groups create body type. +type PortalsConsumerGroupsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + SsoGroupIds *[]string `json:"sso_group_ids,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// MapPortalsConsumerGroupsCreateBodyFromJSON deserializes JSON data into a PortalsConsumerGroupsCreateBody. +func MapPortalsConsumerGroupsCreateBodyFromJSON(data []byte) (*PortalsConsumerGroupsCreateBody, error) { + var v PortalsConsumerGroupsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsCreateBodyToJSON serializes a PortalsConsumerGroupsCreateBody to JSON. +func MapPortalsConsumerGroupsCreateBodyToJSON(v *PortalsConsumerGroupsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumergroups/delete.go b/v1/resources/portals/consumergroups/delete.go new file mode 100644 index 0000000..202bee5 --- /dev/null +++ b/v1/resources/portals/consumergroups/delete.go @@ -0,0 +1,33 @@ +package consumergroups + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerGroupsDeleteOutput represents the portals consumer groups delete output type. +type PortalsConsumerGroupsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsConsumerGroupsDeleteOutputFromJSON deserializes JSON data into a PortalsConsumerGroupsDeleteOutput. +func MapPortalsConsumerGroupsDeleteOutputFromJSON(data []byte) (*PortalsConsumerGroupsDeleteOutput, error) { + var v PortalsConsumerGroupsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsDeleteOutputToJSON serializes a PortalsConsumerGroupsDeleteOutput to JSON. +func MapPortalsConsumerGroupsDeleteOutputToJSON(v *PortalsConsumerGroupsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumergroups/get.go b/v1/resources/portals/consumergroups/get.go new file mode 100644 index 0000000..0cad5ab --- /dev/null +++ b/v1/resources/portals/consumergroups/get.go @@ -0,0 +1,33 @@ +package consumergroups + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerGroupsGetOutput represents the portals consumer groups get output type. +type PortalsConsumerGroupsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsConsumerGroupsGetOutputFromJSON deserializes JSON data into a PortalsConsumerGroupsGetOutput. +func MapPortalsConsumerGroupsGetOutputFromJSON(data []byte) (*PortalsConsumerGroupsGetOutput, error) { + var v PortalsConsumerGroupsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsGetOutputToJSON serializes a PortalsConsumerGroupsGetOutput to JSON. +func MapPortalsConsumerGroupsGetOutputToJSON(v *PortalsConsumerGroupsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumergroups/list.go b/v1/resources/portals/consumergroups/list.go new file mode 100644 index 0000000..fc44567 --- /dev/null +++ b/v1/resources/portals/consumergroups/list.go @@ -0,0 +1,70 @@ +package consumergroups + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerGroupsListOutputItems represents the portals consumer groups list output items type. +type PortalsConsumerGroupsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsConsumerGroupsListOutputPagination represents the portals consumer groups list output pagination type. +type PortalsConsumerGroupsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsConsumerGroupsListOutput represents the portals consumer groups list output type. +type PortalsConsumerGroupsListOutput struct { + Items []PortalsConsumerGroupsListOutputItems `json:"items"` + Pagination PortalsConsumerGroupsListOutputPagination `json:"pagination"` +} + +// MapPortalsConsumerGroupsListOutputFromJSON deserializes JSON data into a PortalsConsumerGroupsListOutput. +func MapPortalsConsumerGroupsListOutputFromJSON(data []byte) (*PortalsConsumerGroupsListOutput, error) { + var v PortalsConsumerGroupsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsListOutputToJSON serializes a PortalsConsumerGroupsListOutput to JSON. +func MapPortalsConsumerGroupsListOutputToJSON(v *PortalsConsumerGroupsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerGroupsListQuery represents the portals consumer groups list query type. +type PortalsConsumerGroupsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Search *string `json:"search,omitempty"` +} + +// MapPortalsConsumerGroupsListQueryFromJSON deserializes JSON data into a PortalsConsumerGroupsListQuery. +func MapPortalsConsumerGroupsListQueryFromJSON(data []byte) (*PortalsConsumerGroupsListQuery, error) { + var v PortalsConsumerGroupsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsListQueryToJSON serializes a PortalsConsumerGroupsListQuery to JSON. +func MapPortalsConsumerGroupsListQueryToJSON(v *PortalsConsumerGroupsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumergroups/update.go b/v1/resources/portals/consumergroups/update.go new file mode 100644 index 0000000..8447286 --- /dev/null +++ b/v1/resources/portals/consumergroups/update.go @@ -0,0 +1,55 @@ +package consumergroups + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerGroupsUpdateOutput represents the portals consumer groups update output type. +type PortalsConsumerGroupsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsConsumerGroupsUpdateOutputFromJSON deserializes JSON data into a PortalsConsumerGroupsUpdateOutput. +func MapPortalsConsumerGroupsUpdateOutputFromJSON(data []byte) (*PortalsConsumerGroupsUpdateOutput, error) { + var v PortalsConsumerGroupsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsUpdateOutputToJSON serializes a PortalsConsumerGroupsUpdateOutput to JSON. +func MapPortalsConsumerGroupsUpdateOutputToJSON(v *PortalsConsumerGroupsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerGroupsUpdateBody represents the portals consumer groups update body type. +type PortalsConsumerGroupsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + SsoGroupIds *[]string `json:"sso_group_ids,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// MapPortalsConsumerGroupsUpdateBodyFromJSON deserializes JSON data into a PortalsConsumerGroupsUpdateBody. +func MapPortalsConsumerGroupsUpdateBodyFromJSON(data []byte) (*PortalsConsumerGroupsUpdateBody, error) { + var v PortalsConsumerGroupsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerGroupsUpdateBodyToJSON serializes a PortalsConsumerGroupsUpdateBody to JSON. +func MapPortalsConsumerGroupsUpdateBodyToJSON(v *PortalsConsumerGroupsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerinvites/create.go b/v1/resources/portals/consumerinvites/create.go new file mode 100644 index 0000000..929da68 --- /dev/null +++ b/v1/resources/portals/consumerinvites/create.go @@ -0,0 +1,71 @@ +package consumerinvites + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerInvitesCreateOutputConsumerProfile represents the portals consumer invites create output consumer profile type. +type PortalsConsumerInvitesCreateOutputConsumerProfile struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` +} + +// PortalsConsumerInvitesCreateOutputInvitedBy represents the portals consumer invites create output invited by type. +type PortalsConsumerInvitesCreateOutputInvitedBy struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email *string `json:"email,omitempty"` +} + +// PortalsConsumerInvitesCreateOutput represents the portals consumer invites create output type. +type PortalsConsumerInvitesCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + PortalUrl *string `json:"portal_url,omitempty"` + ConsumerProfile PortalsConsumerInvitesCreateOutputConsumerProfile `json:"consumer_profile"` + InvitedBy PortalsConsumerInvitesCreateOutputInvitedBy `json:"invited_by"` + Message *string `json:"message,omitempty"` + AcceptedAt *time.Time `json:"accepted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsConsumerInvitesCreateOutputFromJSON deserializes JSON data into a PortalsConsumerInvitesCreateOutput. +func MapPortalsConsumerInvitesCreateOutputFromJSON(data []byte) (*PortalsConsumerInvitesCreateOutput, error) { + var v PortalsConsumerInvitesCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerInvitesCreateOutputToJSON serializes a PortalsConsumerInvitesCreateOutput to JSON. +func MapPortalsConsumerInvitesCreateOutputToJSON(v *PortalsConsumerInvitesCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerInvitesCreateBody represents the portals consumer invites create body type. +type PortalsConsumerInvitesCreateBody struct { + Name string `json:"name"` + Email string `json:"email"` + Message *string `json:"message,omitempty"` +} + +// MapPortalsConsumerInvitesCreateBodyFromJSON deserializes JSON data into a PortalsConsumerInvitesCreateBody. +func MapPortalsConsumerInvitesCreateBodyFromJSON(data []byte) (*PortalsConsumerInvitesCreateBody, error) { + var v PortalsConsumerInvitesCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerInvitesCreateBodyToJSON serializes a PortalsConsumerInvitesCreateBody to JSON. +func MapPortalsConsumerInvitesCreateBodyToJSON(v *PortalsConsumerInvitesCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerinvites/get.go b/v1/resources/portals/consumerinvites/get.go new file mode 100644 index 0000000..c84159b --- /dev/null +++ b/v1/resources/portals/consumerinvites/get.go @@ -0,0 +1,50 @@ +package consumerinvites + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerInvitesGetOutputConsumerProfile represents the portals consumer invites get output consumer profile type. +type PortalsConsumerInvitesGetOutputConsumerProfile struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` +} + +// PortalsConsumerInvitesGetOutputInvitedBy represents the portals consumer invites get output invited by type. +type PortalsConsumerInvitesGetOutputInvitedBy struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email *string `json:"email,omitempty"` +} + +// PortalsConsumerInvitesGetOutput represents the portals consumer invites get output type. +type PortalsConsumerInvitesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + PortalUrl *string `json:"portal_url,omitempty"` + ConsumerProfile PortalsConsumerInvitesGetOutputConsumerProfile `json:"consumer_profile"` + InvitedBy PortalsConsumerInvitesGetOutputInvitedBy `json:"invited_by"` + Message *string `json:"message,omitempty"` + AcceptedAt *time.Time `json:"accepted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsConsumerInvitesGetOutputFromJSON deserializes JSON data into a PortalsConsumerInvitesGetOutput. +func MapPortalsConsumerInvitesGetOutputFromJSON(data []byte) (*PortalsConsumerInvitesGetOutput, error) { + var v PortalsConsumerInvitesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerInvitesGetOutputToJSON serializes a PortalsConsumerInvitesGetOutput to JSON. +func MapPortalsConsumerInvitesGetOutputToJSON(v *PortalsConsumerInvitesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerinvites/list.go b/v1/resources/portals/consumerinvites/list.go new file mode 100644 index 0000000..f94ea4b --- /dev/null +++ b/v1/resources/portals/consumerinvites/list.go @@ -0,0 +1,87 @@ +package consumerinvites + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerInvitesListOutputItemsConsumerProfile represents the portals consumer invites list output items consumer profile type. +type PortalsConsumerInvitesListOutputItemsConsumerProfile struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` +} + +// PortalsConsumerInvitesListOutputItemsInvitedBy represents the portals consumer invites list output items invited by type. +type PortalsConsumerInvitesListOutputItemsInvitedBy struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email *string `json:"email,omitempty"` +} + +// PortalsConsumerInvitesListOutputItems represents the portals consumer invites list output items type. +type PortalsConsumerInvitesListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + PortalUrl *string `json:"portal_url,omitempty"` + ConsumerProfile PortalsConsumerInvitesListOutputItemsConsumerProfile `json:"consumer_profile"` + InvitedBy PortalsConsumerInvitesListOutputItemsInvitedBy `json:"invited_by"` + Message *string `json:"message,omitempty"` + AcceptedAt *time.Time `json:"accepted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsConsumerInvitesListOutputPagination represents the portals consumer invites list output pagination type. +type PortalsConsumerInvitesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsConsumerInvitesListOutput represents the portals consumer invites list output type. +type PortalsConsumerInvitesListOutput struct { + Items []PortalsConsumerInvitesListOutputItems `json:"items"` + Pagination PortalsConsumerInvitesListOutputPagination `json:"pagination"` +} + +// MapPortalsConsumerInvitesListOutputFromJSON deserializes JSON data into a PortalsConsumerInvitesListOutput. +func MapPortalsConsumerInvitesListOutputFromJSON(data []byte) (*PortalsConsumerInvitesListOutput, error) { + var v PortalsConsumerInvitesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerInvitesListOutputToJSON serializes a PortalsConsumerInvitesListOutput to JSON. +func MapPortalsConsumerInvitesListOutputToJSON(v *PortalsConsumerInvitesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerInvitesListQuery represents the portals consumer invites list query type. +type PortalsConsumerInvitesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` +} + +// MapPortalsConsumerInvitesListQueryFromJSON deserializes JSON data into a PortalsConsumerInvitesListQuery. +func MapPortalsConsumerInvitesListQueryFromJSON(data []byte) (*PortalsConsumerInvitesListQuery, error) { + var v PortalsConsumerInvitesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerInvitesListQueryToJSON serializes a PortalsConsumerInvitesListQuery to JSON. +func MapPortalsConsumerInvitesListQueryToJSON(v *PortalsConsumerInvitesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerprofiles/assign_groups.go b/v1/resources/portals/consumerprofiles/assign_groups.go new file mode 100644 index 0000000..5c71a30 --- /dev/null +++ b/v1/resources/portals/consumerprofiles/assign_groups.go @@ -0,0 +1,73 @@ +package consumerprofiles + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerProfilesAssignGroupsOutputGroupsGroup represents the portals consumer profiles assign groups output groups group type. +type PortalsConsumerProfilesAssignGroupsOutputGroupsGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsConsumerProfilesAssignGroupsOutputGroups represents the portals consumer profiles assign groups output groups type. +type PortalsConsumerProfilesAssignGroupsOutputGroups struct { + Object string `json:"object"` + Group PortalsConsumerProfilesAssignGroupsOutputGroupsGroup `json:"group"` + AssignedVia string `json:"assigned_via"` +} + +// PortalsConsumerProfilesAssignGroupsOutput represents the portals consumer profiles assign groups output type. +type PortalsConsumerProfilesAssignGroupsOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + ConsumerId string `json:"consumer_id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Groups *[]PortalsConsumerProfilesAssignGroupsOutputGroups `json:"groups,omitempty"` +} + +// MapPortalsConsumerProfilesAssignGroupsOutputFromJSON deserializes JSON data into a PortalsConsumerProfilesAssignGroupsOutput. +func MapPortalsConsumerProfilesAssignGroupsOutputFromJSON(data []byte) (*PortalsConsumerProfilesAssignGroupsOutput, error) { + var v PortalsConsumerProfilesAssignGroupsOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesAssignGroupsOutputToJSON serializes a PortalsConsumerProfilesAssignGroupsOutput to JSON. +func MapPortalsConsumerProfilesAssignGroupsOutputToJSON(v *PortalsConsumerProfilesAssignGroupsOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerProfilesAssignGroupsBody represents the portals consumer profiles assign groups body type. +type PortalsConsumerProfilesAssignGroupsBody struct { + GroupIds []string `json:"group_ids"` +} + +// MapPortalsConsumerProfilesAssignGroupsBodyFromJSON deserializes JSON data into a PortalsConsumerProfilesAssignGroupsBody. +func MapPortalsConsumerProfilesAssignGroupsBodyFromJSON(data []byte) (*PortalsConsumerProfilesAssignGroupsBody, error) { + var v PortalsConsumerProfilesAssignGroupsBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesAssignGroupsBodyToJSON serializes a PortalsConsumerProfilesAssignGroupsBody to JSON. +func MapPortalsConsumerProfilesAssignGroupsBodyToJSON(v *PortalsConsumerProfilesAssignGroupsBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerprofiles/get.go b/v1/resources/portals/consumerprofiles/get.go new file mode 100644 index 0000000..64fb801 --- /dev/null +++ b/v1/resources/portals/consumerprofiles/get.go @@ -0,0 +1,54 @@ +package consumerprofiles + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerProfilesGetOutputGroupsGroup represents the portals consumer profiles get output groups group type. +type PortalsConsumerProfilesGetOutputGroupsGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsConsumerProfilesGetOutputGroups represents the portals consumer profiles get output groups type. +type PortalsConsumerProfilesGetOutputGroups struct { + Object string `json:"object"` + Group PortalsConsumerProfilesGetOutputGroupsGroup `json:"group"` + AssignedVia string `json:"assigned_via"` +} + +// PortalsConsumerProfilesGetOutput represents the portals consumer profiles get output type. +type PortalsConsumerProfilesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + ConsumerId string `json:"consumer_id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Groups *[]PortalsConsumerProfilesGetOutputGroups `json:"groups,omitempty"` +} + +// MapPortalsConsumerProfilesGetOutputFromJSON deserializes JSON data into a PortalsConsumerProfilesGetOutput. +func MapPortalsConsumerProfilesGetOutputFromJSON(data []byte) (*PortalsConsumerProfilesGetOutput, error) { + var v PortalsConsumerProfilesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesGetOutputToJSON serializes a PortalsConsumerProfilesGetOutput to JSON. +func MapPortalsConsumerProfilesGetOutputToJSON(v *PortalsConsumerProfilesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerprofiles/list.go b/v1/resources/portals/consumerprofiles/list.go new file mode 100644 index 0000000..b0315e8 --- /dev/null +++ b/v1/resources/portals/consumerprofiles/list.go @@ -0,0 +1,57 @@ +package consumerprofiles + +import ( + "encoding/json" +) + +// PortalsConsumerProfilesListOutputPagination represents the portals consumer profiles list output pagination type. +type PortalsConsumerProfilesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsConsumerProfilesListOutput represents the portals consumer profiles list output type. +type PortalsConsumerProfilesListOutput struct { + Items []map[string]any `json:"items"` + Pagination PortalsConsumerProfilesListOutputPagination `json:"pagination"` +} + +// MapPortalsConsumerProfilesListOutputFromJSON deserializes JSON data into a PortalsConsumerProfilesListOutput. +func MapPortalsConsumerProfilesListOutputFromJSON(data []byte) (*PortalsConsumerProfilesListOutput, error) { + var v PortalsConsumerProfilesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesListOutputToJSON serializes a PortalsConsumerProfilesListOutput to JSON. +func MapPortalsConsumerProfilesListOutputToJSON(v *PortalsConsumerProfilesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerProfilesListQuery represents the portals consumer profiles list query type. +type PortalsConsumerProfilesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerGroupId *string `json:"consumer_group_id,omitempty"` + Status *any `json:"status,omitempty"` +} + +// MapPortalsConsumerProfilesListQueryFromJSON deserializes JSON data into a PortalsConsumerProfilesListQuery. +func MapPortalsConsumerProfilesListQueryFromJSON(data []byte) (*PortalsConsumerProfilesListQuery, error) { + var v PortalsConsumerProfilesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesListQueryToJSON serializes a PortalsConsumerProfilesListQuery to JSON. +func MapPortalsConsumerProfilesListQueryToJSON(v *PortalsConsumerProfilesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/consumerprofiles/unassign_groups.go b/v1/resources/portals/consumerprofiles/unassign_groups.go new file mode 100644 index 0000000..f18c01c --- /dev/null +++ b/v1/resources/portals/consumerprofiles/unassign_groups.go @@ -0,0 +1,73 @@ +package consumerprofiles + +import ( + "encoding/json" + "time" +) + +// PortalsConsumerProfilesUnassignGroupsOutputGroupsGroup represents the portals consumer profiles unassign groups output groups group type. +type PortalsConsumerProfilesUnassignGroupsOutputGroupsGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + IsDefault bool `json:"is_default"` + SsoGroupIds []string `json:"sso_group_ids"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsConsumerProfilesUnassignGroupsOutputGroups represents the portals consumer profiles unassign groups output groups type. +type PortalsConsumerProfilesUnassignGroupsOutputGroups struct { + Object string `json:"object"` + Group PortalsConsumerProfilesUnassignGroupsOutputGroupsGroup `json:"group"` + AssignedVia string `json:"assigned_via"` +} + +// PortalsConsumerProfilesUnassignGroupsOutput represents the portals consumer profiles unassign groups output type. +type PortalsConsumerProfilesUnassignGroupsOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + ConsumerId string `json:"consumer_id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Groups *[]PortalsConsumerProfilesUnassignGroupsOutputGroups `json:"groups,omitempty"` +} + +// MapPortalsConsumerProfilesUnassignGroupsOutputFromJSON deserializes JSON data into a PortalsConsumerProfilesUnassignGroupsOutput. +func MapPortalsConsumerProfilesUnassignGroupsOutputFromJSON(data []byte) (*PortalsConsumerProfilesUnassignGroupsOutput, error) { + var v PortalsConsumerProfilesUnassignGroupsOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesUnassignGroupsOutputToJSON serializes a PortalsConsumerProfilesUnassignGroupsOutput to JSON. +func MapPortalsConsumerProfilesUnassignGroupsOutputToJSON(v *PortalsConsumerProfilesUnassignGroupsOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsConsumerProfilesUnassignGroupsBody represents the portals consumer profiles unassign groups body type. +type PortalsConsumerProfilesUnassignGroupsBody struct { + GroupIds []string `json:"group_ids"` +} + +// MapPortalsConsumerProfilesUnassignGroupsBodyFromJSON deserializes JSON data into a PortalsConsumerProfilesUnassignGroupsBody. +func MapPortalsConsumerProfilesUnassignGroupsBodyFromJSON(data []byte) (*PortalsConsumerProfilesUnassignGroupsBody, error) { + var v PortalsConsumerProfilesUnassignGroupsBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsConsumerProfilesUnassignGroupsBodyToJSON serializes a PortalsConsumerProfilesUnassignGroupsBody to JSON. +func MapPortalsConsumerProfilesUnassignGroupsBodyToJSON(v *PortalsConsumerProfilesUnassignGroupsBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/create.go b/v1/resources/portals/create.go index 02ce9d4..a8c831d 100644 --- a/v1/resources/portals/create.go +++ b/v1/resources/portals/create.go @@ -5,16 +5,20 @@ import ( "time" ) -// PortalsCreateOutputAuthAllowedRedirectUrlFilters represents the portals create output auth allowed redirect url filters type. -type PortalsCreateOutputAuthAllowedRedirectUrlFilters struct { - Url string `json:"url"` +// PortalsCreateOutputSkillConfiguration represents the portals create output skill configuration type. +type PortalsCreateOutputSkillConfiguration struct { + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` } // PortalsCreateOutputAuth represents the portals create output auth type. type PortalsCreateOutputAuth struct { - Object string `json:"object"` - SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` - AllowedRedirectUrlFilters []PortalsCreateOutputAuthAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters"` + Object string `json:"object"` + SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` } // PortalsCreateOutputUrls represents the portals create output urls type. @@ -25,16 +29,19 @@ type PortalsCreateOutputUrls struct { // PortalsCreateOutput represents the portals create output type. type PortalsCreateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Slug string `json:"slug"` - Description *string `json:"description,omitempty"` - Auth PortalsCreateOutputAuth `json:"auth"` - Urls []PortalsCreateOutputUrls `json:"urls"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration PortalsCreateOutputSkillConfiguration `json:"skill_configuration"` + Auth PortalsCreateOutputAuth `json:"auth"` + Urls []PortalsCreateOutputUrls `json:"urls"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapPortalsCreateOutputFromJSON deserializes JSON data into a PortalsCreateOutput. @@ -58,10 +65,12 @@ type PortalsCreateBodyAllowedRedirectUrlFilters struct { // PortalsCreateBody represents the portals create body type. type PortalsCreateBody struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - AllowedRedirectUrlFilters *[]PortalsCreateBodyAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters,omitempty"` - SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + AllowedRedirectUrlFilters *[]PortalsCreateBodyAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters,omitempty"` + SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + AllowConsumerSkillAuthoring *bool `json:"allow_consumer_skill_authoring,omitempty"` + AllowConsumerSkillPublishing *bool `json:"allow_consumer_skill_publishing,omitempty"` } // MapPortalsCreateBodyFromJSON deserializes JSON data into a PortalsCreateBody. diff --git a/v1/resources/portals/delete.go b/v1/resources/portals/delete.go index 31ab0b7..aa02eb0 100644 --- a/v1/resources/portals/delete.go +++ b/v1/resources/portals/delete.go @@ -5,16 +5,20 @@ import ( "time" ) -// PortalsDeleteOutputAuthAllowedRedirectUrlFilters represents the portals delete output auth allowed redirect url filters type. -type PortalsDeleteOutputAuthAllowedRedirectUrlFilters struct { - Url string `json:"url"` +// PortalsDeleteOutputSkillConfiguration represents the portals delete output skill configuration type. +type PortalsDeleteOutputSkillConfiguration struct { + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` } // PortalsDeleteOutputAuth represents the portals delete output auth type. type PortalsDeleteOutputAuth struct { - Object string `json:"object"` - SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` - AllowedRedirectUrlFilters []PortalsDeleteOutputAuthAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters"` + Object string `json:"object"` + SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` } // PortalsDeleteOutputUrls represents the portals delete output urls type. @@ -25,16 +29,19 @@ type PortalsDeleteOutputUrls struct { // PortalsDeleteOutput represents the portals delete output type. type PortalsDeleteOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Slug string `json:"slug"` - Description *string `json:"description,omitempty"` - Auth PortalsDeleteOutputAuth `json:"auth"` - Urls []PortalsDeleteOutputUrls `json:"urls"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration PortalsDeleteOutputSkillConfiguration `json:"skill_configuration"` + Auth PortalsDeleteOutputAuth `json:"auth"` + Urls []PortalsDeleteOutputUrls `json:"urls"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapPortalsDeleteOutputFromJSON deserializes JSON data into a PortalsDeleteOutput. diff --git a/v1/resources/portals/get.go b/v1/resources/portals/get.go index a27e867..ac15ba5 100644 --- a/v1/resources/portals/get.go +++ b/v1/resources/portals/get.go @@ -5,16 +5,20 @@ import ( "time" ) -// PortalsGetOutputAuthAllowedRedirectUrlFilters represents the portals get output auth allowed redirect url filters type. -type PortalsGetOutputAuthAllowedRedirectUrlFilters struct { - Url string `json:"url"` +// PortalsGetOutputSkillConfiguration represents the portals get output skill configuration type. +type PortalsGetOutputSkillConfiguration struct { + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` } // PortalsGetOutputAuth represents the portals get output auth type. type PortalsGetOutputAuth struct { - Object string `json:"object"` - SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` - AllowedRedirectUrlFilters []PortalsGetOutputAuthAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters"` + Object string `json:"object"` + SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` } // PortalsGetOutputUrls represents the portals get output urls type. @@ -25,16 +29,19 @@ type PortalsGetOutputUrls struct { // PortalsGetOutput represents the portals get output type. type PortalsGetOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Slug string `json:"slug"` - Description *string `json:"description,omitempty"` - Auth PortalsGetOutputAuth `json:"auth"` - Urls []PortalsGetOutputUrls `json:"urls"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration PortalsGetOutputSkillConfiguration `json:"skill_configuration"` + Auth PortalsGetOutputAuth `json:"auth"` + Urls []PortalsGetOutputUrls `json:"urls"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapPortalsGetOutputFromJSON deserializes JSON data into a PortalsGetOutput. diff --git a/v1/resources/portals/list.go b/v1/resources/portals/list.go index d8da538..742a3ce 100644 --- a/v1/resources/portals/list.go +++ b/v1/resources/portals/list.go @@ -5,16 +5,20 @@ import ( "time" ) -// PortalsListOutputItemsAuthAllowedRedirectUrlFilters represents the portals list output items auth allowed redirect url filters type. -type PortalsListOutputItemsAuthAllowedRedirectUrlFilters struct { - Url string `json:"url"` +// PortalsListOutputItemsSkillConfiguration represents the portals list output items skill configuration type. +type PortalsListOutputItemsSkillConfiguration struct { + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` } // PortalsListOutputItemsAuth represents the portals list output items auth type. type PortalsListOutputItemsAuth struct { - Object string `json:"object"` - SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` - AllowedRedirectUrlFilters []PortalsListOutputItemsAuthAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters"` + Object string `json:"object"` + SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` } // PortalsListOutputItemsUrls represents the portals list output items urls type. @@ -25,16 +29,19 @@ type PortalsListOutputItemsUrls struct { // PortalsListOutputItems represents the portals list output items type. type PortalsListOutputItems struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Slug string `json:"slug"` - Description *string `json:"description,omitempty"` - Auth PortalsListOutputItemsAuth `json:"auth"` - Urls []PortalsListOutputItemsUrls `json:"urls"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration PortalsListOutputItemsSkillConfiguration `json:"skill_configuration"` + Auth PortalsListOutputItemsAuth `json:"auth"` + Urls []PortalsListOutputItemsUrls `json:"urls"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // PortalsListOutputPagination represents the portals list output pagination type. diff --git a/v1/resources/portals/listings/create.go b/v1/resources/portals/listings/create.go new file mode 100644 index 0000000..3e3dc86 --- /dev/null +++ b/v1/resources/portals/listings/create.go @@ -0,0 +1,143 @@ +package listings + +import ( + "encoding/json" + "time" +) + +// PortalsListingsCreateOutputAccessProviderTemplate represents the portals listings create output access provider template type. +type PortalsListingsCreateOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsListingsCreateOutputAccessMagicMcpServer represents the portals listings create output access magic mcp server type. +type PortalsListingsCreateOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsCreateOutputAccessSkill represents the portals listings create output access skill type. +type PortalsListingsCreateOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsListingsCreateOutputAccessSkillTemplate represents the portals listings create output access skill template type. +type PortalsListingsCreateOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsCreateOutputAccessSkillGroup represents the portals listings create output access skill group type. +type PortalsListingsCreateOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsCreateOutputAccessSkillMarketplace represents the portals listings create output access skill marketplace type. +type PortalsListingsCreateOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsListingsCreateOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsListingsCreateOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsListingsCreateOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsListingsCreateOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsListingsCreateOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsListingsCreateOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsListingsCreateOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsListingsCreateOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsListingsCreateOutputGroups represents the portals listings create output groups type. +type PortalsListingsCreateOutputGroups struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Index float64 `json:"index"` +} + +// PortalsListingsCreateOutput represents the portals listings create output type. +type PortalsListingsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsListingsCreateOutputAccess `json:"access"` + Groups []PortalsListingsCreateOutputGroups `json:"groups"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsListingsCreateOutputFromJSON deserializes JSON data into a PortalsListingsCreateOutput. +func MapPortalsListingsCreateOutputFromJSON(data []byte) (*PortalsListingsCreateOutput, error) { + var v PortalsListingsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsCreateOutputToJSON serializes a PortalsListingsCreateOutput to JSON. +func MapPortalsListingsCreateOutputToJSON(v *PortalsListingsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsListingsCreateBodyAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsListingsCreateBodyAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplateId *string `json:"provider_template_id,omitempty"` + MagicMcpServerId *string `json:"magic_mcp_server_id,omitempty"` + SkillId *string `json:"skill_id,omitempty"` + SkillTemplateId *string `json:"skill_template_id,omitempty"` + SkillGroupId *string `json:"skill_group_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` +} + +// PortalsListingsCreateBody represents the portals listings create body type. +type PortalsListingsCreateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsListingsCreateBodyAccess `json:"access"` +} + +// MapPortalsListingsCreateBodyFromJSON deserializes JSON data into a PortalsListingsCreateBody. +func MapPortalsListingsCreateBodyFromJSON(data []byte) (*PortalsListingsCreateBody, error) { + var v PortalsListingsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsCreateBodyToJSON serializes a PortalsListingsCreateBody to JSON. +func MapPortalsListingsCreateBodyToJSON(v *PortalsListingsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/listings/delete.go b/v1/resources/portals/listings/delete.go new file mode 100644 index 0000000..e137d7f --- /dev/null +++ b/v1/resources/portals/listings/delete.go @@ -0,0 +1,109 @@ +package listings + +import ( + "encoding/json" + "time" +) + +// PortalsListingsDeleteOutputAccessProviderTemplate represents the portals listings delete output access provider template type. +type PortalsListingsDeleteOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsListingsDeleteOutputAccessMagicMcpServer represents the portals listings delete output access magic mcp server type. +type PortalsListingsDeleteOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsDeleteOutputAccessSkill represents the portals listings delete output access skill type. +type PortalsListingsDeleteOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsListingsDeleteOutputAccessSkillTemplate represents the portals listings delete output access skill template type. +type PortalsListingsDeleteOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsDeleteOutputAccessSkillGroup represents the portals listings delete output access skill group type. +type PortalsListingsDeleteOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsDeleteOutputAccessSkillMarketplace represents the portals listings delete output access skill marketplace type. +type PortalsListingsDeleteOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsListingsDeleteOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsListingsDeleteOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsListingsDeleteOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsListingsDeleteOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsListingsDeleteOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsListingsDeleteOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsListingsDeleteOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsListingsDeleteOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsListingsDeleteOutputGroups represents the portals listings delete output groups type. +type PortalsListingsDeleteOutputGroups struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Index float64 `json:"index"` +} + +// PortalsListingsDeleteOutput represents the portals listings delete output type. +type PortalsListingsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsListingsDeleteOutputAccess `json:"access"` + Groups []PortalsListingsDeleteOutputGroups `json:"groups"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsListingsDeleteOutputFromJSON deserializes JSON data into a PortalsListingsDeleteOutput. +func MapPortalsListingsDeleteOutputFromJSON(data []byte) (*PortalsListingsDeleteOutput, error) { + var v PortalsListingsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsDeleteOutputToJSON serializes a PortalsListingsDeleteOutput to JSON. +func MapPortalsListingsDeleteOutputToJSON(v *PortalsListingsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/listings/get.go b/v1/resources/portals/listings/get.go new file mode 100644 index 0000000..7e12aa5 --- /dev/null +++ b/v1/resources/portals/listings/get.go @@ -0,0 +1,109 @@ +package listings + +import ( + "encoding/json" + "time" +) + +// PortalsListingsGetOutputAccessProviderTemplate represents the portals listings get output access provider template type. +type PortalsListingsGetOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsListingsGetOutputAccessMagicMcpServer represents the portals listings get output access magic mcp server type. +type PortalsListingsGetOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsGetOutputAccessSkill represents the portals listings get output access skill type. +type PortalsListingsGetOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsListingsGetOutputAccessSkillTemplate represents the portals listings get output access skill template type. +type PortalsListingsGetOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsGetOutputAccessSkillGroup represents the portals listings get output access skill group type. +type PortalsListingsGetOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsGetOutputAccessSkillMarketplace represents the portals listings get output access skill marketplace type. +type PortalsListingsGetOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsListingsGetOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsListingsGetOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsListingsGetOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsListingsGetOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsListingsGetOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsListingsGetOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsListingsGetOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsListingsGetOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsListingsGetOutputGroups represents the portals listings get output groups type. +type PortalsListingsGetOutputGroups struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Index float64 `json:"index"` +} + +// PortalsListingsGetOutput represents the portals listings get output type. +type PortalsListingsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsListingsGetOutputAccess `json:"access"` + Groups []PortalsListingsGetOutputGroups `json:"groups"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsListingsGetOutputFromJSON deserializes JSON data into a PortalsListingsGetOutput. +func MapPortalsListingsGetOutputFromJSON(data []byte) (*PortalsListingsGetOutput, error) { + var v PortalsListingsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsGetOutputToJSON serializes a PortalsListingsGetOutput to JSON. +func MapPortalsListingsGetOutputToJSON(v *PortalsListingsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/listings/list.go b/v1/resources/portals/listings/list.go new file mode 100644 index 0000000..0538ffc --- /dev/null +++ b/v1/resources/portals/listings/list.go @@ -0,0 +1,153 @@ +package listings + +import ( + "encoding/json" + "time" +) + +// PortalsListingsListOutputItemsAccessProviderTemplate represents the portals listings list output items access provider template type. +type PortalsListingsListOutputItemsAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsListingsListOutputItemsAccessMagicMcpServer represents the portals listings list output items access magic mcp server type. +type PortalsListingsListOutputItemsAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsListOutputItemsAccessSkill represents the portals listings list output items access skill type. +type PortalsListingsListOutputItemsAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsListingsListOutputItemsAccessSkillTemplate represents the portals listings list output items access skill template type. +type PortalsListingsListOutputItemsAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsListOutputItemsAccessSkillGroup represents the portals listings list output items access skill group type. +type PortalsListingsListOutputItemsAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsListOutputItemsAccessSkillMarketplace represents the portals listings list output items access skill marketplace type. +type PortalsListingsListOutputItemsAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsListingsListOutputItemsAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsListingsListOutputItemsAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsListingsListOutputItemsAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsListingsListOutputItemsAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsListingsListOutputItemsAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsListingsListOutputItemsAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsListingsListOutputItemsAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsListingsListOutputItemsAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsListingsListOutputItemsGroups represents the portals listings list output items groups type. +type PortalsListingsListOutputItemsGroups struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Index float64 `json:"index"` +} + +// PortalsListingsListOutputItems represents the portals listings list output items type. +type PortalsListingsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsListingsListOutputItemsAccess `json:"access"` + Groups []PortalsListingsListOutputItemsGroups `json:"groups"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsListingsListOutputPagination represents the portals listings list output pagination type. +type PortalsListingsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// PortalsListingsListOutput represents the portals listings list output type. +type PortalsListingsListOutput struct { + Items []PortalsListingsListOutputItems `json:"items"` + Pagination PortalsListingsListOutputPagination `json:"pagination"` +} + +// MapPortalsListingsListOutputFromJSON deserializes JSON data into a PortalsListingsListOutput. +func MapPortalsListingsListOutputFromJSON(data []byte) (*PortalsListingsListOutput, error) { + var v PortalsListingsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsListOutputToJSON serializes a PortalsListingsListOutput to JSON. +func MapPortalsListingsListOutputToJSON(v *PortalsListingsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsListingsListQuery represents the portals listings list query type. +type PortalsListingsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + ConsumerSurfaceProviderGroupId *any `json:"consumer_surface_provider_group_id,omitempty"` + ProviderTemplateId *any `json:"provider_template_id,omitempty"` + MagicMcpServerId *any `json:"magic_mcp_server_id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + SkillTemplateId *any `json:"skill_template_id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + Type *any `json:"type,omitempty"` +} + +// MapPortalsListingsListQueryFromJSON deserializes JSON data into a PortalsListingsListQuery. +func MapPortalsListingsListQueryFromJSON(data []byte) (*PortalsListingsListQuery, error) { + var v PortalsListingsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsListQueryToJSON serializes a PortalsListingsListQuery to JSON. +func MapPortalsListingsListQueryToJSON(v *PortalsListingsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/listings/update.go b/v1/resources/portals/listings/update.go new file mode 100644 index 0000000..40a8814 --- /dev/null +++ b/v1/resources/portals/listings/update.go @@ -0,0 +1,130 @@ +package listings + +import ( + "encoding/json" + "time" +) + +// PortalsListingsUpdateOutputAccessProviderTemplate represents the portals listings update output access provider template type. +type PortalsListingsUpdateOutputAccessProviderTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// PortalsListingsUpdateOutputAccessMagicMcpServer represents the portals listings update output access magic mcp server type. +type PortalsListingsUpdateOutputAccessMagicMcpServer struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsUpdateOutputAccessSkill represents the portals listings update output access skill type. +type PortalsListingsUpdateOutputAccessSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` +} + +// PortalsListingsUpdateOutputAccessSkillTemplate represents the portals listings update output access skill template type. +type PortalsListingsUpdateOutputAccessSkillTemplate struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsUpdateOutputAccessSkillGroup represents the portals listings update output access skill group type. +type PortalsListingsUpdateOutputAccessSkillGroup struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// PortalsListingsUpdateOutputAccessSkillMarketplace represents the portals listings update output access skill marketplace type. +type PortalsListingsUpdateOutputAccessSkillMarketplace struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` +} + +// PortalsListingsUpdateOutputAccess represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type PortalsListingsUpdateOutputAccess struct { + Type *string `json:"type,omitempty"` + ProviderTemplate *PortalsListingsUpdateOutputAccessProviderTemplate `json:"provider_template,omitempty"` + MagicMcpServer *PortalsListingsUpdateOutputAccessMagicMcpServer `json:"magic_mcp_server,omitempty"` + Skill *PortalsListingsUpdateOutputAccessSkill `json:"skill,omitempty"` + SkillTemplate *PortalsListingsUpdateOutputAccessSkillTemplate `json:"skill_template,omitempty"` + SkillGroup *PortalsListingsUpdateOutputAccessSkillGroup `json:"skill_group,omitempty"` + SkillMarketplace *PortalsListingsUpdateOutputAccessSkillMarketplace `json:"skill_marketplace,omitempty"` +} + +// PortalsListingsUpdateOutputGroups represents the portals listings update output groups type. +type PortalsListingsUpdateOutputGroups struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Index float64 `json:"index"` +} + +// PortalsListingsUpdateOutput represents the portals listings update output type. +type PortalsListingsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` + Access PortalsListingsUpdateOutputAccess `json:"access"` + Groups []PortalsListingsUpdateOutputGroups `json:"groups"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapPortalsListingsUpdateOutputFromJSON deserializes JSON data into a PortalsListingsUpdateOutput. +func MapPortalsListingsUpdateOutputFromJSON(data []byte) (*PortalsListingsUpdateOutput, error) { + var v PortalsListingsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsUpdateOutputToJSON serializes a PortalsListingsUpdateOutput to JSON. +func MapPortalsListingsUpdateOutputToJSON(v *PortalsListingsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// PortalsListingsUpdateBody represents the portals listings update body type. +type PortalsListingsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Readme *string `json:"readme,omitempty"` +} + +// MapPortalsListingsUpdateBodyFromJSON deserializes JSON data into a PortalsListingsUpdateBody. +func MapPortalsListingsUpdateBodyFromJSON(data []byte) (*PortalsListingsUpdateBody, error) { + var v PortalsListingsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapPortalsListingsUpdateBodyToJSON serializes a PortalsListingsUpdateBody to JSON. +func MapPortalsListingsUpdateBodyToJSON(v *PortalsListingsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/portals/update.go b/v1/resources/portals/update.go index 598804c..5565f79 100644 --- a/v1/resources/portals/update.go +++ b/v1/resources/portals/update.go @@ -5,16 +5,20 @@ import ( "time" ) -// PortalsUpdateOutputAuthAllowedRedirectUrlFilters represents the portals update output auth allowed redirect url filters type. -type PortalsUpdateOutputAuthAllowedRedirectUrlFilters struct { - Url string `json:"url"` +// PortalsUpdateOutputSkillConfiguration represents the portals update output skill configuration type. +type PortalsUpdateOutputSkillConfiguration struct { + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` } // PortalsUpdateOutputAuth represents the portals update output auth type. type PortalsUpdateOutputAuth struct { - Object string `json:"object"` - SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` - AllowedRedirectUrlFilters []PortalsUpdateOutputAuthAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters"` + Object string `json:"object"` + SessionExpiryTimeInSeconds float64 `json:"session_expiry_time_in_seconds"` } // PortalsUpdateOutputUrls represents the portals update output urls type. @@ -25,16 +29,19 @@ type PortalsUpdateOutputUrls struct { // PortalsUpdateOutput represents the portals update output type. type PortalsUpdateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Slug string `json:"slug"` - Description *string `json:"description,omitempty"` - Auth PortalsUpdateOutputAuth `json:"auth"` - Urls []PortalsUpdateOutputUrls `json:"urls"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + AllowConsumerSkillAuthoring bool `json:"allow_consumer_skill_authoring"` + AllowConsumerSkillPublishing bool `json:"allow_consumer_skill_publishing"` + SkillConfiguration PortalsUpdateOutputSkillConfiguration `json:"skill_configuration"` + Auth PortalsUpdateOutputAuth `json:"auth"` + Urls []PortalsUpdateOutputUrls `json:"urls"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapPortalsUpdateOutputFromJSON deserializes JSON data into a PortalsUpdateOutput. @@ -56,12 +63,22 @@ type PortalsUpdateBodyAllowedRedirectUrlFilters struct { Url string `json:"url"` } +// PortalsUpdateBodySkillConfiguration represents the portals update body skill configuration type. +type PortalsUpdateBodySkillConfiguration struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + // PortalsUpdateBody represents the portals update body type. type PortalsUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - AllowedRedirectUrlFilters *[]PortalsUpdateBodyAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters,omitempty"` - SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + AllowedRedirectUrlFilters *[]PortalsUpdateBodyAllowedRedirectUrlFilters `json:"allowed_redirect_url_filters,omitempty"` + SessionExpiryTimeInSeconds *float64 `json:"session_expiry_time_in_seconds,omitempty"` + AllowConsumerSkillAuthoring *bool `json:"allow_consumer_skill_authoring,omitempty"` + AllowConsumerSkillPublishing *bool `json:"allow_consumer_skill_publishing,omitempty"` + SkillConfiguration *PortalsUpdateBodySkillConfiguration `json:"skill_configuration,omitempty"` } // MapPortalsUpdateBodyFromJSON deserializes JSON data into a PortalsUpdateBody. diff --git a/v1/resources/providerdeployments/authconfigs/list.go b/v1/resources/providerdeployments/authconfigs/list.go index e06319e..7ac820f 100644 --- a/v1/resources/providerdeployments/authconfigs/list.go +++ b/v1/resources/providerdeployments/authconfigs/list.go @@ -212,6 +212,10 @@ type ProviderDeploymentsAuthConfigsListQuery struct { ProviderId *any `json:"provider_id,omitempty"` // ProviderDeploymentId - Filter by provider deployment ID(s) ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + // AvailableForUse - Only return auth configs that are not owned by another integration instance provider. + AvailableForUse *bool `json:"available_for_use,omitempty"` + // AvailableForProviderDeploymentId - Only return auth configs that are not locked to a different provider deployment. + AvailableForProviderDeploymentId *string `json:"available_for_provider_deployment_id,omitempty"` // ProviderAuthCredentialsId - Filter by auth credentials ID(s) ProviderAuthCredentialsId *any `json:"provider_auth_credentials_id,omitempty"` // ProviderAuthMethodId - Filter by auth method ID(s) diff --git a/v1/resources/providerdeployments/configs/list.go b/v1/resources/providerdeployments/configs/list.go index b616292..96f6bb0 100644 --- a/v1/resources/providerdeployments/configs/list.go +++ b/v1/resources/providerdeployments/configs/list.go @@ -169,6 +169,10 @@ type ProviderDeploymentsConfigsListQuery struct { ProviderSpecificationId *any `json:"provider_specification_id,omitempty"` // ProviderDeploymentId - Filter by provider deployment ID(s) ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` + // AvailableForUse - Only return configs that are not owned by another integration instance provider. + AvailableForUse *bool `json:"available_for_use,omitempty"` + // AvailableForProviderDeploymentId - Only return configs that are not locked to a different provider deployment. + AvailableForProviderDeploymentId *string `json:"available_for_provider_deployment_id,omitempty"` // ProviderConfigVaultId - Filter by config vault ID(s) ProviderConfigVaultId *any `json:"provider_config_vault_id,omitempty"` // ActorId - Filter by actor ID(s) diff --git a/v1/resources/providertemplates/create.go b/v1/resources/providertemplates/create.go index ff048d6..b4ea2f3 100644 --- a/v1/resources/providertemplates/create.go +++ b/v1/resources/providertemplates/create.go @@ -5,27 +5,17 @@ import ( "time" ) -// ProviderTemplatesCreateOutputToolFilters represents one of several possible types. -// This is a union type - only one set of fields will be populated. -type ProviderTemplatesCreateOutputToolFilters struct { - Type *string `json:"type,omitempty"` - IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` - Filters *[]any `json:"filters,omitempty"` -} - // ProviderTemplatesCreateOutput represents the provider templates create output type. type ProviderTemplatesCreateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - ProviderDeploymentId string `json:"provider_deployment_id"` - // ToolFilters - Tool filter configuration - ToolFilters ProviderTemplatesCreateOutputToolFilters `json:"tool_filters"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapProviderTemplatesCreateOutputFromJSON deserializes JSON data into a ProviderTemplatesCreateOutput. @@ -42,23 +32,25 @@ func MapProviderTemplatesCreateOutputToJSON(v *ProviderTemplatesCreateOutput) ([ return json.Marshal(v) } -// ProviderTemplatesCreateBodyProviderDeployment represents the provider templates create body provider deployment type. -type ProviderTemplatesCreateBodyProviderDeployment struct { - ProviderId string `json:"provider_id"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - LockedProviderVersionId *string `json:"locked_provider_version_id,omitempty"` +// ProviderTemplatesCreateBodyProviders represents the provider templates create body providers type. +type ProviderTemplatesCreateBodyProviders struct { + ProviderId string `json:"provider_id"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` } // ProviderTemplatesCreateBody represents the provider templates create body type. type ProviderTemplatesCreateBody struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ToolFilers *any `json:"tool_filers,omitempty"` - ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` - ProviderDeployment *ProviderTemplatesCreateBodyProviderDeployment `json:"provider_deployment,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers []ProviderTemplatesCreateBodyProviders `json:"providers"` } // MapProviderTemplatesCreateBodyFromJSON deserializes JSON data into a ProviderTemplatesCreateBody. diff --git a/v1/resources/providertemplates/delete.go b/v1/resources/providertemplates/delete.go index f59a80b..0639c54 100644 --- a/v1/resources/providertemplates/delete.go +++ b/v1/resources/providertemplates/delete.go @@ -5,27 +5,17 @@ import ( "time" ) -// ProviderTemplatesDeleteOutputToolFilters represents one of several possible types. -// This is a union type - only one set of fields will be populated. -type ProviderTemplatesDeleteOutputToolFilters struct { - Type *string `json:"type,omitempty"` - IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` - Filters *[]any `json:"filters,omitempty"` -} - // ProviderTemplatesDeleteOutput represents the provider templates delete output type. type ProviderTemplatesDeleteOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - ProviderDeploymentId string `json:"provider_deployment_id"` - // ToolFilters - Tool filter configuration - ToolFilters ProviderTemplatesDeleteOutputToolFilters `json:"tool_filters"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapProviderTemplatesDeleteOutputFromJSON deserializes JSON data into a ProviderTemplatesDeleteOutput. diff --git a/v1/resources/providertemplates/get.go b/v1/resources/providertemplates/get.go index aa45ff2..328db48 100644 --- a/v1/resources/providertemplates/get.go +++ b/v1/resources/providertemplates/get.go @@ -5,27 +5,17 @@ import ( "time" ) -// ProviderTemplatesGetOutputToolFilters represents one of several possible types. -// This is a union type - only one set of fields will be populated. -type ProviderTemplatesGetOutputToolFilters struct { - Type *string `json:"type,omitempty"` - IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` - Filters *[]any `json:"filters,omitempty"` -} - // ProviderTemplatesGetOutput represents the provider templates get output type. type ProviderTemplatesGetOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - ProviderDeploymentId string `json:"provider_deployment_id"` - // ToolFilters - Tool filter configuration - ToolFilters ProviderTemplatesGetOutputToolFilters `json:"tool_filters"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapProviderTemplatesGetOutputFromJSON deserializes JSON data into a ProviderTemplatesGetOutput. diff --git a/v1/resources/providertemplates/list.go b/v1/resources/providertemplates/list.go index de04fea..c90de31 100644 --- a/v1/resources/providertemplates/list.go +++ b/v1/resources/providertemplates/list.go @@ -5,27 +5,17 @@ import ( "time" ) -// ProviderTemplatesListOutputItemsToolFilters represents one of several possible types. -// This is a union type - only one set of fields will be populated. -type ProviderTemplatesListOutputItemsToolFilters struct { - Type *string `json:"type,omitempty"` - IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` - Filters *[]any `json:"filters,omitempty"` -} - // ProviderTemplatesListOutputItems represents the provider templates list output items type. type ProviderTemplatesListOutputItems struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - ProviderDeploymentId string `json:"provider_deployment_id"` - // ToolFilters - Tool filter configuration - ToolFilters ProviderTemplatesListOutputItemsToolFilters `json:"tool_filters"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // ProviderTemplatesListOutputPagination represents the provider templates list output pagination type. @@ -56,15 +46,15 @@ func MapProviderTemplatesListOutputToJSON(v *ProviderTemplatesListOutput) ([]byt // ProviderTemplatesListQuery represents the provider templates list query type. type ProviderTemplatesListQuery struct { - Limit *float64 `json:"limit,omitempty"` - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Cursor *string `json:"cursor,omitempty"` - Order *string `json:"order,omitempty"` - Id *any `json:"id,omitempty"` - ProviderDeploymentId *any `json:"provider_deployment_id,omitempty"` - Search *string `json:"search,omitempty"` - Status *any `json:"status,omitempty"` + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` } // MapProviderTemplatesListQueryFromJSON deserializes JSON data into a ProviderTemplatesListQuery. diff --git a/v1/resources/providertemplates/update.go b/v1/resources/providertemplates/update.go index b603ed7..f57275f 100644 --- a/v1/resources/providertemplates/update.go +++ b/v1/resources/providertemplates/update.go @@ -5,27 +5,17 @@ import ( "time" ) -// ProviderTemplatesUpdateOutputToolFilters represents one of several possible types. -// This is a union type - only one set of fields will be populated. -type ProviderTemplatesUpdateOutputToolFilters struct { - Type *string `json:"type,omitempty"` - IgnoreParentFilters *bool `json:"ignore_parent_filters,omitempty"` - Filters *[]any `json:"filters,omitempty"` -} - // ProviderTemplatesUpdateOutput represents the provider templates update output type. type ProviderTemplatesUpdateOutput struct { - Object string `json:"object"` - Id string `json:"id"` - Status string `json:"status"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Metadata map[string]any `json:"metadata"` - ProviderDeploymentId string `json:"provider_deployment_id"` - // ToolFilters - Tool filter configuration - ToolFilters ProviderTemplatesUpdateOutputToolFilters `json:"tool_filters"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + IntegrationId *string `json:"integration_id,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // MapProviderTemplatesUpdateOutputFromJSON deserializes JSON data into a ProviderTemplatesUpdateOutput. @@ -42,12 +32,25 @@ func MapProviderTemplatesUpdateOutputToJSON(v *ProviderTemplatesUpdateOutput) ([ return json.Marshal(v) } +// ProviderTemplatesUpdateBodyProviders represents the provider templates update body providers type. +type ProviderTemplatesUpdateBodyProviders struct { + ProviderId string `json:"provider_id"` + ProviderDeploymentId *string `json:"provider_deployment_id,omitempty"` + ProviderAuthMethodId *string `json:"provider_auth_method_id,omitempty"` + ProviderAuthCredentialsId *string `json:"provider_auth_credentials_id,omitempty"` + ProviderConfigId *string `json:"provider_config_id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ToolFilters *any `json:"tool_filters,omitempty"` +} + // ProviderTemplatesUpdateBody represents the provider templates update body type. type ProviderTemplatesUpdateBody struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Metadata *map[string]any `json:"metadata,omitempty"` - ToolFilters *any `json:"tool_filters,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Providers *[]ProviderTemplatesUpdateBodyProviders `json:"providers,omitempty"` } // MapProviderTemplatesUpdateBodyFromJSON deserializes JSON data into a ProviderTemplatesUpdateBody. diff --git a/v1/resources/sessions/connections/get.go b/v1/resources/sessions/connections/get.go index 3811463..9cc59ad 100644 --- a/v1/resources/sessions/connections/get.go +++ b/v1/resources/sessions/connections/get.go @@ -46,7 +46,13 @@ type SessionsConnectionsGetOutputParticipant struct { // Data - Participant payload data Data SessionsConnectionsGetOutputParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } diff --git a/v1/resources/sessions/connections/list.go b/v1/resources/sessions/connections/list.go index 50136fe..3133288 100644 --- a/v1/resources/sessions/connections/list.go +++ b/v1/resources/sessions/connections/list.go @@ -46,7 +46,13 @@ type SessionsConnectionsListOutputItemsParticipant struct { // Data - Participant payload data Data SessionsConnectionsListOutputItemsParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -135,6 +141,16 @@ type SessionsConnectionsListQuery struct { ConnectionState *any `json:"connection_state,omitempty"` // Id - Filter by session connection ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by connected agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // SessionId - Filter by session ID(s) SessionId *any `json:"session_id,omitempty"` // SessionProviderId - Filter by session provider ID(s) diff --git a/v1/resources/sessions/events/get.go b/v1/resources/sessions/events/get.go index 3aef2f6..d2b8dbf 100644 --- a/v1/resources/sessions/events/get.go +++ b/v1/resources/sessions/events/get.go @@ -46,7 +46,13 @@ type SessionsEventsGetOutputConnectionParticipant struct { // Data - Participant payload data Data SessionsEventsGetOutputConnectionParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -142,6 +148,74 @@ type SessionsEventsGetOutputMessageTransport struct { ToolCall *SessionsEventsGetOutputMessageTransportToolCall `json:"tool_call,omitempty"` } +// SessionsEventsGetOutputMessageToolCallSenderParticipantData - Participant payload data +type SessionsEventsGetOutputMessageToolCallSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsEventsGetOutputMessageToolCallSenderParticipant represents the sessions events get output message tool call sender participant type. +type SessionsEventsGetOutputMessageToolCallSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsEventsGetOutputMessageToolCallSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// SessionsEventsGetOutputMessageToolCallResponderParticipantData - Participant payload data +type SessionsEventsGetOutputMessageToolCallResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsEventsGetOutputMessageToolCallResponderParticipant represents the sessions events get output message tool call responder participant type. +type SessionsEventsGetOutputMessageToolCallResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsEventsGetOutputMessageToolCallResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // SessionsEventsGetOutputMessageToolCallToolInputSchema represents the sessions events get output message tool call tool input schema type. type SessionsEventsGetOutputMessageToolCallToolInputSchema struct { Type string `json:"type"` @@ -248,9 +322,11 @@ type SessionsEventsGetOutputMessageToolCall struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool SessionsEventsGetOutputMessageToolCallTool `json:"tool"` - Error *SessionsEventsGetOutputMessageToolCallError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *SessionsEventsGetOutputMessageToolCallSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *SessionsEventsGetOutputMessageToolCallResponderParticipant `json:"responder_participant,omitempty"` + Tool SessionsEventsGetOutputMessageToolCallTool `json:"tool"` + Error *SessionsEventsGetOutputMessageToolCallError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call @@ -282,7 +358,13 @@ type SessionsEventsGetOutputMessageSenderParticipant struct { // Data - Participant payload data Data SessionsEventsGetOutputMessageSenderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -310,7 +392,13 @@ type SessionsEventsGetOutputMessageResponderParticipant struct { // Data - Participant payload data Data SessionsEventsGetOutputMessageResponderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } diff --git a/v1/resources/sessions/events/list.go b/v1/resources/sessions/events/list.go index 4bbfa44..d2e4f59 100644 --- a/v1/resources/sessions/events/list.go +++ b/v1/resources/sessions/events/list.go @@ -46,7 +46,13 @@ type SessionsEventsListOutputItemsConnectionParticipant struct { // Data - Participant payload data Data SessionsEventsListOutputItemsConnectionParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -142,6 +148,74 @@ type SessionsEventsListOutputItemsMessageTransport struct { ToolCall *SessionsEventsListOutputItemsMessageTransportToolCall `json:"tool_call,omitempty"` } +// SessionsEventsListOutputItemsMessageToolCallSenderParticipantData - Participant payload data +type SessionsEventsListOutputItemsMessageToolCallSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsEventsListOutputItemsMessageToolCallSenderParticipant represents the sessions events list output items message tool call sender participant type. +type SessionsEventsListOutputItemsMessageToolCallSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsEventsListOutputItemsMessageToolCallSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// SessionsEventsListOutputItemsMessageToolCallResponderParticipantData - Participant payload data +type SessionsEventsListOutputItemsMessageToolCallResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsEventsListOutputItemsMessageToolCallResponderParticipant represents the sessions events list output items message tool call responder participant type. +type SessionsEventsListOutputItemsMessageToolCallResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsEventsListOutputItemsMessageToolCallResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // SessionsEventsListOutputItemsMessageToolCallToolInputSchema represents the sessions events list output items message tool call tool input schema type. type SessionsEventsListOutputItemsMessageToolCallToolInputSchema struct { Type string `json:"type"` @@ -248,9 +322,11 @@ type SessionsEventsListOutputItemsMessageToolCall struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool SessionsEventsListOutputItemsMessageToolCallTool `json:"tool"` - Error *SessionsEventsListOutputItemsMessageToolCallError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *SessionsEventsListOutputItemsMessageToolCallSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *SessionsEventsListOutputItemsMessageToolCallResponderParticipant `json:"responder_participant,omitempty"` + Tool SessionsEventsListOutputItemsMessageToolCallTool `json:"tool"` + Error *SessionsEventsListOutputItemsMessageToolCallError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call @@ -282,7 +358,13 @@ type SessionsEventsListOutputItemsMessageSenderParticipant struct { // Data - Participant payload data Data SessionsEventsListOutputItemsMessageSenderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -310,7 +392,13 @@ type SessionsEventsListOutputItemsMessageResponderParticipant struct { // Data - Participant payload data Data SessionsEventsListOutputItemsMessageResponderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } diff --git a/v1/resources/sessions/list.go b/v1/resources/sessions/list.go index 775b3eb..5606b10 100644 --- a/v1/resources/sessions/list.go +++ b/v1/resources/sessions/list.go @@ -196,6 +196,14 @@ type SessionsListQuery struct { Status *any `json:"status,omitempty"` // Id - Filter by session ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` // SessionTemplateId - Filter by session template ID(s) SessionTemplateId *any `json:"session_template_id,omitempty"` // SessionProviderId - Filter by session provider ID(s) diff --git a/v1/resources/sessions/messages/get.go b/v1/resources/sessions/messages/get.go index 74197b3..f03010e 100644 --- a/v1/resources/sessions/messages/get.go +++ b/v1/resources/sessions/messages/get.go @@ -43,6 +43,74 @@ type SessionsMessagesGetOutputTransport struct { ToolCall *SessionsMessagesGetOutputTransportToolCall `json:"tool_call,omitempty"` } +// SessionsMessagesGetOutputToolCallSenderParticipantData - Participant payload data +type SessionsMessagesGetOutputToolCallSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsMessagesGetOutputToolCallSenderParticipant represents the sessions messages get output tool call sender participant type. +type SessionsMessagesGetOutputToolCallSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsMessagesGetOutputToolCallSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// SessionsMessagesGetOutputToolCallResponderParticipantData - Participant payload data +type SessionsMessagesGetOutputToolCallResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsMessagesGetOutputToolCallResponderParticipant represents the sessions messages get output tool call responder participant type. +type SessionsMessagesGetOutputToolCallResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsMessagesGetOutputToolCallResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // SessionsMessagesGetOutputToolCallToolInputSchema represents the sessions messages get output tool call tool input schema type. type SessionsMessagesGetOutputToolCallToolInputSchema struct { Type string `json:"type"` @@ -149,9 +217,11 @@ type SessionsMessagesGetOutputToolCall struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool SessionsMessagesGetOutputToolCallTool `json:"tool"` - Error *SessionsMessagesGetOutputToolCallError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *SessionsMessagesGetOutputToolCallSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *SessionsMessagesGetOutputToolCallResponderParticipant `json:"responder_participant,omitempty"` + Tool SessionsMessagesGetOutputToolCallTool `json:"tool"` + Error *SessionsMessagesGetOutputToolCallError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call @@ -183,7 +253,13 @@ type SessionsMessagesGetOutputSenderParticipant struct { // Data - Participant payload data Data SessionsMessagesGetOutputSenderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -211,7 +287,13 @@ type SessionsMessagesGetOutputResponderParticipant struct { // Data - Participant payload data Data SessionsMessagesGetOutputResponderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } diff --git a/v1/resources/sessions/messages/list.go b/v1/resources/sessions/messages/list.go index c0688f8..216d5d2 100644 --- a/v1/resources/sessions/messages/list.go +++ b/v1/resources/sessions/messages/list.go @@ -43,6 +43,74 @@ type SessionsMessagesListOutputItemsTransport struct { ToolCall *SessionsMessagesListOutputItemsTransportToolCall `json:"tool_call,omitempty"` } +// SessionsMessagesListOutputItemsToolCallSenderParticipantData - Participant payload data +type SessionsMessagesListOutputItemsToolCallSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsMessagesListOutputItemsToolCallSenderParticipant represents the sessions messages list output items tool call sender participant type. +type SessionsMessagesListOutputItemsToolCallSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsMessagesListOutputItemsToolCallSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// SessionsMessagesListOutputItemsToolCallResponderParticipantData - Participant payload data +type SessionsMessagesListOutputItemsToolCallResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// SessionsMessagesListOutputItemsToolCallResponderParticipant represents the sessions messages list output items tool call responder participant type. +type SessionsMessagesListOutputItemsToolCallResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data SessionsMessagesListOutputItemsToolCallResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // SessionsMessagesListOutputItemsToolCallToolInputSchema represents the sessions messages list output items tool call tool input schema type. type SessionsMessagesListOutputItemsToolCallToolInputSchema struct { Type string `json:"type"` @@ -149,9 +217,11 @@ type SessionsMessagesListOutputItemsToolCall struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool SessionsMessagesListOutputItemsToolCallTool `json:"tool"` - Error *SessionsMessagesListOutputItemsToolCallError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *SessionsMessagesListOutputItemsToolCallSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *SessionsMessagesListOutputItemsToolCallResponderParticipant `json:"responder_participant,omitempty"` + Tool SessionsMessagesListOutputItemsToolCallTool `json:"tool"` + Error *SessionsMessagesListOutputItemsToolCallError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call @@ -183,7 +253,13 @@ type SessionsMessagesListOutputItemsSenderParticipant struct { // Data - Participant payload data Data SessionsMessagesListOutputItemsSenderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -211,7 +287,13 @@ type SessionsMessagesListOutputItemsResponderParticipant struct { // Data - Participant payload data Data SessionsMessagesListOutputItemsResponderParticipantData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } diff --git a/v1/resources/sessions/participants/get.go b/v1/resources/sessions/participants/get.go index e63aea6..26ec221 100644 --- a/v1/resources/sessions/participants/get.go +++ b/v1/resources/sessions/participants/get.go @@ -28,7 +28,13 @@ type SessionsParticipantsGetOutput struct { // Data - Participant payload data Data SessionsParticipantsGetOutputData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } diff --git a/v1/resources/sessions/participants/list.go b/v1/resources/sessions/participants/list.go index 2ba34aa..ceae498 100644 --- a/v1/resources/sessions/participants/list.go +++ b/v1/resources/sessions/participants/list.go @@ -28,7 +28,13 @@ type SessionsParticipantsListOutputItems struct { // Data - Participant payload data Data SessionsParticipantsListOutputItemsData `json:"data"` // ProviderId - Provider ID if associated - ProviderId *string `json:"provider_id,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` // CreatedAt - Timestamp when created CreatedAt time.Time `json:"created_at"` } @@ -86,6 +92,16 @@ type SessionsParticipantsListQuery struct { Type *any `json:"type,omitempty"` // Id - Filter by participant ID(s) Id *any `json:"id,omitempty"` + // AgentId - Filter by connected agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by connected identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by connected consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by connected identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by connected agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // SessionId - Filter by session ID(s) SessionId *any `json:"session_id,omitempty"` // SessionConnectionId - Filter by session connection ID(s) diff --git a/v1/resources/sessiontemplates/create.go b/v1/resources/sessiontemplates/create.go index 4eaa05f..19be388 100644 --- a/v1/resources/sessiontemplates/create.go +++ b/v1/resources/sessiontemplates/create.go @@ -99,7 +99,9 @@ type SessionTemplatesCreateOutput struct { // Description - Template description Description *string `json:"description,omitempty"` // Metadata - Custom key-value pairs - Metadata *map[string]any `json:"metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` // Providers - Template providers Providers []SessionTemplatesCreateOutputProviders `json:"providers"` // CreatedAt - Timestamp when created diff --git a/v1/resources/sessiontemplates/delete.go b/v1/resources/sessiontemplates/delete.go index 67b9f6b..551367d 100644 --- a/v1/resources/sessiontemplates/delete.go +++ b/v1/resources/sessiontemplates/delete.go @@ -99,7 +99,9 @@ type SessionTemplatesDeleteOutput struct { // Description - Template description Description *string `json:"description,omitempty"` // Metadata - Custom key-value pairs - Metadata *map[string]any `json:"metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` // Providers - Template providers Providers []SessionTemplatesDeleteOutputProviders `json:"providers"` // CreatedAt - Timestamp when created diff --git a/v1/resources/sessiontemplates/get.go b/v1/resources/sessiontemplates/get.go index cba0e53..25d7e58 100644 --- a/v1/resources/sessiontemplates/get.go +++ b/v1/resources/sessiontemplates/get.go @@ -99,7 +99,9 @@ type SessionTemplatesGetOutput struct { // Description - Template description Description *string `json:"description,omitempty"` // Metadata - Custom key-value pairs - Metadata *map[string]any `json:"metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` // Providers - Template providers Providers []SessionTemplatesGetOutputProviders `json:"providers"` // CreatedAt - Timestamp when created diff --git a/v1/resources/sessiontemplates/list.go b/v1/resources/sessiontemplates/list.go index cf006c4..732cf3f 100644 --- a/v1/resources/sessiontemplates/list.go +++ b/v1/resources/sessiontemplates/list.go @@ -99,7 +99,9 @@ type SessionTemplatesListOutputItems struct { // Description - Template description Description *string `json:"description,omitempty"` // Metadata - Custom key-value pairs - Metadata *map[string]any `json:"metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` // Providers - Template providers Providers []SessionTemplatesListOutputItemsProviders `json:"providers"` // CreatedAt - Timestamp when created diff --git a/v1/resources/sessiontemplates/update.go b/v1/resources/sessiontemplates/update.go index 38ca405..9bf8f79 100644 --- a/v1/resources/sessiontemplates/update.go +++ b/v1/resources/sessiontemplates/update.go @@ -99,7 +99,9 @@ type SessionTemplatesUpdateOutput struct { // Description - Template description Description *string `json:"description,omitempty"` // Metadata - Custom key-value pairs - Metadata *map[string]any `json:"metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + IntegrationInstanceId *string `json:"integration_instance_id,omitempty"` + IntegrationInstanceGroupId *string `json:"integration_instance_group_id,omitempty"` // Providers - Template providers Providers []SessionTemplatesUpdateOutputProviders `json:"providers"` // CreatedAt - Timestamp when created diff --git a/v1/resources/skills/agents/create.go b/v1/resources/skills/agents/create.go new file mode 100644 index 0000000..62a2ff4 --- /dev/null +++ b/v1/resources/skills/agents/create.go @@ -0,0 +1,60 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// SkillsAgentsCreateOutput represents the skills agents create output type. +type SkillsAgentsCreateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Status string `json:"status"` + StoreId string `json:"store_id"` + StoreItemId *string `json:"store_item_id,omitempty"` + Path *string `json:"path,omitempty"` + DocumentId string `json:"document_id"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsAgentsCreateOutputFromJSON deserializes JSON data into a SkillsAgentsCreateOutput. +func MapSkillsAgentsCreateOutputFromJSON(data []byte) (*SkillsAgentsCreateOutput, error) { + var v SkillsAgentsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsCreateOutputToJSON serializes a SkillsAgentsCreateOutput to JSON. +func MapSkillsAgentsCreateOutputToJSON(v *SkillsAgentsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsAgentsCreateBody represents the skills agents create body type. +type SkillsAgentsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Content *string `json:"content,omitempty"` +} + +// MapSkillsAgentsCreateBodyFromJSON deserializes JSON data into a SkillsAgentsCreateBody. +func MapSkillsAgentsCreateBodyFromJSON(data []byte) (*SkillsAgentsCreateBody, error) { + var v SkillsAgentsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsCreateBodyToJSON serializes a SkillsAgentsCreateBody to JSON. +func MapSkillsAgentsCreateBodyToJSON(v *SkillsAgentsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/agents/delete.go b/v1/resources/skills/agents/delete.go new file mode 100644 index 0000000..d0642d6 --- /dev/null +++ b/v1/resources/skills/agents/delete.go @@ -0,0 +1,39 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// SkillsAgentsDeleteOutput represents the skills agents delete output type. +type SkillsAgentsDeleteOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Status string `json:"status"` + StoreId string `json:"store_id"` + StoreItemId *string `json:"store_item_id,omitempty"` + Path *string `json:"path,omitempty"` + DocumentId string `json:"document_id"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsAgentsDeleteOutputFromJSON deserializes JSON data into a SkillsAgentsDeleteOutput. +func MapSkillsAgentsDeleteOutputFromJSON(data []byte) (*SkillsAgentsDeleteOutput, error) { + var v SkillsAgentsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsDeleteOutputToJSON serializes a SkillsAgentsDeleteOutput to JSON. +func MapSkillsAgentsDeleteOutputToJSON(v *SkillsAgentsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/agents/get.go b/v1/resources/skills/agents/get.go new file mode 100644 index 0000000..6e7b710 --- /dev/null +++ b/v1/resources/skills/agents/get.go @@ -0,0 +1,39 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// SkillsAgentsGetOutput represents the skills agents get output type. +type SkillsAgentsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Status string `json:"status"` + StoreId string `json:"store_id"` + StoreItemId *string `json:"store_item_id,omitempty"` + Path *string `json:"path,omitempty"` + DocumentId string `json:"document_id"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsAgentsGetOutputFromJSON deserializes JSON data into a SkillsAgentsGetOutput. +func MapSkillsAgentsGetOutputFromJSON(data []byte) (*SkillsAgentsGetOutput, error) { + var v SkillsAgentsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsGetOutputToJSON serializes a SkillsAgentsGetOutput to JSON. +func MapSkillsAgentsGetOutputToJSON(v *SkillsAgentsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/agents/list.go b/v1/resources/skills/agents/list.go new file mode 100644 index 0000000..36777cd --- /dev/null +++ b/v1/resources/skills/agents/list.go @@ -0,0 +1,75 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// SkillsAgentsListOutputItems represents the skills agents list output items type. +type SkillsAgentsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Status string `json:"status"` + StoreId string `json:"store_id"` + StoreItemId *string `json:"store_item_id,omitempty"` + Path *string `json:"path,omitempty"` + DocumentId string `json:"document_id"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsAgentsListOutputPagination represents the skills agents list output pagination type. +type SkillsAgentsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsAgentsListOutput represents the skills agents list output type. +type SkillsAgentsListOutput struct { + Items []SkillsAgentsListOutputItems `json:"items"` + Pagination SkillsAgentsListOutputPagination `json:"pagination"` +} + +// MapSkillsAgentsListOutputFromJSON deserializes JSON data into a SkillsAgentsListOutput. +func MapSkillsAgentsListOutputFromJSON(data []byte) (*SkillsAgentsListOutput, error) { + var v SkillsAgentsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsListOutputToJSON serializes a SkillsAgentsListOutput to JSON. +func MapSkillsAgentsListOutputToJSON(v *SkillsAgentsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsAgentsListQuery represents the skills agents list query type. +type SkillsAgentsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + IncludeArchived *bool `json:"include_archived,omitempty"` +} + +// MapSkillsAgentsListQueryFromJSON deserializes JSON data into a SkillsAgentsListQuery. +func MapSkillsAgentsListQueryFromJSON(data []byte) (*SkillsAgentsListQuery, error) { + var v SkillsAgentsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsListQueryToJSON serializes a SkillsAgentsListQuery to JSON. +func MapSkillsAgentsListQueryToJSON(v *SkillsAgentsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/agents/update.go b/v1/resources/skills/agents/update.go new file mode 100644 index 0000000..524062a --- /dev/null +++ b/v1/resources/skills/agents/update.go @@ -0,0 +1,59 @@ +package agents + +import ( + "encoding/json" + "time" +) + +// SkillsAgentsUpdateOutput represents the skills agents update output type. +type SkillsAgentsUpdateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + Status string `json:"status"` + StoreId string `json:"store_id"` + StoreItemId *string `json:"store_item_id,omitempty"` + Path *string `json:"path,omitempty"` + DocumentId string `json:"document_id"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsAgentsUpdateOutputFromJSON deserializes JSON data into a SkillsAgentsUpdateOutput. +func MapSkillsAgentsUpdateOutputFromJSON(data []byte) (*SkillsAgentsUpdateOutput, error) { + var v SkillsAgentsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsUpdateOutputToJSON serializes a SkillsAgentsUpdateOutput to JSON. +func MapSkillsAgentsUpdateOutputToJSON(v *SkillsAgentsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsAgentsUpdateBody represents the skills agents update body type. +type SkillsAgentsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// MapSkillsAgentsUpdateBodyFromJSON deserializes JSON data into a SkillsAgentsUpdateBody. +func MapSkillsAgentsUpdateBodyFromJSON(data []byte) (*SkillsAgentsUpdateBody, error) { + var v SkillsAgentsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsAgentsUpdateBodyToJSON serializes a SkillsAgentsUpdateBody to JSON. +func MapSkillsAgentsUpdateBodyToJSON(v *SkillsAgentsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/configurations/create.go b/v1/resources/skills/configurations/create.go new file mode 100644 index 0000000..e1e6522 --- /dev/null +++ b/v1/resources/skills/configurations/create.go @@ -0,0 +1,55 @@ +package configurations + +import ( + "encoding/json" + "time" +) + +// SkillsConfigurationsCreateOutput represents the skills configurations create output type. +type SkillsConfigurationsCreateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsConfigurationsCreateOutputFromJSON deserializes JSON data into a SkillsConfigurationsCreateOutput. +func MapSkillsConfigurationsCreateOutputFromJSON(data []byte) (*SkillsConfigurationsCreateOutput, error) { + var v SkillsConfigurationsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsCreateOutputToJSON serializes a SkillsConfigurationsCreateOutput to JSON. +func MapSkillsConfigurationsCreateOutputToJSON(v *SkillsConfigurationsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsConfigurationsCreateBody represents the skills configurations create body type. +type SkillsConfigurationsCreateBody struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + +// MapSkillsConfigurationsCreateBodyFromJSON deserializes JSON data into a SkillsConfigurationsCreateBody. +func MapSkillsConfigurationsCreateBodyFromJSON(data []byte) (*SkillsConfigurationsCreateBody, error) { + var v SkillsConfigurationsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsCreateBodyToJSON serializes a SkillsConfigurationsCreateBody to JSON. +func MapSkillsConfigurationsCreateBodyToJSON(v *SkillsConfigurationsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/configurations/delete.go b/v1/resources/skills/configurations/delete.go new file mode 100644 index 0000000..4296a67 --- /dev/null +++ b/v1/resources/skills/configurations/delete.go @@ -0,0 +1,34 @@ +package configurations + +import ( + "encoding/json" + "time" +) + +// SkillsConfigurationsDeleteOutput represents the skills configurations delete output type. +type SkillsConfigurationsDeleteOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsConfigurationsDeleteOutputFromJSON deserializes JSON data into a SkillsConfigurationsDeleteOutput. +func MapSkillsConfigurationsDeleteOutputFromJSON(data []byte) (*SkillsConfigurationsDeleteOutput, error) { + var v SkillsConfigurationsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsDeleteOutputToJSON serializes a SkillsConfigurationsDeleteOutput to JSON. +func MapSkillsConfigurationsDeleteOutputToJSON(v *SkillsConfigurationsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/configurations/get.go b/v1/resources/skills/configurations/get.go new file mode 100644 index 0000000..aa8039e --- /dev/null +++ b/v1/resources/skills/configurations/get.go @@ -0,0 +1,34 @@ +package configurations + +import ( + "encoding/json" + "time" +) + +// SkillsConfigurationsGetOutput represents the skills configurations get output type. +type SkillsConfigurationsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsConfigurationsGetOutputFromJSON deserializes JSON data into a SkillsConfigurationsGetOutput. +func MapSkillsConfigurationsGetOutputFromJSON(data []byte) (*SkillsConfigurationsGetOutput, error) { + var v SkillsConfigurationsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsGetOutputToJSON serializes a SkillsConfigurationsGetOutput to JSON. +func MapSkillsConfigurationsGetOutputToJSON(v *SkillsConfigurationsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/configurations/list.go b/v1/resources/skills/configurations/list.go new file mode 100644 index 0000000..d373a59 --- /dev/null +++ b/v1/resources/skills/configurations/list.go @@ -0,0 +1,69 @@ +package configurations + +import ( + "encoding/json" + "time" +) + +// SkillsConfigurationsListOutputItems represents the skills configurations list output items type. +type SkillsConfigurationsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsConfigurationsListOutputPagination represents the skills configurations list output pagination type. +type SkillsConfigurationsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsConfigurationsListOutput represents the skills configurations list output type. +type SkillsConfigurationsListOutput struct { + Items []SkillsConfigurationsListOutputItems `json:"items"` + Pagination SkillsConfigurationsListOutputPagination `json:"pagination"` +} + +// MapSkillsConfigurationsListOutputFromJSON deserializes JSON data into a SkillsConfigurationsListOutput. +func MapSkillsConfigurationsListOutputFromJSON(data []byte) (*SkillsConfigurationsListOutput, error) { + var v SkillsConfigurationsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsListOutputToJSON serializes a SkillsConfigurationsListOutput to JSON. +func MapSkillsConfigurationsListOutputToJSON(v *SkillsConfigurationsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsConfigurationsListQuery represents the skills configurations list query type. +type SkillsConfigurationsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapSkillsConfigurationsListQueryFromJSON deserializes JSON data into a SkillsConfigurationsListQuery. +func MapSkillsConfigurationsListQueryFromJSON(data []byte) (*SkillsConfigurationsListQuery, error) { + var v SkillsConfigurationsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsListQueryToJSON serializes a SkillsConfigurationsListQuery to JSON. +func MapSkillsConfigurationsListQueryToJSON(v *SkillsConfigurationsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/configurations/update.go b/v1/resources/skills/configurations/update.go new file mode 100644 index 0000000..03ad98b --- /dev/null +++ b/v1/resources/skills/configurations/update.go @@ -0,0 +1,55 @@ +package configurations + +import ( + "encoding/json" + "time" +) + +// SkillsConfigurationsUpdateOutput represents the skills configurations update output type. +type SkillsConfigurationsUpdateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + IsDefault bool `json:"is_default"` + AllowScripts bool `json:"allow_scripts"` + AllowedFileExtensions []string `json:"allowed_file_extensions"` + AllowNonStandardDirectories bool `json:"allow_non_standard_directories"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsConfigurationsUpdateOutputFromJSON deserializes JSON data into a SkillsConfigurationsUpdateOutput. +func MapSkillsConfigurationsUpdateOutputFromJSON(data []byte) (*SkillsConfigurationsUpdateOutput, error) { + var v SkillsConfigurationsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsUpdateOutputToJSON serializes a SkillsConfigurationsUpdateOutput to JSON. +func MapSkillsConfigurationsUpdateOutputToJSON(v *SkillsConfigurationsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsConfigurationsUpdateBody represents the skills configurations update body type. +type SkillsConfigurationsUpdateBody struct { + AllowScripts *bool `json:"allow_scripts,omitempty"` + AllowedFileExtensions *[]string `json:"allowed_file_extensions,omitempty"` + AllowNonStandardDirectories *bool `json:"allow_non_standard_directories,omitempty"` +} + +// MapSkillsConfigurationsUpdateBodyFromJSON deserializes JSON data into a SkillsConfigurationsUpdateBody. +func MapSkillsConfigurationsUpdateBodyFromJSON(data []byte) (*SkillsConfigurationsUpdateBody, error) { + var v SkillsConfigurationsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsConfigurationsUpdateBodyToJSON serializes a SkillsConfigurationsUpdateBody to JSON. +func MapSkillsConfigurationsUpdateBodyToJSON(v *SkillsConfigurationsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/create.go b/v1/resources/skills/create.go new file mode 100644 index 0000000..c30b590 --- /dev/null +++ b/v1/resources/skills/create.go @@ -0,0 +1,321 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsCreateOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsCreateOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyCreatorOrganizationActor represents the skills create output hierarchy creator organization actor type. +type SkillsCreateOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsCreateOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyCreatorConsumer represents the skills create output hierarchy creator consumer type. +type SkillsCreateOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyCreator represents the skills create output hierarchy creator type. +type SkillsCreateOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsCreateOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsCreateOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsCreateOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsCreateOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyForkCreatorOrganizationActor represents the skills create output hierarchy fork creator organization actor type. +type SkillsCreateOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsCreateOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyForkCreatorConsumer represents the skills create output hierarchy fork creator consumer type. +type SkillsCreateOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyForkCreator represents the skills create output hierarchy fork creator type. +type SkillsCreateOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsCreateOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsCreateOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsCreateOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsCreateOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills create output hierarchy fork original creator organization actor type. +type SkillsCreateOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsCreateOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyForkOriginalCreatorConsumer represents the skills create output hierarchy fork original creator consumer type. +type SkillsCreateOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchyForkOriginalCreator represents the skills create output hierarchy fork original creator type. +type SkillsCreateOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsCreateOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsCreateOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsCreateOutputHierarchyFork represents the skills create output hierarchy fork type. +type SkillsCreateOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsCreateOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsCreateOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsCreateOutputHierarchyEntity represents the skills create output hierarchy entity type. +type SkillsCreateOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutputHierarchy represents the skills create output hierarchy type. +type SkillsCreateOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsCreateOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsCreateOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsCreateOutputHierarchyEntity `json:"entity"` +} + +// SkillsCreateOutputIntegrationsConfiguration represents the skills create output integrations configuration type. +type SkillsCreateOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsCreateOutputIntegrations represents the skills create output integrations type. +type SkillsCreateOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsCreateOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsCreateOutputProviders represents the skills create output providers type. +type SkillsCreateOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsCreateOutput represents the skills create output type. +type SkillsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsCreateOutputHierarchy `json:"hierarchy"` + Integrations []SkillsCreateOutputIntegrations `json:"integrations"` + Providers []SkillsCreateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsCreateOutputFromJSON deserializes JSON data into a SkillsCreateOutput. +func MapSkillsCreateOutputFromJSON(data []byte) (*SkillsCreateOutput, error) { + var v SkillsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsCreateOutputToJSON serializes a SkillsCreateOutput to JSON. +func MapSkillsCreateOutputToJSON(v *SkillsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsCreateBody represents the skills create body type. +type SkillsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + TemplateId *string `json:"template_id,omitempty"` +} + +// MapSkillsCreateBodyFromJSON deserializes JSON data into a SkillsCreateBody. +func MapSkillsCreateBodyFromJSON(data []byte) (*SkillsCreateBody, error) { + var v SkillsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsCreateBodyToJSON serializes a SkillsCreateBody to JSON. +func MapSkillsCreateBodyToJSON(v *SkillsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/delete.go b/v1/resources/skills/delete.go new file mode 100644 index 0000000..b40aba3 --- /dev/null +++ b/v1/resources/skills/delete.go @@ -0,0 +1,293 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsDeleteOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsDeleteOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyCreatorOrganizationActor represents the skills delete output hierarchy creator organization actor type. +type SkillsDeleteOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsDeleteOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyCreatorConsumer represents the skills delete output hierarchy creator consumer type. +type SkillsDeleteOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyCreator represents the skills delete output hierarchy creator type. +type SkillsDeleteOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsDeleteOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsDeleteOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsDeleteOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsDeleteOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyForkCreatorOrganizationActor represents the skills delete output hierarchy fork creator organization actor type. +type SkillsDeleteOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsDeleteOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyForkCreatorConsumer represents the skills delete output hierarchy fork creator consumer type. +type SkillsDeleteOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyForkCreator represents the skills delete output hierarchy fork creator type. +type SkillsDeleteOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsDeleteOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsDeleteOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsDeleteOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsDeleteOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills delete output hierarchy fork original creator organization actor type. +type SkillsDeleteOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsDeleteOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyForkOriginalCreatorConsumer represents the skills delete output hierarchy fork original creator consumer type. +type SkillsDeleteOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchyForkOriginalCreator represents the skills delete output hierarchy fork original creator type. +type SkillsDeleteOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsDeleteOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsDeleteOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsDeleteOutputHierarchyFork represents the skills delete output hierarchy fork type. +type SkillsDeleteOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsDeleteOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsDeleteOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsDeleteOutputHierarchyEntity represents the skills delete output hierarchy entity type. +type SkillsDeleteOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutputHierarchy represents the skills delete output hierarchy type. +type SkillsDeleteOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsDeleteOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsDeleteOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsDeleteOutputHierarchyEntity `json:"entity"` +} + +// SkillsDeleteOutputIntegrationsConfiguration represents the skills delete output integrations configuration type. +type SkillsDeleteOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsDeleteOutputIntegrations represents the skills delete output integrations type. +type SkillsDeleteOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsDeleteOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsDeleteOutputProviders represents the skills delete output providers type. +type SkillsDeleteOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDeleteOutput represents the skills delete output type. +type SkillsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsDeleteOutputHierarchy `json:"hierarchy"` + Integrations []SkillsDeleteOutputIntegrations `json:"integrations"` + Providers []SkillsDeleteOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsDeleteOutputFromJSON deserializes JSON data into a SkillsDeleteOutput. +func MapSkillsDeleteOutputFromJSON(data []byte) (*SkillsDeleteOutput, error) { + var v SkillsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsDeleteOutputToJSON serializes a SkillsDeleteOutput to JSON. +func MapSkillsDeleteOutputToJSON(v *SkillsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/duplicate.go b/v1/resources/skills/duplicate.go new file mode 100644 index 0000000..eb7a0fa --- /dev/null +++ b/v1/resources/skills/duplicate.go @@ -0,0 +1,319 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsDuplicateOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsDuplicateOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyCreatorOrganizationActor represents the skills duplicate output hierarchy creator organization actor type. +type SkillsDuplicateOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsDuplicateOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyCreatorConsumer represents the skills duplicate output hierarchy creator consumer type. +type SkillsDuplicateOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyCreator represents the skills duplicate output hierarchy creator type. +type SkillsDuplicateOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsDuplicateOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsDuplicateOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsDuplicateOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsDuplicateOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyForkCreatorOrganizationActor represents the skills duplicate output hierarchy fork creator organization actor type. +type SkillsDuplicateOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsDuplicateOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyForkCreatorConsumer represents the skills duplicate output hierarchy fork creator consumer type. +type SkillsDuplicateOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyForkCreator represents the skills duplicate output hierarchy fork creator type. +type SkillsDuplicateOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsDuplicateOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsDuplicateOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsDuplicateOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsDuplicateOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills duplicate output hierarchy fork original creator organization actor type. +type SkillsDuplicateOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsDuplicateOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyForkOriginalCreatorConsumer represents the skills duplicate output hierarchy fork original creator consumer type. +type SkillsDuplicateOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchyForkOriginalCreator represents the skills duplicate output hierarchy fork original creator type. +type SkillsDuplicateOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsDuplicateOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsDuplicateOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsDuplicateOutputHierarchyFork represents the skills duplicate output hierarchy fork type. +type SkillsDuplicateOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsDuplicateOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsDuplicateOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsDuplicateOutputHierarchyEntity represents the skills duplicate output hierarchy entity type. +type SkillsDuplicateOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutputHierarchy represents the skills duplicate output hierarchy type. +type SkillsDuplicateOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsDuplicateOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsDuplicateOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsDuplicateOutputHierarchyEntity `json:"entity"` +} + +// SkillsDuplicateOutputIntegrationsConfiguration represents the skills duplicate output integrations configuration type. +type SkillsDuplicateOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsDuplicateOutputIntegrations represents the skills duplicate output integrations type. +type SkillsDuplicateOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsDuplicateOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsDuplicateOutputProviders represents the skills duplicate output providers type. +type SkillsDuplicateOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsDuplicateOutput represents the skills duplicate output type. +type SkillsDuplicateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsDuplicateOutputHierarchy `json:"hierarchy"` + Integrations []SkillsDuplicateOutputIntegrations `json:"integrations"` + Providers []SkillsDuplicateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsDuplicateOutputFromJSON deserializes JSON data into a SkillsDuplicateOutput. +func MapSkillsDuplicateOutputFromJSON(data []byte) (*SkillsDuplicateOutput, error) { + var v SkillsDuplicateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsDuplicateOutputToJSON serializes a SkillsDuplicateOutput to JSON. +func MapSkillsDuplicateOutputToJSON(v *SkillsDuplicateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsDuplicateBody represents the skills duplicate body type. +type SkillsDuplicateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// MapSkillsDuplicateBodyFromJSON deserializes JSON data into a SkillsDuplicateBody. +func MapSkillsDuplicateBodyFromJSON(data []byte) (*SkillsDuplicateBody, error) { + var v SkillsDuplicateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsDuplicateBodyToJSON serializes a SkillsDuplicateBody to JSON. +func MapSkillsDuplicateBodyToJSON(v *SkillsDuplicateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/exports/create.go b/v1/resources/skills/exports/create.go new file mode 100644 index 0000000..5349e22 --- /dev/null +++ b/v1/resources/skills/exports/create.go @@ -0,0 +1,217 @@ +package exports + +import ( + "encoding/json" + "time" +) + +// SkillsExportsCreateOutputFileCreatedByOrganizationActorTeams - The teams the actor belongs to +type SkillsExportsCreateOutputFileCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputFileCreatedByOrganizationActor represents the skills exports create output file created by organization actor type. +type SkillsExportsCreateOutputFileCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsExportsCreateOutputFileCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputFileCreatedByConsumer represents the skills exports create output file created by consumer type. +type SkillsExportsCreateOutputFileCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputFileCreatedBy represents the skills exports create output file created by type. +type SkillsExportsCreateOutputFileCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsExportsCreateOutputFileCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsExportsCreateOutputFileCreatedByConsumer `json:"consumer,omitempty"` +} + +// SkillsExportsCreateOutputFile represents the skills exports create output file type. +type SkillsExportsCreateOutputFile struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The files's unique identifier + Id string `json:"id"` + // Status - The files's status + Status string `json:"status"` + // FileName - The file's name + FileName string `json:"file_name"` + // FileSize - The file's size in bytes + FileSize float64 `json:"file_size"` + // FileType - The file's MIME type + FileType string `json:"file_type"` + // Title - The file's title + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *SkillsExportsCreateOutputFileCreatedBy `json:"created_by,omitempty"` + // CreatedAt - The files's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The files's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputFileLink represents the skills exports create output file link type. +type SkillsExportsCreateOutputFileLink struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The links's unique identifier + Id string `json:"id"` + // FileId - The file's unique identifier + FileId string `json:"file_id"` + // Url - The file's public URL + Url string `json:"url"` + // CreatedAt - The links's creation date + CreatedAt time.Time `json:"created_at"` + // ExpiresAt - The file's expiration date + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// SkillsExportsCreateOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type SkillsExportsCreateOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputCreatedByOrganizationActor represents the skills exports create output created by organization actor type. +type SkillsExportsCreateOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsExportsCreateOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputCreatedByConsumer represents the skills exports create output created by consumer type. +type SkillsExportsCreateOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsCreateOutputCreatedBy represents the skills exports create output created by type. +type SkillsExportsCreateOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsExportsCreateOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsExportsCreateOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// SkillsExportsCreateOutput represents the skills exports create output type. +type SkillsExportsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Target string `json:"target"` + Status string `json:"status"` + File *SkillsExportsCreateOutputFile `json:"file,omitempty"` + FileLink *SkillsExportsCreateOutputFileLink `json:"file_link,omitempty"` + CreatedBy *SkillsExportsCreateOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + StartedAt *time.Time `json:"started_at,omitempty"` + CompletedAt *time.Time `json:"completed_at,omitempty"` +} + +// MapSkillsExportsCreateOutputFromJSON deserializes JSON data into a SkillsExportsCreateOutput. +func MapSkillsExportsCreateOutputFromJSON(data []byte) (*SkillsExportsCreateOutput, error) { + var v SkillsExportsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsExportsCreateOutputToJSON serializes a SkillsExportsCreateOutput to JSON. +func MapSkillsExportsCreateOutputToJSON(v *SkillsExportsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsExportsCreateBody represents the skills exports create body type. +type SkillsExportsCreateBody struct { + Target string `json:"target"` + SkillId *string `json:"skill_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` +} + +// MapSkillsExportsCreateBodyFromJSON deserializes JSON data into a SkillsExportsCreateBody. +func MapSkillsExportsCreateBodyFromJSON(data []byte) (*SkillsExportsCreateBody, error) { + var v SkillsExportsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsExportsCreateBodyToJSON serializes a SkillsExportsCreateBody to JSON. +func MapSkillsExportsCreateBodyToJSON(v *SkillsExportsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/exports/get.go b/v1/resources/skills/exports/get.go new file mode 100644 index 0000000..4512495 --- /dev/null +++ b/v1/resources/skills/exports/get.go @@ -0,0 +1,195 @@ +package exports + +import ( + "encoding/json" + "time" +) + +// SkillsExportsGetOutputFileCreatedByOrganizationActorTeams - The teams the actor belongs to +type SkillsExportsGetOutputFileCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputFileCreatedByOrganizationActor represents the skills exports get output file created by organization actor type. +type SkillsExportsGetOutputFileCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsExportsGetOutputFileCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputFileCreatedByConsumer represents the skills exports get output file created by consumer type. +type SkillsExportsGetOutputFileCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputFileCreatedBy represents the skills exports get output file created by type. +type SkillsExportsGetOutputFileCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsExportsGetOutputFileCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsExportsGetOutputFileCreatedByConsumer `json:"consumer,omitempty"` +} + +// SkillsExportsGetOutputFile represents the skills exports get output file type. +type SkillsExportsGetOutputFile struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The files's unique identifier + Id string `json:"id"` + // Status - The files's status + Status string `json:"status"` + // FileName - The file's name + FileName string `json:"file_name"` + // FileSize - The file's size in bytes + FileSize float64 `json:"file_size"` + // FileType - The file's MIME type + FileType string `json:"file_type"` + // Title - The file's title + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *SkillsExportsGetOutputFileCreatedBy `json:"created_by,omitempty"` + // CreatedAt - The files's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The files's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputFileLink represents the skills exports get output file link type. +type SkillsExportsGetOutputFileLink struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The links's unique identifier + Id string `json:"id"` + // FileId - The file's unique identifier + FileId string `json:"file_id"` + // Url - The file's public URL + Url string `json:"url"` + // CreatedAt - The links's creation date + CreatedAt time.Time `json:"created_at"` + // ExpiresAt - The file's expiration date + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// SkillsExportsGetOutputCreatedByOrganizationActorTeams - The teams the actor belongs to +type SkillsExportsGetOutputCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputCreatedByOrganizationActor represents the skills exports get output created by organization actor type. +type SkillsExportsGetOutputCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsExportsGetOutputCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputCreatedByConsumer represents the skills exports get output created by consumer type. +type SkillsExportsGetOutputCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsGetOutputCreatedBy represents the skills exports get output created by type. +type SkillsExportsGetOutputCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsExportsGetOutputCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsExportsGetOutputCreatedByConsumer `json:"consumer,omitempty"` +} + +// SkillsExportsGetOutput represents the skills exports get output type. +type SkillsExportsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Target string `json:"target"` + Status string `json:"status"` + File *SkillsExportsGetOutputFile `json:"file,omitempty"` + FileLink *SkillsExportsGetOutputFileLink `json:"file_link,omitempty"` + CreatedBy *SkillsExportsGetOutputCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + StartedAt *time.Time `json:"started_at,omitempty"` + CompletedAt *time.Time `json:"completed_at,omitempty"` +} + +// MapSkillsExportsGetOutputFromJSON deserializes JSON data into a SkillsExportsGetOutput. +func MapSkillsExportsGetOutputFromJSON(data []byte) (*SkillsExportsGetOutput, error) { + var v SkillsExportsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsExportsGetOutputToJSON serializes a SkillsExportsGetOutput to JSON. +func MapSkillsExportsGetOutputToJSON(v *SkillsExportsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/exports/list.go b/v1/resources/skills/exports/list.go new file mode 100644 index 0000000..fe8933b --- /dev/null +++ b/v1/resources/skills/exports/list.go @@ -0,0 +1,233 @@ +package exports + +import ( + "encoding/json" + "time" +) + +// SkillsExportsListOutputItemsFileCreatedByOrganizationActorTeams - The teams the actor belongs to +type SkillsExportsListOutputItemsFileCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsFileCreatedByOrganizationActor represents the skills exports list output items file created by organization actor type. +type SkillsExportsListOutputItemsFileCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsExportsListOutputItemsFileCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsFileCreatedByConsumer represents the skills exports list output items file created by consumer type. +type SkillsExportsListOutputItemsFileCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsFileCreatedBy represents the skills exports list output items file created by type. +type SkillsExportsListOutputItemsFileCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsExportsListOutputItemsFileCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsExportsListOutputItemsFileCreatedByConsumer `json:"consumer,omitempty"` +} + +// SkillsExportsListOutputItemsFile represents the skills exports list output items file type. +type SkillsExportsListOutputItemsFile struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The files's unique identifier + Id string `json:"id"` + // Status - The files's status + Status string `json:"status"` + // FileName - The file's name + FileName string `json:"file_name"` + // FileSize - The file's size in bytes + FileSize float64 `json:"file_size"` + // FileType - The file's MIME type + FileType string `json:"file_type"` + // Title - The file's title + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *SkillsExportsListOutputItemsFileCreatedBy `json:"created_by,omitempty"` + // CreatedAt - The files's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The files's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsFileLink represents the skills exports list output items file link type. +type SkillsExportsListOutputItemsFileLink struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The links's unique identifier + Id string `json:"id"` + // FileId - The file's unique identifier + FileId string `json:"file_id"` + // Url - The file's public URL + Url string `json:"url"` + // CreatedAt - The links's creation date + CreatedAt time.Time `json:"created_at"` + // ExpiresAt - The file's expiration date + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// SkillsExportsListOutputItemsCreatedByOrganizationActorTeams - The teams the actor belongs to +type SkillsExportsListOutputItemsCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsCreatedByOrganizationActor represents the skills exports list output items created by organization actor type. +type SkillsExportsListOutputItemsCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsExportsListOutputItemsCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsCreatedByConsumer represents the skills exports list output items created by consumer type. +type SkillsExportsListOutputItemsCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsExportsListOutputItemsCreatedBy represents the skills exports list output items created by type. +type SkillsExportsListOutputItemsCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsExportsListOutputItemsCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsExportsListOutputItemsCreatedByConsumer `json:"consumer,omitempty"` +} + +// SkillsExportsListOutputItems represents the skills exports list output items type. +type SkillsExportsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Target string `json:"target"` + Status string `json:"status"` + File *SkillsExportsListOutputItemsFile `json:"file,omitempty"` + FileLink *SkillsExportsListOutputItemsFileLink `json:"file_link,omitempty"` + CreatedBy *SkillsExportsListOutputItemsCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + StartedAt *time.Time `json:"started_at,omitempty"` + CompletedAt *time.Time `json:"completed_at,omitempty"` +} + +// SkillsExportsListOutputPagination represents the skills exports list output pagination type. +type SkillsExportsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsExportsListOutput represents the skills exports list output type. +type SkillsExportsListOutput struct { + Items []SkillsExportsListOutputItems `json:"items"` + Pagination SkillsExportsListOutputPagination `json:"pagination"` +} + +// MapSkillsExportsListOutputFromJSON deserializes JSON data into a SkillsExportsListOutput. +func MapSkillsExportsListOutputFromJSON(data []byte) (*SkillsExportsListOutput, error) { + var v SkillsExportsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsExportsListOutputToJSON serializes a SkillsExportsListOutput to JSON. +func MapSkillsExportsListOutputToJSON(v *SkillsExportsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsExportsListQuery represents the skills exports list query type. +type SkillsExportsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + Target *any `json:"target,omitempty"` + Status *any `json:"status,omitempty"` +} + +// MapSkillsExportsListQueryFromJSON deserializes JSON data into a SkillsExportsListQuery. +func MapSkillsExportsListQueryFromJSON(data []byte) (*SkillsExportsListQuery, error) { + var v SkillsExportsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsExportsListQueryToJSON serializes a SkillsExportsListQuery to JSON. +func MapSkillsExportsListQueryToJSON(v *SkillsExportsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/fork.go b/v1/resources/skills/fork.go new file mode 100644 index 0000000..b9ebddf --- /dev/null +++ b/v1/resources/skills/fork.go @@ -0,0 +1,320 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsForkOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsForkOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyCreatorOrganizationActor represents the skills fork output hierarchy creator organization actor type. +type SkillsForkOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsForkOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyCreatorConsumer represents the skills fork output hierarchy creator consumer type. +type SkillsForkOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyCreator represents the skills fork output hierarchy creator type. +type SkillsForkOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsForkOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsForkOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsForkOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsForkOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyForkCreatorOrganizationActor represents the skills fork output hierarchy fork creator organization actor type. +type SkillsForkOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsForkOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyForkCreatorConsumer represents the skills fork output hierarchy fork creator consumer type. +type SkillsForkOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyForkCreator represents the skills fork output hierarchy fork creator type. +type SkillsForkOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsForkOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsForkOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsForkOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsForkOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills fork output hierarchy fork original creator organization actor type. +type SkillsForkOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsForkOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyForkOriginalCreatorConsumer represents the skills fork output hierarchy fork original creator consumer type. +type SkillsForkOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchyForkOriginalCreator represents the skills fork output hierarchy fork original creator type. +type SkillsForkOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsForkOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsForkOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsForkOutputHierarchyFork represents the skills fork output hierarchy fork type. +type SkillsForkOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsForkOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsForkOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsForkOutputHierarchyEntity represents the skills fork output hierarchy entity type. +type SkillsForkOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutputHierarchy represents the skills fork output hierarchy type. +type SkillsForkOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsForkOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsForkOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsForkOutputHierarchyEntity `json:"entity"` +} + +// SkillsForkOutputIntegrationsConfiguration represents the skills fork output integrations configuration type. +type SkillsForkOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsForkOutputIntegrations represents the skills fork output integrations type. +type SkillsForkOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsForkOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsForkOutputProviders represents the skills fork output providers type. +type SkillsForkOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsForkOutput represents the skills fork output type. +type SkillsForkOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsForkOutputHierarchy `json:"hierarchy"` + Integrations []SkillsForkOutputIntegrations `json:"integrations"` + Providers []SkillsForkOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsForkOutputFromJSON deserializes JSON data into a SkillsForkOutput. +func MapSkillsForkOutputFromJSON(data []byte) (*SkillsForkOutput, error) { + var v SkillsForkOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsForkOutputToJSON serializes a SkillsForkOutput to JSON. +func MapSkillsForkOutputToJSON(v *SkillsForkOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsForkBody represents the skills fork body type. +type SkillsForkBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` +} + +// MapSkillsForkBodyFromJSON deserializes JSON data into a SkillsForkBody. +func MapSkillsForkBodyFromJSON(data []byte) (*SkillsForkBody, error) { + var v SkillsForkBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsForkBodyToJSON serializes a SkillsForkBody to JSON. +func MapSkillsForkBodyToJSON(v *SkillsForkBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/get.go b/v1/resources/skills/get.go new file mode 100644 index 0000000..f3f6886 --- /dev/null +++ b/v1/resources/skills/get.go @@ -0,0 +1,293 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsGetOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsGetOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyCreatorOrganizationActor represents the skills get output hierarchy creator organization actor type. +type SkillsGetOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsGetOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyCreatorConsumer represents the skills get output hierarchy creator consumer type. +type SkillsGetOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyCreator represents the skills get output hierarchy creator type. +type SkillsGetOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsGetOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsGetOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsGetOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsGetOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyForkCreatorOrganizationActor represents the skills get output hierarchy fork creator organization actor type. +type SkillsGetOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsGetOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyForkCreatorConsumer represents the skills get output hierarchy fork creator consumer type. +type SkillsGetOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyForkCreator represents the skills get output hierarchy fork creator type. +type SkillsGetOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsGetOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsGetOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsGetOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsGetOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills get output hierarchy fork original creator organization actor type. +type SkillsGetOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsGetOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyForkOriginalCreatorConsumer represents the skills get output hierarchy fork original creator consumer type. +type SkillsGetOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchyForkOriginalCreator represents the skills get output hierarchy fork original creator type. +type SkillsGetOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsGetOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsGetOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsGetOutputHierarchyFork represents the skills get output hierarchy fork type. +type SkillsGetOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsGetOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsGetOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsGetOutputHierarchyEntity represents the skills get output hierarchy entity type. +type SkillsGetOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutputHierarchy represents the skills get output hierarchy type. +type SkillsGetOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsGetOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsGetOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsGetOutputHierarchyEntity `json:"entity"` +} + +// SkillsGetOutputIntegrationsConfiguration represents the skills get output integrations configuration type. +type SkillsGetOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsGetOutputIntegrations represents the skills get output integrations type. +type SkillsGetOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsGetOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsGetOutputProviders represents the skills get output providers type. +type SkillsGetOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGetOutput represents the skills get output type. +type SkillsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsGetOutputHierarchy `json:"hierarchy"` + Integrations []SkillsGetOutputIntegrations `json:"integrations"` + Providers []SkillsGetOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsGetOutputFromJSON deserializes JSON data into a SkillsGetOutput. +func MapSkillsGetOutputFromJSON(data []byte) (*SkillsGetOutput, error) { + var v SkillsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGetOutputToJSON serializes a SkillsGetOutput to JSON. +func MapSkillsGetOutputToJSON(v *SkillsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/create.go b/v1/resources/skills/groups/create.go new file mode 100644 index 0000000..8206676 --- /dev/null +++ b/v1/resources/skills/groups/create.go @@ -0,0 +1,74 @@ +package groups + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsCreateOutputSkills represents the skills groups create output skills type. +type SkillsGroupsCreateOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsCreateOutput represents the skills groups create output type. +type SkillsGroupsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Skills []SkillsGroupsCreateOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsGroupsCreateOutputFromJSON deserializes JSON data into a SkillsGroupsCreateOutput. +func MapSkillsGroupsCreateOutputFromJSON(data []byte) (*SkillsGroupsCreateOutput, error) { + var v SkillsGroupsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsCreateOutputToJSON serializes a SkillsGroupsCreateOutput to JSON. +func MapSkillsGroupsCreateOutputToJSON(v *SkillsGroupsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsGroupsCreateBody represents the skills groups create body type. +type SkillsGroupsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + SkillIds *[]string `json:"skill_ids,omitempty"` +} + +// MapSkillsGroupsCreateBodyFromJSON deserializes JSON data into a SkillsGroupsCreateBody. +func MapSkillsGroupsCreateBodyFromJSON(data []byte) (*SkillsGroupsCreateBody, error) { + var v SkillsGroupsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsCreateBodyToJSON serializes a SkillsGroupsCreateBody to JSON. +func MapSkillsGroupsCreateBodyToJSON(v *SkillsGroupsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/delete.go b/v1/resources/skills/groups/delete.go new file mode 100644 index 0000000..82d9563 --- /dev/null +++ b/v1/resources/skills/groups/delete.go @@ -0,0 +1,52 @@ +package groups + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsDeleteOutputSkills represents the skills groups delete output skills type. +type SkillsGroupsDeleteOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsDeleteOutput represents the skills groups delete output type. +type SkillsGroupsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Skills []SkillsGroupsDeleteOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsGroupsDeleteOutputFromJSON deserializes JSON data into a SkillsGroupsDeleteOutput. +func MapSkillsGroupsDeleteOutputFromJSON(data []byte) (*SkillsGroupsDeleteOutput, error) { + var v SkillsGroupsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsDeleteOutputToJSON serializes a SkillsGroupsDeleteOutput to JSON. +func MapSkillsGroupsDeleteOutputToJSON(v *SkillsGroupsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/get.go b/v1/resources/skills/groups/get.go new file mode 100644 index 0000000..9431c3b --- /dev/null +++ b/v1/resources/skills/groups/get.go @@ -0,0 +1,52 @@ +package groups + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsGetOutputSkills represents the skills groups get output skills type. +type SkillsGroupsGetOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsGetOutput represents the skills groups get output type. +type SkillsGroupsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Skills []SkillsGroupsGetOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsGroupsGetOutputFromJSON deserializes JSON data into a SkillsGroupsGetOutput. +func MapSkillsGroupsGetOutputFromJSON(data []byte) (*SkillsGroupsGetOutput, error) { + var v SkillsGroupsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsGetOutputToJSON serializes a SkillsGroupsGetOutput to JSON. +func MapSkillsGroupsGetOutputToJSON(v *SkillsGroupsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/items/create.go b/v1/resources/skills/groups/items/create.go new file mode 100644 index 0000000..d4fbdbc --- /dev/null +++ b/v1/resources/skills/groups/items/create.go @@ -0,0 +1,68 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsItemsCreateOutputSkill represents the skills groups items create output skill type. +type SkillsGroupsItemsCreateOutputSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsItemsCreateOutput represents the skills groups items create output type. +type SkillsGroupsItemsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SkillGroupId string `json:"skill_group_id"` + Skill SkillsGroupsItemsCreateOutputSkill `json:"skill"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsGroupsItemsCreateOutputFromJSON deserializes JSON data into a SkillsGroupsItemsCreateOutput. +func MapSkillsGroupsItemsCreateOutputFromJSON(data []byte) (*SkillsGroupsItemsCreateOutput, error) { + var v SkillsGroupsItemsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsItemsCreateOutputToJSON serializes a SkillsGroupsItemsCreateOutput to JSON. +func MapSkillsGroupsItemsCreateOutputToJSON(v *SkillsGroupsItemsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsGroupsItemsCreateBody represents the skills groups items create body type. +type SkillsGroupsItemsCreateBody struct { + SkillId string `json:"skill_id"` +} + +// MapSkillsGroupsItemsCreateBodyFromJSON deserializes JSON data into a SkillsGroupsItemsCreateBody. +func MapSkillsGroupsItemsCreateBodyFromJSON(data []byte) (*SkillsGroupsItemsCreateBody, error) { + var v SkillsGroupsItemsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsItemsCreateBodyToJSON serializes a SkillsGroupsItemsCreateBody to JSON. +func MapSkillsGroupsItemsCreateBodyToJSON(v *SkillsGroupsItemsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/items/delete.go b/v1/resources/skills/groups/items/delete.go new file mode 100644 index 0000000..eeea496 --- /dev/null +++ b/v1/resources/skills/groups/items/delete.go @@ -0,0 +1,49 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsItemsDeleteOutputSkill represents the skills groups items delete output skill type. +type SkillsGroupsItemsDeleteOutputSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsItemsDeleteOutput represents the skills groups items delete output type. +type SkillsGroupsItemsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SkillGroupId string `json:"skill_group_id"` + Skill SkillsGroupsItemsDeleteOutputSkill `json:"skill"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsGroupsItemsDeleteOutputFromJSON deserializes JSON data into a SkillsGroupsItemsDeleteOutput. +func MapSkillsGroupsItemsDeleteOutputFromJSON(data []byte) (*SkillsGroupsItemsDeleteOutput, error) { + var v SkillsGroupsItemsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsItemsDeleteOutputToJSON serializes a SkillsGroupsItemsDeleteOutput to JSON. +func MapSkillsGroupsItemsDeleteOutputToJSON(v *SkillsGroupsItemsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/items/get.go b/v1/resources/skills/groups/items/get.go new file mode 100644 index 0000000..326015f --- /dev/null +++ b/v1/resources/skills/groups/items/get.go @@ -0,0 +1,49 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsItemsGetOutputSkill represents the skills groups items get output skill type. +type SkillsGroupsItemsGetOutputSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsItemsGetOutput represents the skills groups items get output type. +type SkillsGroupsItemsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SkillGroupId string `json:"skill_group_id"` + Skill SkillsGroupsItemsGetOutputSkill `json:"skill"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsGroupsItemsGetOutputFromJSON deserializes JSON data into a SkillsGroupsItemsGetOutput. +func MapSkillsGroupsItemsGetOutputFromJSON(data []byte) (*SkillsGroupsItemsGetOutput, error) { + var v SkillsGroupsItemsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsItemsGetOutputToJSON serializes a SkillsGroupsItemsGetOutput to JSON. +func MapSkillsGroupsItemsGetOutputToJSON(v *SkillsGroupsItemsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/items/list.go b/v1/resources/skills/groups/items/list.go new file mode 100644 index 0000000..50c00b6 --- /dev/null +++ b/v1/resources/skills/groups/items/list.go @@ -0,0 +1,97 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsItemsListOutputItemsSkill represents the skills groups items list output items skill type. +type SkillsGroupsItemsListOutputItemsSkill struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsItemsListOutputItems represents the skills groups items list output items type. +type SkillsGroupsItemsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SkillGroupId string `json:"skill_group_id"` + Skill SkillsGroupsItemsListOutputItemsSkill `json:"skill"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsGroupsItemsListOutputPagination represents the skills groups items list output pagination type. +type SkillsGroupsItemsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsGroupsItemsListOutput represents the skills groups items list output type. +type SkillsGroupsItemsListOutput struct { + Items []SkillsGroupsItemsListOutputItems `json:"items"` + Pagination SkillsGroupsItemsListOutputPagination `json:"pagination"` +} + +// MapSkillsGroupsItemsListOutputFromJSON deserializes JSON data into a SkillsGroupsItemsListOutput. +func MapSkillsGroupsItemsListOutputFromJSON(data []byte) (*SkillsGroupsItemsListOutput, error) { + var v SkillsGroupsItemsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsItemsListOutputToJSON serializes a SkillsGroupsItemsListOutput to JSON. +func MapSkillsGroupsItemsListOutputToJSON(v *SkillsGroupsItemsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsGroupsItemsListQueryCreatedAt - Filter skill group item creation time by date range +type SkillsGroupsItemsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill group item creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill group item creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsGroupsItemsListQuery represents the skills groups items list query type. +type SkillsGroupsItemsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + // CreatedAt - Filter skill group item creation time by date range + CreatedAt *SkillsGroupsItemsListQueryCreatedAt `json:"created_at,omitempty"` +} + +// MapSkillsGroupsItemsListQueryFromJSON deserializes JSON data into a SkillsGroupsItemsListQuery. +func MapSkillsGroupsItemsListQueryFromJSON(data []byte) (*SkillsGroupsItemsListQuery, error) { + var v SkillsGroupsItemsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsItemsListQueryToJSON serializes a SkillsGroupsItemsListQuery to JSON. +func MapSkillsGroupsItemsListQueryToJSON(v *SkillsGroupsItemsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/list.go b/v1/resources/skills/groups/list.go new file mode 100644 index 0000000..40c2884 --- /dev/null +++ b/v1/resources/skills/groups/list.go @@ -0,0 +1,111 @@ +package groups + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsListOutputItemsSkills represents the skills groups list output items skills type. +type SkillsGroupsListOutputItemsSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsListOutputItems represents the skills groups list output items type. +type SkillsGroupsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Skills []SkillsGroupsListOutputItemsSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsListOutputPagination represents the skills groups list output pagination type. +type SkillsGroupsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsGroupsListOutput represents the skills groups list output type. +type SkillsGroupsListOutput struct { + Items []SkillsGroupsListOutputItems `json:"items"` + Pagination SkillsGroupsListOutputPagination `json:"pagination"` +} + +// MapSkillsGroupsListOutputFromJSON deserializes JSON data into a SkillsGroupsListOutput. +func MapSkillsGroupsListOutputFromJSON(data []byte) (*SkillsGroupsListOutput, error) { + var v SkillsGroupsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsListOutputToJSON serializes a SkillsGroupsListOutput to JSON. +func MapSkillsGroupsListOutputToJSON(v *SkillsGroupsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsGroupsListQueryCreatedAt - Filter skill group creation time by date range +type SkillsGroupsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill group creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill group creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsGroupsListQueryUpdatedAt - Filter skill group last update time by date range +type SkillsGroupsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill group last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill group last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsGroupsListQuery represents the skills groups list query type. +type SkillsGroupsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + // CreatedAt - Filter skill group creation time by date range + CreatedAt *SkillsGroupsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill group last update time by date range + UpdatedAt *SkillsGroupsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsGroupsListQueryFromJSON deserializes JSON data into a SkillsGroupsListQuery. +func MapSkillsGroupsListQueryFromJSON(data []byte) (*SkillsGroupsListQuery, error) { + var v SkillsGroupsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsListQueryToJSON serializes a SkillsGroupsListQuery to JSON. +func MapSkillsGroupsListQueryToJSON(v *SkillsGroupsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/groups/update.go b/v1/resources/skills/groups/update.go new file mode 100644 index 0000000..a2ebdaf --- /dev/null +++ b/v1/resources/skills/groups/update.go @@ -0,0 +1,74 @@ +package groups + +import ( + "encoding/json" + "time" +) + +// SkillsGroupsUpdateOutputSkills represents the skills groups update output skills type. +type SkillsGroupsUpdateOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsGroupsUpdateOutput represents the skills groups update output type. +type SkillsGroupsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Skills []SkillsGroupsUpdateOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsGroupsUpdateOutputFromJSON deserializes JSON data into a SkillsGroupsUpdateOutput. +func MapSkillsGroupsUpdateOutputFromJSON(data []byte) (*SkillsGroupsUpdateOutput, error) { + var v SkillsGroupsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsUpdateOutputToJSON serializes a SkillsGroupsUpdateOutput to JSON. +func MapSkillsGroupsUpdateOutputToJSON(v *SkillsGroupsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsGroupsUpdateBody represents the skills groups update body type. +type SkillsGroupsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + SkillIds *[]string `json:"skill_ids,omitempty"` +} + +// MapSkillsGroupsUpdateBodyFromJSON deserializes JSON data into a SkillsGroupsUpdateBody. +func MapSkillsGroupsUpdateBodyFromJSON(data []byte) (*SkillsGroupsUpdateBody, error) { + var v SkillsGroupsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsGroupsUpdateBodyToJSON serializes a SkillsGroupsUpdateBody to JSON. +func MapSkillsGroupsUpdateBodyToJSON(v *SkillsGroupsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/items/create.go b/v1/resources/skills/items/create.go new file mode 100644 index 0000000..72c161e --- /dev/null +++ b/v1/resources/skills/items/create.go @@ -0,0 +1,93 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsItemsCreateOutputIntegrationConfiguration represents the skills items create output integration configuration type. +type SkillsItemsCreateOutputIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsItemsCreateOutputIntegration represents the skills items create output integration type. +type SkillsItemsCreateOutputIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsItemsCreateOutputIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsItemsCreateOutputProvider represents the skills items create output provider type. +type SkillsItemsCreateOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsItemsCreateOutput represents the skills items create output type. +type SkillsItemsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Type string `json:"type"` + SkillId string `json:"skill_id"` + Integration *SkillsItemsCreateOutputIntegration `json:"integration,omitempty"` + Provider *SkillsItemsCreateOutputProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsItemsCreateOutputFromJSON deserializes JSON data into a SkillsItemsCreateOutput. +func MapSkillsItemsCreateOutputFromJSON(data []byte) (*SkillsItemsCreateOutput, error) { + var v SkillsItemsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsItemsCreateOutputToJSON serializes a SkillsItemsCreateOutput to JSON. +func MapSkillsItemsCreateOutputToJSON(v *SkillsItemsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsItemsCreateBody represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type SkillsItemsCreateBody struct { + Type *string `json:"type,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + IntegrationId *string `json:"integration_id,omitempty"` +} + +// MapSkillsItemsCreateBodyFromJSON deserializes JSON data into a SkillsItemsCreateBody. +func MapSkillsItemsCreateBodyFromJSON(data []byte) (*SkillsItemsCreateBody, error) { + var v SkillsItemsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsItemsCreateBodyToJSON serializes a SkillsItemsCreateBody to JSON. +func MapSkillsItemsCreateBodyToJSON(v *SkillsItemsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/items/delete.go b/v1/resources/skills/items/delete.go new file mode 100644 index 0000000..b35340b --- /dev/null +++ b/v1/resources/skills/items/delete.go @@ -0,0 +1,71 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsItemsDeleteOutputIntegrationConfiguration represents the skills items delete output integration configuration type. +type SkillsItemsDeleteOutputIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsItemsDeleteOutputIntegration represents the skills items delete output integration type. +type SkillsItemsDeleteOutputIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsItemsDeleteOutputIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsItemsDeleteOutputProvider represents the skills items delete output provider type. +type SkillsItemsDeleteOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsItemsDeleteOutput represents the skills items delete output type. +type SkillsItemsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Type string `json:"type"` + SkillId string `json:"skill_id"` + Integration *SkillsItemsDeleteOutputIntegration `json:"integration,omitempty"` + Provider *SkillsItemsDeleteOutputProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsItemsDeleteOutputFromJSON deserializes JSON data into a SkillsItemsDeleteOutput. +func MapSkillsItemsDeleteOutputFromJSON(data []byte) (*SkillsItemsDeleteOutput, error) { + var v SkillsItemsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsItemsDeleteOutputToJSON serializes a SkillsItemsDeleteOutput to JSON. +func MapSkillsItemsDeleteOutputToJSON(v *SkillsItemsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/items/get.go b/v1/resources/skills/items/get.go new file mode 100644 index 0000000..bab2c7d --- /dev/null +++ b/v1/resources/skills/items/get.go @@ -0,0 +1,71 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsItemsGetOutputIntegrationConfiguration represents the skills items get output integration configuration type. +type SkillsItemsGetOutputIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsItemsGetOutputIntegration represents the skills items get output integration type. +type SkillsItemsGetOutputIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsItemsGetOutputIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsItemsGetOutputProvider represents the skills items get output provider type. +type SkillsItemsGetOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsItemsGetOutput represents the skills items get output type. +type SkillsItemsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Type string `json:"type"` + SkillId string `json:"skill_id"` + Integration *SkillsItemsGetOutputIntegration `json:"integration,omitempty"` + Provider *SkillsItemsGetOutputProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsItemsGetOutputFromJSON deserializes JSON data into a SkillsItemsGetOutput. +func MapSkillsItemsGetOutputFromJSON(data []byte) (*SkillsItemsGetOutput, error) { + var v SkillsItemsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsItemsGetOutputToJSON serializes a SkillsItemsGetOutput to JSON. +func MapSkillsItemsGetOutputToJSON(v *SkillsItemsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/items/list.go b/v1/resources/skills/items/list.go new file mode 100644 index 0000000..6c7385e --- /dev/null +++ b/v1/resources/skills/items/list.go @@ -0,0 +1,121 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsItemsListOutputItemsIntegrationConfiguration represents the skills items list output items integration configuration type. +type SkillsItemsListOutputItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsItemsListOutputItemsIntegration represents the skills items list output items integration type. +type SkillsItemsListOutputItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsItemsListOutputItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsItemsListOutputItemsProvider represents the skills items list output items provider type. +type SkillsItemsListOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsItemsListOutputItems represents the skills items list output items type. +type SkillsItemsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Type string `json:"type"` + SkillId string `json:"skill_id"` + Integration *SkillsItemsListOutputItemsIntegration `json:"integration,omitempty"` + Provider *SkillsItemsListOutputItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsItemsListOutputPagination represents the skills items list output pagination type. +type SkillsItemsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsItemsListOutput represents the skills items list output type. +type SkillsItemsListOutput struct { + Items []SkillsItemsListOutputItems `json:"items"` + Pagination SkillsItemsListOutputPagination `json:"pagination"` +} + +// MapSkillsItemsListOutputFromJSON deserializes JSON data into a SkillsItemsListOutput. +func MapSkillsItemsListOutputFromJSON(data []byte) (*SkillsItemsListOutput, error) { + var v SkillsItemsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsItemsListOutputToJSON serializes a SkillsItemsListOutput to JSON. +func MapSkillsItemsListOutputToJSON(v *SkillsItemsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsItemsListQueryCreatedAt - Filter skill item creation time by date range +type SkillsItemsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill item creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill item creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsItemsListQuery represents the skills items list query type. +type SkillsItemsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Status *any `json:"status,omitempty"` + Type *any `json:"type,omitempty"` + Id *any `json:"id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + // CreatedAt - Filter skill item creation time by date range + CreatedAt *SkillsItemsListQueryCreatedAt `json:"created_at,omitempty"` +} + +// MapSkillsItemsListQueryFromJSON deserializes JSON data into a SkillsItemsListQuery. +func MapSkillsItemsListQueryFromJSON(data []byte) (*SkillsItemsListQuery, error) { + var v SkillsItemsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsItemsListQueryToJSON serializes a SkillsItemsListQuery to JSON. +func MapSkillsItemsListQueryToJSON(v *SkillsItemsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/list.go b/v1/resources/skills/list.go new file mode 100644 index 0000000..5aeae06 --- /dev/null +++ b/v1/resources/skills/list.go @@ -0,0 +1,354 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsListOutputItemsHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsListOutputItemsHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyCreatorOrganizationActor represents the skills list output items hierarchy creator organization actor type. +type SkillsListOutputItemsHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsListOutputItemsHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyCreatorConsumer represents the skills list output items hierarchy creator consumer type. +type SkillsListOutputItemsHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyCreator represents the skills list output items hierarchy creator type. +type SkillsListOutputItemsHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsListOutputItemsHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsListOutputItemsHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsListOutputItemsHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsListOutputItemsHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyForkCreatorOrganizationActor represents the skills list output items hierarchy fork creator organization actor type. +type SkillsListOutputItemsHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsListOutputItemsHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyForkCreatorConsumer represents the skills list output items hierarchy fork creator consumer type. +type SkillsListOutputItemsHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyForkCreator represents the skills list output items hierarchy fork creator type. +type SkillsListOutputItemsHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsListOutputItemsHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsListOutputItemsHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsListOutputItemsHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsListOutputItemsHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyForkOriginalCreatorOrganizationActor represents the skills list output items hierarchy fork original creator organization actor type. +type SkillsListOutputItemsHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsListOutputItemsHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyForkOriginalCreatorConsumer represents the skills list output items hierarchy fork original creator consumer type. +type SkillsListOutputItemsHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchyForkOriginalCreator represents the skills list output items hierarchy fork original creator type. +type SkillsListOutputItemsHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsListOutputItemsHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsListOutputItemsHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsListOutputItemsHierarchyFork represents the skills list output items hierarchy fork type. +type SkillsListOutputItemsHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsListOutputItemsHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsListOutputItemsHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsListOutputItemsHierarchyEntity represents the skills list output items hierarchy entity type. +type SkillsListOutputItemsHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItemsHierarchy represents the skills list output items hierarchy type. +type SkillsListOutputItemsHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsListOutputItemsHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsListOutputItemsHierarchyFork `json:"fork,omitempty"` + Entity SkillsListOutputItemsHierarchyEntity `json:"entity"` +} + +// SkillsListOutputItemsIntegrationsConfiguration represents the skills list output items integrations configuration type. +type SkillsListOutputItemsIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsListOutputItemsIntegrations represents the skills list output items integrations type. +type SkillsListOutputItemsIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsListOutputItemsIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsListOutputItemsProviders represents the skills list output items providers type. +type SkillsListOutputItemsProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputItems represents the skills list output items type. +type SkillsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsListOutputItemsHierarchy `json:"hierarchy"` + Integrations []SkillsListOutputItemsIntegrations `json:"integrations"` + Providers []SkillsListOutputItemsProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsListOutputPagination represents the skills list output pagination type. +type SkillsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsListOutput represents the skills list output type. +type SkillsListOutput struct { + Items []SkillsListOutputItems `json:"items"` + Pagination SkillsListOutputPagination `json:"pagination"` +} + +// MapSkillsListOutputFromJSON deserializes JSON data into a SkillsListOutput. +func MapSkillsListOutputFromJSON(data []byte) (*SkillsListOutput, error) { + var v SkillsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsListOutputToJSON serializes a SkillsListOutput to JSON. +func MapSkillsListOutputToJSON(v *SkillsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsListQueryCreatedAt - Filter skill creation time by date range +type SkillsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsListQueryUpdatedAt - Filter skill last update time by date range +type SkillsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsListQuery represents the skills list query type. +type SkillsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Id *any `json:"id,omitempty"` + SkillGroupId *any `json:"skill_group_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + // CreatedAt - Filter skill creation time by date range + CreatedAt *SkillsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill last update time by date range + UpdatedAt *SkillsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsListQueryFromJSON deserializes JSON data into a SkillsListQuery. +func MapSkillsListQueryFromJSON(data []byte) (*SkillsListQuery, error) { + var v SkillsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsListQueryToJSON serializes a SkillsListQuery to JSON. +func MapSkillsListQueryToJSON(v *SkillsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/archive.go b/v1/resources/skills/marketplaces/archive.go new file mode 100644 index 0000000..e14c81c --- /dev/null +++ b/v1/resources/skills/marketplaces/archive.go @@ -0,0 +1,85 @@ +package marketplaces + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesArchiveOutputPluginsSkillPluginSkills represents the skills marketplaces archive output plugins skill plugin skills type. +type SkillsMarketplacesArchiveOutputPluginsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesArchiveOutputPluginsSkillPlugin represents the skills marketplaces archive output plugins skill plugin type. +type SkillsMarketplacesArchiveOutputPluginsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesArchiveOutputPluginsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesArchiveOutputPlugins represents the skills marketplaces archive output plugins type. +type SkillsMarketplacesArchiveOutputPlugins struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesArchiveOutputPluginsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesArchiveOutput represents the skills marketplaces archive output type. +type SkillsMarketplacesArchiveOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Plugins []SkillsMarketplacesArchiveOutputPlugins `json:"plugins"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesArchiveOutputFromJSON deserializes JSON data into a SkillsMarketplacesArchiveOutput. +func MapSkillsMarketplacesArchiveOutputFromJSON(data []byte) (*SkillsMarketplacesArchiveOutput, error) { + var v SkillsMarketplacesArchiveOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesArchiveOutputToJSON serializes a SkillsMarketplacesArchiveOutput to JSON. +func MapSkillsMarketplacesArchiveOutputToJSON(v *SkillsMarketplacesArchiveOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/create.go b/v1/resources/skills/marketplaces/create.go new file mode 100644 index 0000000..bf882e3 --- /dev/null +++ b/v1/resources/skills/marketplaces/create.go @@ -0,0 +1,107 @@ +package marketplaces + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesCreateOutputPluginsSkillPluginSkills represents the skills marketplaces create output plugins skill plugin skills type. +type SkillsMarketplacesCreateOutputPluginsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesCreateOutputPluginsSkillPlugin represents the skills marketplaces create output plugins skill plugin type. +type SkillsMarketplacesCreateOutputPluginsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesCreateOutputPluginsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesCreateOutputPlugins represents the skills marketplaces create output plugins type. +type SkillsMarketplacesCreateOutputPlugins struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesCreateOutputPluginsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesCreateOutput represents the skills marketplaces create output type. +type SkillsMarketplacesCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Plugins []SkillsMarketplacesCreateOutputPlugins `json:"plugins"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesCreateOutputFromJSON deserializes JSON data into a SkillsMarketplacesCreateOutput. +func MapSkillsMarketplacesCreateOutputFromJSON(data []byte) (*SkillsMarketplacesCreateOutput, error) { + var v SkillsMarketplacesCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesCreateOutputToJSON serializes a SkillsMarketplacesCreateOutput to JSON. +func MapSkillsMarketplacesCreateOutputToJSON(v *SkillsMarketplacesCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsMarketplacesCreateBody represents the skills marketplaces create body type. +type SkillsMarketplacesCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// MapSkillsMarketplacesCreateBodyFromJSON deserializes JSON data into a SkillsMarketplacesCreateBody. +func MapSkillsMarketplacesCreateBodyFromJSON(data []byte) (*SkillsMarketplacesCreateBody, error) { + var v SkillsMarketplacesCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesCreateBodyToJSON serializes a SkillsMarketplacesCreateBody to JSON. +func MapSkillsMarketplacesCreateBodyToJSON(v *SkillsMarketplacesCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/get.go b/v1/resources/skills/marketplaces/get.go new file mode 100644 index 0000000..4c986ce --- /dev/null +++ b/v1/resources/skills/marketplaces/get.go @@ -0,0 +1,85 @@ +package marketplaces + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesGetOutputPluginsSkillPluginSkills represents the skills marketplaces get output plugins skill plugin skills type. +type SkillsMarketplacesGetOutputPluginsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesGetOutputPluginsSkillPlugin represents the skills marketplaces get output plugins skill plugin type. +type SkillsMarketplacesGetOutputPluginsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesGetOutputPluginsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesGetOutputPlugins represents the skills marketplaces get output plugins type. +type SkillsMarketplacesGetOutputPlugins struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesGetOutputPluginsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesGetOutput represents the skills marketplaces get output type. +type SkillsMarketplacesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Plugins []SkillsMarketplacesGetOutputPlugins `json:"plugins"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesGetOutputFromJSON deserializes JSON data into a SkillsMarketplacesGetOutput. +func MapSkillsMarketplacesGetOutputFromJSON(data []byte) (*SkillsMarketplacesGetOutput, error) { + var v SkillsMarketplacesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesGetOutputToJSON serializes a SkillsMarketplacesGetOutput to JSON. +func MapSkillsMarketplacesGetOutputToJSON(v *SkillsMarketplacesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/list.go b/v1/resources/skills/marketplaces/list.go new file mode 100644 index 0000000..a04b46a --- /dev/null +++ b/v1/resources/skills/marketplaces/list.go @@ -0,0 +1,144 @@ +package marketplaces + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesListOutputItemsPluginsSkillPluginSkills represents the skills marketplaces list output items plugins skill plugin skills type. +type SkillsMarketplacesListOutputItemsPluginsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesListOutputItemsPluginsSkillPlugin represents the skills marketplaces list output items plugins skill plugin type. +type SkillsMarketplacesListOutputItemsPluginsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesListOutputItemsPluginsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesListOutputItemsPlugins represents the skills marketplaces list output items plugins type. +type SkillsMarketplacesListOutputItemsPlugins struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesListOutputItemsPluginsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesListOutputItems represents the skills marketplaces list output items type. +type SkillsMarketplacesListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Plugins []SkillsMarketplacesListOutputItemsPlugins `json:"plugins"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesListOutputPagination represents the skills marketplaces list output pagination type. +type SkillsMarketplacesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsMarketplacesListOutput represents the skills marketplaces list output type. +type SkillsMarketplacesListOutput struct { + Items []SkillsMarketplacesListOutputItems `json:"items"` + Pagination SkillsMarketplacesListOutputPagination `json:"pagination"` +} + +// MapSkillsMarketplacesListOutputFromJSON deserializes JSON data into a SkillsMarketplacesListOutput. +func MapSkillsMarketplacesListOutputFromJSON(data []byte) (*SkillsMarketplacesListOutput, error) { + var v SkillsMarketplacesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesListOutputToJSON serializes a SkillsMarketplacesListOutput to JSON. +func MapSkillsMarketplacesListOutputToJSON(v *SkillsMarketplacesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsMarketplacesListQueryCreatedAt - Filter skill marketplace creation time by date range +type SkillsMarketplacesListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill marketplace creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill marketplace creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsMarketplacesListQueryUpdatedAt - Filter skill marketplace last update time by date range +type SkillsMarketplacesListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill marketplace last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill marketplace last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsMarketplacesListQuery represents the skills marketplaces list query type. +type SkillsMarketplacesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + Search *string `json:"search,omitempty"` + // CreatedAt - Filter skill marketplace creation time by date range + CreatedAt *SkillsMarketplacesListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill marketplace last update time by date range + UpdatedAt *SkillsMarketplacesListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsMarketplacesListQueryFromJSON deserializes JSON data into a SkillsMarketplacesListQuery. +func MapSkillsMarketplacesListQueryFromJSON(data []byte) (*SkillsMarketplacesListQuery, error) { + var v SkillsMarketplacesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesListQueryToJSON serializes a SkillsMarketplacesListQuery to JSON. +func MapSkillsMarketplacesListQueryToJSON(v *SkillsMarketplacesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/plugins/add.go b/v1/resources/skills/marketplaces/plugins/add.go new file mode 100644 index 0000000..1e55da9 --- /dev/null +++ b/v1/resources/skills/marketplaces/plugins/add.go @@ -0,0 +1,90 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesPluginsAddOutputSkillPluginSkills represents the skills marketplaces plugins add output skill plugin skills type. +type SkillsMarketplacesPluginsAddOutputSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsAddOutputSkillPlugin represents the skills marketplaces plugins add output skill plugin type. +type SkillsMarketplacesPluginsAddOutputSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesPluginsAddOutputSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsAddOutput represents the skills marketplaces plugins add output type. +type SkillsMarketplacesPluginsAddOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesPluginsAddOutputSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesPluginsAddOutputFromJSON deserializes JSON data into a SkillsMarketplacesPluginsAddOutput. +func MapSkillsMarketplacesPluginsAddOutputFromJSON(data []byte) (*SkillsMarketplacesPluginsAddOutput, error) { + var v SkillsMarketplacesPluginsAddOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesPluginsAddOutputToJSON serializes a SkillsMarketplacesPluginsAddOutput to JSON. +func MapSkillsMarketplacesPluginsAddOutputToJSON(v *SkillsMarketplacesPluginsAddOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsMarketplacesPluginsAddBody represents the skills marketplaces plugins add body type. +type SkillsMarketplacesPluginsAddBody struct { + SkillPluginId string `json:"skill_plugin_id"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Identifier *string `json:"identifier,omitempty"` +} + +// MapSkillsMarketplacesPluginsAddBodyFromJSON deserializes JSON data into a SkillsMarketplacesPluginsAddBody. +func MapSkillsMarketplacesPluginsAddBodyFromJSON(data []byte) (*SkillsMarketplacesPluginsAddBody, error) { + var v SkillsMarketplacesPluginsAddBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesPluginsAddBodyToJSON serializes a SkillsMarketplacesPluginsAddBody to JSON. +func MapSkillsMarketplacesPluginsAddBodyToJSON(v *SkillsMarketplacesPluginsAddBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/plugins/get.go b/v1/resources/skills/marketplaces/plugins/get.go new file mode 100644 index 0000000..c671906 --- /dev/null +++ b/v1/resources/skills/marketplaces/plugins/get.go @@ -0,0 +1,69 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesPluginsGetOutputSkillPluginSkills represents the skills marketplaces plugins get output skill plugin skills type. +type SkillsMarketplacesPluginsGetOutputSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsGetOutputSkillPlugin represents the skills marketplaces plugins get output skill plugin type. +type SkillsMarketplacesPluginsGetOutputSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesPluginsGetOutputSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsGetOutput represents the skills marketplaces plugins get output type. +type SkillsMarketplacesPluginsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesPluginsGetOutputSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesPluginsGetOutputFromJSON deserializes JSON data into a SkillsMarketplacesPluginsGetOutput. +func MapSkillsMarketplacesPluginsGetOutputFromJSON(data []byte) (*SkillsMarketplacesPluginsGetOutput, error) { + var v SkillsMarketplacesPluginsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesPluginsGetOutputToJSON serializes a SkillsMarketplacesPluginsGetOutput to JSON. +func MapSkillsMarketplacesPluginsGetOutputToJSON(v *SkillsMarketplacesPluginsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/plugins/list.go b/v1/resources/skills/marketplaces/plugins/list.go new file mode 100644 index 0000000..36e6316 --- /dev/null +++ b/v1/resources/skills/marketplaces/plugins/list.go @@ -0,0 +1,128 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesPluginsListOutputItemsSkillPluginSkills represents the skills marketplaces plugins list output items skill plugin skills type. +type SkillsMarketplacesPluginsListOutputItemsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsListOutputItemsSkillPlugin represents the skills marketplaces plugins list output items skill plugin type. +type SkillsMarketplacesPluginsListOutputItemsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesPluginsListOutputItemsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsListOutputItems represents the skills marketplaces plugins list output items type. +type SkillsMarketplacesPluginsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesPluginsListOutputItemsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsListOutputPagination represents the skills marketplaces plugins list output pagination type. +type SkillsMarketplacesPluginsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsMarketplacesPluginsListOutput represents the skills marketplaces plugins list output type. +type SkillsMarketplacesPluginsListOutput struct { + Items []SkillsMarketplacesPluginsListOutputItems `json:"items"` + Pagination SkillsMarketplacesPluginsListOutputPagination `json:"pagination"` +} + +// MapSkillsMarketplacesPluginsListOutputFromJSON deserializes JSON data into a SkillsMarketplacesPluginsListOutput. +func MapSkillsMarketplacesPluginsListOutputFromJSON(data []byte) (*SkillsMarketplacesPluginsListOutput, error) { + var v SkillsMarketplacesPluginsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesPluginsListOutputToJSON serializes a SkillsMarketplacesPluginsListOutput to JSON. +func MapSkillsMarketplacesPluginsListOutputToJSON(v *SkillsMarketplacesPluginsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsMarketplacesPluginsListQueryCreatedAt - Filter skill marketplace plugin creation time by date range +type SkillsMarketplacesPluginsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill marketplace plugin creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill marketplace plugin creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsMarketplacesPluginsListQueryUpdatedAt - Filter skill marketplace plugin last update time by date range +type SkillsMarketplacesPluginsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill marketplace plugin last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill marketplace plugin last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsMarketplacesPluginsListQuery represents the skills marketplaces plugins list query type. +type SkillsMarketplacesPluginsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillPluginId *any `json:"skill_plugin_id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill marketplace plugin creation time by date range + CreatedAt *SkillsMarketplacesPluginsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill marketplace plugin last update time by date range + UpdatedAt *SkillsMarketplacesPluginsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsMarketplacesPluginsListQueryFromJSON deserializes JSON data into a SkillsMarketplacesPluginsListQuery. +func MapSkillsMarketplacesPluginsListQueryFromJSON(data []byte) (*SkillsMarketplacesPluginsListQuery, error) { + var v SkillsMarketplacesPluginsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesPluginsListQueryToJSON serializes a SkillsMarketplacesPluginsListQuery to JSON. +func MapSkillsMarketplacesPluginsListQueryToJSON(v *SkillsMarketplacesPluginsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/plugins/remove.go b/v1/resources/skills/marketplaces/plugins/remove.go new file mode 100644 index 0000000..e38cc19 --- /dev/null +++ b/v1/resources/skills/marketplaces/plugins/remove.go @@ -0,0 +1,69 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesPluginsRemoveOutputSkillPluginSkills represents the skills marketplaces plugins remove output skill plugin skills type. +type SkillsMarketplacesPluginsRemoveOutputSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsRemoveOutputSkillPlugin represents the skills marketplaces plugins remove output skill plugin type. +type SkillsMarketplacesPluginsRemoveOutputSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesPluginsRemoveOutputSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesPluginsRemoveOutput represents the skills marketplaces plugins remove output type. +type SkillsMarketplacesPluginsRemoveOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesPluginsRemoveOutputSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesPluginsRemoveOutputFromJSON deserializes JSON data into a SkillsMarketplacesPluginsRemoveOutput. +func MapSkillsMarketplacesPluginsRemoveOutputFromJSON(data []byte) (*SkillsMarketplacesPluginsRemoveOutput, error) { + var v SkillsMarketplacesPluginsRemoveOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesPluginsRemoveOutputToJSON serializes a SkillsMarketplacesPluginsRemoveOutput to JSON. +func MapSkillsMarketplacesPluginsRemoveOutputToJSON(v *SkillsMarketplacesPluginsRemoveOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/sync.go b/v1/resources/skills/marketplaces/sync.go new file mode 100644 index 0000000..0f04cc8 --- /dev/null +++ b/v1/resources/skills/marketplaces/sync.go @@ -0,0 +1,102 @@ +package marketplaces + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesSyncOutputPluginsSkillPluginSkills represents the skills marketplaces sync output plugins skill plugin skills type. +type SkillsMarketplacesSyncOutputPluginsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesSyncOutputPluginsSkillPlugin represents the skills marketplaces sync output plugins skill plugin type. +type SkillsMarketplacesSyncOutputPluginsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesSyncOutputPluginsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesSyncOutputPlugins represents the skills marketplaces sync output plugins type. +type SkillsMarketplacesSyncOutputPlugins struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesSyncOutputPluginsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesSyncOutput represents the skills marketplaces sync output type. +type SkillsMarketplacesSyncOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Plugins []SkillsMarketplacesSyncOutputPlugins `json:"plugins"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesSyncOutputFromJSON deserializes JSON data into a SkillsMarketplacesSyncOutput. +func MapSkillsMarketplacesSyncOutputFromJSON(data []byte) (*SkillsMarketplacesSyncOutput, error) { + var v SkillsMarketplacesSyncOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesSyncOutputToJSON serializes a SkillsMarketplacesSyncOutput to JSON. +func MapSkillsMarketplacesSyncOutputToJSON(v *SkillsMarketplacesSyncOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsMarketplacesSyncBody represents the skills marketplaces sync body type. +type SkillsMarketplacesSyncBody struct{} + +// MapSkillsMarketplacesSyncBodyFromJSON deserializes JSON data into a SkillsMarketplacesSyncBody. +func MapSkillsMarketplacesSyncBodyFromJSON(data []byte) (*SkillsMarketplacesSyncBody, error) { + var v SkillsMarketplacesSyncBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesSyncBodyToJSON serializes a SkillsMarketplacesSyncBody to JSON. +func MapSkillsMarketplacesSyncBodyToJSON(v *SkillsMarketplacesSyncBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/marketplaces/update.go b/v1/resources/skills/marketplaces/update.go new file mode 100644 index 0000000..6b1565c --- /dev/null +++ b/v1/resources/skills/marketplaces/update.go @@ -0,0 +1,107 @@ +package marketplaces + +import ( + "encoding/json" + "time" +) + +// SkillsMarketplacesUpdateOutputPluginsSkillPluginSkills represents the skills marketplaces update output plugins skill plugin skills type. +type SkillsMarketplacesUpdateOutputPluginsSkillPluginSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesUpdateOutputPluginsSkillPlugin represents the skills marketplaces update output plugins skill plugin type. +type SkillsMarketplacesUpdateOutputPluginsSkillPlugin struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsMarketplacesUpdateOutputPluginsSkillPluginSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesUpdateOutputPlugins represents the skills marketplaces update output plugins type. +type SkillsMarketplacesUpdateOutputPlugins struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Identifier string `json:"identifier"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillMarketplaceId *string `json:"skill_marketplace_id,omitempty"` + SkillPluginId *string `json:"skill_plugin_id,omitempty"` + SkillPlugin *SkillsMarketplacesUpdateOutputPluginsSkillPlugin `json:"skill_plugin,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsMarketplacesUpdateOutput represents the skills marketplaces update output type. +type SkillsMarketplacesUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Plugins []SkillsMarketplacesUpdateOutputPlugins `json:"plugins"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsMarketplacesUpdateOutputFromJSON deserializes JSON data into a SkillsMarketplacesUpdateOutput. +func MapSkillsMarketplacesUpdateOutputFromJSON(data []byte) (*SkillsMarketplacesUpdateOutput, error) { + var v SkillsMarketplacesUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesUpdateOutputToJSON serializes a SkillsMarketplacesUpdateOutput to JSON. +func MapSkillsMarketplacesUpdateOutputToJSON(v *SkillsMarketplacesUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsMarketplacesUpdateBody represents the skills marketplaces update body type. +type SkillsMarketplacesUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// MapSkillsMarketplacesUpdateBodyFromJSON deserializes JSON data into a SkillsMarketplacesUpdateBody. +func MapSkillsMarketplacesUpdateBodyFromJSON(data []byte) (*SkillsMarketplacesUpdateBody, error) { + var v SkillsMarketplacesUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsMarketplacesUpdateBodyToJSON serializes a SkillsMarketplacesUpdateBody to JSON. +func MapSkillsMarketplacesUpdateBodyToJSON(v *SkillsMarketplacesUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/participants/get.go b/v1/resources/skills/participants/get.go new file mode 100644 index 0000000..5d779a4 --- /dev/null +++ b/v1/resources/skills/participants/get.go @@ -0,0 +1,92 @@ +package participants + +import ( + "encoding/json" + "time" +) + +// SkillsParticipantsGetOutputActorOrganizationActorTeams - The teams the actor belongs to +type SkillsParticipantsGetOutputActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsGetOutputActorOrganizationActor represents the skills participants get output actor organization actor type. +type SkillsParticipantsGetOutputActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsParticipantsGetOutputActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsGetOutputActorConsumer represents the skills participants get output actor consumer type. +type SkillsParticipantsGetOutputActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsGetOutputActor represents the skills participants get output actor type. +type SkillsParticipantsGetOutputActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsParticipantsGetOutputActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsParticipantsGetOutputActorConsumer `json:"consumer,omitempty"` +} + +// SkillsParticipantsGetOutput represents the skills participants get output type. +type SkillsParticipantsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Roles []string `json:"roles"` + Actor SkillsParticipantsGetOutputActor `json:"actor"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsParticipantsGetOutputFromJSON deserializes JSON data into a SkillsParticipantsGetOutput. +func MapSkillsParticipantsGetOutputFromJSON(data []byte) (*SkillsParticipantsGetOutput, error) { + var v SkillsParticipantsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsParticipantsGetOutputToJSON serializes a SkillsParticipantsGetOutput to JSON. +func MapSkillsParticipantsGetOutputToJSON(v *SkillsParticipantsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/participants/list.go b/v1/resources/skills/participants/list.go new file mode 100644 index 0000000..32c1f43 --- /dev/null +++ b/v1/resources/skills/participants/list.go @@ -0,0 +1,127 @@ +package participants + +import ( + "encoding/json" + "time" +) + +// SkillsParticipantsListOutputItemsActorOrganizationActorTeams - The teams the actor belongs to +type SkillsParticipantsListOutputItemsActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsListOutputItemsActorOrganizationActor represents the skills participants list output items actor organization actor type. +type SkillsParticipantsListOutputItemsActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsParticipantsListOutputItemsActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsListOutputItemsActorConsumer represents the skills participants list output items actor consumer type. +type SkillsParticipantsListOutputItemsActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsListOutputItemsActor represents the skills participants list output items actor type. +type SkillsParticipantsListOutputItemsActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsParticipantsListOutputItemsActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsParticipantsListOutputItemsActorConsumer `json:"consumer,omitempty"` +} + +// SkillsParticipantsListOutputItems represents the skills participants list output items type. +type SkillsParticipantsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + Roles []string `json:"roles"` + Actor SkillsParticipantsListOutputItemsActor `json:"actor"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsParticipantsListOutputPagination represents the skills participants list output pagination type. +type SkillsParticipantsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsParticipantsListOutput represents the skills participants list output type. +type SkillsParticipantsListOutput struct { + Items []SkillsParticipantsListOutputItems `json:"items"` + Pagination SkillsParticipantsListOutputPagination `json:"pagination"` +} + +// MapSkillsParticipantsListOutputFromJSON deserializes JSON data into a SkillsParticipantsListOutput. +func MapSkillsParticipantsListOutputFromJSON(data []byte) (*SkillsParticipantsListOutput, error) { + var v SkillsParticipantsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsParticipantsListOutputToJSON serializes a SkillsParticipantsListOutput to JSON. +func MapSkillsParticipantsListOutputToJSON(v *SkillsParticipantsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsParticipantsListQuery represents the skills participants list query type. +type SkillsParticipantsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapSkillsParticipantsListQueryFromJSON deserializes JSON data into a SkillsParticipantsListQuery. +func MapSkillsParticipantsListQueryFromJSON(data []byte) (*SkillsParticipantsListQuery, error) { + var v SkillsParticipantsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsParticipantsListQueryToJSON serializes a SkillsParticipantsListQuery to JSON. +func MapSkillsParticipantsListQueryToJSON(v *SkillsParticipantsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/archive.go b/v1/resources/skills/plugins/archive.go new file mode 100644 index 0000000..8948fff --- /dev/null +++ b/v1/resources/skills/plugins/archive.go @@ -0,0 +1,55 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsArchiveOutputSkills represents the skills plugins archive output skills type. +type SkillsPluginsArchiveOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsArchiveOutput represents the skills plugins archive output type. +type SkillsPluginsArchiveOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsPluginsArchiveOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsArchiveOutputFromJSON deserializes JSON data into a SkillsPluginsArchiveOutput. +func MapSkillsPluginsArchiveOutputFromJSON(data []byte) (*SkillsPluginsArchiveOutput, error) { + var v SkillsPluginsArchiveOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsArchiveOutputToJSON serializes a SkillsPluginsArchiveOutput to JSON. +func MapSkillsPluginsArchiveOutputToJSON(v *SkillsPluginsArchiveOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/create.go b/v1/resources/skills/plugins/create.go new file mode 100644 index 0000000..ee46194 --- /dev/null +++ b/v1/resources/skills/plugins/create.go @@ -0,0 +1,79 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsCreateOutputSkills represents the skills plugins create output skills type. +type SkillsPluginsCreateOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsCreateOutput represents the skills plugins create output type. +type SkillsPluginsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsPluginsCreateOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsCreateOutputFromJSON deserializes JSON data into a SkillsPluginsCreateOutput. +func MapSkillsPluginsCreateOutputFromJSON(data []byte) (*SkillsPluginsCreateOutput, error) { + var v SkillsPluginsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsCreateOutputToJSON serializes a SkillsPluginsCreateOutput to JSON. +func MapSkillsPluginsCreateOutputToJSON(v *SkillsPluginsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsCreateBody represents the skills plugins create body type. +type SkillsPluginsCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// MapSkillsPluginsCreateBodyFromJSON deserializes JSON data into a SkillsPluginsCreateBody. +func MapSkillsPluginsCreateBodyFromJSON(data []byte) (*SkillsPluginsCreateBody, error) { + var v SkillsPluginsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsCreateBodyToJSON serializes a SkillsPluginsCreateBody to JSON. +func MapSkillsPluginsCreateBodyToJSON(v *SkillsPluginsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/get.go b/v1/resources/skills/plugins/get.go new file mode 100644 index 0000000..b6ee9fb --- /dev/null +++ b/v1/resources/skills/plugins/get.go @@ -0,0 +1,55 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsGetOutputSkills represents the skills plugins get output skills type. +type SkillsPluginsGetOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsGetOutput represents the skills plugins get output type. +type SkillsPluginsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsPluginsGetOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsGetOutputFromJSON deserializes JSON data into a SkillsPluginsGetOutput. +func MapSkillsPluginsGetOutputFromJSON(data []byte) (*SkillsPluginsGetOutput, error) { + var v SkillsPluginsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsGetOutputToJSON serializes a SkillsPluginsGetOutput to JSON. +func MapSkillsPluginsGetOutputToJSON(v *SkillsPluginsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/list.go b/v1/resources/skills/plugins/list.go new file mode 100644 index 0000000..6113072 --- /dev/null +++ b/v1/resources/skills/plugins/list.go @@ -0,0 +1,116 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsListOutputItemsSkills represents the skills plugins list output items skills type. +type SkillsPluginsListOutputItemsSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsListOutputItems represents the skills plugins list output items type. +type SkillsPluginsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsPluginsListOutputItemsSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsListOutputPagination represents the skills plugins list output pagination type. +type SkillsPluginsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsPluginsListOutput represents the skills plugins list output type. +type SkillsPluginsListOutput struct { + Items []SkillsPluginsListOutputItems `json:"items"` + Pagination SkillsPluginsListOutputPagination `json:"pagination"` +} + +// MapSkillsPluginsListOutputFromJSON deserializes JSON data into a SkillsPluginsListOutput. +func MapSkillsPluginsListOutputFromJSON(data []byte) (*SkillsPluginsListOutput, error) { + var v SkillsPluginsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsListOutputToJSON serializes a SkillsPluginsListOutput to JSON. +func MapSkillsPluginsListOutputToJSON(v *SkillsPluginsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsListQueryCreatedAt - Filter skill plugin creation time by date range +type SkillsPluginsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill plugin creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill plugin creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsPluginsListQueryUpdatedAt - Filter skill plugin last update time by date range +type SkillsPluginsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill plugin last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill plugin last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsPluginsListQuery represents the skills plugins list query type. +type SkillsPluginsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillMarketplaceId *any `json:"skill_marketplace_id,omitempty"` + Status *any `json:"status,omitempty"` + Category *string `json:"category,omitempty"` + Search *string `json:"search,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill plugin creation time by date range + CreatedAt *SkillsPluginsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill plugin last update time by date range + UpdatedAt *SkillsPluginsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsPluginsListQueryFromJSON deserializes JSON data into a SkillsPluginsListQuery. +func MapSkillsPluginsListQueryFromJSON(data []byte) (*SkillsPluginsListQuery, error) { + var v SkillsPluginsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsListQueryToJSON serializes a SkillsPluginsListQuery to JSON. +func MapSkillsPluginsListQueryToJSON(v *SkillsPluginsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/skills/add.go b/v1/resources/skills/plugins/skills/add.go new file mode 100644 index 0000000..16aaad6 --- /dev/null +++ b/v1/resources/skills/plugins/skills/add.go @@ -0,0 +1,63 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsSkillsAddOutput represents the skills plugins skills add output type. +type SkillsPluginsSkillsAddOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsSkillsAddOutputFromJSON deserializes JSON data into a SkillsPluginsSkillsAddOutput. +func MapSkillsPluginsSkillsAddOutputFromJSON(data []byte) (*SkillsPluginsSkillsAddOutput, error) { + var v SkillsPluginsSkillsAddOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsAddOutputToJSON serializes a SkillsPluginsSkillsAddOutput to JSON. +func MapSkillsPluginsSkillsAddOutputToJSON(v *SkillsPluginsSkillsAddOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsSkillsAddBody represents the skills plugins skills add body type. +type SkillsPluginsSkillsAddBody struct { + SkillId string `json:"skill_id"` + Identifier *string `json:"identifier,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// MapSkillsPluginsSkillsAddBodyFromJSON deserializes JSON data into a SkillsPluginsSkillsAddBody. +func MapSkillsPluginsSkillsAddBodyFromJSON(data []byte) (*SkillsPluginsSkillsAddBody, error) { + var v SkillsPluginsSkillsAddBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsAddBodyToJSON serializes a SkillsPluginsSkillsAddBody to JSON. +func MapSkillsPluginsSkillsAddBodyToJSON(v *SkillsPluginsSkillsAddBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/skills/get.go b/v1/resources/skills/plugins/skills/get.go new file mode 100644 index 0000000..d05ab94 --- /dev/null +++ b/v1/resources/skills/plugins/skills/get.go @@ -0,0 +1,37 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsSkillsGetOutput represents the skills plugins skills get output type. +type SkillsPluginsSkillsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsSkillsGetOutputFromJSON deserializes JSON data into a SkillsPluginsSkillsGetOutput. +func MapSkillsPluginsSkillsGetOutputFromJSON(data []byte) (*SkillsPluginsSkillsGetOutput, error) { + var v SkillsPluginsSkillsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsGetOutputToJSON serializes a SkillsPluginsSkillsGetOutput to JSON. +func MapSkillsPluginsSkillsGetOutputToJSON(v *SkillsPluginsSkillsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/skills/list.go b/v1/resources/skills/plugins/skills/list.go new file mode 100644 index 0000000..a55c6a2 --- /dev/null +++ b/v1/resources/skills/plugins/skills/list.go @@ -0,0 +1,96 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsSkillsListOutputItems represents the skills plugins skills list output items type. +type SkillsPluginsSkillsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsSkillsListOutputPagination represents the skills plugins skills list output pagination type. +type SkillsPluginsSkillsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsPluginsSkillsListOutput represents the skills plugins skills list output type. +type SkillsPluginsSkillsListOutput struct { + Items []SkillsPluginsSkillsListOutputItems `json:"items"` + Pagination SkillsPluginsSkillsListOutputPagination `json:"pagination"` +} + +// MapSkillsPluginsSkillsListOutputFromJSON deserializes JSON data into a SkillsPluginsSkillsListOutput. +func MapSkillsPluginsSkillsListOutputFromJSON(data []byte) (*SkillsPluginsSkillsListOutput, error) { + var v SkillsPluginsSkillsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsListOutputToJSON serializes a SkillsPluginsSkillsListOutput to JSON. +func MapSkillsPluginsSkillsListOutputToJSON(v *SkillsPluginsSkillsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsSkillsListQueryCreatedAt - Filter skill plugin skill creation time by date range +type SkillsPluginsSkillsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill plugin skill creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill plugin skill creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsPluginsSkillsListQueryUpdatedAt - Filter skill plugin skill last update time by date range +type SkillsPluginsSkillsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill plugin skill last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill plugin skill last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsPluginsSkillsListQuery represents the skills plugins skills list query type. +type SkillsPluginsSkillsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Id *any `json:"id,omitempty"` + SkillId *any `json:"skill_id,omitempty"` + Status *any `json:"status,omitempty"` + SkillConfigurationId *any `json:"skill_configuration_id,omitempty"` + // CreatedAt - Filter skill plugin skill creation time by date range + CreatedAt *SkillsPluginsSkillsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill plugin skill last update time by date range + UpdatedAt *SkillsPluginsSkillsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsPluginsSkillsListQueryFromJSON deserializes JSON data into a SkillsPluginsSkillsListQuery. +func MapSkillsPluginsSkillsListQueryFromJSON(data []byte) (*SkillsPluginsSkillsListQuery, error) { + var v SkillsPluginsSkillsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsListQueryToJSON serializes a SkillsPluginsSkillsListQuery to JSON. +func MapSkillsPluginsSkillsListQueryToJSON(v *SkillsPluginsSkillsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/skills/remove.go b/v1/resources/skills/plugins/skills/remove.go new file mode 100644 index 0000000..8755c3a --- /dev/null +++ b/v1/resources/skills/plugins/skills/remove.go @@ -0,0 +1,37 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsSkillsRemoveOutput represents the skills plugins skills remove output type. +type SkillsPluginsSkillsRemoveOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsSkillsRemoveOutputFromJSON deserializes JSON data into a SkillsPluginsSkillsRemoveOutput. +func MapSkillsPluginsSkillsRemoveOutputFromJSON(data []byte) (*SkillsPluginsSkillsRemoveOutput, error) { + var v SkillsPluginsSkillsRemoveOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsRemoveOutputToJSON serializes a SkillsPluginsSkillsRemoveOutput to JSON. +func MapSkillsPluginsSkillsRemoveOutputToJSON(v *SkillsPluginsSkillsRemoveOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/skills/update.go b/v1/resources/skills/plugins/skills/update.go new file mode 100644 index 0000000..916e21e --- /dev/null +++ b/v1/resources/skills/plugins/skills/update.go @@ -0,0 +1,61 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsSkillsUpdateOutput represents the skills plugins skills update output type. +type SkillsPluginsSkillsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsSkillsUpdateOutputFromJSON deserializes JSON data into a SkillsPluginsSkillsUpdateOutput. +func MapSkillsPluginsSkillsUpdateOutputFromJSON(data []byte) (*SkillsPluginsSkillsUpdateOutput, error) { + var v SkillsPluginsSkillsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsUpdateOutputToJSON serializes a SkillsPluginsSkillsUpdateOutput to JSON. +func MapSkillsPluginsSkillsUpdateOutputToJSON(v *SkillsPluginsSkillsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsSkillsUpdateBody represents the skills plugins skills update body type. +type SkillsPluginsSkillsUpdateBody struct { + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// MapSkillsPluginsSkillsUpdateBodyFromJSON deserializes JSON data into a SkillsPluginsSkillsUpdateBody. +func MapSkillsPluginsSkillsUpdateBodyFromJSON(data []byte) (*SkillsPluginsSkillsUpdateBody, error) { + var v SkillsPluginsSkillsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSkillsUpdateBodyToJSON serializes a SkillsPluginsSkillsUpdateBody to JSON. +func MapSkillsPluginsSkillsUpdateBodyToJSON(v *SkillsPluginsSkillsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/sync.go b/v1/resources/skills/plugins/sync.go new file mode 100644 index 0000000..8fb8500 --- /dev/null +++ b/v1/resources/skills/plugins/sync.go @@ -0,0 +1,72 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsSyncOutputSkills represents the skills plugins sync output skills type. +type SkillsPluginsSyncOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsSyncOutput represents the skills plugins sync output type. +type SkillsPluginsSyncOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsPluginsSyncOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsSyncOutputFromJSON deserializes JSON data into a SkillsPluginsSyncOutput. +func MapSkillsPluginsSyncOutputFromJSON(data []byte) (*SkillsPluginsSyncOutput, error) { + var v SkillsPluginsSyncOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSyncOutputToJSON serializes a SkillsPluginsSyncOutput to JSON. +func MapSkillsPluginsSyncOutputToJSON(v *SkillsPluginsSyncOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsSyncBody represents the skills plugins sync body type. +type SkillsPluginsSyncBody struct{} + +// MapSkillsPluginsSyncBodyFromJSON deserializes JSON data into a SkillsPluginsSyncBody. +func MapSkillsPluginsSyncBodyFromJSON(data []byte) (*SkillsPluginsSyncBody, error) { + var v SkillsPluginsSyncBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsSyncBodyToJSON serializes a SkillsPluginsSyncBody to JSON. +func MapSkillsPluginsSyncBodyToJSON(v *SkillsPluginsSyncBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/plugins/update.go b/v1/resources/skills/plugins/update.go new file mode 100644 index 0000000..b5b8186 --- /dev/null +++ b/v1/resources/skills/plugins/update.go @@ -0,0 +1,79 @@ +package plugins + +import ( + "encoding/json" + "time" +) + +// SkillsPluginsUpdateOutputSkills represents the skills plugins update output skills type. +type SkillsPluginsUpdateOutputSkills struct { + Object string `json:"object"` + Id string `json:"id"` + Identifier string `json:"identifier"` + Status string `json:"status"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + SkillId string `json:"skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPluginsUpdateOutput represents the skills plugins update output type. +type SkillsPluginsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + SyncStatus string `json:"sync_status"` + ImageUrl string `json:"image_url"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + Slug string `json:"slug"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` + Skills []SkillsPluginsUpdateOutputSkills `json:"skills"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPluginsUpdateOutputFromJSON deserializes JSON data into a SkillsPluginsUpdateOutput. +func MapSkillsPluginsUpdateOutputFromJSON(data []byte) (*SkillsPluginsUpdateOutput, error) { + var v SkillsPluginsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsUpdateOutputToJSON serializes a SkillsPluginsUpdateOutput to JSON. +func MapSkillsPluginsUpdateOutputToJSON(v *SkillsPluginsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsPluginsUpdateBody represents the skills plugins update body type. +type SkillsPluginsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + LongDescription *string `json:"long_description,omitempty"` + Category *string `json:"category,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` + SkillConfigurationId *string `json:"skill_configuration_id,omitempty"` +} + +// MapSkillsPluginsUpdateBodyFromJSON deserializes JSON data into a SkillsPluginsUpdateBody. +func MapSkillsPluginsUpdateBodyFromJSON(data []byte) (*SkillsPluginsUpdateBody, error) { + var v SkillsPluginsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPluginsUpdateBodyToJSON serializes a SkillsPluginsUpdateBody to JSON. +func MapSkillsPluginsUpdateBodyToJSON(v *SkillsPluginsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/publish_consumer_skill.go b/v1/resources/skills/publish_consumer_skill.go new file mode 100644 index 0000000..7f0374f --- /dev/null +++ b/v1/resources/skills/publish_consumer_skill.go @@ -0,0 +1,293 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsPublishConsumerSkillOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsPublishConsumerSkillOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyCreatorOrganizationActor represents the skills publish consumer skill output hierarchy creator organization actor type. +type SkillsPublishConsumerSkillOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsPublishConsumerSkillOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyCreatorConsumer represents the skills publish consumer skill output hierarchy creator consumer type. +type SkillsPublishConsumerSkillOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyCreator represents the skills publish consumer skill output hierarchy creator type. +type SkillsPublishConsumerSkillOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsPublishConsumerSkillOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsPublishConsumerSkillOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsPublishConsumerSkillOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkCreatorOrganizationActor represents the skills publish consumer skill output hierarchy fork creator organization actor type. +type SkillsPublishConsumerSkillOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsPublishConsumerSkillOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkCreatorConsumer represents the skills publish consumer skill output hierarchy fork creator consumer type. +type SkillsPublishConsumerSkillOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkCreator represents the skills publish consumer skill output hierarchy fork creator type. +type SkillsPublishConsumerSkillOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsPublishConsumerSkillOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsPublishConsumerSkillOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills publish consumer skill output hierarchy fork original creator organization actor type. +type SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorConsumer represents the skills publish consumer skill output hierarchy fork original creator consumer type. +type SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreator represents the skills publish consumer skill output hierarchy fork original creator type. +type SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsPublishConsumerSkillOutputHierarchyFork represents the skills publish consumer skill output hierarchy fork type. +type SkillsPublishConsumerSkillOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsPublishConsumerSkillOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsPublishConsumerSkillOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchyEntity represents the skills publish consumer skill output hierarchy entity type. +type SkillsPublishConsumerSkillOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutputHierarchy represents the skills publish consumer skill output hierarchy type. +type SkillsPublishConsumerSkillOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsPublishConsumerSkillOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsPublishConsumerSkillOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsPublishConsumerSkillOutputHierarchyEntity `json:"entity"` +} + +// SkillsPublishConsumerSkillOutputIntegrationsConfiguration represents the skills publish consumer skill output integrations configuration type. +type SkillsPublishConsumerSkillOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsPublishConsumerSkillOutputIntegrations represents the skills publish consumer skill output integrations type. +type SkillsPublishConsumerSkillOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsPublishConsumerSkillOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsPublishConsumerSkillOutputProviders represents the skills publish consumer skill output providers type. +type SkillsPublishConsumerSkillOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsPublishConsumerSkillOutput represents the skills publish consumer skill output type. +type SkillsPublishConsumerSkillOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsPublishConsumerSkillOutputHierarchy `json:"hierarchy"` + Integrations []SkillsPublishConsumerSkillOutputIntegrations `json:"integrations"` + Providers []SkillsPublishConsumerSkillOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsPublishConsumerSkillOutputFromJSON deserializes JSON data into a SkillsPublishConsumerSkillOutput. +func MapSkillsPublishConsumerSkillOutputFromJSON(data []byte) (*SkillsPublishConsumerSkillOutput, error) { + var v SkillsPublishConsumerSkillOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsPublishConsumerSkillOutputToJSON serializes a SkillsPublishConsumerSkillOutput to JSON. +func MapSkillsPublishConsumerSkillOutputToJSON(v *SkillsPublishConsumerSkillOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/create.go b/v1/resources/skills/templates/create.go new file mode 100644 index 0000000..d2a1f86 --- /dev/null +++ b/v1/resources/skills/templates/create.go @@ -0,0 +1,108 @@ +package templates + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesCreateOutputItemsIntegrationConfiguration represents the skills templates create output items integration configuration type. +type SkillsTemplatesCreateOutputItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesCreateOutputItemsIntegration represents the skills templates create output items integration type. +type SkillsTemplatesCreateOutputItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesCreateOutputItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesCreateOutputItemsProvider represents the skills templates create output items provider type. +type SkillsTemplatesCreateOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesCreateOutputItems represents the skills templates create output items type. +type SkillsTemplatesCreateOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesCreateOutputItemsIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesCreateOutputItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesCreateOutput represents the skills templates create output type. +type SkillsTemplatesCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Items []SkillsTemplatesCreateOutputItems `json:"items"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesCreateOutputFromJSON deserializes JSON data into a SkillsTemplatesCreateOutput. +func MapSkillsTemplatesCreateOutputFromJSON(data []byte) (*SkillsTemplatesCreateOutput, error) { + var v SkillsTemplatesCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesCreateOutputToJSON serializes a SkillsTemplatesCreateOutput to JSON. +func MapSkillsTemplatesCreateOutputToJSON(v *SkillsTemplatesCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsTemplatesCreateBody represents the skills templates create body type. +type SkillsTemplatesCreateBody struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + FromSkillId *string `json:"from_skill_Id,omitempty"` +} + +// MapSkillsTemplatesCreateBodyFromJSON deserializes JSON data into a SkillsTemplatesCreateBody. +func MapSkillsTemplatesCreateBodyFromJSON(data []byte) (*SkillsTemplatesCreateBody, error) { + var v SkillsTemplatesCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesCreateBodyToJSON serializes a SkillsTemplatesCreateBody to JSON. +func MapSkillsTemplatesCreateBodyToJSON(v *SkillsTemplatesCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/delete.go b/v1/resources/skills/templates/delete.go new file mode 100644 index 0000000..ed18a06 --- /dev/null +++ b/v1/resources/skills/templates/delete.go @@ -0,0 +1,86 @@ +package templates + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesDeleteOutputItemsIntegrationConfiguration represents the skills templates delete output items integration configuration type. +type SkillsTemplatesDeleteOutputItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesDeleteOutputItemsIntegration represents the skills templates delete output items integration type. +type SkillsTemplatesDeleteOutputItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesDeleteOutputItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesDeleteOutputItemsProvider represents the skills templates delete output items provider type. +type SkillsTemplatesDeleteOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesDeleteOutputItems represents the skills templates delete output items type. +type SkillsTemplatesDeleteOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesDeleteOutputItemsIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesDeleteOutputItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesDeleteOutput represents the skills templates delete output type. +type SkillsTemplatesDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Items []SkillsTemplatesDeleteOutputItems `json:"items"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesDeleteOutputFromJSON deserializes JSON data into a SkillsTemplatesDeleteOutput. +func MapSkillsTemplatesDeleteOutputFromJSON(data []byte) (*SkillsTemplatesDeleteOutput, error) { + var v SkillsTemplatesDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesDeleteOutputToJSON serializes a SkillsTemplatesDeleteOutput to JSON. +func MapSkillsTemplatesDeleteOutputToJSON(v *SkillsTemplatesDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/get.go b/v1/resources/skills/templates/get.go new file mode 100644 index 0000000..32af342 --- /dev/null +++ b/v1/resources/skills/templates/get.go @@ -0,0 +1,86 @@ +package templates + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesGetOutputItemsIntegrationConfiguration represents the skills templates get output items integration configuration type. +type SkillsTemplatesGetOutputItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesGetOutputItemsIntegration represents the skills templates get output items integration type. +type SkillsTemplatesGetOutputItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesGetOutputItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesGetOutputItemsProvider represents the skills templates get output items provider type. +type SkillsTemplatesGetOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesGetOutputItems represents the skills templates get output items type. +type SkillsTemplatesGetOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesGetOutputItemsIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesGetOutputItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesGetOutput represents the skills templates get output type. +type SkillsTemplatesGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Items []SkillsTemplatesGetOutputItems `json:"items"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesGetOutputFromJSON deserializes JSON data into a SkillsTemplatesGetOutput. +func MapSkillsTemplatesGetOutputFromJSON(data []byte) (*SkillsTemplatesGetOutput, error) { + var v SkillsTemplatesGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesGetOutputToJSON serializes a SkillsTemplatesGetOutput to JSON. +func MapSkillsTemplatesGetOutputToJSON(v *SkillsTemplatesGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/items/create.go b/v1/resources/skills/templates/items/create.go new file mode 100644 index 0000000..a2d44aa --- /dev/null +++ b/v1/resources/skills/templates/items/create.go @@ -0,0 +1,92 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesItemsCreateOutputIntegrationConfiguration represents the skills templates items create output integration configuration type. +type SkillsTemplatesItemsCreateOutputIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesItemsCreateOutputIntegration represents the skills templates items create output integration type. +type SkillsTemplatesItemsCreateOutputIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesItemsCreateOutputIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesItemsCreateOutputProvider represents the skills templates items create output provider type. +type SkillsTemplatesItemsCreateOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesItemsCreateOutput represents the skills templates items create output type. +type SkillsTemplatesItemsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesItemsCreateOutputIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesItemsCreateOutputProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesItemsCreateOutputFromJSON deserializes JSON data into a SkillsTemplatesItemsCreateOutput. +func MapSkillsTemplatesItemsCreateOutputFromJSON(data []byte) (*SkillsTemplatesItemsCreateOutput, error) { + var v SkillsTemplatesItemsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesItemsCreateOutputToJSON serializes a SkillsTemplatesItemsCreateOutput to JSON. +func MapSkillsTemplatesItemsCreateOutputToJSON(v *SkillsTemplatesItemsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsTemplatesItemsCreateBody represents one of several possible types. +// This is a union type - only one set of fields will be populated. +type SkillsTemplatesItemsCreateBody struct { + Type *string `json:"type,omitempty"` + ProviderId *string `json:"provider_id,omitempty"` + IntegrationId *string `json:"integration_id,omitempty"` +} + +// MapSkillsTemplatesItemsCreateBodyFromJSON deserializes JSON data into a SkillsTemplatesItemsCreateBody. +func MapSkillsTemplatesItemsCreateBodyFromJSON(data []byte) (*SkillsTemplatesItemsCreateBody, error) { + var v SkillsTemplatesItemsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesItemsCreateBodyToJSON serializes a SkillsTemplatesItemsCreateBody to JSON. +func MapSkillsTemplatesItemsCreateBodyToJSON(v *SkillsTemplatesItemsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/items/delete.go b/v1/resources/skills/templates/items/delete.go new file mode 100644 index 0000000..5fe1886 --- /dev/null +++ b/v1/resources/skills/templates/items/delete.go @@ -0,0 +1,70 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesItemsDeleteOutputIntegrationConfiguration represents the skills templates items delete output integration configuration type. +type SkillsTemplatesItemsDeleteOutputIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesItemsDeleteOutputIntegration represents the skills templates items delete output integration type. +type SkillsTemplatesItemsDeleteOutputIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesItemsDeleteOutputIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesItemsDeleteOutputProvider represents the skills templates items delete output provider type. +type SkillsTemplatesItemsDeleteOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesItemsDeleteOutput represents the skills templates items delete output type. +type SkillsTemplatesItemsDeleteOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesItemsDeleteOutputIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesItemsDeleteOutputProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesItemsDeleteOutputFromJSON deserializes JSON data into a SkillsTemplatesItemsDeleteOutput. +func MapSkillsTemplatesItemsDeleteOutputFromJSON(data []byte) (*SkillsTemplatesItemsDeleteOutput, error) { + var v SkillsTemplatesItemsDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesItemsDeleteOutputToJSON serializes a SkillsTemplatesItemsDeleteOutput to JSON. +func MapSkillsTemplatesItemsDeleteOutputToJSON(v *SkillsTemplatesItemsDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/items/get.go b/v1/resources/skills/templates/items/get.go new file mode 100644 index 0000000..8a70e7c --- /dev/null +++ b/v1/resources/skills/templates/items/get.go @@ -0,0 +1,70 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesItemsGetOutputIntegrationConfiguration represents the skills templates items get output integration configuration type. +type SkillsTemplatesItemsGetOutputIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesItemsGetOutputIntegration represents the skills templates items get output integration type. +type SkillsTemplatesItemsGetOutputIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesItemsGetOutputIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesItemsGetOutputProvider represents the skills templates items get output provider type. +type SkillsTemplatesItemsGetOutputProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesItemsGetOutput represents the skills templates items get output type. +type SkillsTemplatesItemsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesItemsGetOutputIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesItemsGetOutputProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesItemsGetOutputFromJSON deserializes JSON data into a SkillsTemplatesItemsGetOutput. +func MapSkillsTemplatesItemsGetOutputFromJSON(data []byte) (*SkillsTemplatesItemsGetOutput, error) { + var v SkillsTemplatesItemsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesItemsGetOutputToJSON serializes a SkillsTemplatesItemsGetOutput to JSON. +func MapSkillsTemplatesItemsGetOutputToJSON(v *SkillsTemplatesItemsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/items/list.go b/v1/resources/skills/templates/items/list.go new file mode 100644 index 0000000..3d2bb44 --- /dev/null +++ b/v1/resources/skills/templates/items/list.go @@ -0,0 +1,105 @@ +package items + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesItemsListOutputItemsIntegrationConfiguration represents the skills templates items list output items integration configuration type. +type SkillsTemplatesItemsListOutputItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesItemsListOutputItemsIntegration represents the skills templates items list output items integration type. +type SkillsTemplatesItemsListOutputItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesItemsListOutputItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesItemsListOutputItemsProvider represents the skills templates items list output items provider type. +type SkillsTemplatesItemsListOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesItemsListOutputItems represents the skills templates items list output items type. +type SkillsTemplatesItemsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesItemsListOutputItemsIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesItemsListOutputItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesItemsListOutputPagination represents the skills templates items list output pagination type. +type SkillsTemplatesItemsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsTemplatesItemsListOutput represents the skills templates items list output type. +type SkillsTemplatesItemsListOutput struct { + Items []SkillsTemplatesItemsListOutputItems `json:"items"` + Pagination SkillsTemplatesItemsListOutputPagination `json:"pagination"` +} + +// MapSkillsTemplatesItemsListOutputFromJSON deserializes JSON data into a SkillsTemplatesItemsListOutput. +func MapSkillsTemplatesItemsListOutputFromJSON(data []byte) (*SkillsTemplatesItemsListOutput, error) { + var v SkillsTemplatesItemsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesItemsListOutputToJSON serializes a SkillsTemplatesItemsListOutput to JSON. +func MapSkillsTemplatesItemsListOutputToJSON(v *SkillsTemplatesItemsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsTemplatesItemsListQuery represents the skills templates items list query type. +type SkillsTemplatesItemsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapSkillsTemplatesItemsListQueryFromJSON deserializes JSON data into a SkillsTemplatesItemsListQuery. +func MapSkillsTemplatesItemsListQueryFromJSON(data []byte) (*SkillsTemplatesItemsListQuery, error) { + var v SkillsTemplatesItemsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesItemsListQueryToJSON serializes a SkillsTemplatesItemsListQuery to JSON. +func MapSkillsTemplatesItemsListQueryToJSON(v *SkillsTemplatesItemsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/list.go b/v1/resources/skills/templates/list.go new file mode 100644 index 0000000..dc727d2 --- /dev/null +++ b/v1/resources/skills/templates/list.go @@ -0,0 +1,147 @@ +package templates + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesListOutputItemsItemsIntegrationConfiguration represents the skills templates list output items items integration configuration type. +type SkillsTemplatesListOutputItemsItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesListOutputItemsItemsIntegration represents the skills templates list output items items integration type. +type SkillsTemplatesListOutputItemsItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesListOutputItemsItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesListOutputItemsItemsProvider represents the skills templates list output items items provider type. +type SkillsTemplatesListOutputItemsItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesListOutputItemsItems represents the skills templates list output items items type. +type SkillsTemplatesListOutputItemsItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesListOutputItemsItemsIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesListOutputItemsItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesListOutputItems represents the skills templates list output items type. +type SkillsTemplatesListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Items []SkillsTemplatesListOutputItemsItems `json:"items"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesListOutputPagination represents the skills templates list output pagination type. +type SkillsTemplatesListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsTemplatesListOutput represents the skills templates list output type. +type SkillsTemplatesListOutput struct { + Items []SkillsTemplatesListOutputItems `json:"items"` + Pagination SkillsTemplatesListOutputPagination `json:"pagination"` +} + +// MapSkillsTemplatesListOutputFromJSON deserializes JSON data into a SkillsTemplatesListOutput. +func MapSkillsTemplatesListOutputFromJSON(data []byte) (*SkillsTemplatesListOutput, error) { + var v SkillsTemplatesListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesListOutputToJSON serializes a SkillsTemplatesListOutput to JSON. +func MapSkillsTemplatesListOutputToJSON(v *SkillsTemplatesListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsTemplatesListQueryCreatedAt - Filter skill template creation time by date range +type SkillsTemplatesListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for skill template creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill template creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsTemplatesListQueryUpdatedAt - Filter skill template last update time by date range +type SkillsTemplatesListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for skill template last update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for skill template last update time + Lt *time.Time `json:"lt,omitempty"` +} + +// SkillsTemplatesListQuery represents the skills templates list query type. +type SkillsTemplatesListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + Search *string `json:"search,omitempty"` + Status *any `json:"status,omitempty"` + Owner *any `json:"owner,omitempty"` + Id *any `json:"id,omitempty"` + ProviderId *any `json:"provider_id,omitempty"` + IntegrationId *any `json:"integration_id,omitempty"` + // CreatedAt - Filter skill template creation time by date range + CreatedAt *SkillsTemplatesListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter skill template last update time by date range + UpdatedAt *SkillsTemplatesListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapSkillsTemplatesListQueryFromJSON deserializes JSON data into a SkillsTemplatesListQuery. +func MapSkillsTemplatesListQueryFromJSON(data []byte) (*SkillsTemplatesListQuery, error) { + var v SkillsTemplatesListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesListQueryToJSON serializes a SkillsTemplatesListQuery to JSON. +func MapSkillsTemplatesListQueryToJSON(v *SkillsTemplatesListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/templates/update.go b/v1/resources/skills/templates/update.go new file mode 100644 index 0000000..2388f16 --- /dev/null +++ b/v1/resources/skills/templates/update.go @@ -0,0 +1,107 @@ +package templates + +import ( + "encoding/json" + "time" +) + +// SkillsTemplatesUpdateOutputItemsIntegrationConfiguration represents the skills templates update output items integration configuration type. +type SkillsTemplatesUpdateOutputItemsIntegrationConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsTemplatesUpdateOutputItemsIntegration represents the skills templates update output items integration type. +type SkillsTemplatesUpdateOutputItemsIntegration struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsTemplatesUpdateOutputItemsIntegrationConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsTemplatesUpdateOutputItemsProvider represents the skills templates update output items provider type. +type SkillsTemplatesUpdateOutputItemsProvider struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesUpdateOutputItems represents the skills templates update output items type. +type SkillsTemplatesUpdateOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Type string `json:"type"` + Integration *SkillsTemplatesUpdateOutputItemsIntegration `json:"integration,omitempty"` + Provider *SkillsTemplatesUpdateOutputItemsProvider `json:"provider,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsTemplatesUpdateOutput represents the skills templates update output type. +type SkillsTemplatesUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Items []SkillsTemplatesUpdateOutputItems `json:"items"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsTemplatesUpdateOutputFromJSON deserializes JSON data into a SkillsTemplatesUpdateOutput. +func MapSkillsTemplatesUpdateOutputFromJSON(data []byte) (*SkillsTemplatesUpdateOutput, error) { + var v SkillsTemplatesUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesUpdateOutputToJSON serializes a SkillsTemplatesUpdateOutput to JSON. +func MapSkillsTemplatesUpdateOutputToJSON(v *SkillsTemplatesUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsTemplatesUpdateBody represents the skills templates update body type. +type SkillsTemplatesUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` +} + +// MapSkillsTemplatesUpdateBodyFromJSON deserializes JSON data into a SkillsTemplatesUpdateBody. +func MapSkillsTemplatesUpdateBodyFromJSON(data []byte) (*SkillsTemplatesUpdateBody, error) { + var v SkillsTemplatesUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsTemplatesUpdateBodyToJSON serializes a SkillsTemplatesUpdateBody to JSON. +func MapSkillsTemplatesUpdateBodyToJSON(v *SkillsTemplatesUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/update.go b/v1/resources/skills/update.go new file mode 100644 index 0000000..073ba98 --- /dev/null +++ b/v1/resources/skills/update.go @@ -0,0 +1,320 @@ +package skills + +import ( + "encoding/json" + "time" +) + +// SkillsUpdateOutputHierarchyCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsUpdateOutputHierarchyCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyCreatorOrganizationActor represents the skills update output hierarchy creator organization actor type. +type SkillsUpdateOutputHierarchyCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsUpdateOutputHierarchyCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyCreatorConsumer represents the skills update output hierarchy creator consumer type. +type SkillsUpdateOutputHierarchyCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyCreator represents the skills update output hierarchy creator type. +type SkillsUpdateOutputHierarchyCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsUpdateOutputHierarchyCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsUpdateOutputHierarchyCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsUpdateOutputHierarchyForkCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsUpdateOutputHierarchyForkCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyForkCreatorOrganizationActor represents the skills update output hierarchy fork creator organization actor type. +type SkillsUpdateOutputHierarchyForkCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsUpdateOutputHierarchyForkCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyForkCreatorConsumer represents the skills update output hierarchy fork creator consumer type. +type SkillsUpdateOutputHierarchyForkCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyForkCreator represents the skills update output hierarchy fork creator type. +type SkillsUpdateOutputHierarchyForkCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsUpdateOutputHierarchyForkCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsUpdateOutputHierarchyForkCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsUpdateOutputHierarchyForkOriginalCreatorOrganizationActorTeams - The teams the actor belongs to +type SkillsUpdateOutputHierarchyForkOriginalCreatorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyForkOriginalCreatorOrganizationActor represents the skills update output hierarchy fork original creator organization actor type. +type SkillsUpdateOutputHierarchyForkOriginalCreatorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []SkillsUpdateOutputHierarchyForkOriginalCreatorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyForkOriginalCreatorConsumer represents the skills update output hierarchy fork original creator consumer type. +type SkillsUpdateOutputHierarchyForkOriginalCreatorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchyForkOriginalCreator represents the skills update output hierarchy fork original creator type. +type SkillsUpdateOutputHierarchyForkOriginalCreator struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *SkillsUpdateOutputHierarchyForkOriginalCreatorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *SkillsUpdateOutputHierarchyForkOriginalCreatorConsumer `json:"consumer,omitempty"` +} + +// SkillsUpdateOutputHierarchyFork represents the skills update output hierarchy fork type. +type SkillsUpdateOutputHierarchyFork struct { + Id string `json:"id"` + ParentSkillId string `json:"parent_skill_id"` + Creator *SkillsUpdateOutputHierarchyForkCreator `json:"creator,omitempty"` + OriginalCreator *SkillsUpdateOutputHierarchyForkOriginalCreator `json:"original_creator,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsUpdateOutputHierarchyEntity represents the skills update output hierarchy entity type. +type SkillsUpdateOutputHierarchyEntity struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description *string `json:"description,omitempty"` + ParentSkillId string `json:"parent_skill_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutputHierarchy represents the skills update output hierarchy type. +type SkillsUpdateOutputHierarchy struct { + Object string `json:"object"` + Type string `json:"type"` + ParentSkillId *string `json:"parent_skill_id,omitempty"` + Creator *SkillsUpdateOutputHierarchyCreator `json:"creator,omitempty"` + Fork *SkillsUpdateOutputHierarchyFork `json:"fork,omitempty"` + Entity SkillsUpdateOutputHierarchyEntity `json:"entity"` +} + +// SkillsUpdateOutputIntegrationsConfiguration represents the skills update output integrations configuration type. +type SkillsUpdateOutputIntegrationsConfiguration struct { + CanAttachCustomToolFilters bool `json:"can_attach_custom_tool_filters"` + CanAttachCustomProviderConfig bool `json:"can_attach_custom_provider_config"` + CanOverrideToolFilters bool `json:"can_override_tool_filters"` +} + +// SkillsUpdateOutputIntegrations represents the skills update output integrations type. +type SkillsUpdateOutputIntegrations struct { + Object string `json:"object"` + Id string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + Configuration SkillsUpdateOutputIntegrationsConfiguration `json:"configuration"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ArchivedAt *time.Time `json:"archived_at,omitempty"` +} + +// SkillsUpdateOutputProviders represents the skills update output providers type. +type SkillsUpdateOutputProviders struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique provider identifier + Id string `json:"id"` + // Name - Display name of the provider + Name string `json:"name"` + // Description - Brief description of the provider + Description *string `json:"description,omitempty"` + // Slug - URL-friendly identifier + Slug string `json:"slug"` + // CreatedAt - Timestamp when the provider was created + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - Timestamp when the provider was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SkillsUpdateOutput represents the skills update output type. +type SkillsUpdateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Slug string `json:"slug"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + ImageUrl string `json:"image_url"` + ClientName string `json:"client_name"` + ClientDescription *string `json:"client_description,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + Metadata map[string]any `json:"metadata"` + StoreId string `json:"store_id"` + Hierarchy SkillsUpdateOutputHierarchy `json:"hierarchy"` + Integrations []SkillsUpdateOutputIntegrations `json:"integrations"` + Providers []SkillsUpdateOutputProviders `json:"providers"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapSkillsUpdateOutputFromJSON deserializes JSON data into a SkillsUpdateOutput. +func MapSkillsUpdateOutputFromJSON(data []byte) (*SkillsUpdateOutput, error) { + var v SkillsUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsUpdateOutputToJSON serializes a SkillsUpdateOutput to JSON. +func MapSkillsUpdateOutputToJSON(v *SkillsUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsUpdateBody represents the skills update body type. +type SkillsUpdateBody struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientDescription *string `json:"client_description,omitempty"` + License *string `json:"license,omitempty"` + Compatibility *string `json:"compatibility,omitempty"` + ClientMetadata *map[string]any `json:"client_metadata,omitempty"` + Metadata *map[string]any `json:"metadata,omitempty"` + ImageFileId *string `json:"image_file_id,omitempty"` +} + +// MapSkillsUpdateBodyFromJSON deserializes JSON data into a SkillsUpdateBody. +func MapSkillsUpdateBodyFromJSON(data []byte) (*SkillsUpdateBody, error) { + var v SkillsUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsUpdateBodyToJSON serializes a SkillsUpdateBody to JSON. +func MapSkillsUpdateBodyToJSON(v *SkillsUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/versions/get.go b/v1/resources/skills/versions/get.go new file mode 100644 index 0000000..c3b8529 --- /dev/null +++ b/v1/resources/skills/versions/get.go @@ -0,0 +1,31 @@ +package versions + +import ( + "encoding/json" + "time" +) + +// SkillsVersionsGetOutput represents the skills versions get output type. +type SkillsVersionsGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + StoreId string `json:"store_id"` + StoreVersionId string `json:"store_version_id"` + VersionNumber float64 `json:"version_number"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsVersionsGetOutputFromJSON deserializes JSON data into a SkillsVersionsGetOutput. +func MapSkillsVersionsGetOutputFromJSON(data []byte) (*SkillsVersionsGetOutput, error) { + var v SkillsVersionsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsVersionsGetOutputToJSON serializes a SkillsVersionsGetOutput to JSON. +func MapSkillsVersionsGetOutputToJSON(v *SkillsVersionsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/versions/list.go b/v1/resources/skills/versions/list.go new file mode 100644 index 0000000..cfc1008 --- /dev/null +++ b/v1/resources/skills/versions/list.go @@ -0,0 +1,66 @@ +package versions + +import ( + "encoding/json" + "time" +) + +// SkillsVersionsListOutputItems represents the skills versions list output items type. +type SkillsVersionsListOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + StoreId string `json:"store_id"` + StoreVersionId string `json:"store_version_id"` + VersionNumber float64 `json:"version_number"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsVersionsListOutputPagination represents the skills versions list output pagination type. +type SkillsVersionsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// SkillsVersionsListOutput represents the skills versions list output type. +type SkillsVersionsListOutput struct { + Items []SkillsVersionsListOutputItems `json:"items"` + Pagination SkillsVersionsListOutputPagination `json:"pagination"` +} + +// MapSkillsVersionsListOutputFromJSON deserializes JSON data into a SkillsVersionsListOutput. +func MapSkillsVersionsListOutputFromJSON(data []byte) (*SkillsVersionsListOutput, error) { + var v SkillsVersionsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsVersionsListOutputToJSON serializes a SkillsVersionsListOutput to JSON. +func MapSkillsVersionsListOutputToJSON(v *SkillsVersionsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// SkillsVersionsListQuery represents the skills versions list query type. +type SkillsVersionsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapSkillsVersionsListQueryFromJSON deserializes JSON data into a SkillsVersionsListQuery. +func MapSkillsVersionsListQueryFromJSON(data []byte) (*SkillsVersionsListQuery, error) { + var v SkillsVersionsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsVersionsListQueryToJSON serializes a SkillsVersionsListQuery to JSON. +func MapSkillsVersionsListQueryToJSON(v *SkillsVersionsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/skills/versions/snapshot/get.go b/v1/resources/skills/versions/snapshot/get.go new file mode 100644 index 0000000..1d6eac6 --- /dev/null +++ b/v1/resources/skills/versions/snapshot/get.go @@ -0,0 +1,45 @@ +package snapshot + +import ( + "encoding/json" + "time" +) + +// SkillsVersionsSnapshotGetOutputItems represents the skills versions snapshot get output items type. +type SkillsVersionsSnapshotGetOutputItems struct { + Object string `json:"object"` + Id string `json:"id"` + Kind string `json:"kind"` + Path string `json:"path"` + FileId *string `json:"file_id,omitempty"` + DocumentId *string `json:"document_id,omitempty"` + DocumentVersionId *string `json:"document_version_id,omitempty"` + Content *string `json:"content,omitempty"` + CreatedAt time.Time `json:"created_at"` +} + +// SkillsVersionsSnapshotGetOutput represents the skills versions snapshot get output type. +type SkillsVersionsSnapshotGetOutput struct { + Object string `json:"object"` + Id string `json:"id"` + SkillId string `json:"skill_id"` + StoreId string `json:"store_id"` + StoreVersionId string `json:"store_version_id"` + VersionNumber float64 `json:"version_number"` + Items []SkillsVersionsSnapshotGetOutputItems `json:"items"` + CreatedAt time.Time `json:"created_at"` +} + +// MapSkillsVersionsSnapshotGetOutputFromJSON deserializes JSON data into a SkillsVersionsSnapshotGetOutput. +func MapSkillsVersionsSnapshotGetOutputFromJSON(data []byte) (*SkillsVersionsSnapshotGetOutput, error) { + var v SkillsVersionsSnapshotGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapSkillsVersionsSnapshotGetOutputToJSON serializes a SkillsVersionsSnapshotGetOutput to JSON. +func MapSkillsVersionsSnapshotGetOutputToJSON(v *SkillsVersionsSnapshotGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/create.go b/v1/resources/stores/create.go new file mode 100644 index 0000000..9590654 --- /dev/null +++ b/v1/resources/stores/create.go @@ -0,0 +1,54 @@ +package stores + +import ( + "encoding/json" + "time" +) + +// StoresCreateOutput represents the stores create output type. +type StoresCreateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Access string `json:"access"` + ItemCount float64 `json:"item_count"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapStoresCreateOutputFromJSON deserializes JSON data into a StoresCreateOutput. +func MapStoresCreateOutputFromJSON(data []byte) (*StoresCreateOutput, error) { + var v StoresCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresCreateOutputToJSON serializes a StoresCreateOutput to JSON. +func MapStoresCreateOutputToJSON(v *StoresCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// StoresCreateBody represents the stores create body type. +type StoresCreateBody struct { + Name string `json:"name"` + Access *string `json:"access,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + ParentId *string `json:"parent_id,omitempty"` +} + +// MapStoresCreateBodyFromJSON deserializes JSON data into a StoresCreateBody. +func MapStoresCreateBodyFromJSON(data []byte) (*StoresCreateBody, error) { + var v StoresCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresCreateBodyToJSON serializes a StoresCreateBody to JSON. +func MapStoresCreateBodyToJSON(v *StoresCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/delete.go b/v1/resources/stores/delete.go new file mode 100644 index 0000000..8ad46b9 --- /dev/null +++ b/v1/resources/stores/delete.go @@ -0,0 +1,32 @@ +package stores + +import ( + "encoding/json" + "time" +) + +// StoresDeleteOutput represents the stores delete output type. +type StoresDeleteOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Access string `json:"access"` + ItemCount float64 `json:"item_count"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapStoresDeleteOutputFromJSON deserializes JSON data into a StoresDeleteOutput. +func MapStoresDeleteOutputFromJSON(data []byte) (*StoresDeleteOutput, error) { + var v StoresDeleteOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresDeleteOutputToJSON serializes a StoresDeleteOutput to JSON. +func MapStoresDeleteOutputToJSON(v *StoresDeleteOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/get.go b/v1/resources/stores/get.go new file mode 100644 index 0000000..e75d169 --- /dev/null +++ b/v1/resources/stores/get.go @@ -0,0 +1,32 @@ +package stores + +import ( + "encoding/json" + "time" +) + +// StoresGetOutput represents the stores get output type. +type StoresGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Access string `json:"access"` + ItemCount float64 `json:"item_count"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapStoresGetOutputFromJSON deserializes JSON data into a StoresGetOutput. +func MapStoresGetOutputFromJSON(data []byte) (*StoresGetOutput, error) { + var v StoresGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresGetOutputToJSON serializes a StoresGetOutput to JSON. +func MapStoresGetOutputToJSON(v *StoresGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/items/get.go b/v1/resources/stores/items/get.go new file mode 100644 index 0000000..e7bae0f --- /dev/null +++ b/v1/resources/stores/items/get.go @@ -0,0 +1,196 @@ +package items + +import ( + "encoding/json" + "time" +) + +// StoresItemsGetOutputFileCreatedByOrganizationActorTeams - The teams the actor belongs to +type StoresItemsGetOutputFileCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputFileCreatedByOrganizationActor represents the stores items get output file created by organization actor type. +type StoresItemsGetOutputFileCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresItemsGetOutputFileCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputFileCreatedByConsumer represents the stores items get output file created by consumer type. +type StoresItemsGetOutputFileCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputFileCreatedBy represents the stores items get output file created by type. +type StoresItemsGetOutputFileCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresItemsGetOutputFileCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresItemsGetOutputFileCreatedByConsumer `json:"consumer,omitempty"` +} + +// StoresItemsGetOutputFile represents the stores items get output file type. +type StoresItemsGetOutputFile struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The files's unique identifier + Id string `json:"id"` + // Status - The files's status + Status string `json:"status"` + // FileName - The file's name + FileName string `json:"file_name"` + // FileSize - The file's size in bytes + FileSize float64 `json:"file_size"` + // FileType - The file's MIME type + FileType string `json:"file_type"` + // Title - The file's title + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *StoresItemsGetOutputFileCreatedBy `json:"created_by,omitempty"` + // CreatedAt - The files's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The files's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputDocumentCreatedByOrganizationActorTeams - The teams the actor belongs to +type StoresItemsGetOutputDocumentCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputDocumentCreatedByOrganizationActor represents the stores items get output document created by organization actor type. +type StoresItemsGetOutputDocumentCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresItemsGetOutputDocumentCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputDocumentCreatedByConsumer represents the stores items get output document created by consumer type. +type StoresItemsGetOutputDocumentCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutputDocumentCreatedBy represents the stores items get output document created by type. +type StoresItemsGetOutputDocumentCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresItemsGetOutputDocumentCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresItemsGetOutputDocumentCreatedByConsumer `json:"consumer,omitempty"` +} + +// StoresItemsGetOutputDocument represents the stores items get output document type. +type StoresItemsGetOutputDocument struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *StoresItemsGetOutputDocumentCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsGetOutput represents the stores items get output type. +type StoresItemsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Kind string `json:"kind"` + Path string `json:"path"` + StoreId string `json:"store_id"` + DirectoryId *string `json:"directory_id,omitempty"` + File *StoresItemsGetOutputFile `json:"file,omitempty"` + Document *StoresItemsGetOutputDocument `json:"document,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapStoresItemsGetOutputFromJSON deserializes JSON data into a StoresItemsGetOutput. +func MapStoresItemsGetOutputFromJSON(data []byte) (*StoresItemsGetOutput, error) { + var v StoresItemsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresItemsGetOutputToJSON serializes a StoresItemsGetOutput to JSON. +func MapStoresItemsGetOutputToJSON(v *StoresItemsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/items/list.go b/v1/resources/stores/items/list.go new file mode 100644 index 0000000..8114f66 --- /dev/null +++ b/v1/resources/stores/items/list.go @@ -0,0 +1,259 @@ +package items + +import ( + "encoding/json" + "time" +) + +// StoresItemsListOutputItemsFileCreatedByOrganizationActorTeams - The teams the actor belongs to +type StoresItemsListOutputItemsFileCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsFileCreatedByOrganizationActor represents the stores items list output items file created by organization actor type. +type StoresItemsListOutputItemsFileCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresItemsListOutputItemsFileCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsFileCreatedByConsumer represents the stores items list output items file created by consumer type. +type StoresItemsListOutputItemsFileCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsFileCreatedBy represents the stores items list output items file created by type. +type StoresItemsListOutputItemsFileCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresItemsListOutputItemsFileCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresItemsListOutputItemsFileCreatedByConsumer `json:"consumer,omitempty"` +} + +// StoresItemsListOutputItemsFile represents the stores items list output items file type. +type StoresItemsListOutputItemsFile struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The files's unique identifier + Id string `json:"id"` + // Status - The files's status + Status string `json:"status"` + // FileName - The file's name + FileName string `json:"file_name"` + // FileSize - The file's size in bytes + FileSize float64 `json:"file_size"` + // FileType - The file's MIME type + FileType string `json:"file_type"` + // Title - The file's title + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *StoresItemsListOutputItemsFileCreatedBy `json:"created_by,omitempty"` + // CreatedAt - The files's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The files's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsDocumentCreatedByOrganizationActorTeams - The teams the actor belongs to +type StoresItemsListOutputItemsDocumentCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsDocumentCreatedByOrganizationActor represents the stores items list output items document created by organization actor type. +type StoresItemsListOutputItemsDocumentCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresItemsListOutputItemsDocumentCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsDocumentCreatedByConsumer represents the stores items list output items document created by consumer type. +type StoresItemsListOutputItemsDocumentCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItemsDocumentCreatedBy represents the stores items list output items document created by type. +type StoresItemsListOutputItemsDocumentCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresItemsListOutputItemsDocumentCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresItemsListOutputItemsDocumentCreatedByConsumer `json:"consumer,omitempty"` +} + +// StoresItemsListOutputItemsDocument represents the stores items list output items document type. +type StoresItemsListOutputItemsDocument struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *StoresItemsListOutputItemsDocumentCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputItems represents the stores items list output items type. +type StoresItemsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Kind string `json:"kind"` + Path string `json:"path"` + StoreId string `json:"store_id"` + DirectoryId *string `json:"directory_id,omitempty"` + File *StoresItemsListOutputItemsFile `json:"file,omitempty"` + Document *StoresItemsListOutputItemsDocument `json:"document,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsListOutputPagination represents the stores items list output pagination type. +type StoresItemsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// StoresItemsListOutput represents the stores items list output type. +type StoresItemsListOutput struct { + Items []StoresItemsListOutputItems `json:"items"` + Pagination StoresItemsListOutputPagination `json:"pagination"` +} + +// MapStoresItemsListOutputFromJSON deserializes JSON data into a StoresItemsListOutput. +func MapStoresItemsListOutputFromJSON(data []byte) (*StoresItemsListOutput, error) { + var v StoresItemsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresItemsListOutputToJSON serializes a StoresItemsListOutput to JSON. +func MapStoresItemsListOutputToJSON(v *StoresItemsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// StoresItemsListQueryCreatedAt - Filter Filter by creation time by date range +type StoresItemsListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for Filter by creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// StoresItemsListQueryUpdatedAt - Filter Filter by update time by date range +type StoresItemsListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for Filter by update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by update time + Lt *time.Time `json:"lt,omitempty"` +} + +// StoresItemsListQuery represents the stores items list query type. +type StoresItemsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by store item ID + Id *any `json:"id,omitempty"` + // FileId - Filter by file ID + FileId *any `json:"file_id,omitempty"` + // DocumentId - Filter by document ID + DocumentId *any `json:"document_id,omitempty"` + // Type - Filter by store item type. Repeat `type` to include multiple values. Defaults to `file` and `document`. + Type *any `json:"type,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *StoresItemsListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *StoresItemsListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapStoresItemsListQueryFromJSON deserializes JSON data into a StoresItemsListQuery. +func MapStoresItemsListQueryFromJSON(data []byte) (*StoresItemsListQuery, error) { + var v StoresItemsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresItemsListQueryToJSON serializes a StoresItemsListQuery to JSON. +func MapStoresItemsListQueryToJSON(v *StoresItemsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/items/modify.go b/v1/resources/stores/items/modify.go new file mode 100644 index 0000000..d5ba4f2 --- /dev/null +++ b/v1/resources/stores/items/modify.go @@ -0,0 +1,231 @@ +package items + +import ( + "encoding/json" + "time" +) + +// StoresItemsModifyOutputItemsFileCreatedByOrganizationActorTeams - The teams the actor belongs to +type StoresItemsModifyOutputItemsFileCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsFileCreatedByOrganizationActor represents the stores items modify output items file created by organization actor type. +type StoresItemsModifyOutputItemsFileCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresItemsModifyOutputItemsFileCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsFileCreatedByConsumer represents the stores items modify output items file created by consumer type. +type StoresItemsModifyOutputItemsFileCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsFileCreatedBy represents the stores items modify output items file created by type. +type StoresItemsModifyOutputItemsFileCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresItemsModifyOutputItemsFileCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresItemsModifyOutputItemsFileCreatedByConsumer `json:"consumer,omitempty"` +} + +// StoresItemsModifyOutputItemsFile represents the stores items modify output items file type. +type StoresItemsModifyOutputItemsFile struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The files's unique identifier + Id string `json:"id"` + // Status - The files's status + Status string `json:"status"` + // FileName - The file's name + FileName string `json:"file_name"` + // FileSize - The file's size in bytes + FileSize float64 `json:"file_size"` + // FileType - The file's MIME type + FileType string `json:"file_type"` + // Title - The file's title + Title string `json:"title"` + // Purpose - The file's purpose identifier + Purpose string `json:"purpose"` + CreatedBy *StoresItemsModifyOutputItemsFileCreatedBy `json:"created_by,omitempty"` + // CreatedAt - The files's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The files's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsDocumentCreatedByOrganizationActorTeams - The teams the actor belongs to +type StoresItemsModifyOutputItemsDocumentCreatedByOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsDocumentCreatedByOrganizationActor represents the stores items modify output items document created by organization actor type. +type StoresItemsModifyOutputItemsDocumentCreatedByOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresItemsModifyOutputItemsDocumentCreatedByOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsDocumentCreatedByConsumer represents the stores items modify output items document created by consumer type. +type StoresItemsModifyOutputItemsDocumentCreatedByConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItemsDocumentCreatedBy represents the stores items modify output items document created by type. +type StoresItemsModifyOutputItemsDocumentCreatedBy struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresItemsModifyOutputItemsDocumentCreatedByOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresItemsModifyOutputItemsDocumentCreatedByConsumer `json:"consumer,omitempty"` +} + +// StoresItemsModifyOutputItemsDocument represents the stores items modify output items document type. +type StoresItemsModifyOutputItemsDocument struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Status string `json:"status"` + Title string `json:"title"` + Content string `json:"content"` + FileId string `json:"file_id"` + ParentDocumentId *string `json:"parent_document_id,omitempty"` + CurrentVersionId *string `json:"current_version_id,omitempty"` + CreatedBy *StoresItemsModifyOutputItemsDocumentCreatedBy `json:"created_by,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutputItems represents the stores items modify output items type. +type StoresItemsModifyOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Kind string `json:"kind"` + Path string `json:"path"` + StoreId string `json:"store_id"` + DirectoryId *string `json:"directory_id,omitempty"` + File *StoresItemsModifyOutputItemsFile `json:"file,omitempty"` + Document *StoresItemsModifyOutputItemsDocument `json:"document,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresItemsModifyOutput represents the stores items modify output type. +type StoresItemsModifyOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Items []StoresItemsModifyOutputItems `json:"items"` +} + +// MapStoresItemsModifyOutputFromJSON deserializes JSON data into a StoresItemsModifyOutput. +func MapStoresItemsModifyOutputFromJSON(data []byte) (*StoresItemsModifyOutput, error) { + var v StoresItemsModifyOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresItemsModifyOutputToJSON serializes a StoresItemsModifyOutput to JSON. +func MapStoresItemsModifyOutputToJSON(v *StoresItemsModifyOutput) ([]byte, error) { + return json.Marshal(v) +} + +// StoresItemsModifyBodyOperations represents the stores items modify body operations type. +type StoresItemsModifyBodyOperations struct { + Type *string `json:"type,omitempty"` + ItemId *string `json:"itemId,omitempty"` + FileId *string `json:"fileId,omitempty"` + DocumentId *string `json:"documentId,omitempty"` + Path *string `json:"path,omitempty"` +} + +// StoresItemsModifyBody represents the stores items modify body type. +type StoresItemsModifyBody struct { + Operations []StoresItemsModifyBodyOperations `json:"operations"` +} + +// MapStoresItemsModifyBodyFromJSON deserializes JSON data into a StoresItemsModifyBody. +func MapStoresItemsModifyBodyFromJSON(data []byte) (*StoresItemsModifyBody, error) { + var v StoresItemsModifyBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresItemsModifyBodyToJSON serializes a StoresItemsModifyBody to JSON. +func MapStoresItemsModifyBodyToJSON(v *StoresItemsModifyBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/list.go b/v1/resources/stores/list.go new file mode 100644 index 0000000..08675f3 --- /dev/null +++ b/v1/resources/stores/list.go @@ -0,0 +1,89 @@ +package stores + +import ( + "encoding/json" + "time" +) + +// StoresListOutputItems represents the stores list output items type. +type StoresListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Access string `json:"access"` + ItemCount float64 `json:"item_count"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresListOutputPagination represents the stores list output pagination type. +type StoresListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// StoresListOutput represents the stores list output type. +type StoresListOutput struct { + Items []StoresListOutputItems `json:"items"` + Pagination StoresListOutputPagination `json:"pagination"` +} + +// MapStoresListOutputFromJSON deserializes JSON data into a StoresListOutput. +func MapStoresListOutputFromJSON(data []byte) (*StoresListOutput, error) { + var v StoresListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresListOutputToJSON serializes a StoresListOutput to JSON. +func MapStoresListOutputToJSON(v *StoresListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// StoresListQueryCreatedAt - Filter Filter by creation time by date range +type StoresListQueryCreatedAt struct { + // Gt - Only include records after this timestamp for Filter by creation time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by creation time + Lt *time.Time `json:"lt,omitempty"` +} + +// StoresListQueryUpdatedAt - Filter Filter by update time by date range +type StoresListQueryUpdatedAt struct { + // Gt - Only include records after this timestamp for Filter by update time + Gt *time.Time `json:"gt,omitempty"` + // Lt - Only include records before this timestamp for Filter by update time + Lt *time.Time `json:"lt,omitempty"` +} + +// StoresListQuery represents the stores list query type. +type StoresListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` + // Id - Filter by store ID + Id *any `json:"id,omitempty"` + // CreatedAt - Filter Filter by creation time by date range + CreatedAt *StoresListQueryCreatedAt `json:"created_at,omitempty"` + // UpdatedAt - Filter Filter by update time by date range + UpdatedAt *StoresListQueryUpdatedAt `json:"updated_at,omitempty"` +} + +// MapStoresListQueryFromJSON deserializes JSON data into a StoresListQuery. +func MapStoresListQueryFromJSON(data []byte) (*StoresListQuery, error) { + var v StoresListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresListQueryToJSON serializes a StoresListQuery to JSON. +func MapStoresListQueryToJSON(v *StoresListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/participants/get.go b/v1/resources/stores/participants/get.go new file mode 100644 index 0000000..4b1200d --- /dev/null +++ b/v1/resources/stores/participants/get.go @@ -0,0 +1,91 @@ +package participants + +import ( + "encoding/json" + "time" +) + +// StoresParticipantsGetOutputActorOrganizationActorTeams - The teams the actor belongs to +type StoresParticipantsGetOutputActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresParticipantsGetOutputActorOrganizationActor represents the stores participants get output actor organization actor type. +type StoresParticipantsGetOutputActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresParticipantsGetOutputActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresParticipantsGetOutputActorConsumer represents the stores participants get output actor consumer type. +type StoresParticipantsGetOutputActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresParticipantsGetOutputActor represents the stores participants get output actor type. +type StoresParticipantsGetOutputActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresParticipantsGetOutputActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresParticipantsGetOutputActorConsumer `json:"consumer,omitempty"` +} + +// StoresParticipantsGetOutput represents the stores participants get output type. +type StoresParticipantsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + StoreId string `json:"store_id"` + Permissions []string `json:"permissions"` + Actor StoresParticipantsGetOutputActor `json:"actor"` + CreatedAt time.Time `json:"created_at"` +} + +// MapStoresParticipantsGetOutputFromJSON deserializes JSON data into a StoresParticipantsGetOutput. +func MapStoresParticipantsGetOutputFromJSON(data []byte) (*StoresParticipantsGetOutput, error) { + var v StoresParticipantsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresParticipantsGetOutputToJSON serializes a StoresParticipantsGetOutput to JSON. +func MapStoresParticipantsGetOutputToJSON(v *StoresParticipantsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/participants/list.go b/v1/resources/stores/participants/list.go new file mode 100644 index 0000000..d81e9b8 --- /dev/null +++ b/v1/resources/stores/participants/list.go @@ -0,0 +1,126 @@ +package participants + +import ( + "encoding/json" + "time" +) + +// StoresParticipantsListOutputItemsActorOrganizationActorTeams - The teams the actor belongs to +type StoresParticipantsListOutputItemsActorOrganizationActorTeams struct { + // Id - The team ID + Id string `json:"id"` + // Name - The team name + Name string `json:"name"` + // Slug - The team slug + Slug string `json:"slug"` + // AssignmentId - The team assignment ID + AssignmentId string `json:"assignment_id"` + // CreatedAt - The team assignment creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The team assignment last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresParticipantsListOutputItemsActorOrganizationActor represents the stores participants list output items actor organization actor type. +type StoresParticipantsListOutputItemsActorOrganizationActor struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - The organization member's unique identifier + Id string `json:"id"` + // Type - The organization member's type + Type string `json:"type"` + // OrganizationId - The organization member's organization ID + OrganizationId string `json:"organization_id"` + // Name - The organization member's name + Name string `json:"name"` + // Email - The organization member's email + Email *string `json:"email,omitempty"` + // ImageUrl - The organization member's image URL + ImageUrl string `json:"image_url"` + Teams []StoresParticipantsListOutputItemsActorOrganizationActorTeams `json:"teams"` + // CreatedAt - The organization member's creation date + CreatedAt time.Time `json:"created_at"` + // UpdatedAt - The organization member's last update date + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresParticipantsListOutputItemsActorConsumer represents the stores participants list output items actor consumer type. +type StoresParticipantsListOutputItemsActorConsumer struct { + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + ImageUrl string `json:"image_url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// StoresParticipantsListOutputItemsActor represents the stores participants list output items actor type. +type StoresParticipantsListOutputItemsActor struct { + Type string `json:"type"` + Name string `json:"name"` + ImageUrl *string `json:"image_url,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationActor *StoresParticipantsListOutputItemsActorOrganizationActor `json:"organization_actor,omitempty"` + Consumer *StoresParticipantsListOutputItemsActorConsumer `json:"consumer,omitempty"` +} + +// StoresParticipantsListOutputItems represents the stores participants list output items type. +type StoresParticipantsListOutputItems struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + StoreId string `json:"store_id"` + Permissions []string `json:"permissions"` + Actor StoresParticipantsListOutputItemsActor `json:"actor"` + CreatedAt time.Time `json:"created_at"` +} + +// StoresParticipantsListOutputPagination represents the stores participants list output pagination type. +type StoresParticipantsListOutputPagination struct { + HasMoreBefore bool `json:"has_more_before"` + HasMoreAfter bool `json:"has_more_after"` +} + +// StoresParticipantsListOutput represents the stores participants list output type. +type StoresParticipantsListOutput struct { + Items []StoresParticipantsListOutputItems `json:"items"` + Pagination StoresParticipantsListOutputPagination `json:"pagination"` +} + +// MapStoresParticipantsListOutputFromJSON deserializes JSON data into a StoresParticipantsListOutput. +func MapStoresParticipantsListOutputFromJSON(data []byte) (*StoresParticipantsListOutput, error) { + var v StoresParticipantsListOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresParticipantsListOutputToJSON serializes a StoresParticipantsListOutput to JSON. +func MapStoresParticipantsListOutputToJSON(v *StoresParticipantsListOutput) ([]byte, error) { + return json.Marshal(v) +} + +// StoresParticipantsListQuery represents the stores participants list query type. +type StoresParticipantsListQuery struct { + Limit *float64 `json:"limit,omitempty"` + After *string `json:"after,omitempty"` + Before *string `json:"before,omitempty"` + Cursor *string `json:"cursor,omitempty"` + Order *string `json:"order,omitempty"` +} + +// MapStoresParticipantsListQueryFromJSON deserializes JSON data into a StoresParticipantsListQuery. +func MapStoresParticipantsListQueryFromJSON(data []byte) (*StoresParticipantsListQuery, error) { + var v StoresParticipantsListQuery + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresParticipantsListQueryToJSON serializes a StoresParticipantsListQuery to JSON. +func MapStoresParticipantsListQueryToJSON(v *StoresParticipantsListQuery) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/permissions/get.go b/v1/resources/stores/permissions/get.go new file mode 100644 index 0000000..5956107 --- /dev/null +++ b/v1/resources/stores/permissions/get.go @@ -0,0 +1,31 @@ +package permissions + +import ( + "encoding/json" +) + +// StoresPermissionsGetOutput represents the stores permissions get output type. +type StoresPermissionsGetOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + StoreId string `json:"store_id"` + HasFullAccess bool `json:"has_full_access"` + Permissions []string `json:"permissions"` + RelevantStoreIds []string `json:"relevant_store_ids"` + ReadableStoreIds []string `json:"readable_store_ids"` + WritableStoreIds []string `json:"writable_store_ids"` +} + +// MapStoresPermissionsGetOutputFromJSON deserializes JSON data into a StoresPermissionsGetOutput. +func MapStoresPermissionsGetOutputFromJSON(data []byte) (*StoresPermissionsGetOutput, error) { + var v StoresPermissionsGetOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresPermissionsGetOutputToJSON serializes a StoresPermissionsGetOutput to JSON. +func MapStoresPermissionsGetOutputToJSON(v *StoresPermissionsGetOutput) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/stores/update.go b/v1/resources/stores/update.go new file mode 100644 index 0000000..11e47f3 --- /dev/null +++ b/v1/resources/stores/update.go @@ -0,0 +1,52 @@ +package stores + +import ( + "encoding/json" + "time" +) + +// StoresUpdateOutput represents the stores update output type. +type StoresUpdateOutput struct { + // Object - String representing the object's type + Object string `json:"object"` + Id string `json:"id"` + Name string `json:"name"` + Access string `json:"access"` + ItemCount float64 `json:"item_count"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +// MapStoresUpdateOutputFromJSON deserializes JSON data into a StoresUpdateOutput. +func MapStoresUpdateOutputFromJSON(data []byte) (*StoresUpdateOutput, error) { + var v StoresUpdateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresUpdateOutputToJSON serializes a StoresUpdateOutput to JSON. +func MapStoresUpdateOutputToJSON(v *StoresUpdateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// StoresUpdateBody represents the stores update body type. +type StoresUpdateBody struct { + Name *string `json:"name,omitempty"` + Access *string `json:"access,omitempty"` +} + +// MapStoresUpdateBodyFromJSON deserializes JSON data into a StoresUpdateBody. +func MapStoresUpdateBodyFromJSON(data []byte) (*StoresUpdateBody, error) { + var v StoresUpdateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapStoresUpdateBodyToJSON serializes a StoresUpdateBody to JSON. +func MapStoresUpdateBodyToJSON(v *StoresUpdateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/testhelpers/consumeroauth/authorizations/create.go b/v1/resources/testhelpers/consumeroauth/authorizations/create.go new file mode 100644 index 0000000..dc1eb0a --- /dev/null +++ b/v1/resources/testhelpers/consumeroauth/authorizations/create.go @@ -0,0 +1,51 @@ +package authorizations + +import ( + "encoding/json" + "time" +) + +// TestHelpersConsumerOauthAuthorizationsCreateOutput represents the test helpers consumer oauth authorizations create output type. +type TestHelpersConsumerOauthAuthorizationsCreateOutput struct { + Object string `json:"object"` + Id string `json:"id"` + Url string `json:"url"` + ExpiresAt time.Time `json:"expires_at"` + CreatedAt time.Time `json:"created_at"` +} + +// MapTestHelpersConsumerOauthAuthorizationsCreateOutputFromJSON deserializes JSON data into a TestHelpersConsumerOauthAuthorizationsCreateOutput. +func MapTestHelpersConsumerOauthAuthorizationsCreateOutputFromJSON(data []byte) (*TestHelpersConsumerOauthAuthorizationsCreateOutput, error) { + var v TestHelpersConsumerOauthAuthorizationsCreateOutput + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapTestHelpersConsumerOauthAuthorizationsCreateOutputToJSON serializes a TestHelpersConsumerOauthAuthorizationsCreateOutput to JSON. +func MapTestHelpersConsumerOauthAuthorizationsCreateOutputToJSON(v *TestHelpersConsumerOauthAuthorizationsCreateOutput) ([]byte, error) { + return json.Marshal(v) +} + +// TestHelpersConsumerOauthAuthorizationsCreateBody represents the test helpers consumer oauth authorizations create body type. +type TestHelpersConsumerOauthAuthorizationsCreateBody struct { + InstanceId string `json:"instance_id"` + Url string `json:"url"` + ConsumerProfileId string `json:"consumer_profile_id"` + MagicMcpEndpointId string `json:"magic_mcp_endpoint_id"` +} + +// MapTestHelpersConsumerOauthAuthorizationsCreateBodyFromJSON deserializes JSON data into a TestHelpersConsumerOauthAuthorizationsCreateBody. +func MapTestHelpersConsumerOauthAuthorizationsCreateBodyFromJSON(data []byte) (*TestHelpersConsumerOauthAuthorizationsCreateBody, error) { + var v TestHelpersConsumerOauthAuthorizationsCreateBody + if err := json.Unmarshal(data, &v); err != nil { + return nil, err + } + return &v, nil +} + +// MapTestHelpersConsumerOauthAuthorizationsCreateBodyToJSON serializes a TestHelpersConsumerOauthAuthorizationsCreateBody to JSON. +func MapTestHelpersConsumerOauthAuthorizationsCreateBodyToJSON(v *TestHelpersConsumerOauthAuthorizationsCreateBody) ([]byte, error) { + return json.Marshal(v) +} diff --git a/v1/resources/toolcalls/create.go b/v1/resources/toolcalls/create.go index ca74f58..6a427d0 100644 --- a/v1/resources/toolcalls/create.go +++ b/v1/resources/toolcalls/create.go @@ -5,6 +5,74 @@ import ( "time" ) +// ToolCallsCreateOutputSenderParticipantData - Participant payload data +type ToolCallsCreateOutputSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// ToolCallsCreateOutputSenderParticipant represents the tool calls create output sender participant type. +type ToolCallsCreateOutputSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data ToolCallsCreateOutputSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// ToolCallsCreateOutputResponderParticipantData - Participant payload data +type ToolCallsCreateOutputResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// ToolCallsCreateOutputResponderParticipant represents the tool calls create output responder participant type. +type ToolCallsCreateOutputResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data ToolCallsCreateOutputResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // ToolCallsCreateOutputToolInputSchema represents the tool calls create output tool input schema type. type ToolCallsCreateOutputToolInputSchema struct { Type string `json:"type"` @@ -111,9 +179,11 @@ type ToolCallsCreateOutput struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool ToolCallsCreateOutputTool `json:"tool"` - Error *ToolCallsCreateOutputError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *ToolCallsCreateOutputSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *ToolCallsCreateOutputResponderParticipant `json:"responder_participant,omitempty"` + Tool ToolCallsCreateOutputTool `json:"tool"` + Error *ToolCallsCreateOutputError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call diff --git a/v1/resources/toolcalls/get.go b/v1/resources/toolcalls/get.go index bc57114..acdd11b 100644 --- a/v1/resources/toolcalls/get.go +++ b/v1/resources/toolcalls/get.go @@ -5,6 +5,74 @@ import ( "time" ) +// ToolCallsGetOutputSenderParticipantData - Participant payload data +type ToolCallsGetOutputSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// ToolCallsGetOutputSenderParticipant represents the tool calls get output sender participant type. +type ToolCallsGetOutputSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data ToolCallsGetOutputSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// ToolCallsGetOutputResponderParticipantData - Participant payload data +type ToolCallsGetOutputResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// ToolCallsGetOutputResponderParticipant represents the tool calls get output responder participant type. +type ToolCallsGetOutputResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data ToolCallsGetOutputResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // ToolCallsGetOutputToolInputSchema represents the tool calls get output tool input schema type. type ToolCallsGetOutputToolInputSchema struct { Type string `json:"type"` @@ -111,9 +179,11 @@ type ToolCallsGetOutput struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool ToolCallsGetOutputTool `json:"tool"` - Error *ToolCallsGetOutputError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *ToolCallsGetOutputSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *ToolCallsGetOutputResponderParticipant `json:"responder_participant,omitempty"` + Tool ToolCallsGetOutputTool `json:"tool"` + Error *ToolCallsGetOutputError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call diff --git a/v1/resources/toolcalls/list.go b/v1/resources/toolcalls/list.go index 0e10e79..5b1775e 100644 --- a/v1/resources/toolcalls/list.go +++ b/v1/resources/toolcalls/list.go @@ -5,6 +5,74 @@ import ( "time" ) +// ToolCallsListOutputItemsSenderParticipantData - Participant payload data +type ToolCallsListOutputItemsSenderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// ToolCallsListOutputItemsSenderParticipant represents the tool calls list output items sender participant type. +type ToolCallsListOutputItemsSenderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data ToolCallsListOutputItemsSenderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + +// ToolCallsListOutputItemsResponderParticipantData - Participant payload data +type ToolCallsListOutputItemsResponderParticipantData struct { + // Identifier - Participant-specific identifier within the payload + Identifier string `json:"identifier"` + // Name - Participant-specific display name within the payload + Name string `json:"name"` +} + +// ToolCallsListOutputItemsResponderParticipant represents the tool calls list output items responder participant type. +type ToolCallsListOutputItemsResponderParticipant struct { + // Object - String representing the object's type + Object string `json:"object"` + // Id - Unique session participant identifier + Id string `json:"id"` + // Type - Participant type + Type string `json:"type"` + // Identifier - Participant identifier + Identifier string `json:"identifier"` + // Name - Display name + Name string `json:"name"` + // Data - Participant payload data + Data ToolCallsListOutputItemsResponderParticipantData `json:"data"` + // ProviderId - Provider ID if associated + ProviderId *string `json:"provider_id,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + AgentInstanceId *string `json:"agent_instance_id,omitempty"` + IdentityActorId *string `json:"identity_actor_id,omitempty"` + AgentClientId *string `json:"agent_client_id,omitempty"` + ConsumerId *string `json:"consumer_id,omitempty"` + // CreatedAt - Timestamp when created + CreatedAt time.Time `json:"created_at"` +} + // ToolCallsListOutputItemsToolInputSchema represents the tool calls list output items tool input schema type. type ToolCallsListOutputItemsToolInputSchema struct { Type string `json:"type"` @@ -111,9 +179,11 @@ type ToolCallsListOutputItems struct { // ConnectionId - Session connection ID ConnectionId *string `json:"connection_id,omitempty"` // ProviderRunId - Provider run ID - ProviderRunId *string `json:"provider_run_id,omitempty"` - Tool ToolCallsListOutputItemsTool `json:"tool"` - Error *ToolCallsListOutputItemsError `json:"error,omitempty"` + ProviderRunId *string `json:"provider_run_id,omitempty"` + SenderParticipant *ToolCallsListOutputItemsSenderParticipant `json:"sender_participant,omitempty"` + ResponderParticipant *ToolCallsListOutputItemsResponderParticipant `json:"responder_participant,omitempty"` + Tool ToolCallsListOutputItemsTool `json:"tool"` + Error *ToolCallsListOutputItemsError `json:"error,omitempty"` // Input - Input data passed to the tool call Input *map[string]any `json:"input,omitempty"` // Output - Output data returned from the tool call @@ -183,6 +253,16 @@ type ToolCallsListQuery struct { ProviderConfigId *any `json:"provider_config_id,omitempty"` // ProviderAuthConfigId - Filter by provider auth config ID(s) ProviderAuthConfigId *any `json:"provider_auth_config_id,omitempty"` + // AgentId - Filter by agent ID(s) + AgentId *any `json:"agent_id,omitempty"` + // ActorId - Filter by identity actor ID(s) + ActorId *any `json:"actor_id,omitempty"` + // ConsumerId - Filter by consumer ID(s) + ConsumerId *any `json:"consumer_id,omitempty"` + // IdentityId - Filter by identity ID(s) + IdentityId *any `json:"identity_id,omitempty"` + // AgentInstanceId - Filter by agent instance ID(s) + AgentInstanceId *any `json:"agent_instance_id,omitempty"` // ToolId - Filter by tool ID(s) ToolId *any `json:"tool_id,omitempty"` // CreatedAt - Filter tool call creation time by date range From ff844f59b98e536de79b91d41706dd8fff20fca8 Mon Sep 17 00:00:00 2001 From: Tobias Herber <22559657+herber@users.noreply.github.com> Date: Wed, 20 May 2026 12:36:05 +0200 Subject: [PATCH 2/2] Fix client --- v1/metorial.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v1/metorial.go b/v1/metorial.go index 7fbc0f1..9e731cf 100644 --- a/v1/metorial.go +++ b/v1/metorial.go @@ -79,7 +79,7 @@ type ManagementEndpoints struct { IdentitiesDelegationRequests *management.IdentitiesDelegationRequestsEndpoint IdentityActors *management.IdentityActorsEndpoint Files *management.FilesEndpoint - FileLinks *management.FileLinksEndpoint + FilesLinks *management.FilesLinksEndpoint Portals *management.PortalsEndpoint MagicMcpGroups *management.MagicMcpGroupsEndpoint MagicMcpServers *management.MagicMcpServersEndpoint @@ -137,7 +137,7 @@ type MetorialSdk struct { IdentitiesDelegationRequests *endpoints.IdentitiesDelegationRequestsEndpoint IdentityActors *endpoints.IdentityActorsEndpoint Files *endpoints.FilesEndpoint - FileLinks *endpoints.FileLinksEndpoint + FilesLinks *endpoints.FilesLinksEndpoint Portals *endpoints.PortalsEndpoint MagicMcpGroups *endpoints.MagicMcpGroupsEndpoint MagicMcpServers *endpoints.MagicMcpServersEndpoint @@ -211,7 +211,7 @@ func New(opts ...Option) (*MetorialSdk, error) { IdentitiesDelegationRequests: endpoints.NewIdentitiesDelegationRequestsEndpoint(c), IdentityActors: endpoints.NewIdentityActorsEndpoint(c), Files: endpoints.NewFilesEndpoint(c), - FileLinks: endpoints.NewFileLinksEndpoint(c), + FilesLinks: endpoints.NewFilesLinksEndpoint(c), Portals: endpoints.NewPortalsEndpoint(c), MagicMcpGroups: endpoints.NewMagicMcpGroupsEndpoint(c), MagicMcpServers: endpoints.NewMagicMcpServersEndpoint(c), @@ -261,7 +261,7 @@ func New(opts ...Option) (*MetorialSdk, error) { IdentitiesDelegationRequests: management.NewIdentitiesDelegationRequestsEndpoint(c), IdentityActors: management.NewIdentityActorsEndpoint(c), Files: management.NewFilesEndpoint(c), - FileLinks: management.NewFileLinksEndpoint(c), + FilesLinks: management.NewFilesLinksEndpoint(c), Portals: management.NewPortalsEndpoint(c), MagicMcpGroups: management.NewMagicMcpGroupsEndpoint(c), MagicMcpServers: management.NewMagicMcpServersEndpoint(c),