diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1ca37ae..16d2866 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96 management: - docChecksum: a7b1bff0696d0e354d1e5a6b91b8ae7f + docChecksum: 24e29770dbf567bc2b877159fa7eab18 docVersion: 0.0.1 - speakeasyVersion: 1.487.0 + speakeasyVersion: 1.488.0 generationVersion: 2.506.0 - releaseVersion: 0.11.24 - configChecksum: 82ebf0880d3c32405aa64d01c59e2a4a + releaseVersion: 0.11.25 + configChecksum: 763eb11368b9dbfc5e819c4520529194 repoURL: https://github.com/dubinc/dub-php.git installationURL: https://github.com/dubinc/dub-php published: true @@ -32,6 +32,7 @@ generatedFiles: - .gitattributes - USAGE.md - composer.json + - docs/Models/Components/AccessLevel.md - docs/Models/Components/AnalyticsBrowsers.md - docs/Models/Components/AnalyticsCities.md - docs/Models/Components/AnalyticsCitiesCountry.md @@ -62,6 +63,7 @@ generatedFiles: - docs/Models/Components/DomainSchema.md - docs/Models/Components/Domains.md - docs/Models/Components/Event.md + - docs/Models/Components/FolderSchema.md - docs/Models/Components/Geo.md - docs/Models/Components/Interval.md - docs/Models/Components/LeadCreatedEvent.md @@ -95,8 +97,15 @@ generatedFiles: - docs/Models/Components/LinkWebhookEvent.md - docs/Models/Components/LinkWebhookEventEvent.md - docs/Models/Components/LinkWebhookEventGeo.md + - docs/Models/Components/Links.md - docs/Models/Components/One.md - docs/Models/Components/Partner.md + - docs/Models/Components/PartnerAnalyticsCount.md + - docs/Models/Components/PartnerAnalyticsTimeseries.md + - docs/Models/Components/PartnerAnalyticsTopLinks.md + - docs/Models/Components/PartnerCreatedEvent.md + - docs/Models/Components/PartnerCreatedEventData.md + - docs/Models/Components/PartnerCreatedEventEvent.md - docs/Models/Components/PaymentProcessor.md - docs/Models/Components/Plan.md - docs/Models/Components/RegisteredDomain.md @@ -127,6 +136,7 @@ generatedFiles: - docs/Models/Components/SaleEventPartner.md - docs/Models/Components/SaleEventType.md - docs/Models/Components/Security.md + - docs/Models/Components/Status.md - docs/Models/Components/TagSchema.md - docs/Models/Components/Three.md - docs/Models/Components/Trigger.md @@ -162,6 +172,7 @@ generatedFiles: - docs/Models/Errors/UnprocessableEntity.md - docs/Models/Errors/UnprocessableEntityCode.md - docs/Models/Errors/UnprocessableEntityError.md + - docs/Models/Operations/AccessLevel.md - docs/Models/Operations/BulkCreateLinksResponse.md - docs/Models/Operations/BulkCreateLinksTagIds.md - docs/Models/Operations/BulkCreateLinksTagNames.md @@ -188,10 +199,10 @@ generatedFiles: - docs/Models/Operations/CreateEmbedTokenRequestBody.md - docs/Models/Operations/CreateEmbedTokenResponse.md - docs/Models/Operations/CreateEmbedTokenResponseBody.md + - docs/Models/Operations/CreateFolderRequestBody.md + - docs/Models/Operations/CreateFolderResponse.md - docs/Models/Operations/CreateLinkRequestBody.md - docs/Models/Operations/CreateLinkResponse.md - - docs/Models/Operations/CreatePartnerDiscount.md - - docs/Models/Operations/CreatePartnerInterval.md - docs/Models/Operations/CreatePartnerLinkLinkProps.md - docs/Models/Operations/CreatePartnerLinkRequestBody.md - docs/Models/Operations/CreatePartnerLinkResponse.md @@ -202,7 +213,6 @@ generatedFiles: - docs/Models/Operations/CreatePartnerResponseBody.md - docs/Models/Operations/CreatePartnerTagIds.md - docs/Models/Operations/CreatePartnerTagNames.md - - docs/Models/Operations/CreatePartnerType.md - docs/Models/Operations/CreateTagRequestBody.md - docs/Models/Operations/CreateTagResponse.md - docs/Models/Operations/Customer.md @@ -213,6 +223,9 @@ generatedFiles: - docs/Models/Operations/DeleteDomainRequest.md - docs/Models/Operations/DeleteDomainResponse.md - docs/Models/Operations/DeleteDomainResponseBody.md + - docs/Models/Operations/DeleteFolderRequest.md + - docs/Models/Operations/DeleteFolderResponse.md + - docs/Models/Operations/DeleteFolderResponseBody.md - docs/Models/Operations/DeleteLinkRequest.md - docs/Models/Operations/DeleteLinkResponse.md - docs/Models/Operations/DeleteLinkResponseBody.md @@ -221,6 +234,7 @@ generatedFiles: - docs/Models/Operations/DeleteTagResponseBody.md - docs/Models/Operations/Discount.md - docs/Models/Operations/Event.md + - docs/Models/Operations/Four.md - docs/Models/Operations/GetCustomerDiscount.md - docs/Models/Operations/GetCustomerInterval.md - docs/Models/Operations/GetCustomerLink.md @@ -265,6 +279,8 @@ generatedFiles: - docs/Models/Operations/ListEventsRequest.md - docs/Models/Operations/ListEventsResponse.md - docs/Models/Operations/ListEventsResponseBody.md + - docs/Models/Operations/ListFoldersRequest.md + - docs/Models/Operations/ListFoldersResponse.md - docs/Models/Operations/One.md - docs/Models/Operations/Order.md - docs/Models/Operations/Partner.md @@ -283,6 +299,11 @@ generatedFiles: - docs/Models/Operations/RetrieveAnalyticsRequest.md - docs/Models/Operations/RetrieveAnalyticsResponse.md - docs/Models/Operations/RetrieveAnalyticsResponseBody.md + - docs/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.md + - docs/Models/Operations/RetrievePartnerAnalyticsQueryParamInterval.md + - docs/Models/Operations/RetrievePartnerAnalyticsRequest.md + - docs/Models/Operations/RetrievePartnerAnalyticsResponse.md + - docs/Models/Operations/RetrievePartnerAnalyticsResponseBody.md - docs/Models/Operations/Sale.md - docs/Models/Operations/Sort.md - docs/Models/Operations/SortBy.md @@ -313,6 +334,10 @@ generatedFiles: - docs/Models/Operations/UpdateDomainRequest.md - docs/Models/Operations/UpdateDomainRequestBody.md - docs/Models/Operations/UpdateDomainResponse.md + - docs/Models/Operations/UpdateFolderAccessLevel.md + - docs/Models/Operations/UpdateFolderRequest.md + - docs/Models/Operations/UpdateFolderRequestBody.md + - docs/Models/Operations/UpdateFolderResponse.md - docs/Models/Operations/UpdateLinkRequest.md - docs/Models/Operations/UpdateLinkRequestBody.md - docs/Models/Operations/UpdateLinkResponse.md @@ -340,6 +365,7 @@ generatedFiles: - docs/sdks/dub/README.md - docs/sdks/embedtokens/README.md - docs/sdks/events/README.md + - docs/sdks/folders/README.md - docs/sdks/links/README.md - docs/sdks/metatags/README.md - docs/sdks/partners/README.md @@ -358,6 +384,7 @@ generatedFiles: - src/DubBuilder.php - src/EmbedTokens.php - src/Events.php + - src/Folders.php - src/Hooks/AfterErrorContext.php - src/Hooks/AfterErrorHook.php - src/Hooks/AfterSuccessContext.php @@ -376,6 +403,7 @@ generatedFiles: - src/Hooks/TokenResponse.php - src/Links.php - src/Metatags.php + - src/Models/Components/AccessLevel.php - src/Models/Components/AnalyticsBrowsers.php - src/Models/Components/AnalyticsCities.php - src/Models/Components/AnalyticsCitiesCountry.php @@ -406,6 +434,7 @@ generatedFiles: - src/Models/Components/DomainSchema.php - src/Models/Components/Domains.php - src/Models/Components/Event.php + - src/Models/Components/FolderSchema.php - src/Models/Components/Geo.php - src/Models/Components/Interval.php - src/Models/Components/LeadCreatedEvent.php @@ -438,8 +467,15 @@ generatedFiles: - src/Models/Components/LinkSchema.php - src/Models/Components/LinkWebhookEvent.php - src/Models/Components/LinkWebhookEventGeo.php + - src/Models/Components/Links.php - src/Models/Components/One.php - src/Models/Components/Partner.php + - src/Models/Components/PartnerAnalyticsCount.php + - src/Models/Components/PartnerAnalyticsTimeseries.php + - src/Models/Components/PartnerAnalyticsTopLinks.php + - src/Models/Components/PartnerCreatedEvent.php + - src/Models/Components/PartnerCreatedEventData.php + - src/Models/Components/PartnerCreatedEventEvent.php - src/Models/Components/PaymentProcessor.php - src/Models/Components/Plan.php - src/Models/Components/RegisteredDomain.php @@ -470,6 +506,7 @@ generatedFiles: - src/Models/Components/SaleEventPartner.php - src/Models/Components/SaleEventType.php - src/Models/Components/Security.php + - src/Models/Components/Status.php - src/Models/Components/TagSchema.php - src/Models/Components/Three.php - src/Models/Components/Trigger.php @@ -514,6 +551,7 @@ generatedFiles: - src/Models/Errors/UnprocessableEntityCode.php - src/Models/Errors/UnprocessableEntityError.php - src/Models/Errors/UnprocessableEntityThrowable.php + - src/Models/Operations/AccessLevel.php - src/Models/Operations/BulkCreateLinksResponse.php - src/Models/Operations/BulkDeleteLinksRequest.php - src/Models/Operations/BulkDeleteLinksResponse.php @@ -536,17 +574,16 @@ generatedFiles: - src/Models/Operations/CreateEmbedTokenRequestBody.php - src/Models/Operations/CreateEmbedTokenResponse.php - src/Models/Operations/CreateEmbedTokenResponseBody.php + - src/Models/Operations/CreateFolderRequestBody.php + - src/Models/Operations/CreateFolderResponse.php - src/Models/Operations/CreateLinkRequestBody.php - src/Models/Operations/CreateLinkResponse.php - - src/Models/Operations/CreatePartnerDiscount.php - - src/Models/Operations/CreatePartnerInterval.php - src/Models/Operations/CreatePartnerLinkLinkProps.php - src/Models/Operations/CreatePartnerLinkRequestBody.php - src/Models/Operations/CreatePartnerLinkResponse.php - src/Models/Operations/CreatePartnerRequestBody.php - src/Models/Operations/CreatePartnerResponse.php - src/Models/Operations/CreatePartnerResponseBody.php - - src/Models/Operations/CreatePartnerType.php - src/Models/Operations/CreateTagRequestBody.php - src/Models/Operations/CreateTagResponse.php - src/Models/Operations/Customer.php @@ -557,6 +594,9 @@ generatedFiles: - src/Models/Operations/DeleteDomainRequest.php - src/Models/Operations/DeleteDomainResponse.php - src/Models/Operations/DeleteDomainResponseBody.php + - src/Models/Operations/DeleteFolderRequest.php + - src/Models/Operations/DeleteFolderResponse.php + - src/Models/Operations/DeleteFolderResponseBody.php - src/Models/Operations/DeleteLinkRequest.php - src/Models/Operations/DeleteLinkResponse.php - src/Models/Operations/DeleteLinkResponseBody.php @@ -565,6 +605,7 @@ generatedFiles: - src/Models/Operations/DeleteTagResponseBody.php - src/Models/Operations/Discount.php - src/Models/Operations/Event.php + - src/Models/Operations/Four.php - src/Models/Operations/GetCustomerDiscount.php - src/Models/Operations/GetCustomerInterval.php - src/Models/Operations/GetCustomerLink.php @@ -603,6 +644,8 @@ generatedFiles: - src/Models/Operations/ListDomainsResponse.php - src/Models/Operations/ListEventsRequest.php - src/Models/Operations/ListEventsResponse.php + - src/Models/Operations/ListFoldersRequest.php + - src/Models/Operations/ListFoldersResponse.php - src/Models/Operations/One.php - src/Models/Operations/Order.php - src/Models/Operations/Partner.php @@ -616,6 +659,10 @@ generatedFiles: - src/Models/Operations/RequestBody.php - src/Models/Operations/RetrieveAnalyticsRequest.php - src/Models/Operations/RetrieveAnalyticsResponse.php + - src/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.php + - src/Models/Operations/RetrievePartnerAnalyticsQueryParamInterval.php + - src/Models/Operations/RetrievePartnerAnalyticsRequest.php + - src/Models/Operations/RetrievePartnerAnalyticsResponse.php - src/Models/Operations/Sale.php - src/Models/Operations/Sort.php - src/Models/Operations/SortBy.php @@ -644,6 +691,10 @@ generatedFiles: - src/Models/Operations/UpdateDomainRequest.php - src/Models/Operations/UpdateDomainRequestBody.php - src/Models/Operations/UpdateDomainResponse.php + - src/Models/Operations/UpdateFolderAccessLevel.php + - src/Models/Operations/UpdateFolderRequest.php + - src/Models/Operations/UpdateFolderRequestBody.php + - src/Models/Operations/UpdateFolderResponse.php - src/Models/Operations/UpdateLinkRequest.php - src/Models/Operations/UpdateLinkRequestBody.php - src/Models/Operations/UpdateLinkResponse.php @@ -707,7 +758,7 @@ examples: application/json: {"url": "https://google.com", "externalId": "123456", "tagIds": ["clux0rgak00011..."]} responses: "200": - application/json: {"id": "", "domain": "low-packaging.info", "key": "", "url": "https://black-and-white-secrecy.org/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1737335134620", "expiredUrl": "https://brisk-seafood.net/", "password": "XhB9652A4R_UwKP", "proxy": false, "title": "", "description": "demob fencing fencing vainly kookily", "image": "https://picsum.photos/seed/zicqIZPdCh/2719/290", "video": "https://loremflickr.com/2433/1085?lock=5492184885451890", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "pink"}], "webhookIds": [], "comments": "than rightfully brightly sleet where schedule insolence when warming when determined ouch scarcely ignorance", "shortLink": "https://incomparable-monster.net/", "qrCode": "https://mild-switchboard.info/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1715661268317", "updatedAt": "1737322500951", "projectId": ""} + application/json: {"id": "", "domain": "low-packaging.info", "key": "", "url": "https://black-and-white-secrecy.org/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1737335134620", "expiredUrl": "https://brisk-seafood.net/", "password": "XhB9652A4R_UwKP", "proxy": false, "title": "", "description": "demob fencing fencing vainly kookily", "image": "https://picsum.photos/seed/zicqIZPdCh/2719/290", "video": "https://loremflickr.com/2433/1085?lock=5492184885451890", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "pink"}], "folderId": "", "webhookIds": [], "comments": "than rightfully brightly sleet where schedule insolence when warming when determined ouch scarcely ignorance", "shortLink": "https://incomparable-monster.net/", "qrCode": "https://mild-switchboard.info/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1715661268317", "updatedAt": "1737322500951", "projectId": ""} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -738,7 +789,7 @@ examples: pageSize: 50 responses: "200": - application/json: [{"id": "", "domain": "neglected-plastic.biz", "key": "", "url": "https://crooked-overload.name/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1737886724496", "expiredUrl": "https://breakable-bathrobe.net", "password": "QCOyVtOrvIw1vLI", "proxy": false, "title": "", "description": "beside tromp worth reluctantly wound accompanist", "image": "https://picsum.photos/seed/WT1tZJLp/3243/3827", "video": "https://picsum.videos/seed/p2Pkp47W/118/2609", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "blue"}], "webhookIds": [], "comments": "commonly softly boo massive sorrowful aw strict behind along energetic oddball pasta thread vestment meanwhile likely up questionably forgery", "shortLink": "https://oblong-inspection.net", "qrCode": "https://spherical-gerbil.org/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1721443126904", "updatedAt": "1737331157147", "projectId": ""}, {"id": "", "domain": "married-presume.net", "key": "", "url": "https://reflecting-coast.info", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1755128835154", "expiredUrl": "https://writhing-conversation.com", "password": "ZsCSHb4yMlkCXkK", "proxy": false, "title": "", "description": "overcook till boo ack solicit", "image": "https://loremflickr.com/2989/2665?lock=5845099426147813", "video": "https://picsum.videos/seed/breY1MLSO6/954/73", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "brown"}, {"id": "", "name": "", "color": "red"}], "webhookIds": [""], "comments": "instead athwart before tattered gosh um what thump kettledrum configuration esteemed mysteriously legend absent brr", "shortLink": "https://well-documented-help.biz/", "qrCode": "https://untrue-lamp.info/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1729219253758", "updatedAt": "1737284965474", "projectId": ""}, {"id": "", "domain": "stale-handful.com", "key": "", "url": "https://lean-daughter.org", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1748636365127", "expiredUrl": "https://perfumed-marketplace.com/", "password": "xsCzKbmqqqJnqbw", "proxy": false, "title": "", "description": "as so yet whenever rotating hygienic mid", "image": "https://loremflickr.com/958/3484?lock=3072922795184569", "video": "https://loremflickr.com/565/2800?lock=8555441928057420", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "purple"}, {"id": "", "name": "", "color": "yellow"}], "webhookIds": ["", ""], "comments": "polished whether welcome deck gratefully for outfox pfft indeed phew rejigger overcoat when wonderful ugh before however fooey weakly", "shortLink": "https://muddy-nightlife.info/", "qrCode": "https://cloudy-tackle.net/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1714308890533", "updatedAt": "1737291314409", "projectId": ""}] + application/json: [{"id": "", "domain": "neglected-plastic.biz", "key": "", "url": "https://crooked-overload.name/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1737886724496", "expiredUrl": "https://breakable-bathrobe.net", "password": "QCOyVtOrvIw1vLI", "proxy": false, "title": "", "description": "beside tromp worth reluctantly wound accompanist", "image": "https://picsum.photos/seed/WT1tZJLp/3243/3827", "video": "https://picsum.videos/seed/p2Pkp47W/118/2609", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "blue"}], "folderId": "", "webhookIds": [], "comments": "commonly softly boo massive sorrowful aw strict behind along energetic oddball pasta thread vestment meanwhile likely up questionably forgery", "shortLink": "https://oblong-inspection.net", "qrCode": "https://spherical-gerbil.org/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1721443126904", "updatedAt": "1737331157147", "projectId": ""}, {"id": "", "domain": "married-presume.net", "key": "", "url": "https://reflecting-coast.info", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1755128835154", "expiredUrl": "https://writhing-conversation.com", "password": "ZsCSHb4yMlkCXkK", "proxy": false, "title": "", "description": "overcook till boo ack solicit", "image": "https://loremflickr.com/2989/2665?lock=5845099426147813", "video": "https://picsum.videos/seed/breY1MLSO6/954/73", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "brown"}, {"id": "", "name": "", "color": "red"}], "folderId": "", "webhookIds": [""], "comments": "instead athwart before tattered gosh um what thump kettledrum configuration esteemed mysteriously legend absent brr", "shortLink": "https://well-documented-help.biz/", "qrCode": "https://untrue-lamp.info/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1729219253758", "updatedAt": "1737284965474", "projectId": ""}, {"id": "", "domain": "stale-handful.com", "key": "", "url": "https://lean-daughter.org", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1748636365127", "expiredUrl": "https://perfumed-marketplace.com/", "password": "xsCzKbmqqqJnqbw", "proxy": false, "title": "", "description": "as so yet whenever rotating hygienic mid", "image": "https://loremflickr.com/958/3484?lock=3072922795184569", "video": "https://loremflickr.com/565/2800?lock=8555441928057420", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "purple"}, {"id": "", "name": "", "color": "yellow"}], "folderId": "", "webhookIds": ["", ""], "comments": "polished whether welcome deck gratefully for outfox pfft indeed phew rejigger overcoat when wonderful ugh before however fooey weakly", "shortLink": "https://muddy-nightlife.info/", "qrCode": "https://cloudy-tackle.net/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1714308890533", "updatedAt": "1737291314409", "projectId": ""}] "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -792,7 +843,7 @@ examples: externalId: "123456" responses: "200": - application/json: {"id": "", "domain": "rural-mathematics.name", "key": "", "url": "https://willing-impostor.info", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1745619923759", "expiredUrl": "https://warm-hundred.net/", "password": "5UmEgZU18kgjdwK", "proxy": false, "title": "", "description": "aw showboat shakily times bravely quizzically", "image": "https://picsum.photos/seed/eIfMMF/2755/1170", "video": "https://loremflickr.com/754/1831?lock=3684390672984324", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "yellow"}, {"id": "", "name": "", "color": "red"}], "webhookIds": ["", ""], "comments": "scholarship to blink nifty generously", "shortLink": "https://spiffy-character.name/", "qrCode": "https://immediate-lounge.biz/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1719382478864", "updatedAt": "1737271107259", "projectId": ""} + application/json: {"id": "", "domain": "rural-mathematics.name", "key": "", "url": "https://willing-impostor.info", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1745619923759", "expiredUrl": "https://warm-hundred.net/", "password": "5UmEgZU18kgjdwK", "proxy": false, "title": "", "description": "aw showboat shakily times bravely quizzically", "image": "https://picsum.photos/seed/eIfMMF/2755/1170", "video": "https://loremflickr.com/754/1831?lock=3684390672984324", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "yellow"}, {"id": "", "name": "", "color": "red"}], "folderId": "", "webhookIds": ["", ""], "comments": "scholarship to blink nifty generously", "shortLink": "https://spiffy-character.name/", "qrCode": "https://immediate-lounge.biz/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1719382478864", "updatedAt": "1737271107259", "projectId": ""} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -820,7 +871,7 @@ examples: application/json: {"url": "https://google.com", "externalId": "123456", "tagIds": ["clux0rgak00011..."]} responses: "200": - application/json: {"id": "", "domain": "tinted-nectarine.info", "key": "", "url": "https://powerless-juggernaut.org", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1739037308459", "expiredUrl": "https://juvenile-exploration.biz", "password": "kuMjbGhnJP7Bopu", "proxy": false, "title": "", "description": "bleak from that qualified cycle woot abseil perfumed", "image": "https://loremflickr.com/1166/1632?lock=5920233536834378", "video": "https://loremflickr.com/996/369?lock=4799093392417520", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "green"}], "webhookIds": [], "comments": "duh clamour urgently voluntarily scale gut readies concerning statement nice consequently provided when rim league almost forenenst instead arbitrate pulse", "shortLink": "https://impossible-typeface.net/", "qrCode": "https://worthy-effector.net", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1710615741744", "updatedAt": "1737261085854", "projectId": ""} + application/json: {"id": "", "domain": "tinted-nectarine.info", "key": "", "url": "https://powerless-juggernaut.org", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1739037308459", "expiredUrl": "https://juvenile-exploration.biz", "password": "kuMjbGhnJP7Bopu", "proxy": false, "title": "", "description": "bleak from that qualified cycle woot abseil perfumed", "image": "https://loremflickr.com/1166/1632?lock=5920233536834378", "video": "https://loremflickr.com/996/369?lock=4799093392417520", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "green"}], "folderId": "", "webhookIds": [], "comments": "duh clamour urgently voluntarily scale gut readies concerning statement nice consequently provided when rim league almost forenenst instead arbitrate pulse", "shortLink": "https://impossible-typeface.net/", "qrCode": "https://worthy-effector.net", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1710615741744", "updatedAt": "1737261085854", "projectId": ""} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -896,7 +947,7 @@ examples: application/json: {"data": {"url": "https://google.com", "tagIds": ["clux0rgak00011..."]}} responses: "200": - application/json: [{"id": "", "domain": "old-lox.org", "key": "", "url": "https://angelic-cellar.org/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1746858941074", "expiredUrl": "https://yellowish-vicinity.org/", "password": "yMRdLF0naLtN5wK", "proxy": false, "title": "", "description": "aboard octave since", "image": "https://loremflickr.com/2247/3258?lock=8204630610718424", "video": "https://picsum.videos/seed/L7W1CltA/399/207", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "blue"}], "webhookIds": ["", "", ""], "comments": "psst instead even brr react busily both along whereas absent why round around round beneficial however safely defensive", "shortLink": "https://inborn-trick.biz", "qrCode": "https://scientific-alliance.biz/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1723350894607", "updatedAt": "1737309350832", "projectId": ""}, {"id": "", "domain": "purple-secrecy.name", "key": "", "url": "https://unwilling-godparent.biz/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1761874683802", "expiredUrl": "https://weekly-formamide.name", "password": "t3Ls5KHqWZvIT9U", "proxy": false, "title": "", "description": "tribe astonishing hm who blah verify soybean", "image": "https://picsum.photos/seed/DauITRrHdo/3783/3955", "video": "https://loremflickr.com/405/3655?lock=8436311567525016", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "purple"}, {"id": "", "name": "", "color": "pink"}], "webhookIds": [""], "comments": "since cloudy dutiful heartache unto yippee custom footrest forenenst astonishing shore", "shortLink": "https://exotic-hydrolyze.name/", "qrCode": "https://giving-scale.name", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1715965542309", "updatedAt": "1737265288188", "projectId": ""}] + application/json: [{"id": "", "domain": "old-lox.org", "key": "", "url": "https://angelic-cellar.org/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1746858941074", "expiredUrl": "https://yellowish-vicinity.org/", "password": "yMRdLF0naLtN5wK", "proxy": false, "title": "", "description": "aboard octave since", "image": "https://loremflickr.com/2247/3258?lock=8204630610718424", "video": "https://picsum.videos/seed/L7W1CltA/399/207", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "blue"}], "folderId": "", "webhookIds": ["", "", ""], "comments": "psst instead even brr react busily both along whereas absent why round around round beneficial however safely defensive", "shortLink": "https://inborn-trick.biz", "qrCode": "https://scientific-alliance.biz/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1723350894607", "updatedAt": "1737309350832", "projectId": ""}, {"id": "", "domain": "purple-secrecy.name", "key": "", "url": "https://unwilling-godparent.biz/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1761874683802", "expiredUrl": "https://weekly-formamide.name", "password": "t3Ls5KHqWZvIT9U", "proxy": false, "title": "", "description": "tribe astonishing hm who blah verify soybean", "image": "https://picsum.photos/seed/DauITRrHdo/3783/3955", "video": "https://loremflickr.com/405/3655?lock=8436311567525016", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}, {"id": "", "name": "", "color": "purple"}, {"id": "", "name": "", "color": "pink"}], "folderId": "", "webhookIds": [""], "comments": "since cloudy dutiful heartache unto yippee custom footrest forenenst astonishing shore", "shortLink": "https://exotic-hydrolyze.name/", "qrCode": "https://giving-scale.name", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1715965542309", "updatedAt": "1737265288188", "projectId": ""}] "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -947,7 +998,7 @@ examples: application/json: {"url": "https://google.com", "externalId": "123456", "tagIds": ["clux0rgak00011..."]} responses: "200": - application/json: {"id": "", "domain": "neat-instruction.info", "key": "", "url": "https://entire-rubric.com/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1741965927492", "expiredUrl": "https://rubbery-lay.com/", "password": "cHWcftWRnnmyj_U", "proxy": false, "title": "", "description": "likewise concerning annual instantly anti deployment", "image": "https://loremflickr.com/181/3306?lock=1275456187971812", "video": "https://picsum.videos/seed/CcMAI/2638/2080", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "purple"}, {"id": "", "name": "", "color": "red"}], "webhookIds": [], "comments": "clueless unless conclude daddy boohoo ideal lumpy masculinize charter geez as eulogise granny", "shortLink": "https://complicated-resource.net/", "qrCode": "https://impractical-cap.net", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1731720644839", "updatedAt": "1737298531055", "projectId": ""} + application/json: {"id": "", "domain": "neat-instruction.info", "key": "", "url": "https://entire-rubric.com/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1741965927492", "expiredUrl": "https://rubbery-lay.com/", "password": "cHWcftWRnnmyj_U", "proxy": false, "title": "", "description": "likewise concerning annual instantly anti deployment", "image": "https://loremflickr.com/181/3306?lock=1275456187971812", "video": "https://picsum.videos/seed/CcMAI/2638/2080", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "purple"}, {"id": "", "name": "", "color": "red"}], "folderId": "", "webhookIds": [], "comments": "clueless unless conclude daddy boohoo ideal lumpy masculinize charter geez as eulogise granny", "shortLink": "https://complicated-resource.net/", "qrCode": "https://impractical-cap.net", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1731720644839", "updatedAt": "1737298531055", "projectId": ""} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1019,7 +1070,7 @@ examples: sortBy: "timestamp" responses: "200": - application/json: [{"event": "sale", "eventId": "", "eventName": "", "link": {"id": "", "domain": "remorseful-concentration.biz", "key": "", "url": "https://primary-paintwork.com/", "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "expiresAt": "1761540002981", "expiredUrl": "https://black-poetry.name/", "password": "COyVtOrvIw1vLIJ", "title": "", "description": "despite er boom however when uh-huh", "image": "https://picsum.photos/seed/T1tZJLp1EG/3827/3109", "video": "https://loremflickr.com/2420/1632?lock=7470650813503352", "ios": "", "android": "", "geo": {}, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}], "webhookIds": [], "comments": "tenement commonly softly boo massive sorrowful", "shortLink": "https://dense-custom.info/", "qrCode": "https://alive-lid.biz", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1726952814545", "updatedAt": "1738826442545", "projectId": ""}, "click": {"id": "", "timestamp": "", "url": "https://utilized-quit.net/", "country": "Togo", "city": "Cormiermouth", "region": "", "continent": "North America", "device": "Mobile", "browser": "Chrome", "os": "Chrome OS", "referer": "gummy-cope.net", "refererUrl": "https://prickly-bourgeoisie.info/", "ip": "69bd:53cd:cebc:ac4b:d1e8:50e8:ee59:b0b3"}, "customer": {"id": "", "externalId": "", "name": "", "createdAt": "1737708359013"}, "sale": {"amount": 625809, "invoiceId": null, "paymentProcessor": "stripe"}, "saleAmount": 1401.42, "invoice_id": "", "payment_processor": "", "click_id": "", "link_id": "", "domain": "unruly-allegation.name", "key": "", "url": "https://fortunate-swim.info/", "continent": "Australia", "country": "Cook Islands", "city": "South Harryburgh", "device": "Mobile", "browser": "Safari", "os": "WebOS", "qr": 1523.03, "ip": "caf5:04dc:da9e:67cc:af3b:8caf:afbe:e39c"}, {"event": "sale", "eventId": "", "eventName": "", "link": {"id": "", "domain": "right-window.biz", "key": "", "url": "https://physical-experience.org/", "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "expiresAt": "1750231356608", "expiredUrl": "https://indelible-birdbath.net", "password": "4yMlkCXkK5ppW3u", "title": "", "description": "terribly gosh facilitate in", "image": "https://loremflickr.com/2596/954?lock=8527955982122580", "video": "https://loremflickr.com/3336/742?lock=2177640289466521", "ios": "", "android": "", "geo": {}, "tagId": "", "tags": [{"id": "", "name": "", "color": "red"}, {"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "pink"}], "webhookIds": ["", "", ""], "comments": "up so pro pish clear-cut an mid aw disconnection which wetly typeface usable underneath putrefy ah aha", "shortLink": "https://knowledgeable-season.info", "qrCode": "https://nimble-individual.biz/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1737447080302", "updatedAt": "1738832163766", "projectId": ""}, "click": {"id": "", "timestamp": "", "url": "https://perfumed-marketplace.com/", "country": "Burundi", "city": "Stockton", "region": "", "continent": "Asia", "device": "Desktop", "browser": "Chrome", "os": "Symbian", "referer": "well-off-hygienic.org", "refererUrl": "https://ripe-ceramic.org", "ip": "eebc:cce9:cecf:ebeb:dfd9:15f2:a0cc:a3b1"}, "customer": {"id": "", "externalId": "", "name": "", "createdAt": "1721808025125"}, "sale": {"amount": 443316, "invoiceId": null, "paymentProcessor": "paddle"}, "saleAmount": 2634.98, "invoice_id": "", "payment_processor": "", "click_id": "", "link_id": "", "domain": "next-cricket.biz", "key": "", "url": "https://repentant-rust.name/", "continent": "Australia", "country": "Saint Helena", "city": "Luettgenfort", "device": "Mobile", "browser": "Safari", "os": "Chrome OS", "qr": 4390.32, "ip": "54.229.114.129"}] + application/json: [{"event": "sale", "eventId": "", "eventName": "", "link": {"id": "", "domain": "remorseful-concentration.biz", "key": "", "url": "https://primary-paintwork.com/", "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "expiresAt": "1761972002529", "expiredUrl": "https://black-poetry.name/", "password": "COyVtOrvIw1vLIJ", "title": "", "description": "despite er boom however when uh-huh", "image": "https://picsum.photos/seed/T1tZJLp1EG/3827/3109", "video": "https://loremflickr.com/2420/1632?lock=7470650813503352", "ios": "", "android": "", "geo": {}, "tagId": "", "tags": [{"id": "", "name": "", "color": "green"}], "folderId": "", "webhookIds": [], "comments": "tenement commonly softly boo massive sorrowful", "shortLink": "https://dense-custom.info/", "qrCode": "https://alive-lid.biz", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1727384814075", "updatedAt": "1739258442075", "projectId": ""}, "click": {"id": "", "timestamp": "", "url": "https://utilized-quit.net/", "country": "Togo", "city": "Cormiermouth", "region": "", "continent": "North America", "device": "Mobile", "browser": "Chrome", "os": "Chrome OS", "referer": "gummy-cope.net", "refererUrl": "https://prickly-bourgeoisie.info/", "ip": "69bd:53cd:cebc:ac4b:d1e8:50e8:ee59:b0b3"}, "customer": {"id": "", "externalId": "", "name": "", "createdAt": "1738140358535"}, "sale": {"amount": 625809, "invoiceId": null, "paymentProcessor": "stripe"}, "saleAmount": 1401.42, "invoice_id": "", "payment_processor": "", "click_id": "", "link_id": "", "domain": "unruly-allegation.name", "key": "", "url": "https://fortunate-swim.info/", "continent": "Australia", "country": "Cook Islands", "city": "South Harryburgh", "device": "Mobile", "browser": "Safari", "os": "WebOS", "qr": 1523.03, "ip": "caf5:04dc:da9e:67cc:af3b:8caf:afbe:e39c"}, {"event": "sale", "eventId": "", "eventName": "", "link": {"id": "", "domain": "right-window.biz", "key": "", "url": "https://physical-experience.org/", "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "expiresAt": "1750663356118", "expiredUrl": "https://indelible-birdbath.net", "password": "4yMlkCXkK5ppW3u", "title": "", "description": "terribly gosh facilitate in", "image": "https://loremflickr.com/2596/954?lock=8527955982122580", "video": "https://loremflickr.com/3336/742?lock=2177640289466521", "ios": "", "android": "", "geo": {}, "tagId": "", "tags": [{"id": "", "name": "", "color": "red"}, {"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "pink"}], "folderId": "", "webhookIds": ["", "", ""], "comments": "up so pro pish clear-cut an mid aw disconnection which wetly typeface usable underneath putrefy ah aha", "shortLink": "https://knowledgeable-season.info", "qrCode": "https://nimble-individual.biz/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1737879079839", "updatedAt": "1739264163303", "projectId": ""}, "click": {"id": "", "timestamp": "", "url": "https://perfumed-marketplace.com/", "country": "Burundi", "city": "Stockton", "region": "", "continent": "Asia", "device": "Desktop", "browser": "Chrome", "os": "Symbian", "referer": "well-off-hygienic.org", "refererUrl": "https://ripe-ceramic.org", "ip": "eebc:cce9:cecf:ebeb:dfd9:15f2:a0cc:a3b1"}, "customer": {"id": "", "externalId": "", "name": "", "createdAt": "1722240024670"}, "sale": {"amount": 443316, "invoiceId": null, "paymentProcessor": "paddle"}, "saleAmount": 2634.98, "invoice_id": "", "payment_processor": "", "click_id": "", "link_id": "", "domain": "next-cricket.biz", "key": "", "url": "https://repentant-rust.name/", "continent": "Australia", "country": "Saint Helena", "city": "Luettgenfort", "device": "Mobile", "browser": "Safari", "os": "Chrome OS", "qr": 4390.32, "ip": "54.229.114.129"}] "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1432,7 +1483,7 @@ examples: idOrSlug: "" responses: "200": - application/json: {"id": "", "name": "", "slug": "", "logo": null, "inviteCode": "", "plan": "business extra", "stripeId": "", "billingCycleStart": 5588.34, "paymentFailedAt": "", "stripeConnectId": "", "usage": 5442.21, "usageLimit": 5212.35, "linksUsage": 9699.61, "linksLimit": 4580.49, "salesUsage": 4508.24, "salesLimit": 2627.95, "domainsLimit": 2134.57, "tagsLimit": 9371.46, "usersLimit": 4381.42, "aiUsage": 8013.73, "aiLimit": 788.88, "conversionEnabled": true, "dotLinkClaimed": true, "partnersEnabled": true, "createdAt": "1723222620163", "users": [{"role": "owner"}, {"role": "member"}, {"role": "member"}], "domains": [{"slug": "acme.com", "primary": false, "verified": false}, {"slug": "acme.com", "primary": false, "verified": false}], "store": {"key": ""}, "allowedHostnames": ["dub.sh"]} + application/json: {"id": "", "name": "", "slug": "", "logo": null, "inviteCode": "", "plan": "business extra", "stripeId": "", "billingCycleStart": 5588.34, "paymentFailedAt": "", "stripeConnectId": "", "usage": 5442.21, "usageLimit": 5212.35, "linksUsage": 9699.61, "linksLimit": 4580.49, "salesUsage": 4508.24, "salesLimit": 2627.95, "domainsLimit": 2134.57, "tagsLimit": 9371.46, "foldersLimit": 7003.47, "usersLimit": 4381.42, "aiUsage": 8013.73, "aiLimit": 788.88, "conversionEnabled": true, "dotLinkClaimed": true, "partnersEnabled": true, "createdAt": "1723222620163", "users": [{"role": "owner"}, {"role": "member"}, {"role": "member"}], "domains": [{"slug": "acme.com", "primary": false, "verified": false}, {"slug": "acme.com", "primary": false, "verified": false}], "store": {"key": ""}, "allowedHostnames": ["dub.sh"]} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1458,7 +1509,7 @@ examples: idOrSlug: "" responses: "200": - application/json: {"id": "", "name": "", "slug": "", "logo": null, "inviteCode": "", "plan": "enterprise", "stripeId": "", "billingCycleStart": 5971.29, "paymentFailedAt": "", "stripeConnectId": "", "usage": 3446.2, "usageLimit": 9914.64, "linksUsage": 6276.9, "linksLimit": 4888.52, "salesUsage": 9840.08, "salesLimit": 540.62, "domainsLimit": 8965.01, "tagsLimit": 4468.63, "usersLimit": 3115.07, "aiUsage": 2494.4, "aiLimit": 1395.79, "conversionEnabled": false, "dotLinkClaimed": false, "partnersEnabled": true, "createdAt": "1720441243584", "users": [{"role": "member"}, {"role": "owner"}, {"role": "owner"}], "domains": [{"slug": "acme.com", "primary": false, "verified": false}, {"slug": "acme.com", "primary": false, "verified": false}, {"slug": "acme.com", "primary": false, "verified": false}], "store": {"key": "", "key1": "", "key2": ""}, "allowedHostnames": ["dub.sh"]} + application/json: {"id": "", "name": "", "slug": "", "logo": null, "inviteCode": "", "plan": "enterprise", "stripeId": "", "billingCycleStart": 5971.29, "paymentFailedAt": "", "stripeConnectId": "", "usage": 3446.2, "usageLimit": 9914.64, "linksUsage": 6276.9, "linksLimit": 4888.52, "salesUsage": 9840.08, "salesLimit": 540.62, "domainsLimit": 8965.01, "tagsLimit": 4468.63, "foldersLimit": 8574.78, "usersLimit": 3115.07, "aiUsage": 2494.4, "aiLimit": 1395.79, "conversionEnabled": false, "dotLinkClaimed": false, "partnersEnabled": true, "createdAt": "1720441243584", "users": [{"role": "member"}, {"role": "owner"}, {"role": "owner"}], "domains": [{"slug": "acme.com", "primary": false, "verified": false}, {"slug": "acme.com", "primary": false, "verified": false}, {"slug": "acme.com", "primary": false, "verified": false}], "store": {"key": "", "key1": "", "key2": ""}, "allowedHostnames": ["dub.sh"]} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1547,7 +1598,7 @@ examples: application/json: {"programId": "", "name": "", "email": "Loyal79@yahoo.com", "username": "Aaliyah_Borer", "linkProps": {"externalId": "123456", "tagIds": ["clux0rgak00011..."]}} responses: "201": - application/json: {"id": "", "name": "", "email": "Loyal79@yahoo.com", "image": "https://loremflickr.com/1/679?lock=7139282333236917", "country": "Slovenia", "bio": "", "stripeConnectId": "", "payoutsEnabled": false, "createdAt": "1730216446017", "updatedAt": "1738019902359", "status": "pending", "links": [{"id": "", "domain": "probable-heating.com", "key": "", "shortLink": "https://standard-utilization.com/", "url": "https://brisk-seafood.net/", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0}], "commissionAmount": 365.21, "earnings": 6216.36, "clicks": 0, "leads": 0, "sales": 0, "salesAmount": 0} + application/json: {"id": "", "name": "", "email": "Loyal79@yahoo.com", "image": "https://loremflickr.com/1/679?lock=7139282333236917", "country": "Slovenia", "createdAt": "1730216446017", "status": "pending", "programId": "", "tenantId": "", "links": [{"id": "", "domain": "probable-heating.com", "key": "", "shortLink": "https://standard-utilization.com/", "url": "https://brisk-seafood.net/", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0}], "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0, "earnings": 6216.36} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1572,7 +1623,7 @@ examples: application/json: {"programId": "", "url": "https://necessary-brief.name", "linkProps": {"externalId": "123456", "tagIds": ["clux0rgak00011..."]}} responses: "201": - application/json: {"id": "", "domain": "inferior-louse.org", "key": "", "url": "https://lighthearted-subexpression.net", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1746975543818", "expiredUrl": "https://mammoth-resolve.com", "password": "oCRFmmigZdFo7_S", "proxy": false, "title": "", "description": "triumphantly zowie polite from yippee whether lazily hyena", "image": "https://loremflickr.com/3108/2731?lock=4230767515156707", "video": "https://loremflickr.com/3903/2681?lock=8712371193890444", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "brown"}], "webhookIds": [""], "comments": "after boldly yieldingly from irritably nectarine nor vision loyally ew ick muddy rewrite till amount nor", "shortLink": "https://hard-to-find-railway.name", "qrCode": "https://vivacious-impostor.name/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1730893636352", "updatedAt": "1738583197892", "projectId": ""} + application/json: {"id": "", "domain": "inferior-louse.org", "key": "", "url": "https://lighthearted-subexpression.net", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1746975543818", "expiredUrl": "https://mammoth-resolve.com", "password": "oCRFmmigZdFo7_S", "proxy": false, "title": "", "description": "triumphantly zowie polite from yippee whether lazily hyena", "image": "https://loremflickr.com/3108/2731?lock=4230767515156707", "video": "https://loremflickr.com/3903/2681?lock=8712371193890444", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [{"id": "", "name": "", "color": "blue"}, {"id": "", "name": "", "color": "pink"}, {"id": "", "name": "", "color": "brown"}], "folderId": "", "webhookIds": [""], "comments": "after boldly yieldingly from irritably nectarine nor vision loyally ew ick muddy rewrite till amount nor", "shortLink": "https://hard-to-find-railway.name", "qrCode": "https://vivacious-impostor.name/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1730893636352", "updatedAt": "1738583197892", "projectId": ""} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1597,7 +1648,133 @@ examples: application/json: {"programId": "", "url": "https://unsteady-lobster.com/", "linkProps": {"externalId": "123456", "tagIds": ["clux0rgak00011..."]}} responses: "200": - application/json: {"id": "", "domain": "snoopy-exasperation.name", "key": "", "url": "https://defenseless-suitcase.org/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1766567071612", "expiredUrl": "https://plump-platypus.net", "password": "Fj89Olng6LL82os", "proxy": false, "title": "", "description": "sashay um correctly how oxygenate anenst alliance", "image": "https://picsum.photos/seed/GxNkp/1301/240", "video": "https://picsum.videos/seed/WqM7t1/2914/1686", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [], "webhookIds": [], "comments": "brilliant for meanwhile blindly beyond subtract ha colossal utterly on", "shortLink": "https://grumpy-stall.info", "qrCode": "https://best-swim.com/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1730880676755", "updatedAt": "1738879036916", "projectId": ""} + application/json: {"id": "", "domain": "snoopy-exasperation.name", "key": "", "url": "https://defenseless-suitcase.org/", "trackConversion": false, "externalId": "", "tenantId": "", "programId": "", "partnerId": "", "archived": false, "expiresAt": "1766567071612", "expiredUrl": "https://plump-platypus.net", "password": "Fj89Olng6LL82os", "proxy": false, "title": "", "description": "sashay um correctly how oxygenate anenst alliance", "image": "https://picsum.photos/seed/GxNkp/1301/240", "video": "https://picsum.videos/seed/WqM7t1/2914/1686", "rewrite": false, "doIndex": false, "ios": "", "android": "", "geo": {}, "publicStats": false, "tagId": "", "tags": [], "folderId": "", "webhookIds": [], "comments": "brilliant for meanwhile blindly beyond subtract ha colossal utterly on", "shortLink": "https://grumpy-stall.info", "qrCode": "https://best-swim.com/", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": 0, "lastClicked": "", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1730880676755", "updatedAt": "1738879036916", "projectId": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + createFolder: + speakeasy-default-create-folder: + responses: + "201": + application/json: {"id": "", "name": "", "accessLevel": null, "linkCount": 0, "createdAt": "1723128678202", "updatedAt": "1739288353206"} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + listFolders: + speakeasy-default-list-folders: + responses: + "200": + application/json: [{"id": "", "name": "", "accessLevel": null, "linkCount": 0, "createdAt": "1725042359011", "updatedAt": "1739291799893"}, {"id": "", "name": "", "accessLevel": null, "linkCount": 0, "createdAt": "1713387745090", "updatedAt": "1739253041334"}, {"id": "", "name": "", "accessLevel": null, "linkCount": 0, "createdAt": "1712603481495", "updatedAt": "1739288103392"}] + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + updateFolder: + speakeasy-default-update-folder: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "name": "", "accessLevel": null, "linkCount": 0, "createdAt": "1734824994043", "updatedAt": "1739284785395"} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + deleteFolder: + speakeasy-default-delete-folder: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + retrievePartnerAnalytics: + speakeasy-default-retrieve-partner-analytics: + parameters: + query: + timezone: "America/New_York" + groupBy: "count" + programId: "" + responses: + "200": + application/json: [{"link": "", "id": "", "domain": "hot-dandelion.org", "key": "", "shortLink": "", "url": "https://everlasting-cheetah.name", "createdAt": "1712849418517", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0, "earnings": 0}, {"link": "", "id": "", "domain": "grizzled-ecliptic.biz", "key": "", "shortLink": "", "url": "https://possible-interchange.info", "createdAt": "1738774186771", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0, "earnings": 0}, {"link": "", "id": "", "domain": "glass-wriggler.biz", "key": "", "shortLink": "", "url": "https://light-fit.name/", "createdAt": "1710404697280", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0, "earnings": 0}] "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 203cc90..c63b392 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false php: - version: 0.11.24 + version: 0.11.25 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 92369bb..290a79a 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.487.0 +speakeasyVersion: 1.488.0 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:9e3263ee932aa1080b3fec6a6b12747e9958efae38e87e36373ce7be2d8a7a04 - sourceBlobDigest: sha256:302af5af57801c13e8eae76439ce161f3027ad63927e360e1152ba4f786f7d91 + sourceRevisionDigest: sha256:e4adea36821d8c2383095d5eedeaa4b74c31ba1132a6e1ef66dd90fea2274aca + sourceBlobDigest: sha256:cefa494187073dd8bb1eebde5639c67f6f8ede53421ce7fd329ea379e75153ca tags: - latest - - speakeasy-sdk-regen-1738887580 + - speakeasy-sdk-regen-1739146827 - 0.0.1 targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:9e3263ee932aa1080b3fec6a6b12747e9958efae38e87e36373ce7be2d8a7a04 - sourceBlobDigest: sha256:302af5af57801c13e8eae76439ce161f3027ad63927e360e1152ba4f786f7d91 + sourceRevisionDigest: sha256:e4adea36821d8c2383095d5eedeaa4b74c31ba1132a6e1ef66dd90fea2274aca + sourceBlobDigest: sha256:cefa494187073dd8bb1eebde5639c67f6f8ede53421ce7fd329ea379e75153ca codeSamplesNamespace: code-samples-php-my-first-target - codeSamplesRevisionDigest: sha256:a3f91f4e23b90a8f60d69358e0d343bba6f4d82c0944e889274f7b8c53bc5e56 + codeSamplesRevisionDigest: sha256:c7f8713451be5d22cc878a720d41fa3ef592c3af005db2a20967b8effaa8328c workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 4fc1b23..1f8956e 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,13 @@ if ($response->responseBodies !== null) { * [list](docs/sdks/events/README.md#list) - Retrieve a list of events +### [folders](docs/sdks/folders/README.md) + +* [create](docs/sdks/folders/README.md#create) - Create a new folder +* [delete](docs/sdks/folders/README.md#delete) - Delete a folder +* [list](docs/sdks/folders/README.md#list) - Retrieve a list of folders +* [update](docs/sdks/folders/README.md#update) - Update a folder + ### [links](docs/sdks/links/README.md) * [createMany](docs/sdks/links/README.md#createmany) - Bulk create links @@ -212,6 +219,7 @@ if ($response->responseBodies !== null) { * [create](docs/sdks/partners/README.md#create) - Create a new partner * [createLink](docs/sdks/partners/README.md#createlink) - Create a link for a partner +* [analytics](docs/sdks/partners/README.md#analytics) - Retrieve analytics for a partner * [upsertLink](docs/sdks/partners/README.md#upsertlink) - Upsert a link for a partner ### [qrCodes](docs/sdks/qrcodes/README.md) diff --git a/RELEASES.md b/RELEASES.md index a793977..0173777 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -690,4 +690,14 @@ Based on: ### Generated - [php v0.11.24] . ### Releases -- [Composer v0.11.24] https://packagist.org/packages/dub/dub-php#v0.11.24 - . \ No newline at end of file +- [Composer v0.11.24] https://packagist.org/packages/dub/dub-php#v0.11.24 - . + +## 2025-02-12 00:19:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.488.0 (2.506.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.11.25] . +### Releases +- [Composer v0.11.25] https://packagist.org/packages/dub/dub-php#v0.11.25 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 8ae31ce..2681a76 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -63,6 +63,30 @@ actions: - "lang": "php" "label": "listEvents" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\ListEventsRequest(\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->events->list(\n request: $request\n);\n\nif ($response->oneOf !== null) {\n // handle response\n}" + - target: $["paths"]["/folders"]["get"] + update: + "x-codeSamples": + - "lang": "php" + "label": "listFolders" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->folders->list(\n search: ''\n);\n\nif ($response->folderSchemas !== null) {\n // handle response\n}" + - target: $["paths"]["/folders"]["post"] + update: + "x-codeSamples": + - "lang": "php" + "label": "createFolder" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\CreateFolderRequestBody(\n name: '',\n);\n\n$response = $sdk->folders->create(\n request: $request\n);\n\nif ($response->folderSchema !== null) {\n // handle response\n}" + - target: $["paths"]["/folders/{id}"]["delete"] + update: + "x-codeSamples": + - "lang": "php" + "label": "deleteFolder" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->folders->delete(\n id: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" + - target: $["paths"]["/folders/{id}"]["patch"] + update: + "x-codeSamples": + - "lang": "php" + "label": "updateFolder" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$requestBody = new Operations\\UpdateFolderRequestBody();\n\n$response = $sdk->folders->update(\n id: '',\n requestBody: $requestBody\n\n);\n\nif ($response->folderSchema !== null) {\n // handle response\n}" - target: $["paths"]["/links"]["get"] update: "x-codeSamples": @@ -135,18 +159,24 @@ actions: - "lang": "php" "label": "createPartner" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\CreatePartnerRequestBody(\n programId: '',\n name: '',\n email: 'Loyal79@yahoo.com',\n username: 'Aaliyah_Borer',\n linkProps: new Operations\\LinkProps(\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->partners->create(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" + - target: $["paths"]["/partners/analytics"]["get"] + update: + "x-codeSamples": + - "lang": "php" + "label": "retrievePartnerAnalytics" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\RetrievePartnerAnalyticsRequest(\n programId: '',\n);\n\n$response = $sdk->partners->analytics(\n request: $request\n);\n\nif ($response->oneOf !== null) {\n // handle response\n}" - target: $["paths"]["/partners/links"]["post"] update: "x-codeSamples": - "lang": "php" "label": "createPartnerLink" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\CreatePartnerLinkRequestBody(\n programId: '',\n url: 'https://necessary-brief.name',\n linkProps: new Operations\\CreatePartnerLinkLinkProps(\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->partners->createLink(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\CreatePartnerLinkRequestBody(\n programId: '',\n linkProps: new Operations\\CreatePartnerLinkLinkProps(\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->partners->createLink(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" - target: $["paths"]["/partners/links/upsert"]["put"] update: "x-codeSamples": - "lang": "php" "label": "upsertPartnerLink" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\UpsertPartnerLinkRequestBody(\n programId: '',\n url: 'https://unsteady-lobster.com/',\n linkProps: new Operations\\UpsertPartnerLinkLinkProps(\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->partners->upsertLink(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\UpsertPartnerLinkRequestBody(\n programId: '',\n linkProps: new Operations\\UpsertPartnerLinkLinkProps(\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->partners->upsertLink(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" - target: $["paths"]["/qr"]["get"] update: "x-codeSamples": diff --git a/docs/Models/Components/AccessLevel.md b/docs/Models/Components/AccessLevel.md new file mode 100644 index 0000000..3ceceb1 --- /dev/null +++ b/docs/Models/Components/AccessLevel.md @@ -0,0 +1,11 @@ +# AccessLevel + +The access level of the folder within the workspace. + + +## Values + +| Name | Value | +| ------- | ------- | +| `Read` | read | +| `Write` | write | \ No newline at end of file diff --git a/docs/Models/Components/Data.md b/docs/Models/Components/Data.md index 68dbe28..e995fba 100644 --- a/docs/Models/Components/Data.md +++ b/docs/Models/Components/Data.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/FolderSchema.md b/docs/Models/Components/FolderSchema.md new file mode 100644 index 0000000..5792af5 --- /dev/null +++ b/docs/Models/Components/FolderSchema.md @@ -0,0 +1,13 @@ +# FolderSchema + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the folder. | +| `name` | *string* | :heavy_check_mark: | The name of the folder. | +| `createdAt` | *string* | :heavy_check_mark: | The date the folder was created. | +| `updatedAt` | *string* | :heavy_check_mark: | The date the folder was updated. | +| `linkCount` | *?float* | :heavy_minus_sign: | The number of links in the folder. | +| `accessLevel` | [?Components\AccessLevel](../../Models/Components/AccessLevel.md) | :heavy_minus_sign: | The access level of the folder within the workspace. | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventLink.md b/docs/Models/Components/LeadCreatedEventLink.md index 03b6c56..a35b09c 100644 --- a/docs/Models/Components/LeadCreatedEventLink.md +++ b/docs/Models/Components/LeadCreatedEventLink.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/LeadEventLink.md b/docs/Models/Components/LeadEventLink.md index 0b146f7..4c1dcf1 100644 --- a/docs/Models/Components/LeadEventLink.md +++ b/docs/Models/Components/LeadEventLink.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/Link.md b/docs/Models/Components/Link.md index fb88695..0f8cced 100644 --- a/docs/Models/Components/Link.md +++ b/docs/Models/Components/Link.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/LinkClickedEventLink.md b/docs/Models/Components/LinkClickedEventLink.md index fd3489e..d1cb2b0 100644 --- a/docs/Models/Components/LinkClickedEventLink.md +++ b/docs/Models/Components/LinkClickedEventLink.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/LinkSchema.md b/docs/Models/Components/LinkSchema.md index c01fbb5..854c3ea 100644 --- a/docs/Models/Components/LinkSchema.md +++ b/docs/Models/Components/LinkSchema.md @@ -38,6 +38,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/Links.md b/docs/Models/Components/Links.md new file mode 100644 index 0000000..843881b --- /dev/null +++ b/docs/Models/Components/Links.md @@ -0,0 +1,16 @@ +# Links + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `domain` | *string* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | +| `key` | *string* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | \ No newline at end of file diff --git a/docs/Models/Components/PartnerAnalyticsCount.md b/docs/Models/Components/PartnerAnalyticsCount.md new file mode 100644 index 0000000..d03721f --- /dev/null +++ b/docs/Models/Components/PartnerAnalyticsCount.md @@ -0,0 +1,12 @@ +# PartnerAnalyticsCount + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `clicks` | *?float* | :heavy_minus_sign: | The total number of clicks | +| `leads` | *?float* | :heavy_minus_sign: | The total number of leads | +| `sales` | *?float* | :heavy_minus_sign: | The total number of sales | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales, in cents | +| `earnings` | *?float* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/PartnerAnalyticsTimeseries.md b/docs/Models/Components/PartnerAnalyticsTimeseries.md new file mode 100644 index 0000000..bd6eae4 --- /dev/null +++ b/docs/Models/Components/PartnerAnalyticsTimeseries.md @@ -0,0 +1,13 @@ +# PartnerAnalyticsTimeseries + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks in the interval | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads in the interval | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales in the interval | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales in the interval, in cents | +| `earnings` | *?float* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/PartnerAnalyticsTopLinks.md b/docs/Models/Components/PartnerAnalyticsTopLinks.md new file mode 100644 index 0000000..55038be --- /dev/null +++ b/docs/Models/Components/PartnerAnalyticsTopLinks.md @@ -0,0 +1,20 @@ +# PartnerAnalyticsTopLinks + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`link`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the short link | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link | +| `domain` | *string* | :heavy_check_mark: | The domain of the short link | +| `key` | *string* | :heavy_check_mark: | The key of the short link | +| `shortLink` | *string* | :heavy_check_mark: | The short link URL | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link | +| `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this link | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this link | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this link | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this link, in cents | +| `earnings` | *?float* | :heavy_minus_sign: | N/A | +| `comments` | *?string* | :heavy_minus_sign: | The comments of the short link | \ No newline at end of file diff --git a/docs/Models/Components/PartnerCreatedEvent.md b/docs/Models/Components/PartnerCreatedEvent.md new file mode 100644 index 0000000..164da2c --- /dev/null +++ b/docs/Models/Components/PartnerCreatedEvent.md @@ -0,0 +1,13 @@ +# PartnerCreatedEvent + +Triggered when a partner is created. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `event` | [Components\PartnerCreatedEventEvent](../../Models/Components/PartnerCreatedEventEvent.md) | :heavy_check_mark: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `data` | [Components\PartnerCreatedEventData](../../Models/Components/PartnerCreatedEventData.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/PartnerCreatedEventData.md b/docs/Models/Components/PartnerCreatedEventData.md new file mode 100644 index 0000000..48a8eae --- /dev/null +++ b/docs/Models/Components/PartnerCreatedEventData.md @@ -0,0 +1,23 @@ +# PartnerCreatedEventData + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `country` | *string* | :heavy_check_mark: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `status` | [Components\Status](../../Models/Components/Status.md) | :heavy_check_mark: | N/A | +| `programId` | *string* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `image` | *string* | :heavy_check_mark: | N/A | +| `tenantId` | *string* | :heavy_check_mark: | N/A | +| `links` | array<[Components\Links](../../Models/Components/Links.md)> | :heavy_check_mark: | N/A | +| `clicks` | *?float* | :heavy_minus_sign: | N/A | +| `leads` | *?float* | :heavy_minus_sign: | N/A | +| `sales` | *?float* | :heavy_minus_sign: | N/A | +| `saleAmount` | *?float* | :heavy_minus_sign: | N/A | +| `earnings` | *?float* | :heavy_minus_sign: | N/A | +| `description` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/PartnerCreatedEventEvent.md b/docs/Models/Components/PartnerCreatedEventEvent.md new file mode 100644 index 0000000..4bf073c --- /dev/null +++ b/docs/Models/Components/PartnerCreatedEventEvent.md @@ -0,0 +1,8 @@ +# PartnerCreatedEventEvent + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `PartnerCreated` | partner.created | \ No newline at end of file diff --git a/docs/Models/Components/SaleCreatedEventLink.md b/docs/Models/Components/SaleCreatedEventLink.md index ebc4477..d8577bc 100644 --- a/docs/Models/Components/SaleCreatedEventLink.md +++ b/docs/Models/Components/SaleCreatedEventLink.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/SaleEventLink.md b/docs/Models/Components/SaleEventLink.md index 86e5b2c..93fce8d 100644 --- a/docs/Models/Components/SaleEventLink.md +++ b/docs/Models/Components/SaleEventLink.md @@ -39,6 +39,7 @@ | `publicStats` | *?bool* | :heavy_minus_sign: | N/A | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `folderId` | *string* | :heavy_check_mark: | The unique ID of the folder assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | | `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | diff --git a/docs/Models/Components/Status.md b/docs/Models/Components/Status.md new file mode 100644 index 0000000..7144366 --- /dev/null +++ b/docs/Models/Components/Status.md @@ -0,0 +1,10 @@ +# Status + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Approved` | approved | +| `Pending` | pending | +| `Rejected` | rejected | \ No newline at end of file diff --git a/docs/Models/Components/WebhookEvent.md b/docs/Models/Components/WebhookEvent.md index da3e6a6..25944db 100644 --- a/docs/Models/Components/WebhookEvent.md +++ b/docs/Models/Components/WebhookEvent.md @@ -41,3 +41,12 @@ Components\LeadCreatedEvent $value = /* values here */ Components\SaleCreatedEvent $value = /* values here */ ``` +### `Components\PartnerCreatedEvent` + +```php +/** +* @var Components\PartnerCreatedEvent +*/ +Components\PartnerCreatedEvent $value = /* values here */ +``` + diff --git a/docs/Models/Components/WorkspaceSchema.md b/docs/Models/Components/WorkspaceSchema.md index cc51210..8049abd 100644 --- a/docs/Models/Components/WorkspaceSchema.md +++ b/docs/Models/Components/WorkspaceSchema.md @@ -18,6 +18,7 @@ | `salesLimit` | *float* | :heavy_check_mark: | The limit of tracked revenue in the current billing cycle (in cents). | | | `domainsLimit` | *float* | :heavy_check_mark: | The domains limit of the workspace. | | | `tagsLimit` | *float* | :heavy_check_mark: | The tags limit of the workspace. | | +| `foldersLimit` | *float* | :heavy_check_mark: | The folders limit of the workspace. | | | `usersLimit` | *float* | :heavy_check_mark: | The users limit of the workspace. | | | `aiUsage` | *float* | :heavy_check_mark: | The AI usage of the workspace. | | | `aiLimit` | *float* | :heavy_check_mark: | The AI limit of the workspace. | | diff --git a/docs/Models/Operations/AccessLevel.md b/docs/Models/Operations/AccessLevel.md new file mode 100644 index 0000000..3ceceb1 --- /dev/null +++ b/docs/Models/Operations/AccessLevel.md @@ -0,0 +1,11 @@ +# AccessLevel + +The access level of the folder within the workspace. + + +## Values + +| Name | Value | +| ------- | ------- | +| `Read` | read | +| `Write` | write | \ No newline at end of file diff --git a/docs/Models/Operations/CreateFolderRequestBody.md b/docs/Models/Operations/CreateFolderRequestBody.md new file mode 100644 index 0000000..629a723 --- /dev/null +++ b/docs/Models/Operations/CreateFolderRequestBody.md @@ -0,0 +1,9 @@ +# CreateFolderRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The name of the folder. | +| `accessLevel` | [?Operations\AccessLevel](../../Models/Operations/AccessLevel.md) | :heavy_minus_sign: | The access level of the folder within the workspace. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateFolderResponse.md b/docs/Models/Operations/CreateFolderResponse.md new file mode 100644 index 0000000..67cc0c3 --- /dev/null +++ b/docs/Models/Operations/CreateFolderResponse.md @@ -0,0 +1,11 @@ +# CreateFolderResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `folderSchema` | [?Components\FolderSchema](../../Models/Components/FolderSchema.md) | :heavy_minus_sign: | The created folder | \ No newline at end of file diff --git a/docs/Models/Operations/CreateLinkRequestBody.md b/docs/Models/Operations/CreateLinkRequestBody.md index 344266b..3ba295b 100644 --- a/docs/Models/Operations/CreateLinkRequestBody.md +++ b/docs/Models/Operations/CreateLinkRequestBody.md @@ -22,6 +22,7 @@ | `programId` | *?string* | :heavy_minus_sign: | The ID of the program the short link is associated with. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/CreatePartnerDiscount.md b/docs/Models/Operations/CreatePartnerDiscount.md deleted file mode 100644 index b509534..0000000 --- a/docs/Models/Operations/CreatePartnerDiscount.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreatePartnerDiscount - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `amount` | *float* | :heavy_check_mark: | N/A | -| `type` | [Operations\CreatePartnerType](../../Models/Operations/CreatePartnerType.md) | :heavy_check_mark: | N/A | -| `couponId` | *string* | :heavy_check_mark: | N/A | -| `couponTestId` | *string* | :heavy_check_mark: | N/A | -| `duration` | *float* | :heavy_check_mark: | N/A | -| `interval` | [Operations\CreatePartnerInterval](../../Models/Operations/CreatePartnerInterval.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerInterval.md b/docs/Models/Operations/CreatePartnerInterval.md deleted file mode 100644 index a6a2d35..0000000 --- a/docs/Models/Operations/CreatePartnerInterval.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreatePartnerInterval - - -## Values - -| Name | Value | -| ------- | ------- | -| `Month` | month | -| `Year` | year | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerLinkLinkProps.md b/docs/Models/Operations/CreatePartnerLinkLinkProps.md index 48060db..df4d10a 100644 --- a/docs/Models/Operations/CreatePartnerLinkLinkProps.md +++ b/docs/Models/Operations/CreatePartnerLinkLinkProps.md @@ -17,6 +17,7 @@ Additional properties that you can pass to the partner's short link. Will be use | `externalId` | *?string* | :heavy_minus_sign: | The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. | 123456 | | `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/CreatePartnerLinkRequestBody.md b/docs/Models/Operations/CreatePartnerLinkRequestBody.md index 34ef27d..0028e3d 100644 --- a/docs/Models/Operations/CreatePartnerLinkRequestBody.md +++ b/docs/Models/Operations/CreatePartnerLinkRequestBody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| `programId` | *string* | :heavy_check_mark: | The ID of the program that the partner is enrolled in. | -| `url` | *string* | :heavy_check_mark: | The URL to shorten. Will throw an error if the domain doesn't match the program's default URL domain. | -| `key` | *?string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `linkProps` | [?Operations\CreatePartnerLinkLinkProps](../../Models/Operations/CreatePartnerLinkLinkProps.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | -| `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | -| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `programId` | *string* | :heavy_check_mark: | The ID of the program that the partner is enrolled in. | +| `key` | *?string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `linkProps` | [?Operations\CreatePartnerLinkLinkProps](../../Models/Operations/CreatePartnerLinkLinkProps.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | +| `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | +| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | +| `url` | *?string* | :heavy_minus_sign: | The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain. | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerResponseBody.md b/docs/Models/Operations/CreatePartnerResponseBody.md index 29490a6..8b6587e 100644 --- a/docs/Models/Operations/CreatePartnerResponseBody.md +++ b/docs/Models/Operations/CreatePartnerResponseBody.md @@ -5,25 +5,21 @@ The created partner ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `country` | *string* | :heavy_check_mark: | N/A | -| `payoutsEnabled` | *bool* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `updatedAt` | *string* | :heavy_check_mark: | N/A | -| `status` | [Operations\Status](../../Models/Operations/Status.md) | :heavy_check_mark: | N/A | -| `email` | *string* | :heavy_check_mark: | N/A | -| `image` | *string* | :heavy_check_mark: | N/A | -| `bio` | *string* | :heavy_check_mark: | N/A | -| `stripeConnectId` | *string* | :heavy_check_mark: | N/A | -| `links` | array<[Operations\Links](../../Models/Operations/Links.md)> | :heavy_check_mark: | N/A | -| `commissionAmount` | *float* | :heavy_check_mark: | N/A | -| `earnings` | *?float* | :heavy_minus_sign: | N/A | -| `clicks` | *?float* | :heavy_minus_sign: | N/A | -| `leads` | *?float* | :heavy_minus_sign: | N/A | -| `sales` | *?float* | :heavy_minus_sign: | N/A | -| `salesAmount` | *?float* | :heavy_minus_sign: | N/A | -| `couponId` | *?string* | :heavy_minus_sign: | N/A | -| `discount` | [?Operations\CreatePartnerDiscount](../../Models/Operations/CreatePartnerDiscount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `country` | *string* | :heavy_check_mark: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `status` | [Operations\Status](../../Models/Operations/Status.md) | :heavy_check_mark: | N/A | +| `programId` | *string* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `image` | *string* | :heavy_check_mark: | N/A | +| `tenantId` | *string* | :heavy_check_mark: | N/A | +| `links` | array<[Operations\Links](../../Models/Operations/Links.md)> | :heavy_check_mark: | N/A | +| `clicks` | *?float* | :heavy_minus_sign: | N/A | +| `leads` | *?float* | :heavy_minus_sign: | N/A | +| `sales` | *?float* | :heavy_minus_sign: | N/A | +| `saleAmount` | *?float* | :heavy_minus_sign: | N/A | +| `earnings` | *?float* | :heavy_minus_sign: | N/A | +| `description` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerType.md b/docs/Models/Operations/CreatePartnerType.md deleted file mode 100644 index d35dbc3..0000000 --- a/docs/Models/Operations/CreatePartnerType.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreatePartnerType - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Percentage` | percentage | -| `Flat` | flat | \ No newline at end of file diff --git a/docs/Models/Operations/Data.md b/docs/Models/Operations/Data.md index cb1b36c..1c531df 100644 --- a/docs/Models/Operations/Data.md +++ b/docs/Models/Operations/Data.md @@ -18,6 +18,7 @@ | `programId` | *?string* | :heavy_minus_sign: | The ID of the program the short link is associated with. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/DeleteFolderRequest.md b/docs/Models/Operations/DeleteFolderRequest.md new file mode 100644 index 0000000..d582aea --- /dev/null +++ b/docs/Models/Operations/DeleteFolderRequest.md @@ -0,0 +1,8 @@ +# DeleteFolderRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the folder to delete. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteFolderResponse.md b/docs/Models/Operations/DeleteFolderResponse.md new file mode 100644 index 0000000..c8134be --- /dev/null +++ b/docs/Models/Operations/DeleteFolderResponse.md @@ -0,0 +1,11 @@ +# DeleteFolderResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\DeleteFolderResponseBody](../../Models/Operations/DeleteFolderResponseBody.md) | :heavy_minus_sign: | The deleted folder ID. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteFolderResponseBody.md b/docs/Models/Operations/DeleteFolderResponseBody.md new file mode 100644 index 0000000..9e45f0e --- /dev/null +++ b/docs/Models/Operations/DeleteFolderResponseBody.md @@ -0,0 +1,10 @@ +# DeleteFolderResponseBody + +The deleted folder ID. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the deleted folder. | \ No newline at end of file diff --git a/docs/Models/Operations/Four.md b/docs/Models/Operations/Four.md new file mode 100644 index 0000000..7669ba3 --- /dev/null +++ b/docs/Models/Operations/Four.md @@ -0,0 +1,8 @@ +# Four + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `FolderId` | folderId | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksCountRequest.md b/docs/Models/Operations/GetLinksCountRequest.md index e13b414..77d9c0a 100644 --- a/docs/Models/Operations/GetLinksCountRequest.md +++ b/docs/Models/Operations/GetLinksCountRequest.md @@ -9,9 +9,10 @@ | `tagId` | *?string* | :heavy_minus_sign: | Deprecated. Use `tagIds` instead. The tag ID to filter the links by. | | `tagIds` | [string\|array\|null](../../Models/Operations/GetLinksCountQueryParamTagIds.md) | :heavy_minus_sign: | The tag IDs to filter the links by. | | `tagNames` | [string\|array\|null](../../Models/Operations/GetLinksCountQueryParamTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | +| `folderId` | *?string* | :heavy_minus_sign: | The folder ID to filter the links by. | | `search` | *?string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | | `userId` | *?string* | :heavy_minus_sign: | The user ID to filter the links by. | | `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. | | `showArchived` | *?bool* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | | `withTags` | *?bool* | :heavy_minus_sign: | DEPRECATED. Filter for links that have at least one tag assigned to them. | -| `groupBy` | [Operations\One\|Operations\Two\|Operations\Three\|null](../../Models/Operations/GroupBy.md) | :heavy_minus_sign: | The field to group the links by. | \ No newline at end of file +| `groupBy` | [Operations\One\|Operations\Two\|Operations\Three\|Operations\Four\|null](../../Models/Operations/GroupBy.md) | :heavy_minus_sign: | The field to group the links by. | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksRequest.md b/docs/Models/Operations/GetLinksRequest.md index bb679ba..bb17a8b 100644 --- a/docs/Models/Operations/GetLinksRequest.md +++ b/docs/Models/Operations/GetLinksRequest.md @@ -9,6 +9,7 @@ | `tagId` | *?string* | :heavy_minus_sign: | Deprecated. Use `tagIds` instead. The tag ID to filter the links by. | | | `tagIds` | [string\|array\|null](../../Models/Operations/QueryParamTagIds.md) | :heavy_minus_sign: | The tag IDs to filter the links by. | | | `tagNames` | [string\|array\|null](../../Models/Operations/QueryParamTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `folderId` | *?string* | :heavy_minus_sign: | The folder ID to filter the links by. | | | `search` | *?string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | | | `userId` | *?string* | :heavy_minus_sign: | The user ID to filter the links by. | | | `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. | | diff --git a/docs/Models/Operations/GroupBy.md b/docs/Models/Operations/GroupBy.md index 559ee4a..ab08d4a 100644 --- a/docs/Models/Operations/GroupBy.md +++ b/docs/Models/Operations/GroupBy.md @@ -32,3 +32,12 @@ Operations\Two $value = /* values here */ Operations\Three $value = /* values here */ ``` +### `Operations\Four` + +```php +/** +* @var Operations\Four +*/ +Operations\Four $value = /* values here */ +``` + diff --git a/docs/Models/Operations/Interval.md b/docs/Models/Operations/Interval.md index 3eadd89..bd055fe 100644 --- a/docs/Models/Operations/Interval.md +++ b/docs/Models/Operations/Interval.md @@ -11,7 +11,9 @@ The interval to retrieve analytics for. If undefined, defaults to 24h. | `Sevend` | 7d | | `Thirtyd` | 30d | | `Ninetyd` | 90d | -| `Ytd` | ytd | | `Oney` | 1y | +| `Mtd` | mtd | +| `Qtd` | qtd | +| `Ytd` | ytd | | `All` | all | | `AllUnfiltered` | all_unfiltered | \ No newline at end of file diff --git a/docs/Models/Operations/LinkProps.md b/docs/Models/Operations/LinkProps.md index c26f17e..b98463d 100644 --- a/docs/Models/Operations/LinkProps.md +++ b/docs/Models/Operations/LinkProps.md @@ -17,6 +17,7 @@ Additional properties that you can pass to the partner's short link. Will be use | `externalId` | *?string* | :heavy_minus_sign: | The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. | 123456 | | `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/ListEventsRequest.md b/docs/Models/Operations/ListEventsRequest.md index 7241867..1637cde 100644 --- a/docs/Models/Operations/ListEventsRequest.md +++ b/docs/Models/Operations/ListEventsRequest.md @@ -30,6 +30,7 @@ | `url` | *?string* | :heavy_minus_sign: | The URL to retrieve analytics for. | | | `tagId` | *?string* | :heavy_minus_sign: | Deprecated. Use `tagIds` instead. The tag ID to retrieve analytics for. | | | `tagIds` | [string\|array\|null](../../Models/Operations/ListEventsQueryParamTagIds.md) | :heavy_minus_sign: | The tag IDs to retrieve analytics for. | | +| `folderId` | *?string* | :heavy_minus_sign: | The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links. | | | `qr` | *?bool* | :heavy_minus_sign: | Deprecated. Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | | | `root` | *?bool* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | | | `page` | *?float* | :heavy_minus_sign: | N/A | | diff --git a/docs/Models/Operations/ListFoldersRequest.md b/docs/Models/Operations/ListFoldersRequest.md new file mode 100644 index 0000000..f129e6a --- /dev/null +++ b/docs/Models/Operations/ListFoldersRequest.md @@ -0,0 +1,8 @@ +# ListFoldersRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `search` | *?string* | :heavy_minus_sign: | The search term to filter the folders by. | \ No newline at end of file diff --git a/docs/Models/Operations/ListFoldersResponse.md b/docs/Models/Operations/ListFoldersResponse.md new file mode 100644 index 0000000..47391fe --- /dev/null +++ b/docs/Models/Operations/ListFoldersResponse.md @@ -0,0 +1,11 @@ +# ListFoldersResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `folderSchemas` | array<[Components\FolderSchema](../../Models/Components/FolderSchema.md)> | :heavy_minus_sign: | A list of folders | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamInterval.md b/docs/Models/Operations/QueryParamInterval.md index 00f31e0..2191378 100644 --- a/docs/Models/Operations/QueryParamInterval.md +++ b/docs/Models/Operations/QueryParamInterval.md @@ -11,6 +11,8 @@ The interval to retrieve events for. Takes precedence over start and end. If und | `Sevend` | 7d | | `Thirtyd` | 30d | | `Ninetyd` | 90d | -| `Ytd` | ytd | | `Oney` | 1y | +| `Mtd` | mtd | +| `Qtd` | qtd | +| `Ytd` | ytd | | `All` | all | \ No newline at end of file diff --git a/docs/Models/Operations/RequestBody.md b/docs/Models/Operations/RequestBody.md index 8b30648..1a731c9 100644 --- a/docs/Models/Operations/RequestBody.md +++ b/docs/Models/Operations/RequestBody.md @@ -22,6 +22,7 @@ | `programId` | *?string* | :heavy_minus_sign: | The ID of the program the short link is associated with. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/RetrieveAnalyticsRequest.md b/docs/Models/Operations/RetrieveAnalyticsRequest.md index c6a0b89..11bee4a 100644 --- a/docs/Models/Operations/RetrieveAnalyticsRequest.md +++ b/docs/Models/Operations/RetrieveAnalyticsRequest.md @@ -31,6 +31,7 @@ | `url` | *?string* | :heavy_minus_sign: | The URL to retrieve analytics for. | | | `tagId` | *?string* | :heavy_minus_sign: | Deprecated. Use `tagIds` instead. The tag ID to retrieve analytics for. | | | `tagIds` | [string\|array\|null](../../Models/Operations/RetrieveAnalyticsQueryParamTagIds.md) | :heavy_minus_sign: | The tag IDs to retrieve analytics for. | | +| `folderId` | *?string* | :heavy_minus_sign: | The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links. | | | `qr` | *?bool* | :heavy_minus_sign: | Deprecated. Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | | | `root` | *?bool* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | | | `utmSource` | *?string* | :heavy_minus_sign: | The UTM source of the short link. | | diff --git a/docs/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.md b/docs/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.md new file mode 100644 index 0000000..45ad70b --- /dev/null +++ b/docs/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.md @@ -0,0 +1,12 @@ +# RetrievePartnerAnalyticsQueryParamGroupBy + +The parameter to group the analytics data points by. Defaults to `count` if undefined. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `TopLinks` | top_links | +| `Timeseries` | timeseries | +| `Count` | count | \ No newline at end of file diff --git a/docs/Models/Operations/RetrievePartnerAnalyticsQueryParamInterval.md b/docs/Models/Operations/RetrievePartnerAnalyticsQueryParamInterval.md new file mode 100644 index 0000000..c950650 --- /dev/null +++ b/docs/Models/Operations/RetrievePartnerAnalyticsQueryParamInterval.md @@ -0,0 +1,19 @@ +# RetrievePartnerAnalyticsQueryParamInterval + +The interval to retrieve analytics for. If undefined, defaults to 24h. + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `Oney` | 1y | +| `Mtd` | mtd | +| `Qtd` | qtd | +| `Ytd` | ytd | +| `All` | all | +| `AllUnfiltered` | all_unfiltered | \ No newline at end of file diff --git a/docs/Models/Operations/RetrievePartnerAnalyticsRequest.md b/docs/Models/Operations/RetrievePartnerAnalyticsRequest.md new file mode 100644 index 0000000..9058017 --- /dev/null +++ b/docs/Models/Operations/RetrievePartnerAnalyticsRequest.md @@ -0,0 +1,15 @@ +# RetrievePartnerAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `programId` | *string* | :heavy_check_mark: | The ID of the program to retrieve analytics for. | | +| `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner to retrieve analytics for. | | +| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. | | +| `interval` | [?Operations\RetrievePartnerAnalyticsQueryParamInterval](../../Models/Operations/RetrievePartnerAnalyticsQueryParamInterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. If undefined, defaults to 24h. | | +| `start` | *?string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. Takes precedence over `interval`. | | +| `end` | *?string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. Takes precedence over `interval`. | | +| `timezone` | *?string* | :heavy_minus_sign: | The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. | America/New_York | +| `groupBy` | [?Operations\RetrievePartnerAnalyticsQueryParamGroupBy](../../Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.md) | :heavy_minus_sign: | The parameter to group the analytics data points by. Defaults to `count` if undefined. | | \ No newline at end of file diff --git a/docs/Models/Operations/RetrievePartnerAnalyticsResponse.md b/docs/Models/Operations/RetrievePartnerAnalyticsResponse.md new file mode 100644 index 0000000..a4ef6f0 --- /dev/null +++ b/docs/Models/Operations/RetrievePartnerAnalyticsResponse.md @@ -0,0 +1,11 @@ +# RetrievePartnerAnalyticsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `oneOf` | [Components\PartnerAnalyticsCount\|array\|null](../../Models/Operations/RetrievePartnerAnalyticsResponseBody.md) | :heavy_minus_sign: | Partner analytics data | \ No newline at end of file diff --git a/docs/Models/Operations/RetrievePartnerAnalyticsResponseBody.md b/docs/Models/Operations/RetrievePartnerAnalyticsResponseBody.md new file mode 100644 index 0000000..77224e7 --- /dev/null +++ b/docs/Models/Operations/RetrievePartnerAnalyticsResponseBody.md @@ -0,0 +1,34 @@ +# RetrievePartnerAnalyticsResponseBody + +Partner analytics data + + +## Supported Types + +### `Components\PartnerAnalyticsCount` + +```php +/** +* @var Components\PartnerAnalyticsCount +*/ +Components\PartnerAnalyticsCount $value = /* values here */ +``` + +### `array` + +```php +/** +* @var array +*/ +array $value = /* values here */ +``` + +### `array` + +```php +/** +* @var array +*/ +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/UpdateFolderAccessLevel.md b/docs/Models/Operations/UpdateFolderAccessLevel.md new file mode 100644 index 0000000..a41a4d8 --- /dev/null +++ b/docs/Models/Operations/UpdateFolderAccessLevel.md @@ -0,0 +1,11 @@ +# UpdateFolderAccessLevel + +The access level of the folder within the workspace. + + +## Values + +| Name | Value | +| ------- | ------- | +| `Read` | read | +| `Write` | write | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateFolderRequest.md b/docs/Models/Operations/UpdateFolderRequest.md new file mode 100644 index 0000000..b517285 --- /dev/null +++ b/docs/Models/Operations/UpdateFolderRequest.md @@ -0,0 +1,9 @@ +# UpdateFolderRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the folder to update. | +| `requestBody` | [?Operations\UpdateFolderRequestBody](../../Models/Operations/UpdateFolderRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateFolderRequestBody.md b/docs/Models/Operations/UpdateFolderRequestBody.md new file mode 100644 index 0000000..629a64f --- /dev/null +++ b/docs/Models/Operations/UpdateFolderRequestBody.md @@ -0,0 +1,9 @@ +# UpdateFolderRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `name` | *?string* | :heavy_minus_sign: | The name of the folder. | +| `accessLevel` | [?Operations\UpdateFolderAccessLevel](../../Models/Operations/UpdateFolderAccessLevel.md) | :heavy_minus_sign: | The access level of the folder within the workspace. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateFolderResponse.md b/docs/Models/Operations/UpdateFolderResponse.md new file mode 100644 index 0000000..ee7e6cc --- /dev/null +++ b/docs/Models/Operations/UpdateFolderResponse.md @@ -0,0 +1,11 @@ +# UpdateFolderResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `folderSchema` | [?Components\FolderSchema](../../Models/Components/FolderSchema.md) | :heavy_minus_sign: | The updated folder. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateLinkRequestBody.md b/docs/Models/Operations/UpdateLinkRequestBody.md index 04b25bb..049eb4c 100644 --- a/docs/Models/Operations/UpdateLinkRequestBody.md +++ b/docs/Models/Operations/UpdateLinkRequestBody.md @@ -22,6 +22,7 @@ | `programId` | *?string* | :heavy_minus_sign: | The ID of the program the short link is associated with. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/UpsertLinkRequestBody.md b/docs/Models/Operations/UpsertLinkRequestBody.md index 949681d..489555c 100644 --- a/docs/Models/Operations/UpsertLinkRequestBody.md +++ b/docs/Models/Operations/UpsertLinkRequestBody.md @@ -22,6 +22,7 @@ | `programId` | *?string* | :heavy_minus_sign: | The ID of the program the short link is associated with. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/UpsertPartnerLinkLinkProps.md b/docs/Models/Operations/UpsertPartnerLinkLinkProps.md index be7ec79..1a98cc5 100644 --- a/docs/Models/Operations/UpsertPartnerLinkLinkProps.md +++ b/docs/Models/Operations/UpsertPartnerLinkLinkProps.md @@ -17,6 +17,7 @@ Additional properties that you can pass to the partner's short link. Will be use | `externalId` | *?string* | :heavy_minus_sign: | The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. | 123456 | | `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. | | | `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner the short link is associated with. | | +| `folderId` | *?string* | :heavy_minus_sign: | The unique ID existing folder to assign the short link to. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | diff --git a/docs/Models/Operations/UpsertPartnerLinkRequestBody.md b/docs/Models/Operations/UpsertPartnerLinkRequestBody.md index a9fc020..7f72fd7 100644 --- a/docs/Models/Operations/UpsertPartnerLinkRequestBody.md +++ b/docs/Models/Operations/UpsertPartnerLinkRequestBody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| `programId` | *string* | :heavy_check_mark: | The ID of the program that the partner is enrolled in. | -| `url` | *string* | :heavy_check_mark: | The URL to shorten. Will throw an error if the domain doesn't match the program's default URL domain. | -| `key` | *?string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `linkProps` | [?Operations\UpsertPartnerLinkLinkProps](../../Models/Operations/UpsertPartnerLinkLinkProps.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | -| `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | -| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `programId` | *string* | :heavy_check_mark: | The ID of the program that the partner is enrolled in. | +| `key` | *?string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `linkProps` | [?Operations\UpsertPartnerLinkLinkProps](../../Models/Operations/UpsertPartnerLinkLinkProps.md) | :heavy_minus_sign: | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | +| `partnerId` | *?string* | :heavy_minus_sign: | The ID of the partner to create a link for. Will take precedence over `tenantId` if provided. | +| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown. | +| `url` | *?string* | :heavy_minus_sign: | The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain. | \ No newline at end of file diff --git a/docs/sdks/folders/README.md b/docs/sdks/folders/README.md new file mode 100644 index 0000000..16986f3 --- /dev/null +++ b/docs/sdks/folders/README.md @@ -0,0 +1,238 @@ +# Folders +(*folders*) + +## Overview + +### Available Operations + +* [create](#create) - Create a new folder +* [delete](#delete) - Delete a folder +* [list](#list) - Retrieve a list of folders +* [update](#update) - Update a folder + +## create + +Create a new folder for the authenticated workspace. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; +use Dub\Models\Operations; + +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); + +$request = new Operations\CreateFolderRequestBody( + name: '', +); + +$response = $sdk->folders->create( + request: $request +); + +if ($response->folderSchema !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `$request` | [Operations\CreateFolderRequestBody](../../Models/Operations/CreateFolderRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\CreateFolderResponse](../../Models/Operations/CreateFolderResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## delete + +Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; + +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); + + + +$response = $sdk->folders->delete( + id: '' +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the folder to delete. | + +### Response + +**[?Operations\DeleteFolderResponse](../../Models/Operations/DeleteFolderResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## list + +Retrieve a list of folders for the authenticated workspace. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; + +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); + + + +$response = $sdk->folders->list( + search: '' +); + +if ($response->folderSchemas !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `search` | *?string* | :heavy_minus_sign: | The search term to filter the folders by. | + +### Response + +**[?Operations\ListFoldersResponse](../../Models/Operations/ListFoldersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## update + +Update a folder in the workspace. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; +use Dub\Models\Operations; + +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); + +$requestBody = new Operations\UpdateFolderRequestBody(); + +$response = $sdk->folders->update( + id: '', + requestBody: $requestBody + +); + +if ($response->folderSchema !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the folder to update. | +| `requestBody` | [?Operations\UpdateFolderRequestBody](../../Models/Operations/UpdateFolderRequestBody.md) | :heavy_minus_sign: | N/A | + +### Response + +**[?Operations\UpdateFolderResponse](../../Models/Operations/UpdateFolderResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/partners/README.md b/docs/sdks/partners/README.md index 381bd58..791ad12 100644 --- a/docs/sdks/partners/README.md +++ b/docs/sdks/partners/README.md @@ -7,6 +7,7 @@ * [create](#create) - Create a new partner * [createLink](#createlink) - Create a link for a partner +* [analytics](#analytics) - Retrieve analytics for a partner * [upsertLink](#upsertlink) - Upsert a link for a partner ## create @@ -98,7 +99,6 @@ $sdk = Dub\Dub::builder() $request = new Operations\CreatePartnerLinkRequestBody( programId: '', - url: 'https://necessary-brief.name', linkProps: new Operations\CreatePartnerLinkLinkProps( tagIds: [ 'clux0rgak00011...', @@ -141,6 +141,64 @@ if ($response->linkSchema !== null) { | Errors\InternalServerError | 500 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | +## analytics + +Retrieve analytics for a partner within a program. The response type vary based on the `groupBy` query parameter. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; +use Dub\Models\Operations; + +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); + +$request = new Operations\RetrievePartnerAnalyticsRequest( + programId: '', +); + +$response = $sdk->partners->analytics( + request: $request +); + +if ($response->oneOf !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\RetrievePartnerAnalyticsRequest](../../Models/Operations/RetrievePartnerAnalyticsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\RetrievePartnerAnalyticsResponse](../../Models/Operations/RetrievePartnerAnalyticsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + ## upsertLink Upsert a link for a partner that is enrolled in your program. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created. @@ -163,7 +221,6 @@ $sdk = Dub\Dub::builder() $request = new Operations\UpsertPartnerLinkRequestBody( programId: '', - url: 'https://unsteady-lobster.com/', linkProps: new Operations\UpsertPartnerLinkLinkProps( tagIds: [ 'clux0rgak00011...', diff --git a/src/Dub.php b/src/Dub.php index 41a70ec..ea260b2 100644 --- a/src/Dub.php +++ b/src/Dub.php @@ -26,6 +26,8 @@ class Dub public Tags $tags; + public Folders $folders; + public Domains $domains; public Track $track; @@ -62,6 +64,7 @@ public function __construct( $this->analytics = new Analytics($this->sdkConfiguration); $this->events = new Events($this->sdkConfiguration); $this->tags = new Tags($this->sdkConfiguration); + $this->folders = new Folders($this->sdkConfiguration); $this->domains = new Domains($this->sdkConfiguration); $this->track = new Track($this->sdkConfiguration); $this->customers = new Customers($this->sdkConfiguration); diff --git a/src/Folders.php b/src/Folders.php new file mode 100644 index 0000000..b32c017 --- /dev/null +++ b/src/Folders.php @@ -0,0 +1,709 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * Create a new folder + * + * Create a new folder for the authenticated workspace. + * + * @param ?Operations\CreateFolderRequestBody $request + * @return Operations\CreateFolderResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function create(?Operations\CreateFolderRequestBody $request = null, ?Options $options = null): Operations\CreateFolderResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/folders'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + if ($body !== null) { + $httpOptions = array_merge_recursive($httpOptions, $body); + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext('createFolder', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '409', '410', '422', '429', '4XX', '500', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['201'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Components\FolderSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateFolderResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + folderSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['409'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['410'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Delete a folder + * + * Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder. + * + * @param string $id + * @return Operations\DeleteFolderResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function delete(string $id, ?Options $options = null): Operations\DeleteFolderResponse + { + $request = new Operations\DeleteFolderRequest( + id: $id, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/folders/{id}', Operations\DeleteFolderRequest::class, $request); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + $hookContext = new HookContext('deleteFolder', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '409', '410', '422', '429', '4XX', '500', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Operations\DeleteFolderResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteFolderResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['409'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['410'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Retrieve a list of folders + * + * Retrieve a list of folders for the authenticated workspace. + * + * @param ?string $search + * @return Operations\ListFoldersResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function list(?string $search = null, ?Options $options = null): Operations\ListFoldersResponse + { + $request = new Operations\ListFoldersRequest( + search: $search, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/folders'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\ListFoldersRequest::class, $request, $urlOverride); + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext('listFolders', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '409', '410', '422', '429', '4XX', '500', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Components\FolderSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListFoldersResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + folderSchemas: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['409'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['410'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Update a folder + * + * Update a folder in the workspace. + * + * @param string $id + * @param ?Operations\UpdateFolderRequestBody $requestBody + * @return Operations\UpdateFolderResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function update(string $id, ?Operations\UpdateFolderRequestBody $requestBody = null, ?Options $options = null): Operations\UpdateFolderResponse + { + $request = new Operations\UpdateFolderRequest( + id: $id, + requestBody: $requestBody, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/folders/{id}', Operations\UpdateFolderRequest::class, $request); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); + if ($body !== null) { + $httpOptions = array_merge_recursive($httpOptions, $body); + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + $hookContext = new HookContext('updateFolder', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '409', '410', '422', '429', '4XX', '500', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Components\FolderSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpdateFolderResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + folderSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['409'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['410'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/Links.php b/src/Links.php index a8ce8b2..a7ec3a3 100644 --- a/src/Links.php +++ b/src/Links.php @@ -1113,6 +1113,7 @@ private function listIndividual(?Operations\GetLinksRequest $request = null, ?Op tagId: $request != null ? $request->tagId : null, tagIds: $request != null ? $request->tagIds : null, tagNames: $request != null ? $request->tagNames : null, + folderId: $request != null ? $request->folderId : null, search: $request != null ? $request->search : null, userId: $request != null ? $request->userId : null, tenantId: $request != null ? $request->tenantId : null, diff --git a/src/Models/Components/AccessLevel.php b/src/Models/Components/AccessLevel.php new file mode 100644 index 0000000..85d178b --- /dev/null +++ b/src/Models/Components/AccessLevel.php @@ -0,0 +1,17 @@ +|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class Data * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class Data * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LinkWebhookEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LinkWebhookEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/FolderSchema.php b/src/Models/Components/FolderSchema.php new file mode 100644 index 0000000..4547927 --- /dev/null +++ b/src/Models/Components/FolderSchema.php @@ -0,0 +1,83 @@ +id = $id; + $this->name = $name; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->linkCount = $linkCount; + $this->accessLevel = $accessLevel; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadCreatedEventLink.php b/src/Models/Components/LeadCreatedEventLink.php index adc99fc..1403429 100644 --- a/src/Models/Components/LeadCreatedEventLink.php +++ b/src/Models/Components/LeadCreatedEventLink.php @@ -282,6 +282,14 @@ class LeadCreatedEventLink #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class LeadCreatedEventLink * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class LeadCreatedEventLink * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/LeadEventLink.php b/src/Models/Components/LeadEventLink.php index 5c67101..d71533b 100644 --- a/src/Models/Components/LeadEventLink.php +++ b/src/Models/Components/LeadEventLink.php @@ -282,6 +282,14 @@ class LeadEventLink #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class LeadEventLink * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class LeadEventLink * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/Link.php b/src/Models/Components/Link.php index 7b6e5ea..9dd1a3a 100644 --- a/src/Models/Components/Link.php +++ b/src/Models/Components/Link.php @@ -282,6 +282,14 @@ class Link #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class Link * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class Link * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?ClickEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?ClickEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/LinkClickedEventLink.php b/src/Models/Components/LinkClickedEventLink.php index e5a9c25..ed91320 100644 --- a/src/Models/Components/LinkClickedEventLink.php +++ b/src/Models/Components/LinkClickedEventLink.php @@ -282,6 +282,14 @@ class LinkClickedEventLink #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class LinkClickedEventLink * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class LinkClickedEventLink * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LinkClickedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LinkClickedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/LinkSchema.php b/src/Models/Components/LinkSchema.php index 455bcc1..3d7403d 100644 --- a/src/Models/Components/LinkSchema.php +++ b/src/Models/Components/LinkSchema.php @@ -232,6 +232,14 @@ class LinkSchema #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -420,6 +428,7 @@ class LinkSchema * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -434,7 +443,7 @@ class LinkSchema * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $createdAt, string $updatedAt, string $projectId, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Geo $geo = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $lastClicked = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false, ?bool $publicStats = false, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $createdAt, string $updatedAt, string $projectId, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Geo $geo = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $lastClicked = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false, ?bool $publicStats = false, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -463,6 +472,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->geo = $geo; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/Links.php b/src/Models/Components/Links.php new file mode 100644 index 0000000..ab9d472 --- /dev/null +++ b/src/Models/Components/Links.php @@ -0,0 +1,114 @@ +id = $id; + $this->domain = $domain; + $this->key = $key; + $this->shortLink = $shortLink; + $this->url = $url; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/PartnerAnalyticsCount.php b/src/Models/Components/PartnerAnalyticsCount.php new file mode 100644 index 0000000..2653529 --- /dev/null +++ b/src/Models/Components/PartnerAnalyticsCount.php @@ -0,0 +1,74 @@ +clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + $this->earnings = $earnings; + } +} \ No newline at end of file diff --git a/src/Models/Components/PartnerAnalyticsTimeseries.php b/src/Models/Components/PartnerAnalyticsTimeseries.php new file mode 100644 index 0000000..f75065b --- /dev/null +++ b/src/Models/Components/PartnerAnalyticsTimeseries.php @@ -0,0 +1,84 @@ +start = $start; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + $this->earnings = $earnings; + } +} \ No newline at end of file diff --git a/src/Models/Components/PartnerAnalyticsTopLinks.php b/src/Models/Components/PartnerAnalyticsTopLinks.php new file mode 100644 index 0000000..18e41d9 --- /dev/null +++ b/src/Models/Components/PartnerAnalyticsTopLinks.php @@ -0,0 +1,156 @@ +link = $link; + $this->id = $id; + $this->domain = $domain; + $this->key = $key; + $this->shortLink = $shortLink; + $this->url = $url; + $this->createdAt = $createdAt; + $this->comments = $comments; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + $this->earnings = $earnings; + } +} \ No newline at end of file diff --git a/src/Models/Components/PartnerCreatedEvent.php b/src/Models/Components/PartnerCreatedEvent.php new file mode 100644 index 0000000..dbbfe8a --- /dev/null +++ b/src/Models/Components/PartnerCreatedEvent.php @@ -0,0 +1,59 @@ +id = $id; + $this->event = $event; + $this->createdAt = $createdAt; + $this->data = $data; + } +} \ No newline at end of file diff --git a/src/Models/Components/PartnerCreatedEventData.php b/src/Models/Components/PartnerCreatedEventData.php new file mode 100644 index 0000000..0b62bce --- /dev/null +++ b/src/Models/Components/PartnerCreatedEventData.php @@ -0,0 +1,173 @@ + $links + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('links')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\Links>|null')] + public ?array $links; + + /** + * + * @var ?string $description + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $description = null; + + /** + * + * @var ?float $clicks + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('clicks')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; + + /** + * + * @var ?float $leads + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('leads')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; + + /** + * + * @var ?float $sales + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('sales')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; + + /** + * + * @var ?float $saleAmount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('saleAmount')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; + + /** + * + * @var ?float $earnings + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('earnings')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $earnings = null; + + /** + * @param string $id + * @param string $name + * @param string $country + * @param string $createdAt + * @param Status $status + * @param string $programId + * @param ?string $email + * @param ?string $image + * @param ?string $tenantId + * @param ?array $links + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount + * @param ?float $earnings + * @param ?string $description + * @phpstan-pure + */ + public function __construct(string $id, string $name, string $country, string $createdAt, Status $status, string $programId, ?string $email = null, ?string $image = null, ?string $tenantId = null, ?array $links = null, ?string $description = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0, ?float $earnings = 0) + { + $this->id = $id; + $this->name = $name; + $this->country = $country; + $this->createdAt = $createdAt; + $this->status = $status; + $this->programId = $programId; + $this->email = $email; + $this->image = $image; + $this->tenantId = $tenantId; + $this->links = $links; + $this->description = $description; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + $this->earnings = $earnings; + } +} \ No newline at end of file diff --git a/src/Models/Components/PartnerCreatedEventEvent.php b/src/Models/Components/PartnerCreatedEventEvent.php new file mode 100644 index 0000000..a2eb225 --- /dev/null +++ b/src/Models/Components/PartnerCreatedEventEvent.php @@ -0,0 +1,15 @@ +|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class SaleCreatedEventLink * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class SaleCreatedEventLink * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/SaleEventLink.php b/src/Models/Components/SaleEventLink.php index e0c10c5..9a5cd9b 100644 --- a/src/Models/Components/SaleEventLink.php +++ b/src/Models/Components/SaleEventLink.php @@ -282,6 +282,14 @@ class SaleEventLink #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] public ?array $tags; + /** + * The unique ID of the folder assigned to the short link. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + public ?string $folderId; + /** * The comments for the short link. * @@ -408,6 +416,7 @@ class SaleEventLink * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags + * @param ?string $folderId * @param ?string $comments * @param ?string $utmSource * @param ?string $utmMedium @@ -421,7 +430,7 @@ class SaleEventLink * @param ?float $saleAmount * @phpstan-pure */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $folderId = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -457,6 +466,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; + $this->folderId = $folderId; $this->comments = $comments; $this->utmSource = $utmSource; $this->utmMedium = $utmMedium; diff --git a/src/Models/Components/Status.php b/src/Models/Components/Status.php new file mode 100644 index 0000000..cb3316d --- /dev/null +++ b/src/Models/Components/Status.php @@ -0,0 +1,17 @@ +id = $id; $this->name = $name; @@ -307,6 +316,7 @@ public function __construct(string $id, string $name, string $slug, Plan $plan, $this->salesLimit = $salesLimit; $this->domainsLimit = $domainsLimit; $this->tagsLimit = $tagsLimit; + $this->foldersLimit = $foldersLimit; $this->usersLimit = $usersLimit; $this->aiUsage = $aiUsage; $this->aiLimit = $aiLimit; diff --git a/src/Models/Operations/CreatePartnerType.php b/src/Models/Operations/AccessLevel.php similarity index 52% rename from src/Models/Operations/CreatePartnerType.php rename to src/Models/Operations/AccessLevel.php index 712aa8a..c267a40 100644 --- a/src/Models/Operations/CreatePartnerType.php +++ b/src/Models/Operations/AccessLevel.php @@ -9,8 +9,9 @@ namespace Dub\Models\Operations; -enum CreatePartnerType: string +/** The access level of the folder within the workspace. */ +enum AccessLevel: string { - case Percentage = 'percentage'; - case Flat = 'flat'; + case Read = 'read'; + case Write = 'write'; } diff --git a/src/Models/Operations/CreateFolderRequestBody.php b/src/Models/Operations/CreateFolderRequestBody.php new file mode 100644 index 0000000..9905726 --- /dev/null +++ b/src/Models/Operations/CreateFolderRequestBody.php @@ -0,0 +1,42 @@ +name = $name; + $this->accessLevel = $accessLevel; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateFolderResponse.php b/src/Models/Operations/CreateFolderResponse.php new file mode 100644 index 0000000..dbb79ca --- /dev/null +++ b/src/Models/Operations/CreateFolderResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->folderSchema = $folderSchema; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateLinkRequestBody.php b/src/Models/Operations/CreateLinkRequestBody.php index fedb395..1794c62 100644 --- a/src/Models/Operations/CreateLinkRequestBody.php +++ b/src/Models/Operations/CreateLinkRequestBody.php @@ -167,6 +167,15 @@ class CreateLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tagId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -349,6 +358,7 @@ class CreateLinkRequestBody * @param ?string $programId * @param ?string $partnerId * @param ?string $tagId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -369,7 +379,7 @@ class CreateLinkRequestBody * @param ?array $webhookIds * @phpstan-pure */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) + public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) { $this->url = $url; $this->domain = $domain; @@ -388,6 +398,7 @@ public function __construct(string $url, ?string $domain = null, ?string $key = $this->programId = $programId; $this->partnerId = $partnerId; $this->tagId = $tagId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/CreatePartnerDiscount.php b/src/Models/Operations/CreatePartnerDiscount.php deleted file mode 100644 index 0c77f46..0000000 --- a/src/Models/Operations/CreatePartnerDiscount.php +++ /dev/null @@ -1,85 +0,0 @@ -id = $id; - $this->amount = $amount; - $this->type = $type; - $this->couponId = $couponId; - $this->couponTestId = $couponTestId; - $this->duration = $duration; - $this->interval = $interval; - } -} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerLinkLinkProps.php b/src/Models/Operations/CreatePartnerLinkLinkProps.php index 1add3d8..3534764 100644 --- a/src/Models/Operations/CreatePartnerLinkLinkProps.php +++ b/src/Models/Operations/CreatePartnerLinkLinkProps.php @@ -104,6 +104,15 @@ class CreatePartnerLinkLinkProps #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $partnerId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -259,6 +268,7 @@ class CreatePartnerLinkLinkProps * @param ?string $externalId * @param ?string $tenantId * @param ?string $partnerId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -277,7 +287,7 @@ class CreatePartnerLinkLinkProps * @param ?string $ref * @phpstan-pure */ - public function __construct(?string $prefix = null, ?bool $archived = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $partnerId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null) + public function __construct(?string $prefix = null, ?bool $archived = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $partnerId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null) { $this->prefix = $prefix; $this->archived = $archived; @@ -289,6 +299,7 @@ public function __construct(?string $prefix = null, ?bool $archived = null, stri $this->externalId = $externalId; $this->tenantId = $tenantId; $this->partnerId = $partnerId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/CreatePartnerLinkRequestBody.php b/src/Models/Operations/CreatePartnerLinkRequestBody.php index 15a3b76..be21ef5 100644 --- a/src/Models/Operations/CreatePartnerLinkRequestBody.php +++ b/src/Models/Operations/CreatePartnerLinkRequestBody.php @@ -19,14 +19,6 @@ class CreatePartnerLinkRequestBody #[\Speakeasy\Serializer\Annotation\SerializedName('programId')] public string $programId; - /** - * The URL to shorten. Will throw an error if the domain doesn't match the program's default URL domain. - * - * @var string $url - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('url')] - public string $url; - /** * The short link slug. If not provided, a random 7-character slug will be generated. * @@ -64,22 +56,31 @@ class CreatePartnerLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tenantId = null; + /** + * The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain. + * + * @var ?string $url + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('url')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $url = null; + /** * @param string $programId - * @param string $url * @param ?string $key * @param ?CreatePartnerLinkLinkProps $linkProps * @param ?string $partnerId * @param ?string $tenantId + * @param ?string $url * @phpstan-pure */ - public function __construct(string $programId, string $url, ?string $key = null, ?CreatePartnerLinkLinkProps $linkProps = null, ?string $partnerId = null, ?string $tenantId = null) + public function __construct(string $programId, ?string $key = null, ?CreatePartnerLinkLinkProps $linkProps = null, ?string $partnerId = null, ?string $tenantId = null, ?string $url = null) { $this->programId = $programId; - $this->url = $url; $this->key = $key; $this->linkProps = $linkProps; $this->partnerId = $partnerId; $this->tenantId = $tenantId; + $this->url = $url; } } \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerResponseBody.php b/src/Models/Operations/CreatePartnerResponseBody.php index 55bded7..4600884 100644 --- a/src/Models/Operations/CreatePartnerResponseBody.php +++ b/src/Models/Operations/CreatePartnerResponseBody.php @@ -33,13 +33,6 @@ class CreatePartnerResponseBody #[\Speakeasy\Serializer\Annotation\SerializedName('country')] public string $country; - /** - * - * @var bool $payoutsEnabled - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('payoutsEnabled')] - public bool $payoutsEnabled; - /** * * @var string $createdAt @@ -47,13 +40,6 @@ class CreatePartnerResponseBody #[\Speakeasy\Serializer\Annotation\SerializedName('createdAt')] public string $createdAt; - /** - * - * @var string $updatedAt - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('updatedAt')] - public string $updatedAt; - /** * * @var Status $status @@ -62,6 +48,13 @@ class CreatePartnerResponseBody #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Operations\Status')] public Status $status; + /** + * + * @var string $programId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('programId')] + public string $programId; + /** * * @var ?string $email @@ -78,17 +71,10 @@ class CreatePartnerResponseBody /** * - * @var ?string $bio + * @var ?string $tenantId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('bio')] - public ?string $bio; - - /** - * - * @var ?string $stripeConnectId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('stripeConnectId')] - public ?string $stripeConnectId; + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; /** * $links @@ -101,35 +87,11 @@ class CreatePartnerResponseBody /** * - * @var ?float $commissionAmount + * @var ?string $description */ - #[\Speakeasy\Serializer\Annotation\SerializedName('commissionAmount')] - public ?float $commissionAmount; - - /** - * - * @var ?string $couponId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('couponId')] + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $couponId = null; - - /** - * - * @var ?CreatePartnerDiscount $discount - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('discount')] - #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Operations\CreatePartnerDiscount|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreatePartnerDiscount $discount = null; - - /** - * - * @var ?float $earnings - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('earnings')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $earnings = null; + public ?string $description = null; /** * @@ -157,56 +119,56 @@ class CreatePartnerResponseBody /** * - * @var ?float $salesAmount + * @var ?float $saleAmount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('saleAmount')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; + + /** + * + * @var ?float $earnings */ - #[\Speakeasy\Serializer\Annotation\SerializedName('salesAmount')] + #[\Speakeasy\Serializer\Annotation\SerializedName('earnings')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $salesAmount = null; + public ?float $earnings = null; /** * @param string $id * @param string $name * @param string $country - * @param bool $payoutsEnabled * @param string $createdAt - * @param string $updatedAt * @param Status $status + * @param string $programId * @param ?string $email * @param ?string $image - * @param ?string $bio - * @param ?string $stripeConnectId + * @param ?string $tenantId * @param ?array $links - * @param ?float $commissionAmount - * @param ?float $earnings * @param ?float $clicks * @param ?float $leads * @param ?float $sales - * @param ?float $salesAmount - * @param ?string $couponId - * @param ?CreatePartnerDiscount $discount + * @param ?float $saleAmount + * @param ?float $earnings + * @param ?string $description * @phpstan-pure */ - public function __construct(string $id, string $name, string $country, bool $payoutsEnabled, string $createdAt, string $updatedAt, Status $status, ?string $email = null, ?string $image = null, ?string $bio = null, ?string $stripeConnectId = null, ?array $links = null, ?float $commissionAmount = null, ?string $couponId = null, ?CreatePartnerDiscount $discount = null, ?float $earnings = 0, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $salesAmount = 0) + public function __construct(string $id, string $name, string $country, string $createdAt, Status $status, string $programId, ?string $email = null, ?string $image = null, ?string $tenantId = null, ?array $links = null, ?string $description = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0, ?float $earnings = 0) { $this->id = $id; $this->name = $name; $this->country = $country; - $this->payoutsEnabled = $payoutsEnabled; $this->createdAt = $createdAt; - $this->updatedAt = $updatedAt; $this->status = $status; + $this->programId = $programId; $this->email = $email; $this->image = $image; - $this->bio = $bio; - $this->stripeConnectId = $stripeConnectId; + $this->tenantId = $tenantId; $this->links = $links; - $this->commissionAmount = $commissionAmount; - $this->couponId = $couponId; - $this->discount = $discount; - $this->earnings = $earnings; + $this->description = $description; $this->clicks = $clicks; $this->leads = $leads; $this->sales = $sales; - $this->salesAmount = $salesAmount; + $this->saleAmount = $saleAmount; + $this->earnings = $earnings; } } \ No newline at end of file diff --git a/src/Models/Operations/Data.php b/src/Models/Operations/Data.php index 435bdba..b23968a 100644 --- a/src/Models/Operations/Data.php +++ b/src/Models/Operations/Data.php @@ -132,6 +132,15 @@ class Data #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tagId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -310,6 +319,7 @@ class Data * @param ?string $programId * @param ?string $partnerId * @param ?string $tagId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -330,7 +340,7 @@ class Data * @param ?array $webhookIds * @phpstan-pure */ - public function __construct(?string $url = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) + public function __construct(?string $url = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) { $this->url = $url; $this->trackConversion = $trackConversion; @@ -345,6 +355,7 @@ public function __construct(?string $url = null, ?bool $trackConversion = null, $this->programId = $programId; $this->partnerId = $partnerId; $this->tagId = $tagId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/DeleteFolderRequest.php b/src/Models/Operations/DeleteFolderRequest.php new file mode 100644 index 0000000..e018e22 --- /dev/null +++ b/src/Models/Operations/DeleteFolderRequest.php @@ -0,0 +1,30 @@ +id = $id; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteFolderResponse.php b/src/Models/Operations/DeleteFolderResponse.php new file mode 100644 index 0000000..5fe7382 --- /dev/null +++ b/src/Models/Operations/DeleteFolderResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteFolderResponseBody.php b/src/Models/Operations/DeleteFolderResponseBody.php new file mode 100644 index 0000000..2c0e6f0 --- /dev/null +++ b/src/Models/Operations/DeleteFolderResponseBody.php @@ -0,0 +1,31 @@ +id = $id; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerInterval.php b/src/Models/Operations/Four.php similarity index 63% rename from src/Models/Operations/CreatePartnerInterval.php rename to src/Models/Operations/Four.php index 6fb237e..a922133 100644 --- a/src/Models/Operations/CreatePartnerInterval.php +++ b/src/Models/Operations/Four.php @@ -9,8 +9,7 @@ namespace Dub\Models\Operations; -enum CreatePartnerInterval: string +enum Four: string { - case Month = 'month'; - case Year = 'year'; + case FolderId = 'folderId'; } diff --git a/src/Models/Operations/GetLinksCountRequest.php b/src/Models/Operations/GetLinksCountRequest.php index 0e3363b..0a0e73e 100644 --- a/src/Models/Operations/GetLinksCountRequest.php +++ b/src/Models/Operations/GetLinksCountRequest.php @@ -43,6 +43,14 @@ class GetLinksCountRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagNames')] public string|array|null $tagNames = null; + /** + * The folder ID to filter the links by. + * + * @var ?string $folderId + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=folderId')] + public ?string $folderId = null; + /** * The search term to filter the links by. The search term will be matched against the short link slug and the destination url. * @@ -70,10 +78,10 @@ class GetLinksCountRequest /** * The field to group the links by. * - * @var One|Two|Three|null $groupBy + * @var One|Two|Three|Four|null $groupBy */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=groupBy')] - public One|Two|Three|null $groupBy = null; + public One|Two|Three|Four|null $groupBy = null; /** * Whether to include archived links in the response. Defaults to `false` if not provided. @@ -96,20 +104,22 @@ class GetLinksCountRequest * @param ?string $tagId * @param string|array|null $tagIds * @param string|array|null $tagNames + * @param ?string $folderId * @param ?string $search * @param ?string $userId * @param ?string $tenantId * @param ?bool $showArchived * @param ?bool $withTags - * @param One|Two|Three|null $groupBy + * @param One|Two|Three|Four|null $groupBy * @phpstan-pure */ - public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?string $tenantId = null, One|Two|Three|null $groupBy = null, ?bool $showArchived = true, ?bool $withTags = true) + public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $folderId = null, ?string $search = null, ?string $userId = null, ?string $tenantId = null, One|Two|Three|Four|null $groupBy = null, ?bool $showArchived = true, ?bool $withTags = true) { $this->domain = $domain; $this->tagId = $tagId; $this->tagIds = $tagIds; $this->tagNames = $tagNames; + $this->folderId = $folderId; $this->search = $search; $this->userId = $userId; $this->tenantId = $tenantId; diff --git a/src/Models/Operations/GetLinksRequest.php b/src/Models/Operations/GetLinksRequest.php index 24813a9..eb52d23 100644 --- a/src/Models/Operations/GetLinksRequest.php +++ b/src/Models/Operations/GetLinksRequest.php @@ -43,6 +43,14 @@ class GetLinksRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagNames')] public string|array|null $tagNames = null; + /** + * The folder ID to filter the links by. + * + * @var ?string $folderId + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=folderId')] + public ?string $folderId = null; + /** * The search term to filter the links by. The search term will be matched against the short link slug and the destination url. * @@ -128,6 +136,7 @@ class GetLinksRequest * @param ?string $tagId * @param string|array|null $tagIds * @param string|array|null $tagNames + * @param ?string $folderId * @param ?string $search * @param ?string $userId * @param ?string $tenantId @@ -140,12 +149,13 @@ class GetLinksRequest * @param ?float $pageSize * @phpstan-pure */ - public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?string $tenantId = null, ?bool $showArchived = true, ?bool $withTags = true, ?SortBy $sortBy = SortBy::CreatedAt, ?SortOrder $sortOrder = SortOrder::Desc, ?Sort $sort = Sort::CreatedAt, ?float $page = 1, ?float $pageSize = 100) + public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $folderId = null, ?string $search = null, ?string $userId = null, ?string $tenantId = null, ?bool $showArchived = true, ?bool $withTags = true, ?SortBy $sortBy = SortBy::CreatedAt, ?SortOrder $sortOrder = SortOrder::Desc, ?Sort $sort = Sort::CreatedAt, ?float $page = 1, ?float $pageSize = 100) { $this->domain = $domain; $this->tagId = $tagId; $this->tagIds = $tagIds; $this->tagNames = $tagNames; + $this->folderId = $folderId; $this->search = $search; $this->userId = $userId; $this->tenantId = $tenantId; diff --git a/src/Models/Operations/Interval.php b/src/Models/Operations/Interval.php index aa8e152..563696b 100644 --- a/src/Models/Operations/Interval.php +++ b/src/Models/Operations/Interval.php @@ -16,8 +16,10 @@ enum Interval: string case Sevend = '7d'; case Thirtyd = '30d'; case Ninetyd = '90d'; - case Ytd = 'ytd'; case Oney = '1y'; + case Mtd = 'mtd'; + case Qtd = 'qtd'; + case Ytd = 'ytd'; case All = 'all'; case AllUnfiltered = 'all_unfiltered'; } diff --git a/src/Models/Operations/LinkProps.php b/src/Models/Operations/LinkProps.php index bf7fb3d..67b4f6c 100644 --- a/src/Models/Operations/LinkProps.php +++ b/src/Models/Operations/LinkProps.php @@ -104,6 +104,15 @@ class LinkProps #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $partnerId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -259,6 +268,7 @@ class LinkProps * @param ?string $externalId * @param ?string $tenantId * @param ?string $partnerId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -277,7 +287,7 @@ class LinkProps * @param ?string $ref * @phpstan-pure */ - public function __construct(?string $prefix = null, ?bool $archived = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $partnerId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null) + public function __construct(?string $prefix = null, ?bool $archived = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $partnerId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null) { $this->prefix = $prefix; $this->archived = $archived; @@ -289,6 +299,7 @@ public function __construct(?string $prefix = null, ?bool $archived = null, stri $this->externalId = $externalId; $this->tenantId = $tenantId; $this->partnerId = $partnerId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/ListEventsRequest.php b/src/Models/Operations/ListEventsRequest.php index f12022d..d8b13cd 100644 --- a/src/Models/Operations/ListEventsRequest.php +++ b/src/Models/Operations/ListEventsRequest.php @@ -188,6 +188,14 @@ class ListEventsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagIds')] public string|array|null $tagIds = null; + /** + * The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links. + * + * @var ?string $folderId + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=folderId')] + public ?string $folderId = null; + /** * Deprecated. Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. * @@ -332,6 +340,7 @@ class ListEventsRequest * @param ?string $url * @param ?string $tagId * @param string|array|null $tagIds + * @param ?string $folderId * @param ?bool $qr * @param ?bool $root * @param ?float $page @@ -346,7 +355,7 @@ class ListEventsRequest * @param ?string $utmContent * @phpstan-pure */ - public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $start = null, ?string $end = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $region = null, ?Components\ContinentCode $continent = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?QueryParamTrigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, string|array|null $tagIds = null, ?bool $qr = null, ?bool $root = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?QueryParamEvent $event = QueryParamEvent::Clicks, ?QueryParamInterval $interval = QueryParamInterval::TwentyFourh, ?string $timezone = 'UTC', ?float $page = 1, ?float $limit = 100, ?QueryParamSortOrder $sortOrder = QueryParamSortOrder::Desc, ?QueryParamSortBy $sortBy = QueryParamSortBy::Timestamp, ?Order $order = Order::Desc) + public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $start = null, ?string $end = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $region = null, ?Components\ContinentCode $continent = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?QueryParamTrigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, string|array|null $tagIds = null, ?string $folderId = null, ?bool $qr = null, ?bool $root = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?QueryParamEvent $event = QueryParamEvent::Clicks, ?QueryParamInterval $interval = QueryParamInterval::TwentyFourh, ?string $timezone = 'UTC', ?float $page = 1, ?float $limit = 100, ?QueryParamSortOrder $sortOrder = QueryParamSortOrder::Desc, ?QueryParamSortBy $sortBy = QueryParamSortBy::Timestamp, ?Order $order = Order::Desc) { $this->domain = $domain; $this->key = $key; @@ -370,6 +379,7 @@ public function __construct(?string $domain = null, ?string $key = null, ?string $this->url = $url; $this->tagId = $tagId; $this->tagIds = $tagIds; + $this->folderId = $folderId; $this->qr = $qr; $this->root = $root; $this->utmSource = $utmSource; diff --git a/src/Models/Operations/ListFoldersRequest.php b/src/Models/Operations/ListFoldersRequest.php new file mode 100644 index 0000000..0576fcb --- /dev/null +++ b/src/Models/Operations/ListFoldersRequest.php @@ -0,0 +1,30 @@ +search = $search; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListFoldersResponse.php b/src/Models/Operations/ListFoldersResponse.php new file mode 100644 index 0000000..4abbfd9 --- /dev/null +++ b/src/Models/Operations/ListFoldersResponse.php @@ -0,0 +1,56 @@ + $folderSchemas + */ + public ?array $folderSchemas = null; + + /** + * @param string $contentType + * @param int $statusCode + * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $folderSchemas + * @phpstan-pure + */ + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $folderSchemas = null) + { + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->folderSchemas = $folderSchemas; + } +} \ No newline at end of file diff --git a/src/Models/Operations/QueryParamInterval.php b/src/Models/Operations/QueryParamInterval.php index db6878d..fc7aca2 100644 --- a/src/Models/Operations/QueryParamInterval.php +++ b/src/Models/Operations/QueryParamInterval.php @@ -16,7 +16,9 @@ enum QueryParamInterval: string case Sevend = '7d'; case Thirtyd = '30d'; case Ninetyd = '90d'; - case Ytd = 'ytd'; case Oney = '1y'; + case Mtd = 'mtd'; + case Qtd = 'qtd'; + case Ytd = 'ytd'; case All = 'all'; } diff --git a/src/Models/Operations/RequestBody.php b/src/Models/Operations/RequestBody.php index 6ee5b00..2939f0f 100644 --- a/src/Models/Operations/RequestBody.php +++ b/src/Models/Operations/RequestBody.php @@ -167,6 +167,15 @@ class RequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tagId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -349,6 +358,7 @@ class RequestBody * @param ?string $programId * @param ?string $partnerId * @param ?string $tagId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -369,7 +379,7 @@ class RequestBody * @param ?array $webhookIds * @phpstan-pure */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) + public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) { $this->url = $url; $this->domain = $domain; @@ -388,6 +398,7 @@ public function __construct(string $url, ?string $domain = null, ?string $key = $this->programId = $programId; $this->partnerId = $partnerId; $this->tagId = $tagId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/RetrieveAnalyticsRequest.php b/src/Models/Operations/RetrieveAnalyticsRequest.php index 1e1028a..9f16d48 100644 --- a/src/Models/Operations/RetrieveAnalyticsRequest.php +++ b/src/Models/Operations/RetrieveAnalyticsRequest.php @@ -196,6 +196,14 @@ class RetrieveAnalyticsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagIds')] public string|array|null $tagIds = null; + /** + * The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links. + * + * @var ?string $folderId + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=folderId')] + public ?string $folderId = null; + /** * Deprecated. Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. * @@ -303,6 +311,7 @@ class RetrieveAnalyticsRequest * @param ?string $url * @param ?string $tagId * @param string|array|null $tagIds + * @param ?string $folderId * @param ?bool $qr * @param ?bool $root * @param ?string $utmSource @@ -312,7 +321,7 @@ class RetrieveAnalyticsRequest * @param ?string $utmContent * @phpstan-pure */ - public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?Interval $interval = null, ?string $start = null, ?string $end = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $region = null, ?Components\ContinentCode $continent = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?Trigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, string|array|null $tagIds = null, ?bool $qr = null, ?bool $root = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?Event $event = Event::Clicks, ?QueryParamGroupBy $groupBy = QueryParamGroupBy::Count, ?string $timezone = 'UTC') + public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?Interval $interval = null, ?string $start = null, ?string $end = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $region = null, ?Components\ContinentCode $continent = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?Trigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, string|array|null $tagIds = null, ?string $folderId = null, ?bool $qr = null, ?bool $root = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?Event $event = Event::Clicks, ?QueryParamGroupBy $groupBy = QueryParamGroupBy::Count, ?string $timezone = 'UTC') { $this->domain = $domain; $this->key = $key; @@ -337,6 +346,7 @@ public function __construct(?string $domain = null, ?string $key = null, ?string $this->url = $url; $this->tagId = $tagId; $this->tagIds = $tagIds; + $this->folderId = $folderId; $this->qr = $qr; $this->root = $root; $this->utmSource = $utmSource; diff --git a/src/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.php b/src/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.php new file mode 100644 index 0000000..0ef31b0 --- /dev/null +++ b/src/Models/Operations/RetrievePartnerAnalyticsQueryParamGroupBy.php @@ -0,0 +1,18 @@ +programId = $programId; + $this->partnerId = $partnerId; + $this->tenantId = $tenantId; + $this->interval = $interval; + $this->start = $start; + $this->end = $end; + $this->timezone = $timezone; + $this->groupBy = $groupBy; + } +} \ No newline at end of file diff --git a/src/Models/Operations/RetrievePartnerAnalyticsResponse.php b/src/Models/Operations/RetrievePartnerAnalyticsResponse.php new file mode 100644 index 0000000..ab49c5b --- /dev/null +++ b/src/Models/Operations/RetrievePartnerAnalyticsResponse.php @@ -0,0 +1,56 @@ +|array|null $oneOf + */ + public Components\PartnerAnalyticsCount|array|null $oneOf = null; + + /** + * @param string $contentType + * @param int $statusCode + * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @param Components\PartnerAnalyticsCount|array|array|null $oneOf + * @phpstan-pure + */ + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, Components\PartnerAnalyticsCount|array|null $oneOf = null) + { + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->oneOf = $oneOf; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateFolderAccessLevel.php b/src/Models/Operations/UpdateFolderAccessLevel.php new file mode 100644 index 0000000..7013dbd --- /dev/null +++ b/src/Models/Operations/UpdateFolderAccessLevel.php @@ -0,0 +1,17 @@ +id = $id; + $this->requestBody = $requestBody; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateFolderRequestBody.php b/src/Models/Operations/UpdateFolderRequestBody.php new file mode 100644 index 0000000..38c5a18 --- /dev/null +++ b/src/Models/Operations/UpdateFolderRequestBody.php @@ -0,0 +1,43 @@ +name = $name; + $this->accessLevel = $accessLevel; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateFolderResponse.php b/src/Models/Operations/UpdateFolderResponse.php new file mode 100644 index 0000000..96e8838 --- /dev/null +++ b/src/Models/Operations/UpdateFolderResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->folderSchema = $folderSchema; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateLinkRequestBody.php b/src/Models/Operations/UpdateLinkRequestBody.php index 5c37e6d..9fd7311 100644 --- a/src/Models/Operations/UpdateLinkRequestBody.php +++ b/src/Models/Operations/UpdateLinkRequestBody.php @@ -168,6 +168,15 @@ class UpdateLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tagId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -350,6 +359,7 @@ class UpdateLinkRequestBody * @param ?string $programId * @param ?string $partnerId * @param ?string $tagId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -370,7 +380,7 @@ class UpdateLinkRequestBody * @param ?array $webhookIds * @phpstan-pure */ - public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) + public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) { $this->url = $url; $this->domain = $domain; @@ -389,6 +399,7 @@ public function __construct(?string $url = null, ?string $domain = null, ?string $this->programId = $programId; $this->partnerId = $partnerId; $this->tagId = $tagId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/UpsertLinkRequestBody.php b/src/Models/Operations/UpsertLinkRequestBody.php index 145600e..946e0fe 100644 --- a/src/Models/Operations/UpsertLinkRequestBody.php +++ b/src/Models/Operations/UpsertLinkRequestBody.php @@ -167,6 +167,15 @@ class UpsertLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tagId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -349,6 +358,7 @@ class UpsertLinkRequestBody * @param ?string $programId * @param ?string $partnerId * @param ?string $tagId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -369,7 +379,7 @@ class UpsertLinkRequestBody * @param ?array $webhookIds * @phpstan-pure */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) + public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $programId = null, ?string $partnerId = null, ?string $tagId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?array $webhookIds = null) { $this->url = $url; $this->domain = $domain; @@ -388,6 +398,7 @@ public function __construct(string $url, ?string $domain = null, ?string $key = $this->programId = $programId; $this->partnerId = $partnerId; $this->tagId = $tagId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/UpsertPartnerLinkLinkProps.php b/src/Models/Operations/UpsertPartnerLinkLinkProps.php index a6bbd6e..0905017 100644 --- a/src/Models/Operations/UpsertPartnerLinkLinkProps.php +++ b/src/Models/Operations/UpsertPartnerLinkLinkProps.php @@ -104,6 +104,15 @@ class UpsertPartnerLinkLinkProps #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $partnerId = null; + /** + * The unique ID existing folder to assign the short link to. + * + * @var ?string $folderId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('folderId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $folderId = null; + /** * The comments for the short link. * @@ -259,6 +268,7 @@ class UpsertPartnerLinkLinkProps * @param ?string $externalId * @param ?string $tenantId * @param ?string $partnerId + * @param ?string $folderId * @param ?string $comments * @param ?string $expiresAt * @param ?string $expiredUrl @@ -277,7 +287,7 @@ class UpsertPartnerLinkLinkProps * @param ?string $ref * @phpstan-pure */ - public function __construct(?string $prefix = null, ?bool $archived = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $partnerId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null) + public function __construct(?string $prefix = null, ?bool $archived = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $tenantId = null, ?string $partnerId = null, ?string $folderId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null) { $this->prefix = $prefix; $this->archived = $archived; @@ -289,6 +299,7 @@ public function __construct(?string $prefix = null, ?bool $archived = null, stri $this->externalId = $externalId; $this->tenantId = $tenantId; $this->partnerId = $partnerId; + $this->folderId = $folderId; $this->comments = $comments; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; diff --git a/src/Models/Operations/UpsertPartnerLinkRequestBody.php b/src/Models/Operations/UpsertPartnerLinkRequestBody.php index efe46a7..bf05788 100644 --- a/src/Models/Operations/UpsertPartnerLinkRequestBody.php +++ b/src/Models/Operations/UpsertPartnerLinkRequestBody.php @@ -19,14 +19,6 @@ class UpsertPartnerLinkRequestBody #[\Speakeasy\Serializer\Annotation\SerializedName('programId')] public string $programId; - /** - * The URL to shorten. Will throw an error if the domain doesn't match the program's default URL domain. - * - * @var string $url - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('url')] - public string $url; - /** * The short link slug. If not provided, a random 7-character slug will be generated. * @@ -64,22 +56,31 @@ class UpsertPartnerLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $tenantId = null; + /** + * The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain. + * + * @var ?string $url + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('url')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $url = null; + /** * @param string $programId - * @param string $url * @param ?string $key * @param ?UpsertPartnerLinkLinkProps $linkProps * @param ?string $partnerId * @param ?string $tenantId + * @param ?string $url * @phpstan-pure */ - public function __construct(string $programId, string $url, ?string $key = null, ?UpsertPartnerLinkLinkProps $linkProps = null, ?string $partnerId = null, ?string $tenantId = null) + public function __construct(string $programId, ?string $key = null, ?UpsertPartnerLinkLinkProps $linkProps = null, ?string $partnerId = null, ?string $tenantId = null, ?string $url = null) { $this->programId = $programId; - $this->url = $url; $this->key = $key; $this->linkProps = $linkProps; $this->partnerId = $partnerId; $this->tenantId = $tenantId; + $this->url = $url; } } \ No newline at end of file diff --git a/src/Partners.php b/src/Partners.php index ca61592..74013fc 100644 --- a/src/Partners.php +++ b/src/Partners.php @@ -372,6 +372,169 @@ public function createLink(?Operations\CreatePartnerLinkRequestBody $request = n } } + /** + * Retrieve analytics for a partner + * + * Retrieve analytics for a partner within a program. The response type vary based on the `groupBy` query parameter. + * + * @param Operations\RetrievePartnerAnalyticsRequest $request + * @return Operations\RetrievePartnerAnalyticsResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function analytics(Operations\RetrievePartnerAnalyticsRequest $request, ?Options $options = null): Operations\RetrievePartnerAnalyticsResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/partners/analytics'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\RetrievePartnerAnalyticsRequest::class, $request, $urlOverride); + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext('retrievePartnerAnalytics', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '409', '410', '422', '429', '4XX', '500', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Components\PartnerAnalyticsCount|array<\Dub\Models\Components\PartnerAnalyticsTimeseries>|array<\Dub\Models\Components\PartnerAnalyticsTopLinks>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\RetrievePartnerAnalyticsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + oneOf: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['409'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['410'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + /** * Upsert a link for a partner * diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index a2f1853..bb96e18 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -24,11 +24,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.1'; - public string $sdkVersion = '0.11.24'; + public string $sdkVersion = '0.11.25'; public string $genVersion = '2.506.0'; - public string $userAgent = 'speakeasy-sdk/php 0.11.24 2.506.0 0.0.1 dub/dub-php'; + public string $userAgent = 'speakeasy-sdk/php 0.11.25 2.506.0 0.0.1 dub/dub-php'; public ?RetryConfig $retryConfig = null;