From ff4d35e1b1b15db1d8d720c65b01d016527b5719 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 20 Aug 2024 01:24:18 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.376.0 --- .speakeasy/gen.lock | 30 +++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- Gemfile.lock | 4 +- README.md | 4 + RELEASES.md | 12 +- codeSamples.yaml | 144 +++++++++--------- docs/models/operations/listeventsrequest.md | 31 ++++ docs/models/operations/listeventsresponse.md | 20 +++ docs/models/operations/order.md | 9 ++ docs/models/operations/queryparamevent.md | 13 ++ docs/models/operations/queryparaminterval.md | 17 +++ docs/models/operations/sortby.md | 9 ++ docs/models/shared/clickevents.md | 22 +++ docs/models/shared/security.md | 6 +- docs/sdks/analytics/README.md | 2 + docs/sdks/domains/README.md | 8 + docs/sdks/events/README.md | 55 +++++++ docs/sdks/links/README.md | 18 +++ docs/sdks/metatags/README.md | 2 + docs/sdks/qrcodes/README.md | 2 + docs/sdks/tags/README.md | 6 + docs/sdks/track/README.md | 6 + docs/sdks/workspaces/README.md | 4 + dub.gemspec | 2 +- lib/dub.rb | 1 + lib/open_api_sdk/dub.rb | 3 +- lib/open_api_sdk/events.rb | 99 ++++++++++++ lib/open_api_sdk/models/operations.rb | 6 + .../models/operations/listevents_request.rb | 93 +++++++++++ .../models/operations/listevents_response.rb | 60 ++++++++ lib/open_api_sdk/models/operations/order.rb | 19 +++ .../models/operations/queryparam_event.rb | 21 +++ .../models/operations/queryparam_interval.rb | 25 +++ lib/open_api_sdk/models/operations/sortby.rb | 19 +++ lib/open_api_sdk/models/shared.rb | 1 + lib/open_api_sdk/models/shared/clickevents.rb | 66 ++++++++ lib/open_api_sdk/models/shared/security.rb | 4 +- lib/open_api_sdk/sdkconfiguration.rb | 6 +- 39 files changed, 767 insertions(+), 96 deletions(-) create mode 100644 docs/models/operations/listeventsrequest.md create mode 100644 docs/models/operations/listeventsresponse.md create mode 100644 docs/models/operations/order.md create mode 100644 docs/models/operations/queryparamevent.md create mode 100644 docs/models/operations/queryparaminterval.md create mode 100644 docs/models/operations/sortby.md create mode 100644 docs/models/shared/clickevents.md create mode 100644 docs/sdks/events/README.md create mode 100644 lib/open_api_sdk/events.rb create mode 100644 lib/open_api_sdk/models/operations/listevents_request.rb create mode 100644 lib/open_api_sdk/models/operations/listevents_response.rb create mode 100644 lib/open_api_sdk/models/operations/order.rb create mode 100644 lib/open_api_sdk/models/operations/queryparam_event.rb create mode 100644 lib/open_api_sdk/models/operations/queryparam_interval.rb create mode 100644 lib/open_api_sdk/models/operations/sortby.rb create mode 100644 lib/open_api_sdk/models/shared/clickevents.rb diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7f8b4cc..0250b94 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,22 +1,22 @@ lockVersion: 2.0.0 id: 5a2dd83e-da98-455b-8ef9-0100a914efdf management: - docChecksum: e0d1746d131c608a54c04b32762b2faa + docChecksum: f10061c7787170c0db643f22823c9aa9 docVersion: 0.0.1 - speakeasyVersion: 1.348.1 - generationVersion: 2.380.1 - releaseVersion: 0.2.2-alpha.5 - configChecksum: dd240c2a591fd37e3d0812366f9e931a + speakeasyVersion: 1.376.0 + generationVersion: 2.402.5 + releaseVersion: 0.2.2-alpha.6 + configChecksum: afc7bf2c2dd1ba112cfa587f00dcf0df repoURL: https://github.com/dubinc/dub-ruby.git installationURL: https://github.com/dubinc/dub-ruby published: true features: ruby: - core: 3.2.18 + core: 3.2.19 deprecations: 2.81.1 examples: 2.81.3 flattening: 2.81.1 - globalSecurity: 2.81.6 + globalSecurity: 2.81.7 globalServerURLs: 2.82.3 nameOverrides: 2.81.2 generatedFiles: @@ -24,6 +24,7 @@ generatedFiles: - lib/open_api_sdk/links.rb - lib/open_api_sdk/qr_codes.rb - lib/open_api_sdk/analytics.rb + - lib/open_api_sdk/events.rb - lib/open_api_sdk/workspaces.rb - lib/open_api_sdk/tags.rb - lib/open_api_sdk/domains.rb @@ -108,6 +109,12 @@ generatedFiles: - lib/open_api_sdk/models/operations/interval.rb - lib/open_api_sdk/models/operations/retrieveanalytics_request.rb - lib/open_api_sdk/models/operations/retrieveanalytics_response.rb + - lib/open_api_sdk/models/operations/queryparam_event.rb + - lib/open_api_sdk/models/operations/queryparam_interval.rb + - lib/open_api_sdk/models/operations/order.rb + - lib/open_api_sdk/models/operations/sortby.rb + - lib/open_api_sdk/models/operations/listevents_request.rb + - lib/open_api_sdk/models/operations/listevents_response.rb - lib/open_api_sdk/models/operations/getworkspace_request.rb - lib/open_api_sdk/models/operations/getworkspace_response.rb - lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb @@ -178,6 +185,7 @@ generatedFiles: - lib/open_api_sdk/models/shared/linkgeotargeting.rb - lib/open_api_sdk/models/shared/countrycode.rb - lib/open_api_sdk/models/shared/continentcode.rb + - lib/open_api_sdk/models/shared/clickevents.rb - lib/open_api_sdk/models/shared/plan.rb - lib/open_api_sdk/models/shared/role.rb - lib/open_api_sdk/models/shared/users.rb @@ -218,6 +226,12 @@ generatedFiles: - docs/models/operations/interval.md - docs/models/operations/retrieveanalyticsrequest.md - docs/models/operations/retrieveanalyticsresponse.md + - docs/models/operations/queryparamevent.md + - docs/models/operations/queryparaminterval.md + - docs/models/operations/order.md + - docs/models/operations/sortby.md + - docs/models/operations/listeventsrequest.md + - docs/models/operations/listeventsresponse.md - docs/models/operations/getworkspacerequest.md - docs/models/operations/getworkspaceresponse.md - docs/models/operations/updateworkspacerequestbody.md @@ -288,6 +302,7 @@ generatedFiles: - docs/models/shared/linkgeotargeting.md - docs/models/shared/countrycode.md - docs/models/shared/continentcode.md + - docs/models/shared/clickevents.md - docs/models/shared/plan.md - docs/models/shared/role.md - docs/models/shared/users.md @@ -299,6 +314,7 @@ generatedFiles: - docs/sdks/links/README.md - docs/sdks/qrcodes/README.md - docs/sdks/analytics/README.md + - docs/sdks/events/README.md - docs/sdks/workspaces/README.md - docs/sdks/tags/README.md - docs/sdks/domains/README.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1caa638..2818263 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true ruby: - version: 0.2.2-alpha.5 + version: 0.2.2-alpha.6 author: Dub description: Ruby Client SDK Generated by Speakeasy imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0509950..3f38be7 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.348.1 +speakeasyVersion: 1.376.0 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:ddd3ac98569c6644bee5ea0b6473fccb12d8a8447c982d98dd45a8af717f4d63 - sourceBlobDigest: sha256:203c83eff865e105fd4704a69ebdf35335ca6dcf319c8e060ce038a26c07e892 + sourceRevisionDigest: sha256:c79d71a71c15ad25e8356f6c112a100bda4eedf3c27bcedc65dcb019056b09d9 + sourceBlobDigest: sha256:95a8dafd6f02195984538c42d60d9df2182a04eb50f3954f50aa24872b1814c2 tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:ddd3ac98569c6644bee5ea0b6473fccb12d8a8447c982d98dd45a8af717f4d63 - sourceBlobDigest: sha256:203c83eff865e105fd4704a69ebdf35335ca6dcf319c8e060ce038a26c07e892 + sourceRevisionDigest: sha256:c79d71a71c15ad25e8356f6c112a100bda4eedf3c27bcedc65dcb019056b09d9 + sourceBlobDigest: sha256:95a8dafd6f02195984538c42d60d9df2182a04eb50f3954f50aa24872b1814c2 codeSamplesNamespace: code-samples-ruby-my-first-target - codeSamplesRevisionDigest: sha256:333089a95db29380184a647ae5bb48d0e41cd83da0f9732781bebb74929e0893 + codeSamplesRevisionDigest: sha256:cff7f8729dcb1d2723c05b524090118935b7d68daa1c95879c56235bc53329ed outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/Gemfile.lock b/Gemfile.lock index 1c8768e..d634524 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dub (0.2.2.pre.alpha.5) + dub (0.2.2.pre.alpha.6) faraday faraday-multipart rack @@ -13,7 +13,7 @@ GEM specs: ast (2.4.2) erubi (1.12.0) - faraday (2.10.0) + faraday (2.10.1) faraday-net_http (>= 2.0, < 3.2) logger faraday-multipart (1.0.4) diff --git a/README.md b/README.md index b71d1be..e8cab9c 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,10 @@ end * [retrieve](docs/sdks/analytics/README.md#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace. +### [Events](docs/sdks/events/README.md) + +* [list](docs/sdks/events/README.md#list) - Retrieve a list of events + ### [Workspaces](docs/sdks/workspaces/README.md) * [get](docs/sdks/workspaces/README.md#get) - Retrieve a workspace diff --git a/RELEASES.md b/RELEASES.md index c520804..d700660 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -198,4 +198,14 @@ Based on: ### Generated - [ruby v0.2.2-alpha.5] . ### Releases -- [Ruby Gems v0.2.2-alpha.5] https://rubygems.org/gems/dub/versions/0.2.2-alpha.5 - . \ No newline at end of file +- [Ruby Gems v0.2.2-alpha.5] https://rubygems.org/gems/dub/versions/0.2.2-alpha.5 - . + +## 2024-08-20 01:22:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.376.0 (2.402.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [ruby v0.2.2-alpha.6] . +### Releases +- [Ruby Gems v0.2.2-alpha.6] https://rubygems.org/gems/dub/versions/0.2.2-alpha.6 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 9bbb972..07a4dee 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,147 +3,153 @@ info: title: CodeSamples overlay for ruby target version: 0.0.0 actions: - - target: $["paths"]["/links/info"]["get"] - update: - "x-codeSamples": - - "lang": "ruby" - "label": "getLinkInfo" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinkInfoRequest.new(\n link_id: \"clux0rgak00011...\",\n external_id: \"ext_123456\",\n)\n \nres = s.links.get(req)\n\nif ! res.link_schema.nil?\n # handle response\nend" - - target: $["paths"]["/links/{linkId}"]["delete"] - update: - "x-codeSamples": - - "lang": "ruby" - "label": "deleteLink" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.delete(link_id=\"\")\n\nif ! res.object.nil?\n # handle response\nend" - - target: $["paths"]["/links/bulk"]["post"] + - target: $["paths"]["/links/upsert"]["put"] update: "x-codeSamples": - "lang": "ruby" - "label": "bulkCreateLinks" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = [\n ::OpenApiSDK::Operations::RequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n ],\n ),\n]\n \nres = s.links.create_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend" - - target: $["paths"]["/links/bulk"]["patch"] + "label": "upsertLink" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n],\n)\n \nres = s.links.upsert(req)\n\nif ! res.link_schema.nil?\n # handle response\nend" + - target: $["paths"]["/links"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "bulkUpdateLinks" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::BulkUpdateLinksRequestBody.new(\n link_ids: [\n \"\",\n ],\n data: ::OpenApiSDK::Operations::Data.new(\n url: \"https://google.com\",\n tag_ids: [\n \"\",\n ],\n ),\n)\n \nres = s.links.update_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend" - - target: $["paths"]["/domains"]["get"] + "label": "getLinks" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.links.list(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend" + - target: $["paths"]["/links/{linkId}"]["delete"] update: "x-codeSamples": - "lang": "ruby" - "label": "listDomains" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListDomainsRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.domains.list(req)\n\nif ! res.domain_schemas.nil?\n # handle response\nend" - - target: $["paths"]["/track/lead"]["post"] + "label": "deleteLink" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.delete(link_id=\"\")\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "ruby" - "label": "trackLead" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackLeadRequestBody.new(\n click_id: \"\",\n event_name: \"Sign up\",\n customer_id: \"\",\n)\n \nres = s.track.lead(req)\n\nif ! res.object.nil?\n # handle response\nend" - - target: $["paths"]["/links"]["post"] + "label": "updateLink" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.update(link_id=\"\", request_body=::OpenApiSDK::Operations::UpdateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n ],\n ))\n\nif ! res.link_schema.nil?\n # handle response\nend" + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "createLink" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n],\n)\n \nres = s.links.create(req)\n\nif ! res.link_schema.nil?\n # handle response\nend" - - target: $["paths"]["/links"]["get"] + "label": "getWorkspace" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(\n id_or_slug: \"\",\n)\n \nres = s.workspaces.get(req)\n\nif ! res.workspace_schema.nil?\n # handle response\nend" + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "ruby" - "label": "getLinks" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.links.list(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend" - - target: $["paths"]["/links/{linkId}"]["patch"] + "label": "createTag" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateTagRequestBody.new()\n \nres = s.tags.create(req)\n\nif ! res.tag_schema.nil?\n # handle response\nend" + - target: $["paths"]["/tags/{id}"]["patch"] update: "x-codeSamples": - "lang": "ruby" - "label": "updateLink" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.update(link_id=\"\", request_body=::OpenApiSDK::Operations::UpdateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n ],\n ))\n\nif ! res.link_schema.nil?\n # handle response\nend" - - target: $["paths"]["/analytics"]["get"] + "label": "updateTag" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateTagRequestBody.new())\n\nif ! res.tag_schema.nil?\n # handle response\nend" + - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "ruby" - "label": "retrieveAnalytics" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n)\n \nres = s.analytics.retrieve(req)\n\nif ! res.one_of.nil?\n # handle response\nend" - - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] + "label": "deleteDomain" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.delete(slug=\"acme.com\")\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "ruby" - "label": "updateWorkspace" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.workspaces.update(id_or_slug=\"\", request_body=::OpenApiSDK::Operations::UpdateWorkspaceRequestBody.new())\n\nif ! res.workspace_schema.nil?\n # handle response\nend" - - target: $["paths"]["/domains/{slug}"]["delete"] + "label": "updateDomain" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.update(slug=\"acme.com\", request_body=::OpenApiSDK::Operations::UpdateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n ))\n\nif ! res.domain_schema.nil?\n # handle response\nend" + - target: $["paths"]["/track/sale"]["post"] update: "x-codeSamples": - "lang": "ruby" - "label": "deleteDomain" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.delete(slug=\"acme.com\")\n\nif ! res.object.nil?\n # handle response\nend" - - target: $["paths"]["/links/upsert"]["put"] + "label": "trackSale" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackSaleRequestBody.new(\n customer_id: \"\",\n amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::SHOPIFY,\n event_name: \"Purchase\",\n)\n \nres = s.track.sale(req)\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/links"]["post"] update: "x-codeSamples": - "lang": "ruby" - "label": "upsertLink" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n],\n)\n \nres = s.links.upsert(req)\n\nif ! res.link_schema.nil?\n # handle response\nend" + "label": "createLink" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n],\n)\n \nres = s.links.create(req)\n\nif ! res.link_schema.nil?\n # handle response\nend" - target: $["paths"]["/links/count"]["get"] update: "x-codeSamples": - "lang": "ruby" "label": "getLinksCount" "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksCountRequest.new()\n \nres = s.links.count(req)\n\nif ! res.number.nil?\n # handle response\nend" - - target: $["paths"]["/domains"]["post"] + - target: $["paths"]["/links/bulk"]["post"] update: "x-codeSamples": - "lang": "ruby" - "label": "createDomain" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n)\n \nres = s.domains.create(req)\n\nif ! res.domain_schema.nil?\n # handle response\nend" - - target: $["paths"]["/track/sale"]["post"] + "label": "bulkCreateLinks" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = [\n ::OpenApiSDK::Operations::RequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"\",\n ],\n ),\n]\n \nres = s.links.create_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend" + - target: $["paths"]["/qr"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "trackSale" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackSaleRequestBody.new(\n customer_id: \"\",\n amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::SHOPIFY,\n event_name: \"Purchase\",\n)\n \nres = s.track.sale(req)\n\nif ! res.object.nil?\n # handle response\nend" + "label": "getQRCode" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetQRCodeRequest.new(\n url: \"https://brief-micronutrient.org\",\n)\n \nres = s.qr_codes.get(req)\n\nif ! res.res.nil?\n # handle response\nend" + - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "updateWorkspace" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.workspaces.update(id_or_slug=\"\", request_body=::OpenApiSDK::Operations::UpdateWorkspaceRequestBody.new())\n\nif ! res.workspace_schema.nil?\n # handle response\nend" - target: $["paths"]["/track/customer"]["post"] update: "x-codeSamples": - "lang": "ruby" "label": "trackCustomer" "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackCustomerRequestBody.new(\n customer_id: \"\",\n)\n \nres = s.track.customer(req)\n\nif ! res.object.nil?\n # handle response\nend" - - target: $["paths"]["/qr"]["get"] + - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "getQRCode" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetQRCodeRequest.new(\n url: \"https://brief-micronutrient.org\",\n)\n \nres = s.qr_codes.get(req)\n\nif ! res.res.nil?\n # handle response\nend" - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + "label": "getMetatags" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetMetatagsRequest.new(\n url: \"https://dub.co\",\n)\n \nres = s.metatags.get(req)\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/links/bulk"]["patch"] update: "x-codeSamples": - "lang": "ruby" - "label": "getWorkspace" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(\n id_or_slug: \"\",\n)\n \nres = s.workspaces.get(req)\n\nif ! res.workspace_schema.nil?\n # handle response\nend" - - target: $["paths"]["/tags/{id}"]["patch"] + "label": "bulkUpdateLinks" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::BulkUpdateLinksRequestBody.new(\n link_ids: [\n \"\",\n ],\n data: ::OpenApiSDK::Operations::Data.new(\n url: \"https://google.com\",\n tag_ids: [\n \"\",\n ],\n ),\n)\n \nres = s.links.update_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend" + - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "ruby" - "label": "updateTag" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateTagRequestBody.new())\n\nif ! res.tag_schema.nil?\n # handle response\nend" - - target: $["paths"]["/domains/{slug}"]["patch"] + "label": "trackLead" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackLeadRequestBody.new(\n click_id: \"\",\n event_name: \"Sign up\",\n customer_id: \"\",\n)\n \nres = s.track.lead(req)\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/links/info"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "updateDomain" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.update(slug=\"acme.com\", request_body=::OpenApiSDK::Operations::UpdateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n ))\n\nif ! res.domain_schema.nil?\n # handle response\nend" - - target: $["paths"]["/metatags"]["get"] + "label": "getLinkInfo" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinkInfoRequest.new(\n link_id: \"clux0rgak00011...\",\n external_id: \"ext_123456\",\n)\n \nres = s.links.get(req)\n\nif ! res.link_schema.nil?\n # handle response\nend" + - target: $["paths"]["/analytics"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "getMetatags" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetMetatagsRequest.new(\n url: \"https://dub.co\",\n)\n \nres = s.metatags.get(req)\n\nif ! res.object.nil?\n # handle response\nend" + "label": "retrieveAnalytics" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n)\n \nres = s.analytics.retrieve(req)\n\nif ! res.one_of.nil?\n # handle response\nend" + - target: $["paths"]["/events"]["get"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "listEvents" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListEventsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n)\n \nres = s.events.list(req)\n\nif ! res.click_events.nil?\n # handle response\nend" - target: $["paths"]["/tags"]["get"] update: "x-codeSamples": - "lang": "ruby" "label": "getTags" "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.list()\n\nif ! res.tag_schemas.nil?\n # handle response\nend" - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains"]["get"] update: "x-codeSamples": - "lang": "ruby" - "label": "createTag" - "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateTagRequestBody.new()\n \nres = s.tags.create(req)\n\nif ! res.tag_schema.nil?\n # handle response\nend" + "label": "listDomains" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListDomainsRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.domains.list(req)\n\nif ! res.domain_schemas.nil?\n # handle response\nend" + - target: $["paths"]["/domains"]["post"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "createDomain" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n)\n \nres = s.domains.create(req)\n\nif ! res.domain_schema.nil?\n # handle response\nend" diff --git a/docs/models/operations/listeventsrequest.md b/docs/models/operations/listeventsrequest.md new file mode 100644 index 0000000..d5b9dc4 --- /dev/null +++ b/docs/models/operations/listeventsrequest.md @@ -0,0 +1,31 @@ +# ListEventsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `event` | [T.nilable(::OpenApiSDK::Operations::QueryParamEvent)](../../models/operations/queryparamevent.md) | :heavy_minus_sign: | The type of event to retrieve analytics for. Defaults to 'clicks'. | | +| `domain` | *T.nilable(::String)* | :heavy_minus_sign: | The domain to filter analytics for. | | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | The short link slug. | | +| `link_id` | *T.nilable(::String)* | :heavy_minus_sign: | The unique ID of the short link on Dub. | | +| `external_id` | *T.nilable(::String)* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | | +| `interval` | [T.nilable(::OpenApiSDK::Operations::QueryParamInterval)](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | | +| `start` | *T.nilable(::String)* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | | +| `end_` | *T.nilable(::String)* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | | +| `timezone` | *T.nilable(::String)* | :heavy_minus_sign: | The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. | America/New_York | +| `continent` | [T.nilable(::OpenApiSDK::Shared::ContinentCode)](../../models/shared/continentcode.md) | :heavy_minus_sign: | The continent to retrieve analytics for. | | +| `country` | [T.nilable(::OpenApiSDK::Shared::CountryCode)](../../models/shared/countrycode.md) | :heavy_minus_sign: | The country to retrieve analytics for. | | +| `city` | *T.nilable(::String)* | :heavy_minus_sign: | The city to retrieve analytics for. | New York | +| `device` | *T.nilable(::String)* | :heavy_minus_sign: | The device to retrieve analytics for. | Desktop | +| `browser` | *T.nilable(::String)* | :heavy_minus_sign: | The browser to retrieve analytics for. | Chrome | +| `os` | *T.nilable(::String)* | :heavy_minus_sign: | The OS to retrieve analytics for. | Windows | +| `referer` | *T.nilable(::String)* | :heavy_minus_sign: | The referer to retrieve analytics for. | google.com | +| `url` | *T.nilable(::String)* | :heavy_minus_sign: | The URL to retrieve analytics for. | | +| `tag_id` | *T.nilable(::String)* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | | +| `qr` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | | +| `root` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | | +| `page` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | | +| `limit` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | | +| `order` | [T.nilable(::OpenApiSDK::Operations::Order)](../../models/operations/order.md) | :heavy_minus_sign: | N/A | | +| `sort_by` | [T.nilable(::OpenApiSDK::Operations::SortBy)](../../models/operations/sortby.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/listeventsresponse.md b/docs/models/operations/listeventsresponse.md new file mode 100644 index 0000000..0d1845e --- /dev/null +++ b/docs/models/operations/listeventsresponse.md @@ -0,0 +1,20 @@ +# ListEventsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `click_events` | T::Array<[::OpenApiSDK::Shared::ClickEvents](../../models/shared/clickevents.md)> | :heavy_minus_sign: | A list of events | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/order.md b/docs/models/operations/order.md new file mode 100644 index 0000000..73e1c92 --- /dev/null +++ b/docs/models/operations/order.md @@ -0,0 +1,9 @@ +# Order + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/operations/queryparamevent.md b/docs/models/operations/queryparamevent.md new file mode 100644 index 0000000..faa049b --- /dev/null +++ b/docs/models/operations/queryparamevent.md @@ -0,0 +1,13 @@ +# QueryParamEvent + +The type of event to retrieve analytics for. Defaults to 'clicks'. + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `CLICKS` | clicks | +| `LEADS` | leads | +| `SALES` | sales | +| `COMPOSITE` | composite | \ No newline at end of file diff --git a/docs/models/operations/queryparaminterval.md b/docs/models/operations/queryparaminterval.md new file mode 100644 index 0000000..0645e93 --- /dev/null +++ b/docs/models/operations/queryparaminterval.md @@ -0,0 +1,17 @@ +# QueryParamInterval + +The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | +| `YTD` | ytd | +| `ONEY` | 1y | +| `ALL` | all | +| `ALL_UNFILTERED` | all_unfiltered | \ No newline at end of file diff --git a/docs/models/operations/sortby.md b/docs/models/operations/sortby.md new file mode 100644 index 0000000..f617b86 --- /dev/null +++ b/docs/models/operations/sortby.md @@ -0,0 +1,9 @@ +# SortBy + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `TIMESTAMP` | timestamp | +| `AMOUNT` | amount | \ No newline at end of file diff --git a/docs/models/shared/clickevents.md b/docs/models/shared/clickevents.md new file mode 100644 index 0000000..d6484b3 --- /dev/null +++ b/docs/models/shared/clickevents.md @@ -0,0 +1,22 @@ +# ClickEvents + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `timestamp` | *::String* | :heavy_check_mark: | N/A | +| `click_id` | *::String* | :heavy_check_mark: | N/A | +| `link_id` | *::String* | :heavy_check_mark: | N/A | +| `domain` | *::String* | :heavy_check_mark: | N/A | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `url` | *::String* | :heavy_check_mark: | N/A | +| `continent` | *::String* | :heavy_check_mark: | N/A | +| `country` | *::String* | :heavy_check_mark: | N/A | +| `city` | *::String* | :heavy_check_mark: | N/A | +| `device` | *::String* | :heavy_check_mark: | N/A | +| `browser` | *::String* | :heavy_check_mark: | N/A | +| `os` | *::String* | :heavy_check_mark: | N/A | +| `referer` | *::String* | :heavy_check_mark: | N/A | +| `ip` | *::String* | :heavy_check_mark: | N/A | +| `qr` | *::Float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/security.md b/docs/models/shared/security.md index f98033d..7af73e5 100644 --- a/docs/models/shared/security.md +++ b/docs/models/shared/security.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `token` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | DUB_API_KEY | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *::String* | :heavy_check_mark: | N/A | DUB_API_KEY | \ No newline at end of file diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 5596422..dbf4a95 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -40,6 +40,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index 9ff29b7..355677e 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -39,6 +39,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -84,6 +86,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -122,6 +126,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | Example | @@ -165,6 +171,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | Example | diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md new file mode 100644 index 0000000..f4bd497 --- /dev/null +++ b/docs/sdks/events/README.md @@ -0,0 +1,55 @@ +# Events + + +### Available Operations + +* [list](#list) - Retrieve a list of events + +## list + +Retrieve a paginated list of events for the authenticated workspace. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +req = ::OpenApiSDK::Operations::ListEventsRequest.new( + timezone: "America/New_York", + city: "New York", + device: "Desktop", + browser: "Chrome", + os: "Windows", + referer: "google.com", +) + +res = s.events.list(req) + +if ! res.click_events.nil? + # handle response +end + +``` + + + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [::OpenApiSDK::Operations::ListEventsRequest](../../models/operations/listeventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[T.nilable(::OpenApiSDK::Operations::ListEventsResponse)](../../models/operations/listeventsresponse.md)** + diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 2eb316e..4ec097f 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -44,6 +44,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -90,6 +92,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -130,6 +134,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -173,6 +179,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -211,6 +219,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -255,6 +265,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -304,6 +316,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -354,6 +368,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -400,6 +416,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md index 4d4d535..a8c3f4e 100644 --- a/docs/sdks/metatags/README.md +++ b/docs/sdks/metatags/README.md @@ -35,6 +35,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md index a6dc339..9df9ac1 100644 --- a/docs/sdks/qrcodes/README.md +++ b/docs/sdks/qrcodes/README.md @@ -35,6 +35,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 45f2942..5b6ec98 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -34,6 +34,8 @@ end ``` + + ### Response **[T.nilable(::OpenApiSDK::Operations::GetTagsResponse)](../../models/operations/gettagsresponse.md)** @@ -67,6 +69,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -105,6 +109,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index db5264d..a233452 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -39,6 +39,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -84,6 +86,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -126,6 +130,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index 1e34710..77c50c2 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -36,6 +36,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -74,6 +76,8 @@ end ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/dub.gemspec b/dub.gemspec index fd3c8df..ad7a3a7 100644 --- a/dub.gemspec +++ b/dub.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'dub' - s.version = '0.2.2-alpha.5' + s.version = '0.2.2-alpha.6' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = '' diff --git a/lib/dub.rb b/lib/dub.rb index 6352d03..2baa51f 100644 --- a/lib/dub.rb +++ b/lib/dub.rb @@ -10,6 +10,7 @@ module OpenApiSDK autoload :Links, 'open_api_sdk/links' autoload :QRCodes, 'open_api_sdk/qr_codes' autoload :Analytics, 'open_api_sdk/analytics' + autoload :Events, 'open_api_sdk/events' autoload :Workspaces, 'open_api_sdk/workspaces' autoload :Tags, 'open_api_sdk/tags' autoload :Domains, 'open_api_sdk/domains' diff --git a/lib/open_api_sdk/dub.rb b/lib/open_api_sdk/dub.rb index ffb0ced..cd547e9 100644 --- a/lib/open_api_sdk/dub.rb +++ b/lib/open_api_sdk/dub.rb @@ -13,7 +13,7 @@ module OpenApiSDK class Dub extend T::Sig - attr_accessor :links, :qr_codes, :analytics, :workspaces, :tags, :domains, :track, :metatags + attr_accessor :links, :qr_codes, :analytics, :events, :workspaces, :tags, :domains, :track, :metatags sig do params(client: Faraday::Request, @@ -78,6 +78,7 @@ def init_sdks @links = Links.new(@sdk_configuration) @qr_codes = QRCodes.new(@sdk_configuration) @analytics = Analytics.new(@sdk_configuration) + @events = Events.new(@sdk_configuration) @workspaces = Workspaces.new(@sdk_configuration) @tags = Tags.new(@sdk_configuration) @domains = Domains.new(@sdk_configuration) diff --git a/lib/open_api_sdk/events.rb b/lib/open_api_sdk/events.rb new file mode 100644 index 0000000..d3bfdd3 --- /dev/null +++ b/lib/open_api_sdk/events.rb @@ -0,0 +1,99 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'sorbet-runtime' + +module OpenApiSDK + extend T::Sig + class Events + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::ListEventsRequest)).returns(::OpenApiSDK::Operations::ListEventsResponse) } + def list(request) + # list - Retrieve a list of events + # Retrieve a paginated list of events for the authenticated workspace. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/events" + headers = {} + query_params = Utils.get_query_params(::OpenApiSDK::Operations::ListEventsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.get(url) do |req| + req.headers = headers + req.params = query_params + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::ListEventsResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::ClickEvents]) + res.click_events = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + res + end + end +end diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb index b97a125..2845957 100644 --- a/lib/open_api_sdk/models/operations.rb +++ b/lib/open_api_sdk/models/operations.rb @@ -35,6 +35,12 @@ module Operations autoload :Interval, 'open_api_sdk/models/operations/interval.rb' autoload :RetrieveAnalyticsRequest, 'open_api_sdk/models/operations/retrieveanalytics_request.rb' autoload :RetrieveAnalyticsResponse, 'open_api_sdk/models/operations/retrieveanalytics_response.rb' + autoload :QueryParamEvent, 'open_api_sdk/models/operations/queryparam_event.rb' + autoload :QueryParamInterval, 'open_api_sdk/models/operations/queryparam_interval.rb' + autoload :Order, 'open_api_sdk/models/operations/order.rb' + autoload :SortBy, 'open_api_sdk/models/operations/sortby.rb' + autoload :ListEventsRequest, 'open_api_sdk/models/operations/listevents_request.rb' + autoload :ListEventsResponse, 'open_api_sdk/models/operations/listevents_response.rb' autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb' autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb' autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb' diff --git a/lib/open_api_sdk/models/operations/listevents_request.rb b/lib/open_api_sdk/models/operations/listevents_request.rb new file mode 100644 index 0000000..ee95945 --- /dev/null +++ b/lib/open_api_sdk/models/operations/listevents_request.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class ListEventsRequest < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The browser to retrieve analytics for. + field :browser, T.nilable(::String), { 'query_param': { 'field_name': 'browser', 'style': 'form', 'explode': true } } + # The city to retrieve analytics for. + field :city, T.nilable(::String), { 'query_param': { 'field_name': 'city', 'style': 'form', 'explode': true } } + # The continent to retrieve analytics for. + field :continent, T.nilable(::OpenApiSDK::Shared::ContinentCode), { 'query_param': { 'field_name': 'continent', 'style': 'form', 'explode': true } } + # The country to retrieve analytics for. + field :country, T.nilable(::OpenApiSDK::Shared::CountryCode), { 'query_param': { 'field_name': 'country', 'style': 'form', 'explode': true } } + # The device to retrieve analytics for. + field :device, T.nilable(::String), { 'query_param': { 'field_name': 'device', 'style': 'form', 'explode': true } } + # The domain to filter analytics for. + field :domain, T.nilable(::String), { 'query_param': { 'field_name': 'domain', 'style': 'form', 'explode': true } } + # The end date and time when to retrieve analytics from. If not provided, defaults to the current date. + field :end_, T.nilable(::String), { 'query_param': { 'field_name': 'end', 'style': 'form', 'explode': true } } + # The type of event to retrieve analytics for. Defaults to 'clicks'. + field :event, T.nilable(::OpenApiSDK::Operations::QueryParamEvent), { 'query_param': { 'field_name': 'event', 'style': 'form', 'explode': true } } + # This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. + field :external_id, T.nilable(::String), { 'query_param': { 'field_name': 'externalId', 'style': 'form', 'explode': true } } + # The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + field :interval, T.nilable(::OpenApiSDK::Operations::QueryParamInterval), { 'query_param': { 'field_name': 'interval', 'style': 'form', 'explode': true } } + # The short link slug. + field :key, T.nilable(::String), { 'query_param': { 'field_name': 'key', 'style': 'form', 'explode': true } } + + field :limit, T.nilable(::Float), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # The unique ID of the short link on Dub. + field :link_id, T.nilable(::String), { 'query_param': { 'field_name': 'linkId', 'style': 'form', 'explode': true } } + + field :order, T.nilable(::OpenApiSDK::Operations::Order), { 'query_param': { 'field_name': 'order', 'style': 'form', 'explode': true } } + # The OS to retrieve analytics for. + field :os, T.nilable(::String), { 'query_param': { 'field_name': 'os', 'style': 'form', 'explode': true } } + + field :page, T.nilable(::Float), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + field :qr, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'qr', 'style': 'form', 'explode': true } } + # The referer to retrieve analytics for. + field :referer, T.nilable(::String), { 'query_param': { 'field_name': 'referer', 'style': 'form', 'explode': true } } + # Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + field :root, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'root', 'style': 'form', 'explode': true } } + + field :sort_by, T.nilable(::OpenApiSDK::Operations::SortBy), { 'query_param': { 'field_name': 'sortBy', 'style': 'form', 'explode': true } } + # The start date and time when to retrieve analytics from. + field :start, T.nilable(::String), { 'query_param': { 'field_name': 'start', 'style': 'form', 'explode': true } } + # The tag ID to retrieve analytics for. + field :tag_id, T.nilable(::String), { 'query_param': { 'field_name': 'tagId', 'style': 'form', 'explode': true } } + # The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. + field :timezone, T.nilable(::String), { 'query_param': { 'field_name': 'timezone', 'style': 'form', 'explode': true } } + # The URL to retrieve analytics for. + field :url, T.nilable(::String), { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } } + + + sig { params(browser: T.nilable(::String), city: T.nilable(::String), continent: T.nilable(::OpenApiSDK::Shared::ContinentCode), country: T.nilable(::OpenApiSDK::Shared::CountryCode), device: T.nilable(::String), domain: T.nilable(::String), end_: T.nilable(::String), event: T.nilable(::OpenApiSDK::Operations::QueryParamEvent), external_id: T.nilable(::String), interval: T.nilable(::OpenApiSDK::Operations::QueryParamInterval), key: T.nilable(::String), limit: T.nilable(::Float), link_id: T.nilable(::String), order: T.nilable(::OpenApiSDK::Operations::Order), os: T.nilable(::String), page: T.nilable(::Float), qr: T.nilable(T::Boolean), referer: T.nilable(::String), root: T.nilable(T::Boolean), sort_by: T.nilable(::OpenApiSDK::Operations::SortBy), start: T.nilable(::String), tag_id: T.nilable(::String), timezone: T.nilable(::String), url: T.nilable(::String)).void } + def initialize(browser: nil, city: nil, continent: nil, country: nil, device: nil, domain: nil, end_: nil, event: nil, external_id: nil, interval: nil, key: nil, limit: nil, link_id: nil, order: nil, os: nil, page: nil, qr: nil, referer: nil, root: nil, sort_by: nil, start: nil, tag_id: nil, timezone: nil, url: nil) + @browser = browser + @city = city + @continent = continent + @country = country + @device = device + @domain = domain + @end_ = end_ + @event = event + @external_id = external_id + @interval = interval + @key = key + @limit = limit + @link_id = link_id + @order = order + @os = os + @page = page + @qr = qr + @referer = referer + @root = root + @sort_by = sort_by + @start = start + @tag_id = tag_id + @timezone = timezone + @url = url + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/listevents_response.rb b/lib/open_api_sdk/models/operations/listevents_response.rb new file mode 100644 index 0000000..e255403 --- /dev/null +++ b/lib/open_api_sdk/models/operations/listevents_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class ListEventsResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # A list of events + field :click_events, T.nilable(T::Array[::OpenApiSDK::Shared::ClickEvents]) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), click_events: T.nilable(T::Array[::OpenApiSDK::Shared::ClickEvents]), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, click_events: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @click_events = click_events + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @rate_limit_exceeded = rate_limit_exceeded + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/order.rb b/lib/open_api_sdk/models/operations/order.rb new file mode 100644 index 0000000..3a88812 --- /dev/null +++ b/lib/open_api_sdk/models/operations/order.rb @@ -0,0 +1,19 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # Order + class Order < T::Enum + enums do + ASC = new('asc') + DESC = new('desc') + end + end + + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_event.rb b/lib/open_api_sdk/models/operations/queryparam_event.rb new file mode 100644 index 0000000..80eaf32 --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_event.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # QueryParamEvent - The type of event to retrieve analytics for. Defaults to 'clicks'. + class QueryParamEvent < T::Enum + enums do + CLICKS = new('clicks') + LEADS = new('leads') + SALES = new('sales') + COMPOSITE = new('composite') + end + end + + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_interval.rb b/lib/open_api_sdk/models/operations/queryparam_interval.rb new file mode 100644 index 0000000..8b74acf --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_interval.rb @@ -0,0 +1,25 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # QueryParamInterval - The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + class QueryParamInterval < T::Enum + enums do + TWENTY_FOURH = new('24h') + SEVEND = new('7d') + THIRTYD = new('30d') + NINETYD = new('90d') + YTD = new('ytd') + ONEY = new('1y') + ALL = new('all') + ALL_UNFILTERED = new('all_unfiltered') + end + end + + end +end diff --git a/lib/open_api_sdk/models/operations/sortby.rb b/lib/open_api_sdk/models/operations/sortby.rb new file mode 100644 index 0000000..25e282e --- /dev/null +++ b/lib/open_api_sdk/models/operations/sortby.rb @@ -0,0 +1,19 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # SortBy + class SortBy < T::Enum + enums do + TIMESTAMP = new('timestamp') + AMOUNT = new('amount') + end + end + + end +end diff --git a/lib/open_api_sdk/models/shared.rb b/lib/open_api_sdk/models/shared.rb index 966658e..efc78fb 100644 --- a/lib/open_api_sdk/models/shared.rb +++ b/lib/open_api_sdk/models/shared.rb @@ -39,6 +39,7 @@ module Shared autoload :LinkGeoTargeting, 'open_api_sdk/models/shared/linkgeotargeting.rb' autoload :CountryCode, 'open_api_sdk/models/shared/countrycode.rb' autoload :ContinentCode, 'open_api_sdk/models/shared/continentcode.rb' + autoload :ClickEvents, 'open_api_sdk/models/shared/clickevents.rb' autoload :Plan, 'open_api_sdk/models/shared/plan.rb' autoload :Role, 'open_api_sdk/models/shared/role.rb' autoload :Users, 'open_api_sdk/models/shared/users.rb' diff --git a/lib/open_api_sdk/models/shared/clickevents.rb b/lib/open_api_sdk/models/shared/clickevents.rb new file mode 100644 index 0000000..c22857a --- /dev/null +++ b/lib/open_api_sdk/models/shared/clickevents.rb @@ -0,0 +1,66 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Shared + + + class ClickEvents < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :browser, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('browser') } } + + field :city, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('city') } } + + field :click_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('click_id') } } + + field :continent, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('continent') } } + + field :country, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country') } } + + field :device, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('device') } } + + field :domain, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain') } } + + field :ip, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ip') } } + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :link_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('link_id') } } + + field :os, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('os') } } + + field :qr, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('qr') } } + + field :referer, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('referer') } } + + field :timestamp, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timestamp') } } + + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + + sig { params(browser: ::String, city: ::String, click_id: ::String, continent: ::String, country: ::String, device: ::String, domain: ::String, ip: ::String, key: ::String, link_id: ::String, os: ::String, qr: ::Float, referer: ::String, timestamp: ::String, url: ::String).void } + def initialize(browser: nil, city: nil, click_id: nil, continent: nil, country: nil, device: nil, domain: nil, ip: nil, key: nil, link_id: nil, os: nil, qr: nil, referer: nil, timestamp: nil, url: nil) + @browser = browser + @city = city + @click_id = click_id + @continent = continent + @country = country + @device = device + @domain = domain + @ip = ip + @key = key + @link_id = link_id + @os = os + @qr = qr + @referer = referer + @timestamp = timestamp + @url = url + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/security.rb b/lib/open_api_sdk/models/shared/security.rb index 5dc7e0b..2c1e53c 100644 --- a/lib/open_api_sdk/models/shared/security.rb +++ b/lib/open_api_sdk/models/shared/security.rb @@ -12,10 +12,10 @@ class Security < ::OpenApiSDK::Utils::FieldAugmented extend T::Sig - field :token, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + field :token, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } - sig { params(token: T.nilable(::String)).void } + sig { params(token: ::String).void } def initialize(token: nil) @token = token end diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb index 9507ec9..949fb8c 100644 --- a/lib/open_api_sdk/sdkconfiguration.rb +++ b/lib/open_api_sdk/sdkconfiguration.rb @@ -38,9 +38,9 @@ def initialize(client, security, server_url, server_idx) @security = security @language = 'ruby' @openapi_doc_version = '0.0.1' - @sdk_version = '0.2.2-alpha.5' - @gen_version = '2.380.1' - @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.5 2.380.1 0.0.1 dub' + @sdk_version = '0.2.2-alpha.6' + @gen_version = '2.402.5' + @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.6 2.402.5 0.0.1 dub' end sig { returns([String, T::Hash[Symbol, String]]) }