From 2c843fb0a03bb09d5eca1f059572565ed010e619 Mon Sep 17 00:00:00 2001 From: GithubActions Date: Mon, 4 May 2026 15:48:24 +0000 Subject: [PATCH] Update generated TypeScript client --- src/apis/BSDsApi.ts | 18 +- src/apis/BitlinksApi.ts | 534 +++- src/apis/CampaignsApi.ts | 144 +- src/apis/CustomBitlinksApi.ts | 90 +- src/apis/DefaultApi.ts | 18 +- src/apis/GroupsApi.ts | 500 +++- src/apis/OrganizationsApi.ts | 104 +- src/apis/QRCodesApi.ts | 346 ++- src/apis/UserApi.ts | 54 +- src/apis/WebhooksApi.ts | 108 +- src/docs/AddCustomBitlink.md | 36 + src/docs/BSDsApi.md | 76 + src/docs/BSDsResponse.md | 34 + src/docs/BadGateway.md | 41 + src/docs/BadRequest.md | 41 + src/docs/BaseChannel.md | 42 + src/docs/BaseChannelBitlink.md | 36 + src/docs/BaseMetrics.md | 40 + src/docs/BaseScanMetrics.md | 40 + src/docs/BitlinkBody.md | 66 + src/docs/BitlinkScans.md | 40 + src/docs/BitlinkScansSummary.md | 40 + src/docs/BitlinkUpdate.md | 64 + src/docs/BitlinkUpdateBody.md | 44 + src/docs/Bitlinks.md | 36 + src/docs/BitlinksApi.md | 1776 +++++++++++++ src/docs/BitlinksPagination.md | 38 + src/docs/BulkUpdate.md | 34 + src/docs/BulkUpdateRequest.md | 42 + src/docs/Campaign.md | 48 + src/docs/CampaignModify.md | 40 + src/docs/Campaigns.md | 34 + src/docs/CampaignsApi.md | 649 +++++ src/docs/Channel.md | 44 + src/docs/ChannelModify.md | 44 + src/docs/Channels.md | 34 + src/docs/CityMetric.md | 42 + src/docs/CityMetrics.md | 44 + src/docs/CityScanMetric.md | 42 + src/docs/CityScanMetrics.md | 44 + src/docs/ClickLink.md | 36 + src/docs/ClickMetric.md | 36 + src/docs/ClickMetrics.md | 42 + src/docs/Clicks.md | 40 + src/docs/ClicksSummary.md | 40 + src/docs/Conflict.md | 41 + src/docs/CountItem.md | 36 + src/docs/CustomBitlink.md | 38 + src/docs/CustomBitlinkHistory.md | 52 + src/docs/CustomBitlinksApi.md | 428 +++ src/docs/Deeplink.md | 40 + src/docs/DeeplinkRule.md | 52 + src/docs/DefaultApi.md | 84 + src/docs/DeletedLink.md | 34 + src/docs/DeletedQRCode.md | 34 + src/docs/DeviceMetric.md | 36 + src/docs/DeviceMetrics.md | 42 + src/docs/Email.md | 38 + src/docs/Engagement.md | 38 + src/docs/Engagements.md | 38 + src/docs/ExpandBitlink.md | 34 + src/docs/ExpandedBitlink.md | 40 + src/docs/ExpectationFailed.md | 41 + src/docs/FieldError.md | 38 + src/docs/Forbidden.md | 41 + src/docs/FullShorten.md | 53 + src/docs/GS1Metadata.md | 35 + src/docs/GS1Value.md | 36 + .../GetGroupLinkClicksByDevice200Response.md | 42 + ...nkClicksByDevice200ResponseMetricsInner.md | 36 + src/docs/Gone.md | 41 + src/docs/GradientColor.md | 36 + src/docs/Group.md | 50 + src/docs/GroupClicks.md | 40 + src/docs/GroupConsumableFeatureUsage.md | 38 + src/docs/GroupFeatureUsage.md | 36 + src/docs/GroupHistoricalUsage.md | 42 + src/docs/GroupPreferences.md | 36 + src/docs/GroupUpdate.md | 38 + src/docs/Groups.md | 34 + src/docs/GroupsApi.md | 2308 +++++++++++++++++ src/docs/HasReferences.md | 34 + src/docs/HistoricalFeatureUsage.md | 36 + src/docs/HistoricalUsage.md | 36 + src/docs/InstallPreference.md | 32 + src/docs/InternalError.md | 41 + src/docs/LinkClicks.md | 36 + src/docs/LinkDeletionResponse.md | 34 + src/docs/MethodLimit.md | 38 + src/docs/Metric.md | 36 + src/docs/Metrics.md | 42 + src/docs/MobileOS.md | 32 + src/docs/ModelError.md | 40 + src/docs/MonthlyLimitExceeded.md | 39 + src/docs/NotFound.md | 41 + src/docs/OAuthApp.md | 42 + src/docs/Organization.md | 58 + src/docs/Organizations.md | 34 + src/docs/OrganizationsApi.md | 396 +++ src/docs/OtherMetrics.md | 36 + src/docs/OtherScanMetrics.md | 36 + src/docs/PlanLimit.md | 40 + src/docs/PlanLimits.md | 38 + src/docs/PlatformLimit.md | 36 + src/docs/PlatformLimits.md | 34 + src/docs/PublicCreateQRCodeRequest.md | 49 + src/docs/PublicCreateStaticQRCodeRequest.md | 39 + src/docs/PublicDeleteQRCodeResponse.md | 37 + src/docs/PublicQRCodeImageResponse.md | 35 + src/docs/PublicStaticQRCodeResponse.md | 35 + src/docs/PublicUpdateQRCodeRequest.md | 43 + src/docs/QRCodeBranding.md | 34 + src/docs/QRCodeCorner.md | 39 + src/docs/QRCodeCorners.md | 39 + src/docs/QRCodeCustomizationsPublic.md | 55 + src/docs/QRCodeCustomizationsStaticPublic.md | 45 + src/docs/QRCodeDestination.md | 38 + src/docs/QRCodeDetails.md | 58 + src/docs/QRCodeDotPatternType.md | 32 + src/docs/QRCodeFrameRequest.md | 38 + src/docs/QRCodeFrameRequestColors.md | 39 + src/docs/QRCodeFrameRequestText.md | 37 + src/docs/QRCodeFrameType.md | 32 + src/docs/QRCodeGradient.md | 40 + src/docs/QRCodeLogoPublic.md | 34 + src/docs/QRCodeMinimal.md | 62 + src/docs/QRCodeSpecSettingsPublic.md | 35 + src/docs/QRCodeText.md | 39 + src/docs/QRCodeTypeEnum.md | 33 + src/docs/QRCodesApi.md | 1143 ++++++++ src/docs/QRCodesMinimal.md | 37 + src/docs/QRPagination.md | 39 + src/docs/QRScans.md | 36 + src/docs/ReferrersByDomain.md | 36 + src/docs/ReferrersByDomains.md | 42 + src/docs/ScanMetric.md | 36 + src/docs/ScanMetrics.md | 42 + src/docs/Shorten.md | 40 + src/docs/ShortenBitlinkBody.md | 50 + src/docs/SimplifiedError.md | 38 + src/docs/SortedLinks.md | 36 + src/docs/Tags.md | 34 + src/docs/TemporarilyUnavailable.md | 41 + src/docs/Text.md | 37 + src/docs/TimeUnit.md | 33 + src/docs/TimeUnitDWM.md | 33 + src/docs/TotalEngagements.md | 40 + src/docs/TotalEngagementsSummary.md | 42 + src/docs/UnprocessableEntity.md | 41 + src/docs/UpdateCustomBitlink.md | 34 + src/docs/UpgradeRequired.md | 41 + src/docs/User.md | 50 + src/docs/UserApi.md | 230 ++ src/docs/UserUpdate.md | 36 + src/docs/Webhook.md | 70 + src/docs/WebhookCreate.md | 52 + src/docs/WebhookUpdate.md | 54 + src/docs/Webhooks.md | 34 + src/docs/WebhooksApi.md | 484 ++++ src/models/BaseMetrics.ts | 2 +- src/models/BaseScanMetrics.ts | 2 +- src/models/BitlinkBody.ts | 2 +- src/models/BitlinkScans.ts | 2 +- src/models/BitlinkScansSummary.ts | 2 +- src/models/BitlinkUpdate.ts | 2 +- src/models/BitlinkUpdateBody.ts | 2 +- src/models/BulkUpdateRequest.ts | 2 +- src/models/CityMetrics.ts | 2 +- src/models/CityScanMetrics.ts | 2 +- src/models/ClickMetrics.ts | 2 +- src/models/Clicks.ts | 2 +- src/models/ClicksSummary.ts | 2 +- src/models/DeviceMetrics.ts | 2 +- src/models/Engagement.ts | 81 + src/models/Engagements.ts | 89 + src/models/FullShorten.ts | 2 +- .../GetGroupLinkClicksByDevice200Response.ts | 2 +- src/models/Metrics.ts | 2 +- src/models/Organization.ts | 36 + src/models/PublicCreateQRCodeRequest.ts | 10 +- src/models/PublicCreateStaticQRCodeRequest.ts | 91 + src/models/PublicStaticQRCodeResponse.ts | 65 + src/models/PublicUpdateQRCodeRequest.ts | 10 +- src/models/QRCodeCorner.ts | 2 +- .../QRCodeCustomizationsStaticPublic.ts | 136 + src/models/QRCodeDetails.ts | 2 +- src/models/QRCodeGradient.ts | 2 +- src/models/QRCodeMinimal.ts | 10 +- src/models/ReferrersByDomains.ts | 2 +- src/models/ScanMetrics.ts | 2 +- src/models/TotalEngagements.ts | 110 + src/models/TotalEngagementsSummary.ts | 118 + src/models/index.ts | 7 + src/runtime.ts | 18 + 194 files changed, 15429 insertions(+), 458 deletions(-) create mode 100644 src/docs/AddCustomBitlink.md create mode 100644 src/docs/BSDsApi.md create mode 100644 src/docs/BSDsResponse.md create mode 100644 src/docs/BadGateway.md create mode 100644 src/docs/BadRequest.md create mode 100644 src/docs/BaseChannel.md create mode 100644 src/docs/BaseChannelBitlink.md create mode 100644 src/docs/BaseMetrics.md create mode 100644 src/docs/BaseScanMetrics.md create mode 100644 src/docs/BitlinkBody.md create mode 100644 src/docs/BitlinkScans.md create mode 100644 src/docs/BitlinkScansSummary.md create mode 100644 src/docs/BitlinkUpdate.md create mode 100644 src/docs/BitlinkUpdateBody.md create mode 100644 src/docs/Bitlinks.md create mode 100644 src/docs/BitlinksApi.md create mode 100644 src/docs/BitlinksPagination.md create mode 100644 src/docs/BulkUpdate.md create mode 100644 src/docs/BulkUpdateRequest.md create mode 100644 src/docs/Campaign.md create mode 100644 src/docs/CampaignModify.md create mode 100644 src/docs/Campaigns.md create mode 100644 src/docs/CampaignsApi.md create mode 100644 src/docs/Channel.md create mode 100644 src/docs/ChannelModify.md create mode 100644 src/docs/Channels.md create mode 100644 src/docs/CityMetric.md create mode 100644 src/docs/CityMetrics.md create mode 100644 src/docs/CityScanMetric.md create mode 100644 src/docs/CityScanMetrics.md create mode 100644 src/docs/ClickLink.md create mode 100644 src/docs/ClickMetric.md create mode 100644 src/docs/ClickMetrics.md create mode 100644 src/docs/Clicks.md create mode 100644 src/docs/ClicksSummary.md create mode 100644 src/docs/Conflict.md create mode 100644 src/docs/CountItem.md create mode 100644 src/docs/CustomBitlink.md create mode 100644 src/docs/CustomBitlinkHistory.md create mode 100644 src/docs/CustomBitlinksApi.md create mode 100644 src/docs/Deeplink.md create mode 100644 src/docs/DeeplinkRule.md create mode 100644 src/docs/DefaultApi.md create mode 100644 src/docs/DeletedLink.md create mode 100644 src/docs/DeletedQRCode.md create mode 100644 src/docs/DeviceMetric.md create mode 100644 src/docs/DeviceMetrics.md create mode 100644 src/docs/Email.md create mode 100644 src/docs/Engagement.md create mode 100644 src/docs/Engagements.md create mode 100644 src/docs/ExpandBitlink.md create mode 100644 src/docs/ExpandedBitlink.md create mode 100644 src/docs/ExpectationFailed.md create mode 100644 src/docs/FieldError.md create mode 100644 src/docs/Forbidden.md create mode 100644 src/docs/FullShorten.md create mode 100644 src/docs/GS1Metadata.md create mode 100644 src/docs/GS1Value.md create mode 100644 src/docs/GetGroupLinkClicksByDevice200Response.md create mode 100644 src/docs/GetGroupLinkClicksByDevice200ResponseMetricsInner.md create mode 100644 src/docs/Gone.md create mode 100644 src/docs/GradientColor.md create mode 100644 src/docs/Group.md create mode 100644 src/docs/GroupClicks.md create mode 100644 src/docs/GroupConsumableFeatureUsage.md create mode 100644 src/docs/GroupFeatureUsage.md create mode 100644 src/docs/GroupHistoricalUsage.md create mode 100644 src/docs/GroupPreferences.md create mode 100644 src/docs/GroupUpdate.md create mode 100644 src/docs/Groups.md create mode 100644 src/docs/GroupsApi.md create mode 100644 src/docs/HasReferences.md create mode 100644 src/docs/HistoricalFeatureUsage.md create mode 100644 src/docs/HistoricalUsage.md create mode 100644 src/docs/InstallPreference.md create mode 100644 src/docs/InternalError.md create mode 100644 src/docs/LinkClicks.md create mode 100644 src/docs/LinkDeletionResponse.md create mode 100644 src/docs/MethodLimit.md create mode 100644 src/docs/Metric.md create mode 100644 src/docs/Metrics.md create mode 100644 src/docs/MobileOS.md create mode 100644 src/docs/ModelError.md create mode 100644 src/docs/MonthlyLimitExceeded.md create mode 100644 src/docs/NotFound.md create mode 100644 src/docs/OAuthApp.md create mode 100644 src/docs/Organization.md create mode 100644 src/docs/Organizations.md create mode 100644 src/docs/OrganizationsApi.md create mode 100644 src/docs/OtherMetrics.md create mode 100644 src/docs/OtherScanMetrics.md create mode 100644 src/docs/PlanLimit.md create mode 100644 src/docs/PlanLimits.md create mode 100644 src/docs/PlatformLimit.md create mode 100644 src/docs/PlatformLimits.md create mode 100644 src/docs/PublicCreateQRCodeRequest.md create mode 100644 src/docs/PublicCreateStaticQRCodeRequest.md create mode 100644 src/docs/PublicDeleteQRCodeResponse.md create mode 100644 src/docs/PublicQRCodeImageResponse.md create mode 100644 src/docs/PublicStaticQRCodeResponse.md create mode 100644 src/docs/PublicUpdateQRCodeRequest.md create mode 100644 src/docs/QRCodeBranding.md create mode 100644 src/docs/QRCodeCorner.md create mode 100644 src/docs/QRCodeCorners.md create mode 100644 src/docs/QRCodeCustomizationsPublic.md create mode 100644 src/docs/QRCodeCustomizationsStaticPublic.md create mode 100644 src/docs/QRCodeDestination.md create mode 100644 src/docs/QRCodeDetails.md create mode 100644 src/docs/QRCodeDotPatternType.md create mode 100644 src/docs/QRCodeFrameRequest.md create mode 100644 src/docs/QRCodeFrameRequestColors.md create mode 100644 src/docs/QRCodeFrameRequestText.md create mode 100644 src/docs/QRCodeFrameType.md create mode 100644 src/docs/QRCodeGradient.md create mode 100644 src/docs/QRCodeLogoPublic.md create mode 100644 src/docs/QRCodeMinimal.md create mode 100644 src/docs/QRCodeSpecSettingsPublic.md create mode 100644 src/docs/QRCodeText.md create mode 100644 src/docs/QRCodeTypeEnum.md create mode 100644 src/docs/QRCodesApi.md create mode 100644 src/docs/QRCodesMinimal.md create mode 100644 src/docs/QRPagination.md create mode 100644 src/docs/QRScans.md create mode 100644 src/docs/ReferrersByDomain.md create mode 100644 src/docs/ReferrersByDomains.md create mode 100644 src/docs/ScanMetric.md create mode 100644 src/docs/ScanMetrics.md create mode 100644 src/docs/Shorten.md create mode 100644 src/docs/ShortenBitlinkBody.md create mode 100644 src/docs/SimplifiedError.md create mode 100644 src/docs/SortedLinks.md create mode 100644 src/docs/Tags.md create mode 100644 src/docs/TemporarilyUnavailable.md create mode 100644 src/docs/Text.md create mode 100644 src/docs/TimeUnit.md create mode 100644 src/docs/TimeUnitDWM.md create mode 100644 src/docs/TotalEngagements.md create mode 100644 src/docs/TotalEngagementsSummary.md create mode 100644 src/docs/UnprocessableEntity.md create mode 100644 src/docs/UpdateCustomBitlink.md create mode 100644 src/docs/UpgradeRequired.md create mode 100644 src/docs/User.md create mode 100644 src/docs/UserApi.md create mode 100644 src/docs/UserUpdate.md create mode 100644 src/docs/Webhook.md create mode 100644 src/docs/WebhookCreate.md create mode 100644 src/docs/WebhookUpdate.md create mode 100644 src/docs/Webhooks.md create mode 100644 src/docs/WebhooksApi.md create mode 100644 src/models/Engagement.ts create mode 100644 src/models/Engagements.ts create mode 100644 src/models/PublicCreateStaticQRCodeRequest.ts create mode 100644 src/models/PublicStaticQRCodeResponse.ts create mode 100644 src/models/QRCodeCustomizationsStaticPublic.ts create mode 100644 src/models/TotalEngagements.ts create mode 100644 src/models/TotalEngagementsSummary.ts diff --git a/src/apis/BSDsApi.ts b/src/apis/BSDsApi.ts index e6d2667..43a598b 100644 --- a/src/apis/BSDsApi.ts +++ b/src/apis/BSDsApi.ts @@ -40,10 +40,9 @@ import { export class BSDsApi extends runtime.BaseAPI { /** - * Fetch all Branded Short Domains - * Get BSDs + * Creates request options for getBSDs without sending the request */ - async getBSDsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getBSDsRequestOpts(): Promise { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -59,12 +58,21 @@ export class BSDsApi extends runtime.BaseAPI { let urlPath = `/bsds`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Fetch all Branded Short Domains + * Get BSDs + */ + async getBSDsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getBSDsRequestOpts(); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BSDsResponseFromJSON(jsonValue)); } diff --git a/src/apis/BitlinksApi.ts b/src/apis/BitlinksApi.ts index 9348c91..f934784 100644 --- a/src/apis/BitlinksApi.ts +++ b/src/apis/BitlinksApi.ts @@ -43,6 +43,8 @@ import type { SortedLinks, TemporarilyUnavailable, TimeUnit, + TotalEngagements, + TotalEngagementsSummary, UnprocessableEntity, UpgradeRequired, } from '../models/index'; @@ -103,6 +105,10 @@ import { TemporarilyUnavailableToJSON, TimeUnitFromJSON, TimeUnitToJSON, + TotalEngagementsFromJSON, + TotalEngagementsToJSON, + TotalEngagementsSummaryFromJSON, + TotalEngagementsSummaryToJSON, UnprocessableEntityFromJSON, UnprocessableEntityToJSON, UpgradeRequiredFromJSON, @@ -144,6 +150,8 @@ export interface GetBitlinksByGroupRequest { channel_guid?: string; custom_bitlink?: GetBitlinksByGroupCustomBitlinkEnum; has_qr_codes?: GetBitlinksByGroupHasQrCodesEnum; + is_expired?: GetBitlinksByGroupIsExpiredEnum; + has_expiration?: GetBitlinksByGroupHasExpirationEnum; tags?: Array; launchpad_ids?: Array; encoding_login?: Array; @@ -163,6 +171,20 @@ export interface GetClicksSummaryForBitlinkRequest { unit_reference?: string; } +export interface GetEngagementsRequest { + bitlink: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + +export interface GetEngagementsSummaryRequest { + bitlink: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + export interface GetMetricsForBitlinkByCitiesRequest { bitlink: string; unit: TimeUnit; @@ -244,10 +266,9 @@ export interface UpdateBitlinksByGroupRequest { export class BitlinksApi extends runtime.BaseAPI { /** - * Converts a long url to a Bitlink. You may see errors returned from this endpoint - \"BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED\" occurs if you have shortened more links than your account is configured for for the month, and \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn\'t have DNS properly configured. - * Shorten a Link + * Creates request options for createBitlink without sending the request */ - async createBitlinkRaw(requestParameters: CreateBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createBitlinkRequestOpts(requestParameters: CreateBitlinkRequest): Promise { if (requestParameters['shorten'] == null) { throw new runtime.RequiredError( 'shorten', @@ -272,13 +293,22 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/shorten`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: ShortenToJSON(requestParameters['shorten']), - }, initOverrides); + }; + } + + /** + * Converts a long url to a Bitlink. You may see errors returned from this endpoint - \"BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED\" occurs if you have shortened more links than your account is configured for for the month, and \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn\'t have DNS properly configured. + * Shorten a Link + */ + async createBitlinkRaw(requestParameters: CreateBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ShortenBitlinkBodyFromJSON(jsonValue)); } @@ -293,10 +323,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Converts a long url to a Bitlink and sets additional parameters. You may see errors returned from this endpoint - \"BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED\" occurs if you have shortened more links than your account is configured for for the month, and \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn\'t have DNS properly configured. - * Create a Bitlink + * Creates request options for createFullBitlink without sending the request */ - async createFullBitlinkRaw(requestParameters: CreateFullBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createFullBitlinkRequestOpts(requestParameters: CreateFullBitlinkRequest): Promise { if (requestParameters['full_shorten'] == null) { throw new runtime.RequiredError( 'full_shorten', @@ -321,13 +350,22 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: FullShortenToJSON(requestParameters['full_shorten']), - }, initOverrides); + }; + } + + /** + * Converts a long url to a Bitlink and sets additional parameters. You may see errors returned from this endpoint - \"BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED\" occurs if you have shortened more links than your account is configured for for the month, and \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn\'t have DNS properly configured. + * Create a Bitlink + */ + async createFullBitlinkRaw(requestParameters: CreateFullBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createFullBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BitlinkBodyFromJSON(jsonValue)); } @@ -342,10 +380,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Delete an unedited hash Bitlink. - * Delete a Bitlink + * Creates request options for deleteBitlink without sending the request */ - async deleteBitlinkRaw(requestParameters: DeleteBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteBitlinkRequestOpts(requestParameters: DeleteBitlinkRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -369,12 +406,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Delete an unedited hash Bitlink. + * Delete a Bitlink + */ + async deleteBitlinkRaw(requestParameters: DeleteBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => LinkDeletionResponseFromJSON(jsonValue)); } @@ -389,10 +435,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the short link and long URL for the specified link. - * Expand a Bitlink + * Creates request options for expandBitlink without sending the request */ - async expandBitlinkRaw(requestParameters: ExpandBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async expandBitlinkRequestOpts(requestParameters: ExpandBitlinkRequest): Promise { if (requestParameters['expand_bitlink'] == null) { throw new runtime.RequiredError( 'expand_bitlink', @@ -417,13 +462,22 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/expand`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: ExpandBitlinkToJSON(requestParameters['expand_bitlink']), - }, initOverrides); + }; + } + + /** + * Returns the short link and long URL for the specified link. + * Expand a Bitlink + */ + async expandBitlinkRaw(requestParameters: ExpandBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.expandBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ExpandedBitlinkFromJSON(jsonValue)); } @@ -438,10 +492,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns information for the specified link. - * Retrieve a Bitlink + * Creates request options for getBitlink without sending the request */ - async getBitlinkRaw(requestParameters: GetBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getBitlinkRequestOpts(requestParameters: GetBitlinkRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -465,12 +518,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns information for the specified link. + * Retrieve a Bitlink + */ + async getBitlinkRaw(requestParameters: GetBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BitlinkBodyFromJSON(jsonValue)); } @@ -485,10 +547,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns a paginated collection of Bitlinks for a group. The list of custom bitlinks has newest entries first. - * Retrieve Bitlinks by Group + * Creates request options for getBitlinksByGroup without sending the request */ - async getBitlinksByGroupRaw(requestParameters: GetBitlinksByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getBitlinksByGroupRequestOpts(requestParameters: GetBitlinksByGroupRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -550,6 +611,14 @@ export class BitlinksApi extends runtime.BaseAPI { queryParameters['has_qr_codes'] = requestParameters['has_qr_codes']; } + if (requestParameters['is_expired'] != null) { + queryParameters['is_expired'] = requestParameters['is_expired']; + } + + if (requestParameters['has_expiration'] != null) { + queryParameters['has_expiration'] = requestParameters['has_expiration']; + } + if (requestParameters['tags'] != null) { queryParameters['tags'] = requestParameters['tags']; } @@ -576,12 +645,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/bitlinks`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns a paginated collection of Bitlinks for a group. The list of custom bitlinks has newest entries first. + * Retrieve Bitlinks by Group + */ + async getBitlinksByGroupRaw(requestParameters: GetBitlinksByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getBitlinksByGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BitlinksFromJSON(jsonValue)); } @@ -596,10 +674,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the click counts for the specified link in an array based on a date. - * Get Clicks for a Bitlink + * Creates request options for getClicksForBitlink without sending the request */ - async getClicksForBitlinkRaw(requestParameters: GetClicksForBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getClicksForBitlinkRequestOpts(requestParameters: GetClicksForBitlinkRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -649,12 +726,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/clicks`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the click counts for the specified link in an array based on a date. + * Get Clicks for a Bitlink + */ + async getClicksForBitlinkRaw(requestParameters: GetClicksForBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getClicksForBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClicksFromJSON(jsonValue)); } @@ -669,10 +755,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the click counts for the specified link rolled up into a single field. - * Get a Clicks Summary for a Bitlink + * Creates request options for getClicksSummaryForBitlink without sending the request */ - async getClicksSummaryForBitlinkRaw(requestParameters: GetClicksSummaryForBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getClicksSummaryForBitlinkRequestOpts(requestParameters: GetClicksSummaryForBitlinkRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -722,12 +807,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/clicks/summary`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the click counts for the specified link rolled up into a single field. + * Get a Clicks Summary for a Bitlink + */ + async getClicksSummaryForBitlinkRaw(requestParameters: GetClicksSummaryForBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getClicksSummaryForBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClicksSummaryFromJSON(jsonValue)); } @@ -742,10 +836,171 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the city origins of click traffic for the specified link. - * Get Metrics for a Bitlink by City + * Creates request options for getEngagements without sending the request */ - async getMetricsForBitlinkByCitiesRaw(requestParameters: GetMetricsForBitlinkByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getEngagementsRequestOpts(requestParameters: GetEngagementsRequest): Promise { + if (requestParameters['bitlink'] == null) { + throw new runtime.RequiredError( + 'bitlink', + 'Required parameter "bitlink" was null or undefined when calling getEngagements().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getEngagements().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getEngagements().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/bitlinks/{bitlink}/engagements`; + urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns an array of engagement counts for the specified link. The array is comprised of button click, click and scan counts for each time window, where the window is based on the provided unit. + * Get Engagement Counts for a Bitlink + */ + async getEngagementsRaw(requestParameters: GetEngagementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getEngagementsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TotalEngagementsFromJSON(jsonValue)); + } + + /** + * Returns an array of engagement counts for the specified link. The array is comprised of button click, click and scan counts for each time window, where the window is based on the provided unit. + * Get Engagement Counts for a Bitlink + */ + async getEngagements(requestParameters: GetEngagementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getEngagementsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getEngagementsSummary without sending the request + */ + async getEngagementsSummaryRequestOpts(requestParameters: GetEngagementsSummaryRequest): Promise { + if (requestParameters['bitlink'] == null) { + throw new runtime.RequiredError( + 'bitlink', + 'Required parameter "bitlink" was null or undefined when calling getEngagementsSummary().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getEngagementsSummary().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getEngagementsSummary().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/bitlinks/{bitlink}/engagements/summary`; + urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the engagement counts for the specified link rolled up into a single field. + * Get an Engagement Count Summary for a Bitlink + */ + async getEngagementsSummaryRaw(requestParameters: GetEngagementsSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getEngagementsSummaryRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TotalEngagementsSummaryFromJSON(jsonValue)); + } + + /** + * Returns the engagement counts for the specified link rolled up into a single field. + * Get an Engagement Count Summary for a Bitlink + */ + async getEngagementsSummary(requestParameters: GetEngagementsSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getEngagementsSummaryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getMetricsForBitlinkByCities without sending the request + */ + async getMetricsForBitlinkByCitiesRequestOpts(requestParameters: GetMetricsForBitlinkByCitiesRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -799,12 +1054,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/cities`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the city origins of click traffic for the specified link. + * Get Metrics for a Bitlink by City + */ + async getMetricsForBitlinkByCitiesRaw(requestParameters: GetMetricsForBitlinkByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByCitiesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CityMetricsFromJSON(jsonValue)); } @@ -819,10 +1083,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the country origins of click traffic for the specified link. - * Get Metrics for a Bitlink by Country + * Creates request options for getMetricsForBitlinkByCountries without sending the request */ - async getMetricsForBitlinkByCountriesRaw(requestParameters: GetMetricsForBitlinkByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMetricsForBitlinkByCountriesRequestOpts(requestParameters: GetMetricsForBitlinkByCountriesRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -876,12 +1139,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/countries`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the country origins of click traffic for the specified link. + * Get Metrics for a Bitlink by Country + */ + async getMetricsForBitlinkByCountriesRaw(requestParameters: GetMetricsForBitlinkByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByCountriesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -896,10 +1168,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the device types generating click traffic to the specified link. - * Get Metrics for a Bitlink by Device Type + * Creates request options for getMetricsForBitlinkByDevices without sending the request */ - async getMetricsForBitlinkByDevicesRaw(requestParameters: GetMetricsForBitlinkByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMetricsForBitlinkByDevicesRequestOpts(requestParameters: GetMetricsForBitlinkByDevicesRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -953,12 +1224,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/devices`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the device types generating click traffic to the specified link. + * Get Metrics for a Bitlink by Device Type + */ + async getMetricsForBitlinkByDevicesRaw(requestParameters: GetMetricsForBitlinkByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByDevicesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => DeviceMetricsFromJSON(jsonValue)); } @@ -973,10 +1253,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns referrer click counts for the specified link. - * Get Metrics for a Bitlink by Referrer Name + * Creates request options for getMetricsForBitlinkByReferrerName without sending the request */ - async getMetricsForBitlinkByReferrerNameRaw(requestParameters: GetMetricsForBitlinkByReferrerNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMetricsForBitlinkByReferrerNameRequestOpts(requestParameters: GetMetricsForBitlinkByReferrerNameRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -1030,12 +1309,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/referrer_name`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns referrer click counts for the specified link. + * Get Metrics for a Bitlink by Referrer Name + */ + async getMetricsForBitlinkByReferrerNameRaw(requestParameters: GetMetricsForBitlinkByReferrerNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByReferrerNameRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1050,10 +1338,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns referrer click counts for the specified link. - * Get Metrics for a Bitlink by Referrers + * Creates request options for getMetricsForBitlinkByReferrers without sending the request */ - async getMetricsForBitlinkByReferrersRaw(requestParameters: GetMetricsForBitlinkByReferrersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMetricsForBitlinkByReferrersRequestOpts(requestParameters: GetMetricsForBitlinkByReferrersRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -1107,12 +1394,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/referrers`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns referrer click counts for the specified link. + * Get Metrics for a Bitlink by Referrers + */ + async getMetricsForBitlinkByReferrersRaw(requestParameters: GetMetricsForBitlinkByReferrersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByReferrersRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1127,10 +1423,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns click metrics grouped by referrers for the specified link. - * Get Metrics for a Bitlink by Referrers by Domain + * Creates request options for getMetricsForBitlinkByReferrersByDomains without sending the request */ - async getMetricsForBitlinkByReferrersByDomainsRaw(requestParameters: GetMetricsForBitlinkByReferrersByDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMetricsForBitlinkByReferrersByDomainsRequestOpts(requestParameters: GetMetricsForBitlinkByReferrersByDomainsRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -1184,12 +1479,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/referrers_by_domains`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns click metrics grouped by referrers for the specified link. + * Get Metrics for a Bitlink by Referrers by Domain + */ + async getMetricsForBitlinkByReferrersByDomainsRaw(requestParameters: GetMetricsForBitlinkByReferrersByDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByReferrersByDomainsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ReferrersByDomainsFromJSON(jsonValue)); } @@ -1204,10 +1508,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns the referring domain click counts for the specified link. - * Get Metrics for a Bitlink by Referring Domains + * Creates request options for getMetricsForBitlinkByReferringDomains without sending the request */ - async getMetricsForBitlinkByReferringDomainsRaw(requestParameters: GetMetricsForBitlinkByReferringDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getMetricsForBitlinkByReferringDomainsRequestOpts(requestParameters: GetMetricsForBitlinkByReferringDomainsRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -1261,12 +1564,21 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}/referring_domains`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the referring domain click counts for the specified link. + * Get Metrics for a Bitlink by Referring Domains + */ + async getMetricsForBitlinkByReferringDomainsRaw(requestParameters: GetMetricsForBitlinkByReferringDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForBitlinkByReferringDomainsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1281,10 +1593,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Returns a list of Bitlinks sorted by group. The list of custom bitlinks has newest entries first. - * Retrieve Sorted Bitlinks for Group + * Creates request options for getSortedBitlinks without sending the request */ - async getSortedBitlinksRaw(requestParameters: GetSortedBitlinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getSortedBitlinksRequestOpts(requestParameters: GetSortedBitlinksRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1332,12 +1643,21 @@ export class BitlinksApi extends runtime.BaseAPI { urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); urlPath = urlPath.replace(`{${"sort"}}`, encodeURIComponent(String(requestParameters['sort']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns a list of Bitlinks sorted by group. The list of custom bitlinks has newest entries first. + * Retrieve Sorted Bitlinks for Group + */ + async getSortedBitlinksRaw(requestParameters: GetSortedBitlinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSortedBitlinksRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); } @@ -1352,10 +1672,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Updates fields in the specified link. To redirect the link (i.e. to update the Long URL), use the long_url parameter. This will always charge an encode limit. - * Update a Bitlink + * Creates request options for updateBitlink without sending the request */ - async updateBitlinkRaw(requestParameters: UpdateBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateBitlinkRequestOpts(requestParameters: UpdateBitlinkRequest): Promise { if (requestParameters['bitlink'] == null) { throw new runtime.RequiredError( 'bitlink', @@ -1388,13 +1707,22 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/bitlinks/{bitlink}`; urlPath = urlPath.replace(`{${"bitlink"}}`, encodeURIComponent(String(requestParameters['bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: BitlinkUpdateBodyToJSON(requestParameters['bitlink_update_body']), - }, initOverrides); + }; + } + + /** + * Updates fields in the specified link. To redirect the link (i.e. to update the Long URL), use the long_url parameter. This will always charge an encode limit. + * Update a Bitlink + */ + async updateBitlinkRaw(requestParameters: UpdateBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BitlinkBodyFromJSON(jsonValue)); } @@ -1409,10 +1737,9 @@ export class BitlinksApi extends runtime.BaseAPI { } /** - * Bulk update can add or remove tags or archive up to 100 links at a time; The response includes a list of bitlink ids that were updated. - * Bulk update bitlinks + * Creates request options for updateBitlinksByGroup without sending the request */ - async updateBitlinksByGroupRaw(requestParameters: UpdateBitlinksByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateBitlinksByGroupRequestOpts(requestParameters: UpdateBitlinksByGroupRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1445,13 +1772,22 @@ export class BitlinksApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/bitlinks`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: BulkUpdateRequestToJSON(requestParameters['bulk_update_request']), - }, initOverrides); + }; + } + + /** + * Bulk update can add or remove tags or archive up to 100 links at a time; The response includes a list of bitlink ids that were updated. + * Bulk update bitlinks + */ + async updateBitlinksByGroupRaw(requestParameters: UpdateBitlinksByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateBitlinksByGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BulkUpdateFromJSON(jsonValue)); } @@ -1512,6 +1848,24 @@ export enum GetBitlinksByGroupHasQrCodesEnum { off = 'off', both = 'both' } +/** + * @export + * @enum {string} + */ +export enum GetBitlinksByGroupIsExpiredEnum { + on = 'on', + off = 'off', + both = 'both' +} +/** + * @export + * @enum {string} + */ +export enum GetBitlinksByGroupHasExpirationEnum { + on = 'on', + off = 'off', + both = 'both' +} /** * @export * @enum {string} diff --git a/src/apis/CampaignsApi.ts b/src/apis/CampaignsApi.ts index 6f0bad9..6250dde 100644 --- a/src/apis/CampaignsApi.ts +++ b/src/apis/CampaignsApi.ts @@ -105,10 +105,9 @@ export interface UpdateChannelRequest { export class CampaignsApi extends runtime.BaseAPI { /** - * Creates a new campaign. - * Create Campaign + * Creates request options for createCampaign without sending the request */ - async createCampaignRaw(requestParameters: CreateCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createCampaignRequestOpts(requestParameters: CreateCampaignRequest): Promise { if (requestParameters['campaign_modify'] == null) { throw new runtime.RequiredError( 'campaign_modify', @@ -133,13 +132,22 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/campaigns`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: CampaignModifyToJSON(requestParameters['campaign_modify']), - }, initOverrides); + }; + } + + /** + * Creates a new campaign. + * Create Campaign + */ + async createCampaignRaw(requestParameters: CreateCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createCampaignRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CampaignFromJSON(jsonValue)); } @@ -154,10 +162,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Creates a new channel. - * Create Channel + * Creates request options for createChannel without sending the request */ - async createChannelRaw(requestParameters: CreateChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createChannelRequestOpts(requestParameters: CreateChannelRequest): Promise { if (requestParameters['channel_modify'] == null) { throw new runtime.RequiredError( 'channel_modify', @@ -182,13 +189,22 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/channels`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: ChannelModifyToJSON(requestParameters['channel_modify']), - }, initOverrides); + }; + } + + /** + * Creates a new channel. + * Create Channel + */ + async createChannelRaw(requestParameters: CreateChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createChannelRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ChannelFromJSON(jsonValue)); } @@ -203,10 +219,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Returns details for a campaign. - * Retrieve a Campaign + * Creates request options for getCampaign without sending the request */ - async getCampaignRaw(requestParameters: GetCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getCampaignRequestOpts(requestParameters: GetCampaignRequest): Promise { if (requestParameters['campaign_guid'] == null) { throw new runtime.RequiredError( 'campaign_guid', @@ -230,12 +245,21 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/campaigns/{campaign_guid}`; urlPath = urlPath.replace(`{${"campaign_guid"}}`, encodeURIComponent(String(requestParameters['campaign_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns details for a campaign. + * Retrieve a Campaign + */ + async getCampaignRaw(requestParameters: GetCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getCampaignRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CampaignFromJSON(jsonValue)); } @@ -250,10 +274,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Returns the campaigns for the current authenticated user. - * Retrieve Campaigns + * Creates request options for getCampaigns without sending the request */ - async getCampaignsRaw(requestParameters: GetCampaignsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getCampaignsRequestOpts(requestParameters: GetCampaignsRequest): Promise { const queryParameters: any = {}; if (requestParameters['group_guid'] != null) { @@ -273,12 +296,21 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/campaigns`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the campaigns for the current authenticated user. + * Retrieve Campaigns + */ + async getCampaignsRaw(requestParameters: GetCampaignsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getCampaignsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CampaignsFromJSON(jsonValue)); } @@ -293,10 +325,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Returns a channel\'s details. - * Get a Channel + * Creates request options for getChannel without sending the request */ - async getChannelRaw(requestParameters: GetChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getChannelRequestOpts(requestParameters: GetChannelRequest): Promise { if (requestParameters['channel_guid'] == null) { throw new runtime.RequiredError( 'channel_guid', @@ -320,12 +351,21 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/channels/{channel_guid}`; urlPath = urlPath.replace(`{${"channel_guid"}}`, encodeURIComponent(String(requestParameters['channel_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns a channel\'s details. + * Get a Channel + */ + async getChannelRaw(requestParameters: GetChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getChannelRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ChannelFromJSON(jsonValue)); } @@ -340,10 +380,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Returns the channels available to a user. - * Retrieve Channels + * Creates request options for getChannels without sending the request */ - async getChannelsRaw(requestParameters: GetChannelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getChannelsRequestOpts(requestParameters: GetChannelsRequest): Promise { const queryParameters: any = {}; if (requestParameters['group_guid'] != null) { @@ -367,12 +406,21 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/channels`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the channels available to a user. + * Retrieve Channels + */ + async getChannelsRaw(requestParameters: GetChannelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getChannelsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ChannelsFromJSON(jsonValue)); } @@ -387,10 +435,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Updates a campaign\'s details. - * Update Campaign + * Creates request options for updateCampaign without sending the request */ - async updateCampaignRaw(requestParameters: UpdateCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateCampaignRequestOpts(requestParameters: UpdateCampaignRequest): Promise { if (requestParameters['campaign_guid'] == null) { throw new runtime.RequiredError( 'campaign_guid', @@ -423,13 +470,22 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/campaigns/{campaign_guid}`; urlPath = urlPath.replace(`{${"campaign_guid"}}`, encodeURIComponent(String(requestParameters['campaign_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: CampaignModifyToJSON(requestParameters['campaign_modify']), - }, initOverrides); + }; + } + + /** + * Updates a campaign\'s details. + * Update Campaign + */ + async updateCampaignRaw(requestParameters: UpdateCampaignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateCampaignRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CampaignFromJSON(jsonValue)); } @@ -444,10 +500,9 @@ export class CampaignsApi extends runtime.BaseAPI { } /** - * Updates an existing channel. - * Update a Channel + * Creates request options for updateChannel without sending the request */ - async updateChannelRaw(requestParameters: UpdateChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateChannelRequestOpts(requestParameters: UpdateChannelRequest): Promise { if (requestParameters['channel_guid'] == null) { throw new runtime.RequiredError( 'channel_guid', @@ -480,13 +535,22 @@ export class CampaignsApi extends runtime.BaseAPI { let urlPath = `/channels/{channel_guid}`; urlPath = urlPath.replace(`{${"channel_guid"}}`, encodeURIComponent(String(requestParameters['channel_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: ChannelModifyToJSON(requestParameters['channel_modify']), - }, initOverrides); + }; + } + + /** + * Updates an existing channel. + * Update a Channel + */ + async updateChannelRaw(requestParameters: UpdateChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateChannelRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ChannelFromJSON(jsonValue)); } diff --git a/src/apis/CustomBitlinksApi.ts b/src/apis/CustomBitlinksApi.ts index a641677..5b0040f 100644 --- a/src/apis/CustomBitlinksApi.ts +++ b/src/apis/CustomBitlinksApi.ts @@ -97,10 +97,9 @@ export interface UpdateCustomBitlinkRequest { export class CustomBitlinksApi extends runtime.BaseAPI { /** - * Add a keyword (or \"custom back-half\") to a Bitlink with a Custom Domain (domains must match). This endpoint can also be used for initial redirects to a link. - * Add Custom Bitlink + * Creates request options for addCustomBitlink without sending the request */ - async addCustomBitlinkRaw(requestParameters: AddCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async addCustomBitlinkRequestOpts(requestParameters: AddCustomBitlinkRequest): Promise { if (requestParameters['add_custom_bitlink'] == null) { throw new runtime.RequiredError( 'add_custom_bitlink', @@ -125,13 +124,22 @@ export class CustomBitlinksApi extends runtime.BaseAPI { let urlPath = `/custom_bitlinks`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: AddCustomBitlinkToJSON(requestParameters['add_custom_bitlink']), - }, initOverrides); + }; + } + + /** + * Add a keyword (or \"custom back-half\") to a Bitlink with a Custom Domain (domains must match). This endpoint can also be used for initial redirects to a link. + * Add Custom Bitlink + */ + async addCustomBitlinkRaw(requestParameters: AddCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.addCustomBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CustomBitlinkFromJSON(jsonValue)); } @@ -146,10 +154,9 @@ export class CustomBitlinksApi extends runtime.BaseAPI { } /** - * Returns the click counts for the specified link. This returns an array with clicks based on a date. - * Get Clicks for a Custom Bitlink\'s Entire History + * Creates request options for getClicksForCustomBitlink without sending the request */ - async getClicksForCustomBitlinkRaw(requestParameters: GetClicksForCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getClicksForCustomBitlinkRequestOpts(requestParameters: GetClicksForCustomBitlinkRequest): Promise { if (requestParameters['custom_bitlink'] == null) { throw new runtime.RequiredError( 'custom_bitlink', @@ -199,12 +206,21 @@ export class CustomBitlinksApi extends runtime.BaseAPI { let urlPath = `/custom_bitlinks/{custom_bitlink}/clicks`; urlPath = urlPath.replace(`{${"custom_bitlink"}}`, encodeURIComponent(String(requestParameters['custom_bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the click counts for the specified link. This returns an array with clicks based on a date. + * Get Clicks for a Custom Bitlink\'s Entire History + */ + async getClicksForCustomBitlinkRaw(requestParameters: GetClicksForCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getClicksForCustomBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClicksFromJSON(jsonValue)); } @@ -219,10 +235,9 @@ export class CustomBitlinksApi extends runtime.BaseAPI { } /** - * Returns the details and history of the specified link. - * Retrieve Custom Bitlink + * Creates request options for getCustomBitlink without sending the request */ - async getCustomBitlinkRaw(requestParameters: GetCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getCustomBitlinkRequestOpts(requestParameters: GetCustomBitlinkRequest): Promise { if (requestParameters['custom_bitlink'] == null) { throw new runtime.RequiredError( 'custom_bitlink', @@ -246,12 +261,21 @@ export class CustomBitlinksApi extends runtime.BaseAPI { let urlPath = `/custom_bitlinks/{custom_bitlink}`; urlPath = urlPath.replace(`{${"custom_bitlink"}}`, encodeURIComponent(String(requestParameters['custom_bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the details and history of the specified link. + * Retrieve Custom Bitlink + */ + async getCustomBitlinkRaw(requestParameters: GetCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getCustomBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CustomBitlinkFromJSON(jsonValue)); } @@ -266,10 +290,9 @@ export class CustomBitlinksApi extends runtime.BaseAPI { } /** - * Returns click metrics for the specified link by its historical destinations. - * Get Metrics for a Custom Bitlink by Destination + * Creates request options for getCustomBitlinkMetricsByDestination without sending the request */ - async getCustomBitlinkMetricsByDestinationRaw(requestParameters: GetCustomBitlinkMetricsByDestinationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getCustomBitlinkMetricsByDestinationRequestOpts(requestParameters: GetCustomBitlinkMetricsByDestinationRequest): Promise { if (requestParameters['custom_bitlink'] == null) { throw new runtime.RequiredError( 'custom_bitlink', @@ -319,12 +342,21 @@ export class CustomBitlinksApi extends runtime.BaseAPI { let urlPath = `/custom_bitlinks/{custom_bitlink}/clicks_by_destination`; urlPath = urlPath.replace(`{${"custom_bitlink"}}`, encodeURIComponent(String(requestParameters['custom_bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns click metrics for the specified link by its historical destinations. + * Get Metrics for a Custom Bitlink by Destination + */ + async getCustomBitlinkMetricsByDestinationRaw(requestParameters: GetCustomBitlinkMetricsByDestinationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getCustomBitlinkMetricsByDestinationRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -339,10 +371,9 @@ export class CustomBitlinksApi extends runtime.BaseAPI { } /** - * Move a keyword (or custom back-half) to a different Bitlink (domains must match). - * Update Custom Bitlink + * Creates request options for updateCustomBitlink without sending the request */ - async updateCustomBitlinkRaw(requestParameters: UpdateCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateCustomBitlinkRequestOpts(requestParameters: UpdateCustomBitlinkRequest): Promise { if (requestParameters['custom_bitlink'] == null) { throw new runtime.RequiredError( 'custom_bitlink', @@ -375,13 +406,22 @@ export class CustomBitlinksApi extends runtime.BaseAPI { let urlPath = `/custom_bitlinks/{custom_bitlink}`; urlPath = urlPath.replace(`{${"custom_bitlink"}}`, encodeURIComponent(String(requestParameters['custom_bitlink']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: UpdateCustomBitlinkToJSON(requestParameters['update_custom_bitlink']), - }, initOverrides); + }; + } + + /** + * Move a keyword (or custom back-half) to a different Bitlink (domains must match). + * Update Custom Bitlink + */ + async updateCustomBitlinkRaw(requestParameters: UpdateCustomBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateCustomBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CustomBitlinkFromJSON(jsonValue)); } diff --git a/src/apis/DefaultApi.ts b/src/apis/DefaultApi.ts index f8bff8b..1576caa 100644 --- a/src/apis/DefaultApi.ts +++ b/src/apis/DefaultApi.ts @@ -44,10 +44,9 @@ export interface GetOAuthAppRequest { export class DefaultApi extends runtime.BaseAPI { /** - * Retrieve the details for the provided OAuth App client ID - * Retrieve OAuth App + * Creates request options for getOAuthApp without sending the request */ - async getOAuthAppRaw(requestParameters: GetOAuthAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getOAuthAppRequestOpts(requestParameters: GetOAuthAppRequest): Promise { if (requestParameters['client_id'] == null) { throw new runtime.RequiredError( 'client_id', @@ -71,12 +70,21 @@ export class DefaultApi extends runtime.BaseAPI { let urlPath = `/apps/{client_id}`; urlPath = urlPath.replace(`{${"client_id"}}`, encodeURIComponent(String(requestParameters['client_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Retrieve the details for the provided OAuth App client ID + * Retrieve OAuth App + */ + async getOAuthAppRaw(requestParameters: GetOAuthAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getOAuthAppRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OAuthAppFromJSON(jsonValue)); } diff --git a/src/apis/GroupsApi.ts b/src/apis/GroupsApi.ts index 4720aee..2a18bdf 100644 --- a/src/apis/GroupsApi.ts +++ b/src/apis/GroupsApi.ts @@ -235,6 +235,7 @@ export interface GetGroupShortenCountsRequest { export interface GetGroupTagsRequest { group_guid: string; + type?: GetGroupTagsTypeEnum; } export interface GetGroupTopCodeScansRequest { @@ -280,10 +281,9 @@ export interface UpdateGroupPreferencesRequest { export class GroupsApi extends runtime.BaseAPI { /** - * Returns details for a group. - * Retrieve a Group + * Creates request options for getGroup without sending the request */ - async getGroupRaw(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupRequestOpts(requestParameters: GetGroupRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -307,12 +307,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns details for a group. + * Retrieve a Group + */ + async getGroupRaw(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); } @@ -327,10 +336,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * get number of clicks on bitlinks in a group - * Get clicks by group + * Creates request options for getGroupClicks without sending the request */ - async getGroupClicksRaw(requestParameters: GetGroupClicksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupClicksRequestOpts(requestParameters: GetGroupClicksRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -380,12 +388,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/clicks`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * get number of clicks on bitlinks in a group + * Get clicks by group + */ + async getGroupClicksRaw(requestParameters: GetGroupClicksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupClicksRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); } @@ -400,10 +417,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get QR code scan metrics for a group broken down by city. - * Get Scan Metrics for a Group by City + * Creates request options for getGroupCodeScansByCity without sending the request */ - async getGroupCodeScansByCityRaw(requestParameters: GetGroupCodeScansByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupCodeScansByCityRequestOpts(requestParameters: GetGroupCodeScansByCityRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -453,12 +469,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/codes/scans/cities`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get QR code scan metrics for a group broken down by city. + * Get Scan Metrics for a Group by City + */ + async getGroupCodeScansByCityRaw(requestParameters: GetGroupCodeScansByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupCodeScansByCityRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CityMetricsFromJSON(jsonValue)); } @@ -473,10 +498,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get QR code scan metrics for a group broken down by country. - * Get Scan Metrics for a Group by Country + * Creates request options for getGroupCodeScansByCountry without sending the request */ - async getGroupCodeScansByCountryRaw(requestParameters: GetGroupCodeScansByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupCodeScansByCountryRequestOpts(requestParameters: GetGroupCodeScansByCountryRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -526,12 +550,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/codes/scans/countries`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get QR code scan metrics for a group broken down by country. + * Get Scan Metrics for a Group by Country + */ + async getGroupCodeScansByCountryRaw(requestParameters: GetGroupCodeScansByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupCodeScansByCountryRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -546,10 +579,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get QR code scan metrics over time for a group. - * Get Scan Metrics for a Group Over Time + * Creates request options for getGroupCodeScansOverTime without sending the request */ - async getGroupCodeScansOverTimeRaw(requestParameters: GetGroupCodeScansOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupCodeScansOverTimeRequestOpts(requestParameters: GetGroupCodeScansOverTimeRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -599,12 +631,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/codes/scans/over_time`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get QR code scan metrics over time for a group. + * Get Scan Metrics for a Group Over Time + */ + async getGroupCodeScansOverTimeRaw(requestParameters: GetGroupCodeScansOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupCodeScansOverTimeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); } @@ -619,10 +660,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) - * Get limit usage for a group + * Creates request options for getGroupFeatureUsage without sending the request */ - async getGroupFeatureUsageRaw(requestParameters: GetGroupFeatureUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupFeatureUsageRequestOpts(requestParameters: GetGroupFeatureUsageRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -650,12 +690,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/feature_usage`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) + * Get limit usage for a group + */ + async getGroupFeatureUsageRaw(requestParameters: GetGroupFeatureUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupFeatureUsageRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupFeatureUsageFromJSON(jsonValue)); } @@ -670,10 +719,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. - * Get historical usage for a group + * Creates request options for getGroupHistoricalUsage without sending the request */ - async getGroupHistoricalUsageRaw(requestParameters: GetGroupHistoricalUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupHistoricalUsageRequestOpts(requestParameters: GetGroupHistoricalUsageRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -713,12 +761,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/historical_usage`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. + * Get historical usage for a group + */ + async getGroupHistoricalUsageRaw(requestParameters: GetGroupHistoricalUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupHistoricalUsageRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupHistoricalUsageFromJSON(jsonValue)); } @@ -733,10 +790,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get link clicks by city for all links in a group. - * Get Group Link Clicks by City + * Creates request options for getGroupLinkClicksByCity without sending the request */ - async getGroupLinkClicksByCityRaw(requestParameters: GetGroupLinkClicksByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupLinkClicksByCityRequestOpts(requestParameters: GetGroupLinkClicksByCityRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -790,12 +846,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/links/clicks/cities`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get link clicks by city for all links in a group. + * Get Group Link Clicks by City + */ + async getGroupLinkClicksByCityRaw(requestParameters: GetGroupLinkClicksByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupLinkClicksByCityRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CityMetricsFromJSON(jsonValue)); } @@ -810,10 +875,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get link clicks by country for all links in a group. - * Get Group Link Clicks by Country + * Creates request options for getGroupLinkClicksByCountry without sending the request */ - async getGroupLinkClicksByCountryRaw(requestParameters: GetGroupLinkClicksByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupLinkClicksByCountryRequestOpts(requestParameters: GetGroupLinkClicksByCountryRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -867,12 +931,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/links/clicks/countries`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get link clicks by country for all links in a group. + * Get Group Link Clicks by Country + */ + async getGroupLinkClicksByCountryRaw(requestParameters: GetGroupLinkClicksByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupLinkClicksByCountryRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -887,10 +960,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get link clicks by device for all links in a group. - * Get Group Link Clicks by Device + * Creates request options for getGroupLinkClicksByDevice without sending the request */ - async getGroupLinkClicksByDeviceRaw(requestParameters: GetGroupLinkClicksByDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupLinkClicksByDeviceRequestOpts(requestParameters: GetGroupLinkClicksByDeviceRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -944,12 +1016,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/links/clicks/devices`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get link clicks by device for all links in a group. + * Get Group Link Clicks by Device + */ + async getGroupLinkClicksByDeviceRaw(requestParameters: GetGroupLinkClicksByDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupLinkClicksByDeviceRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GetGroupLinkClicksByDevice200ResponseFromJSON(jsonValue)); } @@ -964,10 +1045,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get link clicks by referrer for all links in a group. - * Get Group Link Clicks by Referrer + * Creates request options for getGroupLinkClicksByReferrer without sending the request */ - async getGroupLinkClicksByReferrerRaw(requestParameters: GetGroupLinkClicksByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupLinkClicksByReferrerRequestOpts(requestParameters: GetGroupLinkClicksByReferrerRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1021,12 +1101,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/links/clicks/referrers`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get link clicks by referrer for all links in a group. + * Get Group Link Clicks by Referrer + */ + async getGroupLinkClicksByReferrerRaw(requestParameters: GetGroupLinkClicksByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupLinkClicksByReferrerRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1041,10 +1130,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get link clicks over time for all links in a group. - * Get Group Link Clicks Over Time + * Creates request options for getGroupLinkClicksOverTime without sending the request */ - async getGroupLinkClicksOverTimeRaw(requestParameters: GetGroupLinkClicksOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupLinkClicksOverTimeRequestOpts(requestParameters: GetGroupLinkClicksOverTimeRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1094,12 +1182,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/links/clicks/over_time`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get link clicks over time for all links in a group. + * Get Group Link Clicks Over Time + */ + async getGroupLinkClicksOverTimeRaw(requestParameters: GetGroupLinkClicksOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupLinkClicksOverTimeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); } @@ -1114,10 +1211,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns the geographic origins of click traffic by city for the specified group. - * Get Click Metrics for a Group by City + * Creates request options for getGroupMetricsByCities without sending the request */ - async getGroupMetricsByCitiesRaw(requestParameters: GetGroupMetricsByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupMetricsByCitiesRequestOpts(requestParameters: GetGroupMetricsByCitiesRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1171,12 +1267,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/cities`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the geographic origins of click traffic by city for the specified group. + * Get Click Metrics for a Group by City + */ + async getGroupMetricsByCitiesRaw(requestParameters: GetGroupMetricsByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupMetricsByCitiesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CityMetricsFromJSON(jsonValue)); } @@ -1191,10 +1296,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns the geographic origins of click traffic by country for the specified group. - * Get Click Metrics for a Group by Country + * Creates request options for getGroupMetricsByCountries without sending the request */ - async getGroupMetricsByCountriesRaw(requestParameters: GetGroupMetricsByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupMetricsByCountriesRequestOpts(requestParameters: GetGroupMetricsByCountriesRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1248,12 +1352,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/countries`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the geographic origins of click traffic by country for the specified group. + * Get Click Metrics for a Group by Country + */ + async getGroupMetricsByCountriesRaw(requestParameters: GetGroupMetricsByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupMetricsByCountriesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1268,10 +1381,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns the device types generating click traffic to the specified group\'s links. - * Get Click Metrics for a Group by Device Type + * Creates request options for getGroupMetricsByDevices without sending the request */ - async getGroupMetricsByDevicesRaw(requestParameters: GetGroupMetricsByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupMetricsByDevicesRequestOpts(requestParameters: GetGroupMetricsByDevicesRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1325,12 +1437,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/devices`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the device types generating click traffic to the specified group\'s links. + * Get Click Metrics for a Group by Device Type + */ + async getGroupMetricsByDevicesRaw(requestParameters: GetGroupMetricsByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupMetricsByDevicesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => DeviceMetricsFromJSON(jsonValue)); } @@ -1345,10 +1466,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns metrics by referrer for the specified group\'s links. - * Get Click Metrics for a Group by Referrer + * Creates request options for getGroupMetricsByReferrer without sending the request */ - async getGroupMetricsByReferrerRaw(requestParameters: GetGroupMetricsByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupMetricsByReferrerRequestOpts(requestParameters: GetGroupMetricsByReferrerRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1402,12 +1522,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/referrers`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns metrics by referrer for the specified group\'s links. + * Get Click Metrics for a Group by Referrer + */ + async getGroupMetricsByReferrerRaw(requestParameters: GetGroupMetricsByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupMetricsByReferrerRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1422,10 +1551,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns metrics by referring networks for the specified group\'s links. - * Get Click Metrics for a Group by Referring Networks + * Creates request options for getGroupMetricsByReferringNetworks without sending the request */ - async getGroupMetricsByReferringNetworksRaw(requestParameters: GetGroupMetricsByReferringNetworksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupMetricsByReferringNetworksRequestOpts(requestParameters: GetGroupMetricsByReferringNetworksRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1479,12 +1607,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/referring_networks`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns metrics by referring networks for the specified group\'s links. + * Get Click Metrics for a Group by Referring Networks + */ + async getGroupMetricsByReferringNetworksRaw(requestParameters: GetGroupMetricsByReferringNetworksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupMetricsByReferringNetworksRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); } @@ -1499,10 +1636,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get group engagement metrics over time for all links in a group. - * Get Group Metrics Over Time + * Creates request options for getGroupMetricsOverTime without sending the request */ - async getGroupMetricsOverTimeRaw(requestParameters: GetGroupMetricsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupMetricsOverTimeRequestOpts(requestParameters: GetGroupMetricsOverTimeRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1552,12 +1688,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/engagements/over_time`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get group engagement metrics over time for all links in a group. + * Get Group Metrics Over Time + */ + async getGroupMetricsOverTimeRaw(requestParameters: GetGroupMetricsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupMetricsOverTimeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); } @@ -1572,10 +1717,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns preferences for the specified group. - * Retrieve Group Preferences + * Creates request options for getGroupPreferences without sending the request */ - async getGroupPreferencesRaw(requestParameters: GetGroupPreferencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupPreferencesRequestOpts(requestParameters: GetGroupPreferencesRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1599,12 +1743,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/preferences`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns preferences for the specified group. + * Retrieve Group Preferences + */ + async getGroupPreferencesRaw(requestParameters: GetGroupPreferencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupPreferencesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupPreferencesFromJSON(jsonValue)); } @@ -1619,10 +1772,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns all the shorten counts for a group. - * Retrieve Group Shorten Counts + * Creates request options for getGroupShortenCounts without sending the request */ - async getGroupShortenCountsRaw(requestParameters: GetGroupShortenCountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupShortenCountsRequestOpts(requestParameters: GetGroupShortenCountsRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1672,12 +1824,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/shorten_counts`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns all the shorten counts for a group. + * Retrieve Group Shorten Counts + */ + async getGroupShortenCountsRaw(requestParameters: GetGroupShortenCountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupShortenCountsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MetricsFromJSON(jsonValue)); } @@ -1692,10 +1853,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns the tags currently used in the specified group. Maximum 1000. - * Retrieve Tags by Group + * Creates request options for getGroupTags without sending the request */ - async getGroupTagsRaw(requestParameters: GetGroupTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupTagsRequestOpts(requestParameters: GetGroupTagsRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1705,6 +1865,10 @@ export class GroupsApi extends runtime.BaseAPI { const queryParameters: any = {}; + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.accessToken) { @@ -1719,12 +1883,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/tags`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the tags currently used in the specified group. Maximum 1000. + * Retrieve Tags by Group + */ + async getGroupTagsRaw(requestParameters: GetGroupTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupTagsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => TagsFromJSON(jsonValue)); } @@ -1739,10 +1912,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get top performing QR codes by scan count for all codes in a group. - * Get Top Performing QR Codes for a Group + * Creates request options for getGroupTopCodeScans without sending the request */ - async getGroupTopCodeScansRaw(requestParameters: GetGroupTopCodeScansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupTopCodeScansRequestOpts(requestParameters: GetGroupTopCodeScansRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1792,12 +1964,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/codes/scans/top`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get top performing QR codes by scan count for all codes in a group. + * Get Top Performing QR Codes for a Group + */ + async getGroupTopCodeScansRaw(requestParameters: GetGroupTopCodeScansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupTopCodeScansRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); } @@ -1812,10 +1993,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get top performing links by click for all links in a group. - * Get Group Top Performing Links by Click + * Creates request options for getGroupTopLinkClicks without sending the request */ - async getGroupTopLinkClicksRaw(requestParameters: GetGroupTopLinkClicksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupTopLinkClicksRequestOpts(requestParameters: GetGroupTopLinkClicksRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1869,12 +2049,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/links/clicks/top`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get top performing links by click for all links in a group. + * Get Group Top Performing Links by Click + */ + async getGroupTopLinkClicksRaw(requestParameters: GetGroupTopLinkClicksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupTopLinkClicksRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); } @@ -1889,10 +2078,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get top performing links by engagement for all links in a group. - * Get Group Top Performing Links by Engagement + * Creates request options for getGroupTopMetrics without sending the request */ - async getGroupTopMetricsRaw(requestParameters: GetGroupTopMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupTopMetricsRequestOpts(requestParameters: GetGroupTopMetricsRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -1946,12 +2134,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/engagements/top`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get top performing links by engagement for all links in a group. + * Get Group Top Performing Links by Engagement + */ + async getGroupTopMetricsRaw(requestParameters: GetGroupTopMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupTopMetricsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); } @@ -1966,10 +2163,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Returns a list of groups in the organization. - * Retrieve Groups + * Creates request options for getGroups without sending the request */ - async getGroupsRaw(requestParameters: GetGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupsRequestOpts(requestParameters: GetGroupsRequest): Promise { const queryParameters: any = {}; if (requestParameters['organization_guid'] != null) { @@ -1989,12 +2185,21 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns a list of groups in the organization. + * Retrieve Groups + */ + async getGroupsRaw(requestParameters: GetGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupsFromJSON(jsonValue)); } @@ -2009,10 +2214,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Updates the details of a group. - * Update a Group + * Creates request options for updateGroup without sending the request */ - async updateGroupRaw(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateGroupRequestOpts(requestParameters: UpdateGroupRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -2045,13 +2249,22 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: GroupUpdateToJSON(requestParameters['group_update']), - }, initOverrides); + }; + } + + /** + * Updates the details of a group. + * Update a Group + */ + async updateGroupRaw(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); } @@ -2066,10 +2279,9 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Updates preferences for a group. - * Update Group Preferences + * Creates request options for updateGroupPreferences without sending the request */ - async updateGroupPreferencesRaw(requestParameters: UpdateGroupPreferencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateGroupPreferencesRequestOpts(requestParameters: UpdateGroupPreferencesRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -2102,13 +2314,22 @@ export class GroupsApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/preferences`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: GroupPreferencesToJSON(requestParameters['group_preferences']), - }, initOverrides); + }; + } + + /** + * Updates preferences for a group. + * Update Group Preferences + */ + async updateGroupPreferencesRaw(requestParameters: UpdateGroupPreferencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateGroupPreferencesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GroupPreferencesFromJSON(jsonValue)); } @@ -2123,3 +2344,12 @@ export class GroupsApi extends runtime.BaseAPI { } } + +/** + * @export + * @enum {string} + */ +export enum GetGroupTagsTypeEnum { + bitlink = 'bitlink', + qr_code = 'qr_code' +} diff --git a/src/apis/OrganizationsApi.ts b/src/apis/OrganizationsApi.ts index bc26d01..870289f 100644 --- a/src/apis/OrganizationsApi.ts +++ b/src/apis/OrganizationsApi.ts @@ -61,6 +61,10 @@ export interface GetOrganizationShortenCountsByGroupRequest { organization_guid: string; } +export interface GetOrganizationsRequest { + include_all?: boolean; +} + export interface GetPlanLimitsRequest { organization_guid: string; } @@ -71,10 +75,9 @@ export interface GetPlanLimitsRequest { export class OrganizationsApi extends runtime.BaseAPI { /** - * Retrive details for the specified organization. - * Retrieve an Organization + * Creates request options for getOrganization without sending the request */ - async getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getOrganizationRequestOpts(requestParameters: GetOrganizationRequest): Promise { if (requestParameters['organization_guid'] == null) { throw new runtime.RequiredError( 'organization_guid', @@ -98,12 +101,21 @@ export class OrganizationsApi extends runtime.BaseAPI { let urlPath = `/organizations/{organization_guid}`; urlPath = urlPath.replace(`{${"organization_guid"}}`, encodeURIComponent(String(requestParameters['organization_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Retrive details for the specified organization. + * Retrieve an Organization + */ + async getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getOrganizationRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationFromJSON(jsonValue)); } @@ -118,10 +130,9 @@ export class OrganizationsApi extends runtime.BaseAPI { } /** - * Returns the shorten counts for a specific organization over a specified time period. - * Get Shorten Counts for an Organization + * Creates request options for getOrganizationShortenCounts without sending the request */ - async getOrganizationShortenCountsRaw(requestParameters: GetOrganizationShortenCountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getOrganizationShortenCountsRequestOpts(requestParameters: GetOrganizationShortenCountsRequest): Promise { if (requestParameters['organization_guid'] == null) { throw new runtime.RequiredError( 'organization_guid', @@ -171,12 +182,21 @@ export class OrganizationsApi extends runtime.BaseAPI { let urlPath = `/organizations/{organization_guid}/shorten_counts`; urlPath = urlPath.replace(`{${"organization_guid"}}`, encodeURIComponent(String(requestParameters['organization_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the shorten counts for a specific organization over a specified time period. + * Get Shorten Counts for an Organization + */ + async getOrganizationShortenCountsRaw(requestParameters: GetOrganizationShortenCountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getOrganizationShortenCountsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MetricsFromJSON(jsonValue)); } @@ -191,10 +211,9 @@ export class OrganizationsApi extends runtime.BaseAPI { } /** - * Returns the shorten counts for a specific organization by group for the current month. - * Get Shorten Counts for an Organization by Group + * Creates request options for getOrganizationShortenCountsByGroup without sending the request */ - async getOrganizationShortenCountsByGroupRaw(requestParameters: GetOrganizationShortenCountsByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getOrganizationShortenCountsByGroupRequestOpts(requestParameters: GetOrganizationShortenCountsByGroupRequest): Promise { if (requestParameters['organization_guid'] == null) { throw new runtime.RequiredError( 'organization_guid', @@ -218,12 +237,21 @@ export class OrganizationsApi extends runtime.BaseAPI { let urlPath = `/organizations/{organization_guid}/shorten_counts_by_group`; urlPath = urlPath.replace(`{${"organization_guid"}}`, encodeURIComponent(String(requestParameters['organization_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the shorten counts for a specific organization by group for the current month. + * Get Shorten Counts for an Organization by Group + */ + async getOrganizationShortenCountsByGroupRaw(requestParameters: GetOrganizationShortenCountsByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getOrganizationShortenCountsByGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MetricsFromJSON(jsonValue)); } @@ -238,12 +266,15 @@ export class OrganizationsApi extends runtime.BaseAPI { } /** - * Retrieve a list of organizations. - * Retrieve Organizations + * Creates request options for getOrganizations without sending the request */ - async getOrganizationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getOrganizationsRequestOpts(requestParameters: GetOrganizationsRequest): Promise { const queryParameters: any = {}; + if (requestParameters['include_all'] != null) { + queryParameters['include_all'] = requestParameters['include_all']; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.accessToken) { @@ -257,30 +288,38 @@ export class OrganizationsApi extends runtime.BaseAPI { let urlPath = `/organizations`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Retrieve a list of organizations for the authenticated user. By default, only organizations permitted by the token\'s allowed_orgs are returned. Use include_all=true to return all organizations regardless of token restrictions. Each organization is annotated with its authentication requirements (require_sso, require_2fa) when configured. + * Retrieve Organizations + */ + async getOrganizationsRaw(requestParameters: GetOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getOrganizationsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationsFromJSON(jsonValue)); } /** - * Retrieve a list of organizations. + * Retrieve a list of organizations for the authenticated user. By default, only organizations permitted by the token\'s allowed_orgs are returned. Use include_all=true to return all organizations regardless of token restrictions. Each organization is annotated with its authentication requirements (require_sso, require_2fa) when configured. * Retrieve Organizations */ - async getOrganizations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getOrganizationsRaw(initOverrides); + async getOrganizations(requestParameters: GetOrganizationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOrganizationsRaw(requestParameters, initOverrides); return await response.value(); } /** - * Returns all plan limits and counts available for an organization. - * Get Plan Limits + * Creates request options for getPlanLimits without sending the request */ - async getPlanLimitsRaw(requestParameters: GetPlanLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getPlanLimitsRequestOpts(requestParameters: GetPlanLimitsRequest): Promise { if (requestParameters['organization_guid'] == null) { throw new runtime.RequiredError( 'organization_guid', @@ -304,12 +343,21 @@ export class OrganizationsApi extends runtime.BaseAPI { let urlPath = `/organizations/{organization_guid}/plan_limits`; urlPath = urlPath.replace(`{${"organization_guid"}}`, encodeURIComponent(String(requestParameters['organization_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns all plan limits and counts available for an organization. + * Get Plan Limits + */ + async getPlanLimitsRaw(requestParameters: GetPlanLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getPlanLimitsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PlanLimitsFromJSON(jsonValue)); } diff --git a/src/apis/QRCodesApi.ts b/src/apis/QRCodesApi.ts index 8e8f58f..ebddd82 100644 --- a/src/apis/QRCodesApi.ts +++ b/src/apis/QRCodesApi.ts @@ -25,8 +25,10 @@ import type { MonthlyLimitExceeded, NotFound, PublicCreateQRCodeRequest, + PublicCreateStaticQRCodeRequest, PublicDeleteQRCodeResponse, PublicQRCodeImageResponse, + PublicStaticQRCodeResponse, PublicUpdateQRCodeRequest, QRCodeDetails, QRCodeMinimal, @@ -34,6 +36,7 @@ import type { ScanMetrics, TemporarilyUnavailable, TimeUnit, + UnprocessableEntity, UpgradeRequired, } from '../models/index'; import { @@ -57,10 +60,14 @@ import { NotFoundToJSON, PublicCreateQRCodeRequestFromJSON, PublicCreateQRCodeRequestToJSON, + PublicCreateStaticQRCodeRequestFromJSON, + PublicCreateStaticQRCodeRequestToJSON, PublicDeleteQRCodeResponseFromJSON, PublicDeleteQRCodeResponseToJSON, PublicQRCodeImageResponseFromJSON, PublicQRCodeImageResponseToJSON, + PublicStaticQRCodeResponseFromJSON, + PublicStaticQRCodeResponseToJSON, PublicUpdateQRCodeRequestFromJSON, PublicUpdateQRCodeRequestToJSON, QRCodeDetailsFromJSON, @@ -75,6 +82,8 @@ import { TemporarilyUnavailableToJSON, TimeUnitFromJSON, TimeUnitToJSON, + UnprocessableEntityFromJSON, + UnprocessableEntityToJSON, UpgradeRequiredFromJSON, UpgradeRequiredToJSON, } from '../models/index'; @@ -83,6 +92,12 @@ export interface CreateQRCodePublicRequest { public_create_qr_code_request: PublicCreateQRCodeRequest; } +export interface CreateStaticQRCodePublicRequest { + public_create_static_qr_code_request: PublicCreateStaticQRCodeRequest; + accept?: CreateStaticQRCodePublicAcceptEnum; + format?: CreateStaticQRCodePublicFormatEnum; +} + export interface DeleteQRCodeRequest { qrcode_id: string; } @@ -156,6 +171,9 @@ export interface ListQRMinimalRequest { creating_login?: Array; qrc_type?: Array; is_gs1?: ListQRMinimalIsGs1Enum; + is_expired?: ListQRMinimalIsExpiredEnum; + has_expiration?: ListQRMinimalHasExpirationEnum; + tags?: Array; } export interface UpdateQRCodePublicRequest { @@ -169,10 +187,9 @@ export interface UpdateQRCodePublicRequest { export class QRCodesApi extends runtime.BaseAPI { /** - * Create a new QR Code and return its metadata - * Create a QR Code + * Creates request options for createQRCodePublic without sending the request */ - async createQRCodePublicRaw(requestParameters: CreateQRCodePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createQRCodePublicRequestOpts(requestParameters: CreateQRCodePublicRequest): Promise { if (requestParameters['public_create_qr_code_request'] == null) { throw new runtime.RequiredError( 'public_create_qr_code_request', @@ -197,13 +214,22 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: PublicCreateQRCodeRequestToJSON(requestParameters['public_create_qr_code_request']), - }, initOverrides); + }; + } + + /** + * Create a new QR Code and return its metadata + * Create a QR Code + */ + async createQRCodePublicRaw(requestParameters: CreateQRCodePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createQRCodePublicRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => QRCodeMinimalFromJSON(jsonValue)); } @@ -218,10 +244,74 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Delete a QR Code that has not been redirected and is not for a custom link. Also deletes the associated link (if applicable). - * Delete a QR Code + * Creates request options for createStaticQRCodePublic without sending the request */ - async deleteQRCodeRaw(requestParameters: DeleteQRCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createStaticQRCodePublicRequestOpts(requestParameters: CreateStaticQRCodePublicRequest): Promise { + if (requestParameters['public_create_static_qr_code_request'] == null) { + throw new runtime.RequiredError( + 'public_create_static_qr_code_request', + 'Required parameter "public_create_static_qr_code_request" was null or undefined when calling createStaticQRCodePublic().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['format'] != null) { + queryParameters['format'] = requestParameters['format']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['accept'] != null) { + headerParameters['Accept'] = String(requestParameters['accept']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/qr-codes/static`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PublicCreateStaticQRCodeRequestToJSON(requestParameters['public_create_static_qr_code_request']), + }; + } + + /** + * Generate a static QR code image without creating or saving a QR code resource. SVG and PNG output are supported via the Accept header Contact your Account Manager to discuss enabling this feature for your account. The `render_customizations` field supports basic appearance options. Customizations that require the rasterize API are not supported: `gradient`, `background_gradient`, `frame`, `text`, and `logo`. The Accept header controls the response format: - `application/json` (default): Returns a JSON object with the image as a base64-encoded byte string. - `image/svg+xml`: Returns the raw SVG image. - `image/png`: Returns the raw PNG image. + * Generate a static QR Code image + */ + async createStaticQRCodePublicRaw(requestParameters: CreateStaticQRCodePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createStaticQRCodePublicRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PublicStaticQRCodeResponseFromJSON(jsonValue)); + } + + /** + * Generate a static QR code image without creating or saving a QR code resource. SVG and PNG output are supported via the Accept header Contact your Account Manager to discuss enabling this feature for your account. The `render_customizations` field supports basic appearance options. Customizations that require the rasterize API are not supported: `gradient`, `background_gradient`, `frame`, `text`, and `logo`. The Accept header controls the response format: - `application/json` (default): Returns a JSON object with the image as a base64-encoded byte string. - `image/svg+xml`: Returns the raw SVG image. - `image/png`: Returns the raw PNG image. + * Generate a static QR Code image + */ + async createStaticQRCodePublic(requestParameters: CreateStaticQRCodePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createStaticQRCodePublicRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for deleteQRCode without sending the request + */ + async deleteQRCodeRequestOpts(requestParameters: DeleteQRCodeRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -245,12 +335,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Delete a QR Code that has not been redirected and is not for a custom link. Also deletes the associated link (if applicable). + * Delete a QR Code + */ + async deleteQRCodeRaw(requestParameters: DeleteQRCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteQRCodeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PublicDeleteQRCodeResponseFromJSON(jsonValue)); } @@ -265,10 +364,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Gets the QR code with a matching id. - * Retrieve a QR Code + * Creates request options for getQRCodeByIdPublic without sending the request */ - async getQRCodeByIdPublicRaw(requestParameters: GetQRCodeByIdPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getQRCodeByIdPublicRequestOpts(requestParameters: GetQRCodeByIdPublicRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -292,12 +390,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Gets the QR code with a matching id. + * Retrieve a QR Code + */ + async getQRCodeByIdPublicRaw(requestParameters: GetQRCodeByIdPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getQRCodeByIdPublicRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => QRCodeDetailsFromJSON(jsonValue)); } @@ -312,10 +419,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Get the image of a given QR Code. The Accept header controls how this is returned (options are \"application/json\", \"image/svg+xml\", and \"image/png\"). If the Accept header is \"application/json\" the format query parameter will determine the image format inside of the json (which will be base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag). To Return the QR Code image itself, set the Accept header to \"image/svg+xml\" or \"image/png\", or remove the Accept header and set the format query parameter to “svg” or “png” (if no format is specified the default will be “svg”). - * Retrieve a QR Code image + * Creates request options for getQRCodeImagePublic without sending the request */ - async getQRCodeImagePublicRaw(requestParameters: GetQRCodeImagePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getQRCodeImagePublicRequestOpts(requestParameters: GetQRCodeImagePublicRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -347,12 +453,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/image`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Get the image of a given QR Code. The Accept header controls how this is returned (options are \"application/json\", \"image/svg+xml\", and \"image/png\"). If the Accept header is \"application/json\" the format query parameter will determine the image format inside of the json (which will be base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag). To Return the QR Code image itself, set the Accept header to \"image/svg+xml\" or \"image/png\", or remove the Accept header and set the format query parameter to “svg” or “png” (if no format is specified the default will be “svg”). + * Retrieve a QR Code image + */ + async getQRCodeImagePublicRaw(requestParameters: GetQRCodeImagePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getQRCodeImagePublicRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PublicQRCodeImageResponseFromJSON(jsonValue)); } @@ -367,10 +482,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Returns an array of scan counts for the specified QR code. The array is comprised of scan counts for each time window, where the window is based on the provided unit. - * Get Scans for a QR Code + * Creates request options for getScanMetricsForQRCode without sending the request */ - async getScanMetricsForQRCodeRaw(requestParameters: GetScanMetricsForQRCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getScanMetricsForQRCodeRequestOpts(requestParameters: GetScanMetricsForQRCodeRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -420,12 +534,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/scans`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns an array of scan counts for the specified QR code. The array is comprised of scan counts for each time window, where the window is based on the provided unit. + * Get Scans for a QR Code + */ + async getScanMetricsForQRCodeRaw(requestParameters: GetScanMetricsForQRCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getScanMetricsForQRCodeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BitlinkScansFromJSON(jsonValue)); } @@ -440,10 +563,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Returns the browsers generating scan traffic to the specified QR Code. - * Get Scans for a QR Code by Browser + * Creates request options for getScanMetricsForQRCodeByBrowser without sending the request */ - async getScanMetricsForQRCodeByBrowserRaw(requestParameters: GetScanMetricsForQRCodeByBrowserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getScanMetricsForQRCodeByBrowserRequestOpts(requestParameters: GetScanMetricsForQRCodeByBrowserRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -497,12 +619,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/scans/browsers`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the browsers generating scan traffic to the specified QR Code. + * Get Scans for a QR Code by Browser + */ + async getScanMetricsForQRCodeByBrowserRaw(requestParameters: GetScanMetricsForQRCodeByBrowserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getScanMetricsForQRCodeByBrowserRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ScanMetricsFromJSON(jsonValue)); } @@ -517,10 +648,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Returns the city origins of scan traffic for the specified QR Code. - * Get Metrics for a QR Code by City + * Creates request options for getScanMetricsForQRCodeByCities without sending the request */ - async getScanMetricsForQRCodeByCitiesRaw(requestParameters: GetScanMetricsForQRCodeByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getScanMetricsForQRCodeByCitiesRequestOpts(requestParameters: GetScanMetricsForQRCodeByCitiesRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -574,12 +704,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/scans/cities`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the city origins of scan traffic for the specified QR Code. + * Get Metrics for a QR Code by City + */ + async getScanMetricsForQRCodeByCitiesRaw(requestParameters: GetScanMetricsForQRCodeByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getScanMetricsForQRCodeByCitiesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CityScanMetricsFromJSON(jsonValue)); } @@ -594,10 +733,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Returns the country origins of scan traffic for the specified QR Code. - * Get Scans for a QR Code by Country + * Creates request options for getScanMetricsForQRCodeByCountries without sending the request */ - async getScanMetricsForQRCodeByCountriesRaw(requestParameters: GetScanMetricsForQRCodeByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getScanMetricsForQRCodeByCountriesRequestOpts(requestParameters: GetScanMetricsForQRCodeByCountriesRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -651,12 +789,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/scans/countries`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the country origins of scan traffic for the specified QR Code. + * Get Scans for a QR Code by Country + */ + async getScanMetricsForQRCodeByCountriesRaw(requestParameters: GetScanMetricsForQRCodeByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getScanMetricsForQRCodeByCountriesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ScanMetricsFromJSON(jsonValue)); } @@ -671,10 +818,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Returns the device os generating scan traffic for the specified QR Code. - * Get Scans for a QR Code by Device OS + * Creates request options for getScanMetricsForQRCodeByDevicesOS without sending the request */ - async getScanMetricsForQRCodeByDevicesOSRaw(requestParameters: GetScanMetricsForQRCodeByDevicesOSRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getScanMetricsForQRCodeByDevicesOSRequestOpts(requestParameters: GetScanMetricsForQRCodeByDevicesOSRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -728,12 +874,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/scans/device_os`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the device os generating scan traffic for the specified QR Code. + * Get Scans for a QR Code by Device OS + */ + async getScanMetricsForQRCodeByDevicesOSRaw(requestParameters: GetScanMetricsForQRCodeByDevicesOSRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getScanMetricsForQRCodeByDevicesOSRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ScanMetricsFromJSON(jsonValue)); } @@ -748,10 +903,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Returns the scan counts for a QR Code rolled up into a single field for a specified time window, where the window is based on the provided unit. - * Get Scans Summary for a QR Code + * Creates request options for getScanMetricsSummaryForQRCode without sending the request */ - async getScanMetricsSummaryForQRCodeRaw(requestParameters: GetScanMetricsSummaryForQRCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getScanMetricsSummaryForQRCodeRequestOpts(requestParameters: GetScanMetricsSummaryForQRCodeRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -801,12 +955,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}/scans/summary`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns the scan counts for a QR Code rolled up into a single field for a specified time window, where the window is based on the provided unit. + * Get Scans Summary for a QR Code + */ + async getScanMetricsSummaryForQRCodeRaw(requestParameters: GetScanMetricsSummaryForQRCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getScanMetricsSummaryForQRCodeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BitlinkScansSummaryFromJSON(jsonValue)); } @@ -821,10 +984,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Retrieves a list of QR codes matching the filter settings. Values are in reverse chronological order. The pagination occurs by calling the next link in the pagination response object. - * Retrieve QR Codes by Group + * Creates request options for listQRMinimal without sending the request */ - async listQRMinimalRaw(requestParameters: ListQRMinimalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async listQRMinimalRequestOpts(requestParameters: ListQRMinimalRequest): Promise { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', @@ -878,6 +1040,18 @@ export class QRCodesApi extends runtime.BaseAPI { queryParameters['is_gs1'] = requestParameters['is_gs1']; } + if (requestParameters['is_expired'] != null) { + queryParameters['is_expired'] = requestParameters['is_expired']; + } + + if (requestParameters['has_expiration'] != null) { + queryParameters['has_expiration'] = requestParameters['has_expiration']; + } + + if (requestParameters['tags'] != null) { + queryParameters['tags'] = requestParameters['tags']; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.accessToken) { @@ -892,12 +1066,21 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/groups/{group_guid}/qr-codes`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Retrieves a list of QR codes matching the filter settings. Values are in reverse chronological order. The pagination occurs by calling the next link in the pagination response object. + * Retrieve QR Codes by Group + */ + async listQRMinimalRaw(requestParameters: ListQRMinimalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.listQRMinimalRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => QRCodesMinimalFromJSON(jsonValue)); } @@ -912,10 +1095,9 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Updates the QR code with a matching id and returns it. - * Update a QR Code + * Creates request options for updateQRCodePublic without sending the request */ - async updateQRCodePublicRaw(requestParameters: UpdateQRCodePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateQRCodePublicRequestOpts(requestParameters: UpdateQRCodePublicRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', @@ -948,13 +1130,22 @@ export class QRCodesApi extends runtime.BaseAPI { let urlPath = `/qr-codes/{qrcode_id}`; urlPath = urlPath.replace(`{${"qrcode_id"}}`, encodeURIComponent(String(requestParameters['qrcode_id']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: PublicUpdateQRCodeRequestToJSON(requestParameters['public_update_qr_code_request']), - }, initOverrides); + }; + } + + /** + * Updates the QR code with a matching id and returns it. + * Update a QR Code + */ + async updateQRCodePublicRaw(requestParameters: UpdateQRCodePublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateQRCodePublicRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => QRCodeMinimalFromJSON(jsonValue)); } @@ -970,6 +1161,23 @@ export class QRCodesApi extends runtime.BaseAPI { } +/** + * @export + * @enum {string} + */ +export enum CreateStaticQRCodePublicAcceptEnum { + application_json = 'application/json', + image_svgxml = 'image/svg+xml', + image_png = 'image/png' +} +/** + * @export + * @enum {string} + */ +export enum CreateStaticQRCodePublicFormatEnum { + svg = 'svg', + png = 'png' +} /** * @export * @enum {string} @@ -1013,3 +1221,21 @@ export enum ListQRMinimalIsGs1Enum { off = 'off', both = 'both' } +/** + * @export + * @enum {string} + */ +export enum ListQRMinimalIsExpiredEnum { + on = 'on', + off = 'off', + both = 'both' +} +/** + * @export + * @enum {string} + */ +export enum ListQRMinimalHasExpirationEnum { + on = 'on', + off = 'off', + both = 'both' +} diff --git a/src/apis/UserApi.ts b/src/apis/UserApi.ts index e93eeac..cbd655c 100644 --- a/src/apis/UserApi.ts +++ b/src/apis/UserApi.ts @@ -60,10 +60,9 @@ export interface UpdateUserRequest { export class UserApi extends runtime.BaseAPI { /** - * Fetch all platform limits and counts available for an organization - * Get Platform Limits + * Creates request options for getPlatformLimits without sending the request */ - async getPlatformLimitsRaw(requestParameters: GetPlatformLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getPlatformLimitsRequestOpts(requestParameters: GetPlatformLimitsRequest): Promise { const queryParameters: any = {}; if (requestParameters['path'] != null) { @@ -83,12 +82,21 @@ export class UserApi extends runtime.BaseAPI { let urlPath = `/user/platform_limits`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Fetch all platform limits and counts available for an organization + * Get Platform Limits + */ + async getPlatformLimitsRaw(requestParameters: GetPlatformLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getPlatformLimitsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PlatformLimitsFromJSON(jsonValue)); } @@ -103,10 +111,9 @@ export class UserApi extends runtime.BaseAPI { } /** - * Returns information for the current authenticated user. - * Retrieve a User + * Creates request options for getUser without sending the request */ - async getUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getUserRequestOpts(): Promise { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -122,12 +129,21 @@ export class UserApi extends runtime.BaseAPI { let urlPath = `/user`; - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns information for the current authenticated user. + * Retrieve a User + */ + async getUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getUserRequestOpts(); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); } @@ -142,10 +158,9 @@ export class UserApi extends runtime.BaseAPI { } /** - * Update fields in the user - * Update a User + * Creates request options for updateUser without sending the request */ - async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateUserRequestOpts(requestParameters: UpdateUserRequest): Promise { if (requestParameters['user_update'] == null) { throw new runtime.RequiredError( 'user_update', @@ -170,13 +185,22 @@ export class UserApi extends runtime.BaseAPI { let urlPath = `/user`; - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: UserUpdateToJSON(requestParameters['user_update']), - }, initOverrides); + }; + } + + /** + * Update fields in the user + * Update a User + */ + async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateUserRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); } diff --git a/src/apis/WebhooksApi.ts b/src/apis/WebhooksApi.ts index 2cd3773..56aa646 100644 --- a/src/apis/WebhooksApi.ts +++ b/src/apis/WebhooksApi.ts @@ -86,10 +86,9 @@ export interface VerifyWebhookRequest { export class WebhooksApi extends runtime.BaseAPI { /** - * Creates a webhook. - * Create Webhook + * Creates request options for createWebhook without sending the request */ - async createWebhookRaw(requestParameters: CreateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createWebhookRequestOpts(requestParameters: CreateWebhookRequest): Promise { if (requestParameters['webhook_create'] == null) { throw new runtime.RequiredError( 'webhook_create', @@ -114,13 +113,22 @@ export class WebhooksApi extends runtime.BaseAPI { let urlPath = `/webhooks`; - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: WebhookCreateToJSON(requestParameters['webhook_create']), - }, initOverrides); + }; + } + + /** + * Creates a webhook. + * Create Webhook + */ + async createWebhookRaw(requestParameters: CreateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createWebhookRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => WebhookFromJSON(jsonValue)); } @@ -135,10 +143,9 @@ export class WebhooksApi extends runtime.BaseAPI { } /** - * Deletes a webhook. - * Delete Webhook + * Creates request options for deleteWebhook without sending the request */ - async deleteWebhookRaw(requestParameters: DeleteWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteWebhookRequestOpts(requestParameters: DeleteWebhookRequest): Promise { if (requestParameters['webhook_guid'] == null) { throw new runtime.RequiredError( 'webhook_guid', @@ -162,12 +169,21 @@ export class WebhooksApi extends runtime.BaseAPI { let urlPath = `/webhooks/{webhook_guid}`; urlPath = urlPath.replace(`{${"webhook_guid"}}`, encodeURIComponent(String(requestParameters['webhook_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Deletes a webhook. + * Delete Webhook + */ + async deleteWebhookRaw(requestParameters: DeleteWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteWebhookRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } @@ -181,10 +197,9 @@ export class WebhooksApi extends runtime.BaseAPI { } /** - * Returns a webhook. - * Retrieve Webhook + * Creates request options for getWebhook without sending the request */ - async getWebhookRaw(requestParameters: GetWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getWebhookRequestOpts(requestParameters: GetWebhookRequest): Promise { if (requestParameters['webhook_guid'] == null) { throw new runtime.RequiredError( 'webhook_guid', @@ -208,12 +223,21 @@ export class WebhooksApi extends runtime.BaseAPI { let urlPath = `/webhooks/{webhook_guid}`; urlPath = urlPath.replace(`{${"webhook_guid"}}`, encodeURIComponent(String(requestParameters['webhook_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Returns a webhook. + * Retrieve Webhook + */ + async getWebhookRaw(requestParameters: GetWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getWebhookRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => WebhookFromJSON(jsonValue)); } @@ -228,10 +252,9 @@ export class WebhooksApi extends runtime.BaseAPI { } /** - * Fetch all webhooks available for an Organization - * Get Webhooks + * Creates request options for getWebhooks without sending the request */ - async getWebhooksRaw(requestParameters: GetWebhooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getWebhooksRequestOpts(requestParameters: GetWebhooksRequest): Promise { if (requestParameters['organization_guid'] == null) { throw new runtime.RequiredError( 'organization_guid', @@ -255,12 +278,21 @@ export class WebhooksApi extends runtime.BaseAPI { let urlPath = `/organizations/{organization_guid}/webhooks`; urlPath = urlPath.replace(`{${"organization_guid"}}`, encodeURIComponent(String(requestParameters['organization_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Fetch all webhooks available for an Organization + * Get Webhooks + */ + async getWebhooksRaw(requestParameters: GetWebhooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getWebhooksRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => WebhooksFromJSON(jsonValue)); } @@ -275,10 +307,9 @@ export class WebhooksApi extends runtime.BaseAPI { } /** - * Update a webhook - * Update Webhook + * Creates request options for updateWebhook without sending the request */ - async updateWebhookRaw(requestParameters: UpdateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateWebhookRequestOpts(requestParameters: UpdateWebhookRequest): Promise { if (requestParameters['webhook_guid'] == null) { throw new runtime.RequiredError( 'webhook_guid', @@ -311,13 +342,22 @@ export class WebhooksApi extends runtime.BaseAPI { let urlPath = `/webhooks/{webhook_guid}`; urlPath = urlPath.replace(`{${"webhook_guid"}}`, encodeURIComponent(String(requestParameters['webhook_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: WebhookUpdateToJSON(requestParameters['webhook_update']), - }, initOverrides); + }; + } + + /** + * Update a webhook + * Update Webhook + */ + async updateWebhookRaw(requestParameters: UpdateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateWebhookRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => WebhookFromJSON(jsonValue)); } @@ -332,10 +372,9 @@ export class WebhooksApi extends runtime.BaseAPI { } /** - * Sends ping event to test webhook configuration. - * Verify Webhook + * Creates request options for verifyWebhook without sending the request */ - async verifyWebhookRaw(requestParameters: VerifyWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async verifyWebhookRequestOpts(requestParameters: VerifyWebhookRequest): Promise { if (requestParameters['webhook_guid'] == null) { throw new runtime.RequiredError( 'webhook_guid', @@ -359,12 +398,21 @@ export class WebhooksApi extends runtime.BaseAPI { let urlPath = `/webhooks/{webhook_guid}/verify`; urlPath = urlPath.replace(`{${"webhook_guid"}}`, encodeURIComponent(String(requestParameters['webhook_guid']))); - const response = await this.request({ + return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, - }, initOverrides); + }; + } + + /** + * Sends ping event to test webhook configuration. + * Verify Webhook + */ + async verifyWebhookRaw(requestParameters: VerifyWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.verifyWebhookRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => WebhookFromJSON(jsonValue)); } diff --git a/src/docs/AddCustomBitlink.md b/src/docs/AddCustomBitlink.md new file mode 100644 index 0000000..46cda3b --- /dev/null +++ b/src/docs/AddCustomBitlink.md @@ -0,0 +1,36 @@ + +# AddCustomBitlink + + +## Properties + +Name | Type +------------ | ------------- +`custom_bitlink` | string +`bitlink_id` | string + +## Example + +```typescript +import type { AddCustomBitlink } from '' + +// TODO: Update the object below with actual values +const example = { + "custom_bitlink": null, + "bitlink_id": null, +} satisfies AddCustomBitlink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as AddCustomBitlink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BSDsApi.md b/src/docs/BSDsApi.md new file mode 100644 index 0000000..e65c4ce --- /dev/null +++ b/src/docs/BSDsApi.md @@ -0,0 +1,76 @@ +# BSDsApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getBSDs**](BSDsApi.md#getbsds) | **GET** /bsds | Get BSDs | + + + +## getBSDs + +> BSDsResponse getBSDs() + +Get BSDs + +Fetch all Branded Short Domains + +### Example + +```ts +import { + Configuration, + BSDsApi, +} from ''; +import type { GetBSDsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BSDsApi(config); + + try { + const data = await api.getBSDs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**BSDsResponse**](BSDsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | * X-Ratelimit-Reason - An explanation of the ratelimit received.
| +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/BSDsResponse.md b/src/docs/BSDsResponse.md new file mode 100644 index 0000000..87a059b --- /dev/null +++ b/src/docs/BSDsResponse.md @@ -0,0 +1,34 @@ + +# BSDsResponse + + +## Properties + +Name | Type +------------ | ------------- +`bsds` | Array<string> + +## Example + +```typescript +import type { BSDsResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "bsds": null, +} satisfies BSDsResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BSDsResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BadGateway.md b/src/docs/BadGateway.md new file mode 100644 index 0000000..50d410a --- /dev/null +++ b/src/docs/BadGateway.md @@ -0,0 +1,41 @@ + +# BadGateway + +BAD_GATEWAY + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { BadGateway } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies BadGateway + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BadGateway +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BadRequest.md b/src/docs/BadRequest.md new file mode 100644 index 0000000..3af8ac4 --- /dev/null +++ b/src/docs/BadRequest.md @@ -0,0 +1,41 @@ + +# BadRequest + +BAD_REQUEST + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { BadRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies BadRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BadRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BaseChannel.md b/src/docs/BaseChannel.md new file mode 100644 index 0000000..ba7ec49 --- /dev/null +++ b/src/docs/BaseChannel.md @@ -0,0 +1,42 @@ + +# BaseChannel + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`guid` | string +`created` | string +`modified` | string +`group_guid` | string + +## Example + +```typescript +import type { BaseChannel } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "guid": null, + "created": null, + "modified": null, + "group_guid": null, +} satisfies BaseChannel + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BaseChannel +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BaseChannelBitlink.md b/src/docs/BaseChannelBitlink.md new file mode 100644 index 0000000..3d3b140 --- /dev/null +++ b/src/docs/BaseChannelBitlink.md @@ -0,0 +1,36 @@ + +# BaseChannelBitlink + + +## Properties + +Name | Type +------------ | ------------- +`campaign_guid` | string +`bitlink_id` | string + +## Example + +```typescript +import type { BaseChannelBitlink } from '' + +// TODO: Update the object below with actual values +const example = { + "campaign_guid": null, + "bitlink_id": null, +} satisfies BaseChannelBitlink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BaseChannelBitlink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BaseMetrics.md b/src/docs/BaseMetrics.md new file mode 100644 index 0000000..eab3c9e --- /dev/null +++ b/src/docs/BaseMetrics.md @@ -0,0 +1,40 @@ + +# BaseMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string + +## Example + +```typescript +import type { BaseMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, +} satisfies BaseMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BaseMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BaseScanMetrics.md b/src/docs/BaseScanMetrics.md new file mode 100644 index 0000000..1d43152 --- /dev/null +++ b/src/docs/BaseScanMetrics.md @@ -0,0 +1,40 @@ + +# BaseScanMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string + +## Example + +```typescript +import type { BaseScanMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, +} satisfies BaseScanMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BaseScanMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BitlinkBody.md b/src/docs/BitlinkBody.md new file mode 100644 index 0000000..57e8c43 --- /dev/null +++ b/src/docs/BitlinkBody.md @@ -0,0 +1,66 @@ + +# BitlinkBody + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`link` | string +`id` | string +`long_url` | string +`title` | string +`archived` | boolean +`created_at` | string +`created_by` | string +`client_id` | string +`custom_bitlinks` | Array<string> +`tags` | Array<string> +`launchpad_ids` | Array<string> +`qr_code_ids` | Array<string> +`deeplinks` | [Array<DeeplinkRule>](DeeplinkRule.md) +`is_deleted` | boolean +`campaign_ids` | Array<string> +`expiration_at` | string + +## Example + +```typescript +import type { BitlinkBody } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "link": null, + "id": null, + "long_url": null, + "title": null, + "archived": null, + "created_at": null, + "created_by": null, + "client_id": null, + "custom_bitlinks": null, + "tags": null, + "launchpad_ids": null, + "qr_code_ids": null, + "deeplinks": null, + "is_deleted": null, + "campaign_ids": null, + "expiration_at": null, +} satisfies BitlinkBody + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BitlinkBody +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BitlinkScans.md b/src/docs/BitlinkScans.md new file mode 100644 index 0000000..9000f01 --- /dev/null +++ b/src/docs/BitlinkScans.md @@ -0,0 +1,40 @@ + +# BitlinkScans + + +## Properties + +Name | Type +------------ | ------------- +`scans` | [Array<QRScans>](QRScans.md) +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { BitlinkScans } from '' + +// TODO: Update the object below with actual values +const example = { + "scans": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies BitlinkScans + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BitlinkScans +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BitlinkScansSummary.md b/src/docs/BitlinkScansSummary.md new file mode 100644 index 0000000..9249853 --- /dev/null +++ b/src/docs/BitlinkScansSummary.md @@ -0,0 +1,40 @@ + +# BitlinkScansSummary + + +## Properties + +Name | Type +------------ | ------------- +`total_scans` | number +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { BitlinkScansSummary } from '' + +// TODO: Update the object below with actual values +const example = { + "total_scans": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies BitlinkScansSummary + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BitlinkScansSummary +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BitlinkUpdate.md b/src/docs/BitlinkUpdate.md new file mode 100644 index 0000000..7ddb685 --- /dev/null +++ b/src/docs/BitlinkUpdate.md @@ -0,0 +1,64 @@ + +# BitlinkUpdate + + +## Properties + +Name | Type +------------ | ------------- +`link` | string +`id` | string +`long_url` | string +`title` | string +`archived` | boolean +`created_at` | string +`created_by` | string +`client_id` | string +`custom_bitlinks` | Array<string> +`tags` | Array<string> +`launchpad_ids` | Array<string> +`qr_code_ids` | Array<string> +`deeplinks` | [Array<DeeplinkRule>](DeeplinkRule.md) +`is_deleted` | boolean +`campaign_ids` | Array<string> +`expiration_at` | string + +## Example + +```typescript +import type { BitlinkUpdate } from '' + +// TODO: Update the object below with actual values +const example = { + "link": null, + "id": null, + "long_url": null, + "title": null, + "archived": null, + "created_at": null, + "created_by": null, + "client_id": null, + "custom_bitlinks": null, + "tags": null, + "launchpad_ids": null, + "qr_code_ids": null, + "deeplinks": null, + "is_deleted": null, + "campaign_ids": null, + "expiration_at": null, +} satisfies BitlinkUpdate + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BitlinkUpdate +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BitlinkUpdateBody.md b/src/docs/BitlinkUpdateBody.md new file mode 100644 index 0000000..0f83df1 --- /dev/null +++ b/src/docs/BitlinkUpdateBody.md @@ -0,0 +1,44 @@ + +# BitlinkUpdateBody + + +## Properties + +Name | Type +------------ | ------------- +`title` | string +`archived` | boolean +`tags` | Array<string> +`deeplinks` | [Array<DeeplinkRule>](DeeplinkRule.md) +`long_url` | string +`expiration_at` | string + +## Example + +```typescript +import type { BitlinkUpdateBody } from '' + +// TODO: Update the object below with actual values +const example = { + "title": null, + "archived": null, + "tags": null, + "deeplinks": null, + "long_url": null, + "expiration_at": null, +} satisfies BitlinkUpdateBody + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BitlinkUpdateBody +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Bitlinks.md b/src/docs/Bitlinks.md new file mode 100644 index 0000000..5ee6d23 --- /dev/null +++ b/src/docs/Bitlinks.md @@ -0,0 +1,36 @@ + +# Bitlinks + + +## Properties + +Name | Type +------------ | ------------- +`links` | [Array<BitlinkBody>](BitlinkBody.md) +`pagination` | [BitlinksPagination](BitlinksPagination.md) + +## Example + +```typescript +import type { Bitlinks } from '' + +// TODO: Update the object below with actual values +const example = { + "links": null, + "pagination": null, +} satisfies Bitlinks + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Bitlinks +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BitlinksApi.md b/src/docs/BitlinksApi.md new file mode 100644 index 0000000..fb52f2a --- /dev/null +++ b/src/docs/BitlinksApi.md @@ -0,0 +1,1776 @@ +# BitlinksApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createBitlink**](BitlinksApi.md#createbitlink) | **POST** /shorten | Shorten a Link | +| [**createFullBitlink**](BitlinksApi.md#createfullbitlink) | **POST** /bitlinks | Create a Bitlink | +| [**deleteBitlink**](BitlinksApi.md#deletebitlink) | **DELETE** /bitlinks/{bitlink} | Delete a Bitlink | +| [**expandBitlink**](BitlinksApi.md#expandbitlink) | **POST** /expand | Expand a Bitlink | +| [**getBitlink**](BitlinksApi.md#getbitlink) | **GET** /bitlinks/{bitlink} | Retrieve a Bitlink | +| [**getBitlinksByGroup**](BitlinksApi.md#getbitlinksbygroup) | **GET** /groups/{group_guid}/bitlinks | Retrieve Bitlinks by Group | +| [**getClicksForBitlink**](BitlinksApi.md#getclicksforbitlink) | **GET** /bitlinks/{bitlink}/clicks | Get Clicks for a Bitlink | +| [**getClicksSummaryForBitlink**](BitlinksApi.md#getclickssummaryforbitlink) | **GET** /bitlinks/{bitlink}/clicks/summary | Get a Clicks Summary for a Bitlink | +| [**getEngagements**](BitlinksApi.md#getengagements) | **GET** /bitlinks/{bitlink}/engagements | Get Engagement Counts for a Bitlink | +| [**getEngagementsSummary**](BitlinksApi.md#getengagementssummary) | **GET** /bitlinks/{bitlink}/engagements/summary | Get an Engagement Count Summary for a Bitlink | +| [**getMetricsForBitlinkByCities**](BitlinksApi.md#getmetricsforbitlinkbycities) | **GET** /bitlinks/{bitlink}/cities | Get Metrics for a Bitlink by City | +| [**getMetricsForBitlinkByCountries**](BitlinksApi.md#getmetricsforbitlinkbycountries) | **GET** /bitlinks/{bitlink}/countries | Get Metrics for a Bitlink by Country | +| [**getMetricsForBitlinkByDevices**](BitlinksApi.md#getmetricsforbitlinkbydevices) | **GET** /bitlinks/{bitlink}/devices | Get Metrics for a Bitlink by Device Type | +| [**getMetricsForBitlinkByReferrerName**](BitlinksApi.md#getmetricsforbitlinkbyreferrername) | **GET** /bitlinks/{bitlink}/referrer_name | Get Metrics for a Bitlink by Referrer Name | +| [**getMetricsForBitlinkByReferrers**](BitlinksApi.md#getmetricsforbitlinkbyreferrers) | **GET** /bitlinks/{bitlink}/referrers | Get Metrics for a Bitlink by Referrers | +| [**getMetricsForBitlinkByReferrersByDomains**](BitlinksApi.md#getmetricsforbitlinkbyreferrersbydomains) | **GET** /bitlinks/{bitlink}/referrers_by_domains | Get Metrics for a Bitlink by Referrers by Domain | +| [**getMetricsForBitlinkByReferringDomains**](BitlinksApi.md#getmetricsforbitlinkbyreferringdomains) | **GET** /bitlinks/{bitlink}/referring_domains | Get Metrics for a Bitlink by Referring Domains | +| [**getSortedBitlinks**](BitlinksApi.md#getsortedbitlinks) | **GET** /groups/{group_guid}/bitlinks/{sort} | Retrieve Sorted Bitlinks for Group | +| [**updateBitlink**](BitlinksApi.md#updatebitlink) | **PATCH** /bitlinks/{bitlink} | Update a Bitlink | +| [**updateBitlinksByGroup**](BitlinksApi.md#updatebitlinksbygroup) | **PATCH** /groups/{group_guid}/bitlinks | Bulk update bitlinks | + + + +## createBitlink + +> ShortenBitlinkBody createBitlink(shorten) + +Shorten a Link + +Converts a long url to a Bitlink. You may see errors returned from this endpoint - \"BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED\" occurs if you have shortened more links than your account is configured for for the month, and \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn\'t have DNS properly configured. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { CreateBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // Shorten + shorten: ..., + } satisfies CreateBitlinkRequest; + + try { + const data = await api.createBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **shorten** | [Shorten](Shorten.md) | | | + +### Return type + +[**ShortenBitlinkBody**](ShortenBitlinkBody.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | * X-Bsd-Error - An explanation of the DNS error received
| +| **201** | CREATED | * X-Bsd-Error - An explanation of the DNS error received
| +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | * X-Ratelimit-Reason - An explanation of the ratelimit received.
| +| **417** | EXPECTATION_FAILED | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createFullBitlink + +> BitlinkBody createFullBitlink(full_shorten) + +Create a Bitlink + +Converts a long url to a Bitlink and sets additional parameters. You may see errors returned from this endpoint - \"BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED\" occurs if you have shortened more links than your account is configured for for the month, and \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn\'t have DNS properly configured. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { CreateFullBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // FullShorten + full_shorten: {"long_url":"https://dev.bitly.com","domain":"yourdomain.co","group_guid":"Ba1bc23dE4F","keyword":"new-link"}, + } satisfies CreateFullBitlinkRequest; + + try { + const data = await api.createFullBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **full_shorten** | [FullShorten](FullShorten.md) | | | + +### Return type + +[**BitlinkBody**](BitlinkBody.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **201** | CREATED | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **417** | EXPECTATION_FAILED | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## deleteBitlink + +> LinkDeletionResponse deleteBitlink(bitlink) + +Delete a Bitlink + +Delete an unedited hash Bitlink. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { DeleteBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + } satisfies DeleteBitlinkRequest; + + try { + const data = await api.deleteBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | + +### Return type + +[**LinkDeletionResponse**](LinkDeletionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## expandBitlink + +> ExpandedBitlink expandBitlink(expand_bitlink) + +Expand a Bitlink + +Returns the short link and long URL for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { ExpandBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // ExpandBitlink + expand_bitlink: ..., + } satisfies ExpandBitlinkRequest; + + try { + const data = await api.expandBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **expand_bitlink** | [ExpandBitlink](ExpandBitlink.md) | | | + +### Return type + +[**ExpandedBitlink**](ExpandedBitlink.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getBitlink + +> BitlinkBody getBitlink(bitlink) + +Retrieve a Bitlink + +Returns information for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + } satisfies GetBitlinkRequest; + + try { + const data = await api.getBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | + +### Return type + +[**BitlinkBody**](BitlinkBody.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getBitlinksByGroup + +> Bitlinks getBitlinksByGroup(group_guid, size, search_after, query, hostname_path_query, created_before, created_after, archived, deeplinks, domain_deeplinks, campaign_guid, channel_guid, custom_bitlink, has_qr_codes, is_expired, has_expiration, tags, launchpad_ids, encoding_login) + +Retrieve Bitlinks by Group + +Returns a paginated collection of Bitlinks for a group. The list of custom bitlinks has newest entries first. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetBitlinksByGroupRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | Token used to search next batch, only use response from API as input value. (optional) + search_after: search_after_example, + // string | The value that you would like to search (optional) + query: api, + // string | The hostname and/or path you would like to search (case-insensitive). Subdomains included; query params and fragment ignored. (optional) + hostname_path_query: dev.bitly.com/api-reference, + // number | Timestamp as an integer unix epoch (seconds only) (optional) + created_before: 1694529902, + // number | Timestamp as an integer unix epoch (seconds only) (optional) + created_after: 1694529902, + // 'on' | 'off' | 'both' | Whether or not to include archived resources (optional) + archived: both, + // 'on' | 'off' | 'both' | Filter to only Bitlinks that contain deeplinks (optional) + deeplinks: both, + // 'on' | 'off' | 'both' | Filter to only Bitlinks that contain deeplinks configured with a custom domain (optional) + domain_deeplinks: both, + // string | Filter to return only links for the given campaign GUID, can be provided (optional) + campaign_guid: Ca1bcd2EFGh, + // string | Filter to return only links for the given channel GUID, can be provided, overrides all other parameters (optional) + channel_guid: Ha1bc2DefGh, + // 'on' | 'off' | 'both' (optional) + custom_bitlink: both, + // 'on' | 'off' | 'both' | a filter value if the resource has any QR codes (optional) + has_qr_codes: both, + // 'on' | 'off' | 'both' | filter bitlinks by expiration status (optional) + is_expired: is_expired_example, + // 'on' | 'off' | 'both' | filter bitlinks by presence of expiration (optional) + has_expiration: has_expiration_example, + // Array | Filter by given tags (optional) + tags: ["bitly","api"], + // Array | Filter by launchpad id (optional) + launchpad_ids: ["M1234567890"], + // Array | Filter by the login of the authenticated user that created the Bitlink (optional) + encoding_login: ["chauncey"], + } satisfies GetBitlinksByGroupRequest; + + try { + const data = await api.getBitlinksByGroup(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **search_after** | `string` | Token used to search next batch, only use response from API as input value. | [Optional] [Defaults to `undefined`] | +| **query** | `string` | The value that you would like to search | [Optional] [Defaults to `undefined`] | +| **hostname_path_query** | `string` | The hostname and/or path you would like to search (case-insensitive). Subdomains included; query params and fragment ignored. | [Optional] [Defaults to `undefined`] | +| **created_before** | `number` | Timestamp as an integer unix epoch (seconds only) | [Optional] [Defaults to `undefined`] | +| **created_after** | `number` | Timestamp as an integer unix epoch (seconds only) | [Optional] [Defaults to `undefined`] | +| **archived** | `on`, `off`, `both` | Whether or not to include archived resources | [Optional] [Defaults to `'off'`] [Enum: on, off, both] | +| **deeplinks** | `on`, `off`, `both` | Filter to only Bitlinks that contain deeplinks | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **domain_deeplinks** | `on`, `off`, `both` | Filter to only Bitlinks that contain deeplinks configured with a custom domain | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **campaign_guid** | `string` | Filter to return only links for the given campaign GUID, can be provided | [Optional] [Defaults to `undefined`] | +| **channel_guid** | `string` | Filter to return only links for the given channel GUID, can be provided, overrides all other parameters | [Optional] [Defaults to `undefined`] | +| **custom_bitlink** | `on`, `off`, `both` | | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **has_qr_codes** | `on`, `off`, `both` | a filter value if the resource has any QR codes | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **is_expired** | `on`, `off`, `both` | filter bitlinks by expiration status | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **has_expiration** | `on`, `off`, `both` | filter bitlinks by presence of expiration | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **tags** | `Array` | Filter by given tags | [Optional] | +| **launchpad_ids** | `Array` | Filter by launchpad id | [Optional] | +| **encoding_login** | `Array` | Filter by the login of the authenticated user that created the Bitlink | [Optional] | + +### Return type + +[**Bitlinks**](Bitlinks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getClicksForBitlink + +> Clicks getClicksForBitlink(bitlink, unit, units, unit_reference) + +Get Clicks for a Bitlink + +Returns the click counts for the specified link in an array based on a date. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetClicksForBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetClicksForBitlinkRequest; + + try { + const data = await api.getClicksForBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Clicks**](Clicks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getClicksSummaryForBitlink + +> ClicksSummary getClicksSummaryForBitlink(bitlink, unit, units, unit_reference) + +Get a Clicks Summary for a Bitlink + +Returns the click counts for the specified link rolled up into a single field. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetClicksSummaryForBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetClicksSummaryForBitlinkRequest; + + try { + const data = await api.getClicksSummaryForBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClicksSummary**](ClicksSummary.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getEngagements + +> TotalEngagements getEngagements(bitlink, unit, units, unit_reference) + +Get Engagement Counts for a Bitlink + +Returns an array of engagement counts for the specified link. The array is comprised of button click, click and scan counts for each time window, where the window is based on the provided unit. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetEngagementsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetEngagementsRequest; + + try { + const data = await api.getEngagements(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**TotalEngagements**](TotalEngagements.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getEngagementsSummary + +> TotalEngagementsSummary getEngagementsSummary(bitlink, unit, units, unit_reference) + +Get an Engagement Count Summary for a Bitlink + +Returns the engagement counts for the specified link rolled up into a single field. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetEngagementsSummaryRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetEngagementsSummaryRequest; + + try { + const data = await api.getEngagementsSummary(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**TotalEngagementsSummary**](TotalEngagementsSummary.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByCities + +> CityMetrics getMetricsForBitlinkByCities(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by City + +Returns the city origins of click traffic for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByCitiesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByCitiesRequest; + + try { + const data = await api.getMetricsForBitlinkByCities(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CityMetrics**](CityMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByCountries + +> ClickMetrics getMetricsForBitlinkByCountries(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by Country + +Returns the country origins of click traffic for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByCountriesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByCountriesRequest; + + try { + const data = await api.getMetricsForBitlinkByCountries(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByDevices + +> DeviceMetrics getMetricsForBitlinkByDevices(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by Device Type + +Returns the device types generating click traffic to the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByDevicesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByDevicesRequest; + + try { + const data = await api.getMetricsForBitlinkByDevices(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**DeviceMetrics**](DeviceMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByReferrerName + +> ClickMetrics getMetricsForBitlinkByReferrerName(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by Referrer Name + +Returns referrer click counts for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByReferrerNameRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByReferrerNameRequest; + + try { + const data = await api.getMetricsForBitlinkByReferrerName(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByReferrers + +> ClickMetrics getMetricsForBitlinkByReferrers(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by Referrers + +Returns referrer click counts for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByReferrersRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByReferrersRequest; + + try { + const data = await api.getMetricsForBitlinkByReferrers(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByReferrersByDomains + +> ReferrersByDomains getMetricsForBitlinkByReferrersByDomains(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by Referrers by Domain + +Returns click metrics grouped by referrers for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByReferrersByDomainsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByReferrersByDomainsRequest; + + try { + const data = await api.getMetricsForBitlinkByReferrersByDomains(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ReferrersByDomains**](ReferrersByDomains.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMetricsForBitlinkByReferringDomains + +> ClickMetrics getMetricsForBitlinkByReferringDomains(bitlink, unit, units, size, unit_reference) + +Get Metrics for a Bitlink by Referring Domains + +Returns the referring domain click counts for the specified link. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetMetricsForBitlinkByReferringDomainsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetMetricsForBitlinkByReferringDomainsRequest; + + try { + const data = await api.getMetricsForBitlinkByReferringDomains(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSortedBitlinks + +> SortedLinks getSortedBitlinks(group_guid, sort, unit, units, unit_reference, size) + +Retrieve Sorted Bitlinks for Group + +Returns a list of Bitlinks sorted by group. The list of custom bitlinks has newest entries first. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { GetSortedBitlinksRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // 'clicks' | The type of sorting that you would like to do + sort: clicks, + // TimeUnit | A unit of time (optional) + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time. (optional) + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + // number | The quantity of items to be be returned (optional) + size: 10, + } satisfies GetSortedBitlinksRequest; + + try { + const data = await api.getSortedBitlinks(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **sort** | `clicks` | The type of sorting that you would like to do | [Defaults to `undefined`] [Enum: clicks] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time. | [Optional] [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | + +### Return type + +[**SortedLinks**](SortedLinks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateBitlink + +> BitlinkBody updateBitlink(bitlink, bitlink_update_body) + +Update a Bitlink + +Updates fields in the specified link. To redirect the link (i.e. to update the Long URL), use the long_url parameter. This will always charge an encode limit. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { UpdateBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A Bitlink made of the domain and hash + bitlink: bit.ly/12a4b6c, + // BitlinkUpdateBody + bitlink_update_body: {"long_url":"https://www.newdestination.com"}, + } satisfies UpdateBitlinkRequest; + + try { + const data = await api.updateBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bitlink** | `string` | A Bitlink made of the domain and hash | [Defaults to `undefined`] | +| **bitlink_update_body** | [BitlinkUpdateBody](BitlinkUpdateBody.md) | | | + +### Return type + +[**BitlinkBody**](BitlinkBody.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **409** | CONFLICT | - | +| **410** | GONE | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateBitlinksByGroup + +> BulkUpdate updateBitlinksByGroup(group_guid, bulk_update_request) + +Bulk update bitlinks + +Bulk update can add or remove tags or archive up to 100 links at a time; The response includes a list of bitlink ids that were updated. + +### Example + +```ts +import { + Configuration, + BitlinksApi, +} from ''; +import type { UpdateBitlinksByGroupRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlinksApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // BulkUpdateRequest + bulk_update_request: ..., + } satisfies UpdateBitlinksByGroupRequest; + + try { + const data = await api.updateBitlinksByGroup(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **bulk_update_request** | [BulkUpdateRequest](BulkUpdateRequest.md) | | | + +### Return type + +[**BulkUpdate**](BulkUpdate.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/BitlinksPagination.md b/src/docs/BitlinksPagination.md new file mode 100644 index 0000000..b8082f0 --- /dev/null +++ b/src/docs/BitlinksPagination.md @@ -0,0 +1,38 @@ + +# BitlinksPagination + + +## Properties + +Name | Type +------------ | ------------- +`next` | string +`search_after` | string +`size` | number + +## Example + +```typescript +import type { BitlinksPagination } from '' + +// TODO: Update the object below with actual values +const example = { + "next": null, + "search_after": null, + "size": null, +} satisfies BitlinksPagination + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BitlinksPagination +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BulkUpdate.md b/src/docs/BulkUpdate.md new file mode 100644 index 0000000..7c853ce --- /dev/null +++ b/src/docs/BulkUpdate.md @@ -0,0 +1,34 @@ + +# BulkUpdate + + +## Properties + +Name | Type +------------ | ------------- +`links` | Array<string> + +## Example + +```typescript +import type { BulkUpdate } from '' + +// TODO: Update the object below with actual values +const example = { + "links": null, +} satisfies BulkUpdate + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BulkUpdate +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/BulkUpdateRequest.md b/src/docs/BulkUpdateRequest.md new file mode 100644 index 0000000..1a444ae --- /dev/null +++ b/src/docs/BulkUpdateRequest.md @@ -0,0 +1,42 @@ + +# BulkUpdateRequest + + +## Properties + +Name | Type +------------ | ------------- +`action` | string +`archive` | boolean +`add_tags` | Array<string> +`remove_tags` | Array<string> +`links` | Array<string> + +## Example + +```typescript +import type { BulkUpdateRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "action": null, + "archive": null, + "add_tags": null, + "remove_tags": null, + "links": null, +} satisfies BulkUpdateRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as BulkUpdateRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Campaign.md b/src/docs/Campaign.md new file mode 100644 index 0000000..feb23d0 --- /dev/null +++ b/src/docs/Campaign.md @@ -0,0 +1,48 @@ + +# Campaign + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`guid` | string +`group_guid` | string +`created_by` | string +`name` | string +`description` | string +`created` | string +`modified` | string + +## Example + +```typescript +import type { Campaign } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "guid": null, + "group_guid": null, + "created_by": null, + "name": null, + "description": null, + "created": null, + "modified": null, +} satisfies Campaign + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Campaign +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CampaignModify.md b/src/docs/CampaignModify.md new file mode 100644 index 0000000..1873a98 --- /dev/null +++ b/src/docs/CampaignModify.md @@ -0,0 +1,40 @@ + +# CampaignModify + + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`name` | string +`description` | string +`channel_guids` | Array<string> + +## Example + +```typescript +import type { CampaignModify } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": null, + "name": null, + "description": null, + "channel_guids": null, +} satisfies CampaignModify + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CampaignModify +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Campaigns.md b/src/docs/Campaigns.md new file mode 100644 index 0000000..2ee66e4 --- /dev/null +++ b/src/docs/Campaigns.md @@ -0,0 +1,34 @@ + +# Campaigns + + +## Properties + +Name | Type +------------ | ------------- +`campaigns` | [Array<Campaign>](Campaign.md) + +## Example + +```typescript +import type { Campaigns } from '' + +// TODO: Update the object below with actual values +const example = { + "campaigns": null, +} satisfies Campaigns + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Campaigns +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CampaignsApi.md b/src/docs/CampaignsApi.md new file mode 100644 index 0000000..5ce7bbe --- /dev/null +++ b/src/docs/CampaignsApi.md @@ -0,0 +1,649 @@ +# CampaignsApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createCampaign**](CampaignsApi.md#createcampaign) | **POST** /campaigns | Create Campaign | +| [**createChannel**](CampaignsApi.md#createchannel) | **POST** /channels | Create Channel | +| [**getCampaign**](CampaignsApi.md#getcampaign) | **GET** /campaigns/{campaign_guid} | Retrieve a Campaign | +| [**getCampaigns**](CampaignsApi.md#getcampaigns) | **GET** /campaigns | Retrieve Campaigns | +| [**getChannel**](CampaignsApi.md#getchannel) | **GET** /channels/{channel_guid} | Get a Channel | +| [**getChannels**](CampaignsApi.md#getchannels) | **GET** /channels | Retrieve Channels | +| [**updateCampaign**](CampaignsApi.md#updatecampaign) | **PATCH** /campaigns/{campaign_guid} | Update Campaign | +| [**updateChannel**](CampaignsApi.md#updatechannel) | **PATCH** /channels/{channel_guid} | Update a Channel | + + + +## createCampaign + +> Campaign createCampaign(campaign_modify) + +Create Campaign + +Creates a new campaign. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { CreateCampaignRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // CampaignModify + campaign_modify: ..., + } satisfies CreateCampaignRequest; + + try { + const data = await api.createCampaign(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **campaign_modify** | [CampaignModify](CampaignModify.md) | | | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createChannel + +> Channel createChannel(channel_modify) + +Create Channel + +Creates a new channel. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { CreateChannelRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // ChannelModify + channel_modify: ..., + } satisfies CreateChannelRequest; + + try { + const data = await api.createChannel(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **channel_modify** | [ChannelModify](ChannelModify.md) | | | + +### Return type + +[**Channel**](Channel.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCampaign + +> Campaign getCampaign(campaign_guid) + +Retrieve a Campaign + +Returns details for a campaign. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { GetCampaignRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // string | A GUID for a Bitly campaign + campaign_guid: Ca1bcd2EFGh, + } satisfies GetCampaignRequest; + + try { + const data = await api.getCampaign(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **campaign_guid** | `string` | A GUID for a Bitly campaign | [Defaults to `undefined`] | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCampaigns + +> Campaigns getCampaigns(group_guid) + +Retrieve Campaigns + +Returns the campaigns for the current authenticated user. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { GetCampaignsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // string | A GUID for a Bitly group (optional) + group_guid: Ba1bc23dE4F, + } satisfies GetCampaignsRequest; + + try { + const data = await api.getCampaigns(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Campaigns**](Campaigns.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **502** | BAD_GATEWAY | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getChannel + +> Channel getChannel(channel_guid) + +Get a Channel + +Returns a channel\'s details. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { GetChannelRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // string | A GUID for a Bitly Channel + channel_guid: Ha1bc2DefGh, + } satisfies GetChannelRequest; + + try { + const data = await api.getChannel(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **channel_guid** | `string` | A GUID for a Bitly Channel | [Defaults to `undefined`] | + +### Return type + +[**Channel**](Channel.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getChannels + +> Channels getChannels(group_guid, campaign_guid) + +Retrieve Channels + +Returns the channels available to a user. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { GetChannelsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // string | A GUID for a Bitly group (optional) + group_guid: Ba1bc23dE4F, + // string | A GUID for a Bitly campaign (optional) + campaign_guid: Ca1bcd2EFGh, + } satisfies GetChannelsRequest; + + try { + const data = await api.getChannels(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Optional] [Defaults to `undefined`] | +| **campaign_guid** | `string` | A GUID for a Bitly campaign | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Channels**](Channels.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateCampaign + +> Campaign updateCampaign(campaign_guid, campaign_modify) + +Update Campaign + +Updates a campaign\'s details. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { UpdateCampaignRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // string | A GUID for a Bitly campaign + campaign_guid: Ca1bcd2EFGh, + // CampaignModify + campaign_modify: ..., + } satisfies UpdateCampaignRequest; + + try { + const data = await api.updateCampaign(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **campaign_guid** | `string` | A GUID for a Bitly campaign | [Defaults to `undefined`] | +| **campaign_modify** | [CampaignModify](CampaignModify.md) | | | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateChannel + +> Channel updateChannel(channel_guid, channel_modify) + +Update a Channel + +Updates an existing channel. + +### Example + +```ts +import { + Configuration, + CampaignsApi, +} from ''; +import type { UpdateChannelRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CampaignsApi(config); + + const body = { + // string | A GUID for a Bitly Channel + channel_guid: Ha1bc2DefGh, + // ChannelModify + channel_modify: ..., + } satisfies UpdateChannelRequest; + + try { + const data = await api.updateChannel(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **channel_guid** | `string` | A GUID for a Bitly Channel | [Defaults to `undefined`] | +| **channel_modify** | [ChannelModify](ChannelModify.md) | | | + +### Return type + +[**Channel**](Channel.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/Channel.md b/src/docs/Channel.md new file mode 100644 index 0000000..8f476d7 --- /dev/null +++ b/src/docs/Channel.md @@ -0,0 +1,44 @@ + +# Channel + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`guid` | string +`created` | string +`modified` | string +`group_guid` | string +`references` | { [key: string]: string; } + +## Example + +```typescript +import type { Channel } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "guid": null, + "created": null, + "modified": null, + "group_guid": null, + "references": null, +} satisfies Channel + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Channel +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ChannelModify.md b/src/docs/ChannelModify.md new file mode 100644 index 0000000..b1ba8c4 --- /dev/null +++ b/src/docs/ChannelModify.md @@ -0,0 +1,44 @@ + +# ChannelModify + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`guid` | string +`created` | string +`modified` | string +`group_guid` | string +`bitlinks` | [Array<BaseChannelBitlink>](BaseChannelBitlink.md) + +## Example + +```typescript +import type { ChannelModify } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "guid": null, + "created": null, + "modified": null, + "group_guid": null, + "bitlinks": null, +} satisfies ChannelModify + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ChannelModify +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Channels.md b/src/docs/Channels.md new file mode 100644 index 0000000..227574c --- /dev/null +++ b/src/docs/Channels.md @@ -0,0 +1,34 @@ + +# Channels + + +## Properties + +Name | Type +------------ | ------------- +`channels` | [Array<Channel>](Channel.md) + +## Example + +```typescript +import type { Channels } from '' + +// TODO: Update the object below with actual values +const example = { + "channels": null, +} satisfies Channels + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Channels +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CityMetric.md b/src/docs/CityMetric.md new file mode 100644 index 0000000..53d63bc --- /dev/null +++ b/src/docs/CityMetric.md @@ -0,0 +1,42 @@ + +# CityMetric + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`city` | string +`subregion` | string +`region` | string +`country` | string + +## Example + +```typescript +import type { CityMetric } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": null, + "city": null, + "subregion": null, + "region": null, + "country": null, +} satisfies CityMetric + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CityMetric +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CityMetrics.md b/src/docs/CityMetrics.md new file mode 100644 index 0000000..2c2e424 --- /dev/null +++ b/src/docs/CityMetrics.md @@ -0,0 +1,44 @@ + +# CityMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<CityMetric>](CityMetric.md) +`other_metrics` | [OtherMetrics](OtherMetrics.md) + +## Example + +```typescript +import type { CityMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, + "other_metrics": null, +} satisfies CityMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CityMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CityScanMetric.md b/src/docs/CityScanMetric.md new file mode 100644 index 0000000..a29cd0c --- /dev/null +++ b/src/docs/CityScanMetric.md @@ -0,0 +1,42 @@ + +# CityScanMetric + + +## Properties + +Name | Type +------------ | ------------- +`scans` | number +`city` | string +`subregion` | string +`region` | string +`country` | string + +## Example + +```typescript +import type { CityScanMetric } from '' + +// TODO: Update the object below with actual values +const example = { + "scans": null, + "city": null, + "subregion": null, + "region": null, + "country": null, +} satisfies CityScanMetric + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CityScanMetric +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CityScanMetrics.md b/src/docs/CityScanMetrics.md new file mode 100644 index 0000000..12f273c --- /dev/null +++ b/src/docs/CityScanMetrics.md @@ -0,0 +1,44 @@ + +# CityScanMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<CityScanMetric>](CityScanMetric.md) +`other_metrics` | [OtherScanMetrics](OtherScanMetrics.md) + +## Example + +```typescript +import type { CityScanMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, + "other_metrics": null, +} satisfies CityScanMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CityScanMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ClickLink.md b/src/docs/ClickLink.md new file mode 100644 index 0000000..27e0e79 --- /dev/null +++ b/src/docs/ClickLink.md @@ -0,0 +1,36 @@ + +# ClickLink + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`id` | string + +## Example + +```typescript +import type { ClickLink } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": null, + "id": null, +} satisfies ClickLink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ClickLink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ClickMetric.md b/src/docs/ClickMetric.md new file mode 100644 index 0000000..438f43c --- /dev/null +++ b/src/docs/ClickMetric.md @@ -0,0 +1,36 @@ + +# ClickMetric + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`value` | string + +## Example + +```typescript +import type { ClickMetric } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": 123, + "value": bit.ly, +} satisfies ClickMetric + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ClickMetric +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ClickMetrics.md b/src/docs/ClickMetrics.md new file mode 100644 index 0000000..36271a4 --- /dev/null +++ b/src/docs/ClickMetrics.md @@ -0,0 +1,42 @@ + +# ClickMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<ClickMetric>](ClickMetric.md) + +## Example + +```typescript +import type { ClickMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, +} satisfies ClickMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ClickMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Clicks.md b/src/docs/Clicks.md new file mode 100644 index 0000000..a7cd034 --- /dev/null +++ b/src/docs/Clicks.md @@ -0,0 +1,40 @@ + +# Clicks + + +## Properties + +Name | Type +------------ | ------------- +`link_clicks` | [Array<LinkClicks>](LinkClicks.md) +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { Clicks } from '' + +// TODO: Update the object below with actual values +const example = { + "link_clicks": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies Clicks + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Clicks +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ClicksSummary.md b/src/docs/ClicksSummary.md new file mode 100644 index 0000000..428fff7 --- /dev/null +++ b/src/docs/ClicksSummary.md @@ -0,0 +1,40 @@ + +# ClicksSummary + + +## Properties + +Name | Type +------------ | ------------- +`total_clicks` | number +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { ClicksSummary } from '' + +// TODO: Update the object below with actual values +const example = { + "total_clicks": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies ClicksSummary + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ClicksSummary +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Conflict.md b/src/docs/Conflict.md new file mode 100644 index 0000000..ba588b4 --- /dev/null +++ b/src/docs/Conflict.md @@ -0,0 +1,41 @@ + +# Conflict + +CONFLICT + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { Conflict } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies Conflict + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Conflict +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CountItem.md b/src/docs/CountItem.md new file mode 100644 index 0000000..875981a --- /dev/null +++ b/src/docs/CountItem.md @@ -0,0 +1,36 @@ + +# CountItem + + +## Properties + +Name | Type +------------ | ------------- +`ts` | string +`count` | number + +## Example + +```typescript +import type { CountItem } from '' + +// TODO: Update the object below with actual values +const example = { + "ts": null, + "count": null, +} satisfies CountItem + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CountItem +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CustomBitlink.md b/src/docs/CustomBitlink.md new file mode 100644 index 0000000..05ae5c7 --- /dev/null +++ b/src/docs/CustomBitlink.md @@ -0,0 +1,38 @@ + +# CustomBitlink + + +## Properties + +Name | Type +------------ | ------------- +`custom_bitlink` | string +`bitlink` | [BitlinkBody](BitlinkBody.md) +`bitlink_history` | [Array<CustomBitlinkHistory>](CustomBitlinkHistory.md) + +## Example + +```typescript +import type { CustomBitlink } from '' + +// TODO: Update the object below with actual values +const example = { + "custom_bitlink": null, + "bitlink": null, + "bitlink_history": null, +} satisfies CustomBitlink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CustomBitlink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CustomBitlinkHistory.md b/src/docs/CustomBitlinkHistory.md new file mode 100644 index 0000000..194175c --- /dev/null +++ b/src/docs/CustomBitlinkHistory.md @@ -0,0 +1,52 @@ + +# CustomBitlinkHistory + + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`keyword` | string +`bsd` | string +`hash` | string +`login` | string +`long_url` | string +`created` | string +`first_created` | string +`deactivated` | string +`is_active` | boolean + +## Example + +```typescript +import type { CustomBitlinkHistory } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": null, + "keyword": null, + "bsd": null, + "hash": null, + "login": null, + "long_url": null, + "created": null, + "first_created": null, + "deactivated": null, + "is_active": null, +} satisfies CustomBitlinkHistory + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as CustomBitlinkHistory +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/CustomBitlinksApi.md b/src/docs/CustomBitlinksApi.md new file mode 100644 index 0000000..a684bed --- /dev/null +++ b/src/docs/CustomBitlinksApi.md @@ -0,0 +1,428 @@ +# CustomBitlinksApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addCustomBitlink**](CustomBitlinksApi.md#addcustombitlink) | **POST** /custom_bitlinks | Add Custom Bitlink | +| [**getClicksForCustomBitlink**](CustomBitlinksApi.md#getclicksforcustombitlink) | **GET** /custom_bitlinks/{custom_bitlink}/clicks | Get Clicks for a Custom Bitlink\'s Entire History | +| [**getCustomBitlink**](CustomBitlinksApi.md#getcustombitlink) | **GET** /custom_bitlinks/{custom_bitlink} | Retrieve Custom Bitlink | +| [**getCustomBitlinkMetricsByDestination**](CustomBitlinksApi.md#getcustombitlinkmetricsbydestination) | **GET** /custom_bitlinks/{custom_bitlink}/clicks_by_destination | Get Metrics for a Custom Bitlink by Destination | +| [**updateCustomBitlink**](CustomBitlinksApi.md#updatecustombitlink) | **PATCH** /custom_bitlinks/{custom_bitlink} | Update Custom Bitlink | + + + +## addCustomBitlink + +> CustomBitlink addCustomBitlink(add_custom_bitlink) + +Add Custom Bitlink + +Add a keyword (or \"custom back-half\") to a Bitlink with a Custom Domain (domains must match). This endpoint can also be used for initial redirects to a link. + +### Example + +```ts +import { + Configuration, + CustomBitlinksApi, +} from ''; +import type { AddCustomBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CustomBitlinksApi(config); + + const body = { + // AddCustomBitlink + add_custom_bitlink: ..., + } satisfies AddCustomBitlinkRequest; + + try { + const data = await api.addCustomBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **add_custom_bitlink** | [AddCustomBitlink](AddCustomBitlink.md) | | | + +### Return type + +[**CustomBitlink**](CustomBitlink.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **409** | Conflict | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getClicksForCustomBitlink + +> Clicks getClicksForCustomBitlink(custom_bitlink, unit, units, unit_reference) + +Get Clicks for a Custom Bitlink\'s Entire History + +Returns the click counts for the specified link. This returns an array with clicks based on a date. + +### Example + +```ts +import { + Configuration, + CustomBitlinksApi, +} from ''; +import type { GetClicksForCustomBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CustomBitlinksApi(config); + + const body = { + // string | A Custom Bitlink made of the domain and keyword + custom_bitlink: chauncey.ly/chauncey, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetClicksForCustomBitlinkRequest; + + try { + const data = await api.getClicksForCustomBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **custom_bitlink** | `string` | A Custom Bitlink made of the domain and keyword | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Clicks**](Clicks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCustomBitlink + +> CustomBitlink getCustomBitlink(custom_bitlink) + +Retrieve Custom Bitlink + +Returns the details and history of the specified link. + +### Example + +```ts +import { + Configuration, + CustomBitlinksApi, +} from ''; +import type { GetCustomBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CustomBitlinksApi(config); + + const body = { + // string | A Custom Bitlink made of the domain and keyword + custom_bitlink: chauncey.ly/chauncey, + } satisfies GetCustomBitlinkRequest; + + try { + const data = await api.getCustomBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **custom_bitlink** | `string` | A Custom Bitlink made of the domain and keyword | [Defaults to `undefined`] | + +### Return type + +[**CustomBitlink**](CustomBitlink.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCustomBitlinkMetricsByDestination + +> ClickMetrics getCustomBitlinkMetricsByDestination(custom_bitlink, unit, units, unit_reference) + +Get Metrics for a Custom Bitlink by Destination + +Returns click metrics for the specified link by its historical destinations. + +### Example + +```ts +import { + Configuration, + CustomBitlinksApi, +} from ''; +import type { GetCustomBitlinkMetricsByDestinationRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CustomBitlinksApi(config); + + const body = { + // string | A Custom Bitlink made of the domain and keyword + custom_bitlink: chauncey.ly/chauncey, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetCustomBitlinkMetricsByDestinationRequest; + + try { + const data = await api.getCustomBitlinkMetricsByDestination(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **custom_bitlink** | `string` | A Custom Bitlink made of the domain and keyword | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateCustomBitlink + +> CustomBitlink updateCustomBitlink(custom_bitlink, update_custom_bitlink) + +Update Custom Bitlink + +Move a keyword (or custom back-half) to a different Bitlink (domains must match). + +### Example + +```ts +import { + Configuration, + CustomBitlinksApi, +} from ''; +import type { UpdateCustomBitlinkRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CustomBitlinksApi(config); + + const body = { + // string | A Custom Bitlink made of the domain and keyword + custom_bitlink: chauncey.ly/chauncey, + // UpdateCustomBitlink + update_custom_bitlink: ..., + } satisfies UpdateCustomBitlinkRequest; + + try { + const data = await api.updateCustomBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **custom_bitlink** | `string` | A Custom Bitlink made of the domain and keyword | [Defaults to `undefined`] | +| **update_custom_bitlink** | [UpdateCustomBitlink](UpdateCustomBitlink.md) | | | + +### Return type + +[**CustomBitlink**](CustomBitlink.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/Deeplink.md b/src/docs/Deeplink.md new file mode 100644 index 0000000..7063e5f --- /dev/null +++ b/src/docs/Deeplink.md @@ -0,0 +1,40 @@ + +# Deeplink + + +## Properties + +Name | Type +------------ | ------------- +`app_id` | string +`app_uri_path` | string +`install_url` | string +`install_type` | [InstallPreference](InstallPreference.md) + +## Example + +```typescript +import type { Deeplink } from '' + +// TODO: Update the object below with actual values +const example = { + "app_id": null, + "app_uri_path": null, + "install_url": null, + "install_type": null, +} satisfies Deeplink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Deeplink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/DeeplinkRule.md b/src/docs/DeeplinkRule.md new file mode 100644 index 0000000..32d6f68 --- /dev/null +++ b/src/docs/DeeplinkRule.md @@ -0,0 +1,52 @@ + +# DeeplinkRule + + +## Properties + +Name | Type +------------ | ------------- +`guid` | string +`bitlink` | string +`app_uri_path` | string +`install_url` | string +`app_guid` | string +`os` | [MobileOS](MobileOS.md) +`install_type` | [InstallPreference](InstallPreference.md) +`created` | string +`modified` | string +`brand_guid` | string + +## Example + +```typescript +import type { DeeplinkRule } from '' + +// TODO: Update the object below with actual values +const example = { + "guid": null, + "bitlink": null, + "app_uri_path": null, + "install_url": null, + "app_guid": null, + "os": null, + "install_type": null, + "created": null, + "modified": null, + "brand_guid": null, +} satisfies DeeplinkRule + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeeplinkRule +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/DefaultApi.md b/src/docs/DefaultApi.md new file mode 100644 index 0000000..d0ee47e --- /dev/null +++ b/src/docs/DefaultApi.md @@ -0,0 +1,84 @@ +# DefaultApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getOAuthApp**](DefaultApi.md#getoauthapp) | **GET** /apps/{client_id} | Retrieve OAuth App | + + + +## getOAuthApp + +> OAuthApp getOAuthApp(client_id) + +Retrieve OAuth App + +Retrieve the details for the provided OAuth App client ID + +### Example + +```ts +import { + Configuration, + DefaultApi, +} from ''; +import type { GetOAuthAppRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DefaultApi(config); + + const body = { + // string | The client ID of an OAuth app + client_id: 1234a56b789cd0e123456fg7h8901j123km45n6p, + } satisfies GetOAuthAppRequest; + + try { + const data = await api.getOAuthApp(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **client_id** | `string` | The client ID of an OAuth app | [Defaults to `undefined`] | + +### Return type + +[**OAuthApp**](OAuthApp.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/DeletedLink.md b/src/docs/DeletedLink.md new file mode 100644 index 0000000..a24d1a2 --- /dev/null +++ b/src/docs/DeletedLink.md @@ -0,0 +1,34 @@ + +# DeletedLink + + +## Properties + +Name | Type +------------ | ------------- +`id` | string + +## Example + +```typescript +import type { DeletedLink } from '' + +// TODO: Update the object below with actual values +const example = { + "id": null, +} satisfies DeletedLink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeletedLink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/DeletedQRCode.md b/src/docs/DeletedQRCode.md new file mode 100644 index 0000000..04ccd88 --- /dev/null +++ b/src/docs/DeletedQRCode.md @@ -0,0 +1,34 @@ + +# DeletedQRCode + + +## Properties + +Name | Type +------------ | ------------- +`id` | string + +## Example + +```typescript +import type { DeletedQRCode } from '' + +// TODO: Update the object below with actual values +const example = { + "id": null, +} satisfies DeletedQRCode + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeletedQRCode +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/DeviceMetric.md b/src/docs/DeviceMetric.md new file mode 100644 index 0000000..2501b67 --- /dev/null +++ b/src/docs/DeviceMetric.md @@ -0,0 +1,36 @@ + +# DeviceMetric + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`device_type` | string + +## Example + +```typescript +import type { DeviceMetric } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": null, + "device_type": null, +} satisfies DeviceMetric + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeviceMetric +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/DeviceMetrics.md b/src/docs/DeviceMetrics.md new file mode 100644 index 0000000..8fdcd64 --- /dev/null +++ b/src/docs/DeviceMetrics.md @@ -0,0 +1,42 @@ + +# DeviceMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<DeviceMetric>](DeviceMetric.md) + +## Example + +```typescript +import type { DeviceMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, +} satisfies DeviceMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DeviceMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Email.md b/src/docs/Email.md new file mode 100644 index 0000000..2abe5e2 --- /dev/null +++ b/src/docs/Email.md @@ -0,0 +1,38 @@ + +# Email + + +## Properties + +Name | Type +------------ | ------------- +`email` | string +`is_primary` | boolean +`is_verified` | boolean + +## Example + +```typescript +import type { Email } from '' + +// TODO: Update the object below with actual values +const example = { + "email": null, + "is_primary": null, + "is_verified": null, +} satisfies Email + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Email +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Engagement.md b/src/docs/Engagement.md new file mode 100644 index 0000000..d31441c --- /dev/null +++ b/src/docs/Engagement.md @@ -0,0 +1,38 @@ + +# Engagement + + +## Properties + +Name | Type +------------ | ------------- +`lib_button_clicks` | number +`clicks` | number +`scans` | number + +## Example + +```typescript +import type { Engagement } from '' + +// TODO: Update the object below with actual values +const example = { + "lib_button_clicks": null, + "clicks": null, + "scans": null, +} satisfies Engagement + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Engagement +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Engagements.md b/src/docs/Engagements.md new file mode 100644 index 0000000..7b6e0a4 --- /dev/null +++ b/src/docs/Engagements.md @@ -0,0 +1,38 @@ + +# Engagements + + +## Properties + +Name | Type +------------ | ------------- +`engagement_count` | number +`engagements` | [Engagement](Engagement.md) +`date` | string + +## Example + +```typescript +import type { Engagements } from '' + +// TODO: Update the object below with actual values +const example = { + "engagement_count": null, + "engagements": null, + "date": null, +} satisfies Engagements + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Engagements +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ExpandBitlink.md b/src/docs/ExpandBitlink.md new file mode 100644 index 0000000..259993f --- /dev/null +++ b/src/docs/ExpandBitlink.md @@ -0,0 +1,34 @@ + +# ExpandBitlink + + +## Properties + +Name | Type +------------ | ------------- +`bitlink_id` | string + +## Example + +```typescript +import type { ExpandBitlink } from '' + +// TODO: Update the object below with actual values +const example = { + "bitlink_id": null, +} satisfies ExpandBitlink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ExpandBitlink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ExpandedBitlink.md b/src/docs/ExpandedBitlink.md new file mode 100644 index 0000000..e0780b5 --- /dev/null +++ b/src/docs/ExpandedBitlink.md @@ -0,0 +1,40 @@ + +# ExpandedBitlink + + +## Properties + +Name | Type +------------ | ------------- +`link` | string +`id` | string +`long_url` | string +`created_at` | string + +## Example + +```typescript +import type { ExpandedBitlink } from '' + +// TODO: Update the object below with actual values +const example = { + "link": null, + "id": null, + "long_url": null, + "created_at": null, +} satisfies ExpandedBitlink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ExpandedBitlink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ExpectationFailed.md b/src/docs/ExpectationFailed.md new file mode 100644 index 0000000..05f9795 --- /dev/null +++ b/src/docs/ExpectationFailed.md @@ -0,0 +1,41 @@ + +# ExpectationFailed + +EXPECTATION_FAILED + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { ExpectationFailed } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies ExpectationFailed + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ExpectationFailed +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/FieldError.md b/src/docs/FieldError.md new file mode 100644 index 0000000..769d22d --- /dev/null +++ b/src/docs/FieldError.md @@ -0,0 +1,38 @@ + +# FieldError + + +## Properties + +Name | Type +------------ | ------------- +`field` | string +`error_code` | string +`message` | string + +## Example + +```typescript +import type { FieldError } from '' + +// TODO: Update the object below with actual values +const example = { + "field": null, + "error_code": null, + "message": null, +} satisfies FieldError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as FieldError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Forbidden.md b/src/docs/Forbidden.md new file mode 100644 index 0000000..fa7d654 --- /dev/null +++ b/src/docs/Forbidden.md @@ -0,0 +1,41 @@ + +# Forbidden + +FORBIDDEN + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { Forbidden } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies Forbidden + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Forbidden +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/FullShorten.md b/src/docs/FullShorten.md new file mode 100644 index 0000000..2888635 --- /dev/null +++ b/src/docs/FullShorten.md @@ -0,0 +1,53 @@ + +# FullShorten + +Either long_url (for new bitlinks) or bitlink_id (for adding keywords to existing bitlinks) must be provided, but not both. + +## Properties + +Name | Type +------------ | ------------- +`long_url` | string +`domain` | string +`group_guid` | string +`title` | string +`tags` | Array<string> +`deeplinks` | [Array<Deeplink>](Deeplink.md) +`force_new_link` | boolean +`keyword` | string +`bitlink_id` | string +`expiration_at` | string + +## Example + +```typescript +import type { FullShorten } from '' + +// TODO: Update the object below with actual values +const example = { + "long_url": null, + "domain": null, + "group_guid": null, + "title": null, + "tags": null, + "deeplinks": null, + "force_new_link": null, + "keyword": null, + "bitlink_id": null, + "expiration_at": null, +} satisfies FullShorten + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as FullShorten +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GS1Metadata.md b/src/docs/GS1Metadata.md new file mode 100644 index 0000000..9853780 --- /dev/null +++ b/src/docs/GS1Metadata.md @@ -0,0 +1,35 @@ + +# GS1Metadata + +Contains GS1 related metadata + +## Properties + +Name | Type +------------ | ------------- +`values` | [Array<GS1Value>](GS1Value.md) + +## Example + +```typescript +import type { GS1Metadata } from '' + +// TODO: Update the object below with actual values +const example = { + "values": null, +} satisfies GS1Metadata + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GS1Metadata +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GS1Value.md b/src/docs/GS1Value.md new file mode 100644 index 0000000..30eadcd --- /dev/null +++ b/src/docs/GS1Value.md @@ -0,0 +1,36 @@ + +# GS1Value + + +## Properties + +Name | Type +------------ | ------------- +`key` | string +`value` | string + +## Example + +```typescript +import type { GS1Value } from '' + +// TODO: Update the object below with actual values +const example = { + "key": null, + "value": null, +} satisfies GS1Value + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GS1Value +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GetGroupLinkClicksByDevice200Response.md b/src/docs/GetGroupLinkClicksByDevice200Response.md new file mode 100644 index 0000000..d2acc06 --- /dev/null +++ b/src/docs/GetGroupLinkClicksByDevice200Response.md @@ -0,0 +1,42 @@ + +# GetGroupLinkClicksByDevice200Response + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<GetGroupLinkClicksByDevice200ResponseMetricsInner>](GetGroupLinkClicksByDevice200ResponseMetricsInner.md) + +## Example + +```typescript +import type { GetGroupLinkClicksByDevice200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, +} satisfies GetGroupLinkClicksByDevice200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetGroupLinkClicksByDevice200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GetGroupLinkClicksByDevice200ResponseMetricsInner.md b/src/docs/GetGroupLinkClicksByDevice200ResponseMetricsInner.md new file mode 100644 index 0000000..508855d --- /dev/null +++ b/src/docs/GetGroupLinkClicksByDevice200ResponseMetricsInner.md @@ -0,0 +1,36 @@ + +# GetGroupLinkClicksByDevice200ResponseMetricsInner + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`value` | string + +## Example + +```typescript +import type { GetGroupLinkClicksByDevice200ResponseMetricsInner } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": null, + "value": null, +} satisfies GetGroupLinkClicksByDevice200ResponseMetricsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetGroupLinkClicksByDevice200ResponseMetricsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Gone.md b/src/docs/Gone.md new file mode 100644 index 0000000..23f34e1 --- /dev/null +++ b/src/docs/Gone.md @@ -0,0 +1,41 @@ + +# Gone + +GONE + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { Gone } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies Gone + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Gone +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GradientColor.md b/src/docs/GradientColor.md new file mode 100644 index 0000000..542ce7d --- /dev/null +++ b/src/docs/GradientColor.md @@ -0,0 +1,36 @@ + +# GradientColor + + +## Properties + +Name | Type +------------ | ------------- +`color` | string +`offset` | number + +## Example + +```typescript +import type { GradientColor } from '' + +// TODO: Update the object below with actual values +const example = { + "color": #ff0098, + "offset": null, +} satisfies GradientColor + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GradientColor +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Group.md b/src/docs/Group.md new file mode 100644 index 0000000..b41a6d6 --- /dev/null +++ b/src/docs/Group.md @@ -0,0 +1,50 @@ + +# Group + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`name` | string +`guid` | string +`created` | string +`modified` | string +`is_active` | boolean +`role` | string +`organization_guid` | string +`bsds` | Array<string> + +## Example + +```typescript +import type { Group } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "name": null, + "guid": null, + "created": null, + "modified": null, + "is_active": null, + "role": null, + "organization_guid": null, + "bsds": null, +} satisfies Group + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Group +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupClicks.md b/src/docs/GroupClicks.md new file mode 100644 index 0000000..a8717c1 --- /dev/null +++ b/src/docs/GroupClicks.md @@ -0,0 +1,40 @@ + +# GroupClicks + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`unit_reference` | string +`data` | [Array<CountItem>](CountItem.md) + +## Example + +```typescript +import type { GroupClicks } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "unit_reference": null, + "data": null, +} satisfies GroupClicks + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GroupClicks +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupConsumableFeatureUsage.md b/src/docs/GroupConsumableFeatureUsage.md new file mode 100644 index 0000000..d3a0b1b --- /dev/null +++ b/src/docs/GroupConsumableFeatureUsage.md @@ -0,0 +1,38 @@ + +# GroupConsumableFeatureUsage + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`description` | string +`count` | number + +## Example + +```typescript +import type { GroupConsumableFeatureUsage } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "description": null, + "count": null, +} satisfies GroupConsumableFeatureUsage + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GroupConsumableFeatureUsage +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupFeatureUsage.md b/src/docs/GroupFeatureUsage.md new file mode 100644 index 0000000..6b15d72 --- /dev/null +++ b/src/docs/GroupFeatureUsage.md @@ -0,0 +1,36 @@ + +# GroupFeatureUsage + + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`limit_usage` | [Array<GroupConsumableFeatureUsage>](GroupConsumableFeatureUsage.md) + +## Example + +```typescript +import type { GroupFeatureUsage } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": null, + "limit_usage": null, +} satisfies GroupFeatureUsage + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GroupFeatureUsage +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupHistoricalUsage.md b/src/docs/GroupHistoricalUsage.md new file mode 100644 index 0000000..94b155b --- /dev/null +++ b/src/docs/GroupHistoricalUsage.md @@ -0,0 +1,42 @@ + +# GroupHistoricalUsage + + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`unit` | string +`start_date` | string +`end_date` | string +`historical_limit_usage` | [Array<HistoricalFeatureUsage>](HistoricalFeatureUsage.md) + +## Example + +```typescript +import type { GroupHistoricalUsage } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": null, + "unit": null, + "start_date": null, + "end_date": null, + "historical_limit_usage": null, +} satisfies GroupHistoricalUsage + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GroupHistoricalUsage +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupPreferences.md b/src/docs/GroupPreferences.md new file mode 100644 index 0000000..1f0f9cf --- /dev/null +++ b/src/docs/GroupPreferences.md @@ -0,0 +1,36 @@ + +# GroupPreferences + + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`domain_preference` | string + +## Example + +```typescript +import type { GroupPreferences } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": null, + "domain_preference": null, +} satisfies GroupPreferences + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GroupPreferences +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupUpdate.md b/src/docs/GroupUpdate.md new file mode 100644 index 0000000..7670f3a --- /dev/null +++ b/src/docs/GroupUpdate.md @@ -0,0 +1,38 @@ + +# GroupUpdate + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`organization_guid` | string +`bsds` | Array<string> + +## Example + +```typescript +import type { GroupUpdate } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "organization_guid": null, + "bsds": null, +} satisfies GroupUpdate + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GroupUpdate +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Groups.md b/src/docs/Groups.md new file mode 100644 index 0000000..0418a9f --- /dev/null +++ b/src/docs/Groups.md @@ -0,0 +1,34 @@ + +# Groups + + +## Properties + +Name | Type +------------ | ------------- +`groups` | [Array<Group>](Group.md) + +## Example + +```typescript +import type { Groups } from '' + +// TODO: Update the object below with actual values +const example = { + "groups": null, +} satisfies Groups + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Groups +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/GroupsApi.md b/src/docs/GroupsApi.md new file mode 100644 index 0000000..d75c06a --- /dev/null +++ b/src/docs/GroupsApi.md @@ -0,0 +1,2308 @@ +# GroupsApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getGroup**](GroupsApi.md#getgroup) | **GET** /groups/{group_guid} | Retrieve a Group | +| [**getGroupClicks**](GroupsApi.md#getgroupclicks) | **GET** /groups/{group_guid}/clicks | Get clicks by group | +| [**getGroupCodeScansByCity**](GroupsApi.md#getgroupcodescansbycity) | **GET** /groups/{group_guid}/codes/scans/cities | Get Scan Metrics for a Group by City | +| [**getGroupCodeScansByCountry**](GroupsApi.md#getgroupcodescansbycountry) | **GET** /groups/{group_guid}/codes/scans/countries | Get Scan Metrics for a Group by Country | +| [**getGroupCodeScansOverTime**](GroupsApi.md#getgroupcodescansovertime) | **GET** /groups/{group_guid}/codes/scans/over_time | Get Scan Metrics for a Group Over Time | +| [**getGroupFeatureUsage**](GroupsApi.md#getgroupfeatureusage) | **GET** /groups/{group_guid}/feature_usage | Get limit usage for a group | +| [**getGroupHistoricalUsage**](GroupsApi.md#getgrouphistoricalusage) | **GET** /groups/{group_guid}/historical_usage | Get historical usage for a group | +| [**getGroupLinkClicksByCity**](GroupsApi.md#getgrouplinkclicksbycity) | **GET** /groups/{group_guid}/links/clicks/cities | Get Group Link Clicks by City | +| [**getGroupLinkClicksByCountry**](GroupsApi.md#getgrouplinkclicksbycountry) | **GET** /groups/{group_guid}/links/clicks/countries | Get Group Link Clicks by Country | +| [**getGroupLinkClicksByDevice**](GroupsApi.md#getgrouplinkclicksbydevice) | **GET** /groups/{group_guid}/links/clicks/devices | Get Group Link Clicks by Device | +| [**getGroupLinkClicksByReferrer**](GroupsApi.md#getgrouplinkclicksbyreferrer) | **GET** /groups/{group_guid}/links/clicks/referrers | Get Group Link Clicks by Referrer | +| [**getGroupLinkClicksOverTime**](GroupsApi.md#getgrouplinkclicksovertime) | **GET** /groups/{group_guid}/links/clicks/over_time | Get Group Link Clicks Over Time | +| [**getGroupMetricsByCities**](GroupsApi.md#getgroupmetricsbycities) | **GET** /groups/{group_guid}/cities | Get Click Metrics for a Group by City | +| [**getGroupMetricsByCountries**](GroupsApi.md#getgroupmetricsbycountries) | **GET** /groups/{group_guid}/countries | Get Click Metrics for a Group by Country | +| [**getGroupMetricsByDevices**](GroupsApi.md#getgroupmetricsbydevices) | **GET** /groups/{group_guid}/devices | Get Click Metrics for a Group by Device Type | +| [**getGroupMetricsByReferrer**](GroupsApi.md#getgroupmetricsbyreferrer) | **GET** /groups/{group_guid}/referrers | Get Click Metrics for a Group by Referrer | +| [**getGroupMetricsByReferringNetworks**](GroupsApi.md#getgroupmetricsbyreferringnetworks) | **GET** /groups/{group_guid}/referring_networks | Get Click Metrics for a Group by Referring Networks | +| [**getGroupMetricsOverTime**](GroupsApi.md#getgroupmetricsovertime) | **GET** /groups/{group_guid}/engagements/over_time | Get Group Metrics Over Time | +| [**getGroupPreferences**](GroupsApi.md#getgrouppreferences) | **GET** /groups/{group_guid}/preferences | Retrieve Group Preferences | +| [**getGroupShortenCounts**](GroupsApi.md#getgroupshortencounts) | **GET** /groups/{group_guid}/shorten_counts | Retrieve Group Shorten Counts | +| [**getGroupTags**](GroupsApi.md#getgrouptags) | **GET** /groups/{group_guid}/tags | Retrieve Tags by Group | +| [**getGroupTopCodeScans**](GroupsApi.md#getgrouptopcodescans) | **GET** /groups/{group_guid}/codes/scans/top | Get Top Performing QR Codes for a Group | +| [**getGroupTopLinkClicks**](GroupsApi.md#getgrouptoplinkclicks) | **GET** /groups/{group_guid}/links/clicks/top | Get Group Top Performing Links by Click | +| [**getGroupTopMetrics**](GroupsApi.md#getgrouptopmetrics) | **GET** /groups/{group_guid}/engagements/top | Get Group Top Performing Links by Engagement | +| [**getGroups**](GroupsApi.md#getgroups) | **GET** /groups | Retrieve Groups | +| [**updateGroup**](GroupsApi.md#updategroup) | **PATCH** /groups/{group_guid} | Update a Group | +| [**updateGroupPreferences**](GroupsApi.md#updategrouppreferences) | **PATCH** /groups/{group_guid}/preferences | Update Group Preferences | + + + +## getGroup + +> Group getGroup(group_guid) + +Retrieve a Group + +Returns details for a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + } satisfies GetGroupRequest; + + try { + const data = await api.getGroup(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupClicks + +> GroupClicks getGroupClicks(group_guid, unit, units, unit_reference) + +Get clicks by group + +get number of clicks on bitlinks in a group + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupClicksRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupClicksRequest; + + try { + const data = await api.getGroupClicks(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GroupClicks**](GroupClicks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupCodeScansByCity + +> CityMetrics getGroupCodeScansByCity(group_guid, unit, units, unit_reference) + +Get Scan Metrics for a Group by City + +Get QR code scan metrics for a group broken down by city. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupCodeScansByCityRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupCodeScansByCityRequest; + + try { + const data = await api.getGroupCodeScansByCity(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CityMetrics**](CityMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupCodeScansByCountry + +> ClickMetrics getGroupCodeScansByCountry(group_guid, unit, units, unit_reference) + +Get Scan Metrics for a Group by Country + +Get QR code scan metrics for a group broken down by country. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupCodeScansByCountryRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupCodeScansByCountryRequest; + + try { + const data = await api.getGroupCodeScansByCountry(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupCodeScansOverTime + +> GroupClicks getGroupCodeScansOverTime(group_guid, unit, units, unit_reference) + +Get Scan Metrics for a Group Over Time + +Get QR code scan metrics over time for a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupCodeScansOverTimeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupCodeScansOverTimeRequest; + + try { + const data = await api.getGroupCodeScansOverTime(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GroupClicks**](GroupClicks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupFeatureUsage + +> GroupFeatureUsage getGroupFeatureUsage(group_guid, name) + +Get limit usage for a group + +Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupFeatureUsageRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // Array | The limit name you would like usage for (optional) + name: ["qr_codes"], + } satisfies GetGroupFeatureUsageRequest; + + try { + const data = await api.getGroupFeatureUsage(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **name** | `Array` | The limit name you would like usage for | [Optional] | + +### Return type + +[**GroupFeatureUsage**](GroupFeatureUsage.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupHistoricalUsage + +> GroupHistoricalUsage getGroupHistoricalUsage(group_guid, name, start_date, end_date, unit) + +Get historical usage for a group + +Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupHistoricalUsageRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // Array | The limit name you would like usage for (optional) + name: ["qr_codes"], + // string | The start date for the date range (optional) + start_date: 2022-02-02, + // string | The end date for the date range (optional) + end_date: 2023-10-04, + // TimeUnitDWM | A unit of time (day, week, or month) (optional) + unit: month, + } satisfies GetGroupHistoricalUsageRequest; + + try { + const data = await api.getGroupHistoricalUsage(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **name** | `Array` | The limit name you would like usage for | [Optional] | +| **start_date** | `string` | The start date for the date range | [Optional] [Defaults to `undefined`] | +| **end_date** | `string` | The end date for the date range | [Optional] [Defaults to `undefined`] | +| **unit** | `TimeUnitDWM` | A unit of time (day, week, or month) | [Optional] [Defaults to `undefined`] [Enum: day, week, month] | + +### Return type + +[**GroupHistoricalUsage**](GroupHistoricalUsage.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupLinkClicksByCity + +> CityMetrics getGroupLinkClicksByCity(group_guid, unit, units, size, unit_reference) + +Get Group Link Clicks by City + +Get link clicks by city for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupLinkClicksByCityRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupLinkClicksByCityRequest; + + try { + const data = await api.getGroupLinkClicksByCity(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CityMetrics**](CityMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupLinkClicksByCountry + +> ClickMetrics getGroupLinkClicksByCountry(group_guid, unit, units, size, unit_reference) + +Get Group Link Clicks by Country + +Get link clicks by country for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupLinkClicksByCountryRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupLinkClicksByCountryRequest; + + try { + const data = await api.getGroupLinkClicksByCountry(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupLinkClicksByDevice + +> GetGroupLinkClicksByDevice200Response getGroupLinkClicksByDevice(group_guid, unit, units, size, unit_reference) + +Get Group Link Clicks by Device + +Get link clicks by device for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupLinkClicksByDeviceRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupLinkClicksByDeviceRequest; + + try { + const data = await api.getGroupLinkClicksByDevice(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GetGroupLinkClicksByDevice200Response**](GetGroupLinkClicksByDevice200Response.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupLinkClicksByReferrer + +> ClickMetrics getGroupLinkClicksByReferrer(group_guid, unit, units, size, unit_reference) + +Get Group Link Clicks by Referrer + +Get link clicks by referrer for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupLinkClicksByReferrerRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupLinkClicksByReferrerRequest; + + try { + const data = await api.getGroupLinkClicksByReferrer(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupLinkClicksOverTime + +> GroupClicks getGroupLinkClicksOverTime(group_guid, unit, units, unit_reference) + +Get Group Link Clicks Over Time + +Get link clicks over time for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupLinkClicksOverTimeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupLinkClicksOverTimeRequest; + + try { + const data = await api.getGroupLinkClicksOverTime(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GroupClicks**](GroupClicks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupMetricsByCities + +> CityMetrics getGroupMetricsByCities(group_guid, unit, units, size, unit_reference) + +Get Click Metrics for a Group by City + +Returns the geographic origins of click traffic by city for the specified group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupMetricsByCitiesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupMetricsByCitiesRequest; + + try { + const data = await api.getGroupMetricsByCities(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CityMetrics**](CityMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupMetricsByCountries + +> ClickMetrics getGroupMetricsByCountries(group_guid, unit, units, size, unit_reference) + +Get Click Metrics for a Group by Country + +Returns the geographic origins of click traffic by country for the specified group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupMetricsByCountriesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupMetricsByCountriesRequest; + + try { + const data = await api.getGroupMetricsByCountries(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupMetricsByDevices + +> DeviceMetrics getGroupMetricsByDevices(group_guid, unit, units, size, unit_reference) + +Get Click Metrics for a Group by Device Type + +Returns the device types generating click traffic to the specified group\'s links. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupMetricsByDevicesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupMetricsByDevicesRequest; + + try { + const data = await api.getGroupMetricsByDevices(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**DeviceMetrics**](DeviceMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupMetricsByReferrer + +> ClickMetrics getGroupMetricsByReferrer(group_guid, unit, units, size, unit_reference) + +Get Click Metrics for a Group by Referrer + +Returns metrics by referrer for the specified group\'s links. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupMetricsByReferrerRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupMetricsByReferrerRequest; + + try { + const data = await api.getGroupMetricsByReferrer(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupMetricsByReferringNetworks + +> ClickMetrics getGroupMetricsByReferringNetworks(group_guid, unit, units, size, unit_reference) + +Get Click Metrics for a Group by Referring Networks + +Returns metrics by referring networks for the specified group\'s links. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupMetricsByReferringNetworksRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupMetricsByReferringNetworksRequest; + + try { + const data = await api.getGroupMetricsByReferringNetworks(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ClickMetrics**](ClickMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupMetricsOverTime + +> GroupClicks getGroupMetricsOverTime(group_guid, unit, units, unit_reference) + +Get Group Metrics Over Time + +Get group engagement metrics over time for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupMetricsOverTimeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupMetricsOverTimeRequest; + + try { + const data = await api.getGroupMetricsOverTime(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GroupClicks**](GroupClicks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupPreferences + +> GroupPreferences getGroupPreferences(group_guid) + +Retrieve Group Preferences + +Returns preferences for the specified group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupPreferencesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + } satisfies GetGroupPreferencesRequest; + + try { + const data = await api.getGroupPreferences(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | + +### Return type + +[**GroupPreferences**](GroupPreferences.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupShortenCounts + +> Metrics getGroupShortenCounts(group_guid, unit, units, unit_reference) + +Retrieve Group Shorten Counts + +Returns all the shorten counts for a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupShortenCountsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupShortenCountsRequest; + + try { + const data = await api.getGroupShortenCounts(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupTags + +> Tags getGroupTags(group_guid, type) + +Retrieve Tags by Group + +Returns the tags currently used in the specified group. Maximum 1000. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupTagsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // 'bitlink' | 'qr_code' | Tag set to return; defaults to bitlink (optional) + type: type_example, + } satisfies GetGroupTagsRequest; + + try { + const data = await api.getGroupTags(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **type** | `bitlink`, `qr_code` | Tag set to return; defaults to bitlink | [Optional] [Defaults to `'bitlink'`] [Enum: bitlink, qr_code] | + +### Return type + +[**Tags**](Tags.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupTopCodeScans + +> SortedLinks getGroupTopCodeScans(group_guid, unit, units, unit_reference) + +Get Top Performing QR Codes for a Group + +Get top performing QR codes by scan count for all codes in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupTopCodeScansRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupTopCodeScansRequest; + + try { + const data = await api.getGroupTopCodeScans(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**SortedLinks**](SortedLinks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupTopLinkClicks + +> SortedLinks getGroupTopLinkClicks(group_guid, unit, units, size, unit_reference) + +Get Group Top Performing Links by Click + +Get top performing links by click for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupTopLinkClicksRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupTopLinkClicksRequest; + + try { + const data = await api.getGroupTopLinkClicks(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**SortedLinks**](SortedLinks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroupTopMetrics + +> SortedLinks getGroupTopMetrics(group_guid, unit, units, size, unit_reference) + +Get Group Top Performing Links by Engagement + +Get top performing links by engagement for all links in a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupTopMetricsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetGroupTopMetricsRequest; + + try { + const data = await api.getGroupTopMetrics(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**SortedLinks**](SortedLinks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getGroups + +> Groups getGroups(organization_guid) + +Retrieve Groups + +Returns a list of groups in the organization. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly organization (optional) + organization_guid: Oa1bcd234eF, + } satisfies GetGroupsRequest; + + try { + const data = await api.getGroups(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **organization_guid** | `string` | A GUID for a Bitly organization | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Groups**](Groups.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateGroup + +> Group updateGroup(group_guid, group_update) + +Update a Group + +Updates the details of a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { UpdateGroupRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // GroupUpdate + group_update: ..., + } satisfies UpdateGroupRequest; + + try { + const data = await api.updateGroup(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **group_update** | [GroupUpdate](GroupUpdate.md) | | | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateGroupPreferences + +> GroupPreferences updateGroupPreferences(group_guid, group_preferences) + +Update Group Preferences + +Updates preferences for a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { UpdateGroupPreferencesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GroupsApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // GroupPreferences + group_preferences: ..., + } satisfies UpdateGroupPreferencesRequest; + + try { + const data = await api.updateGroupPreferences(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **group_preferences** | [GroupPreferences](GroupPreferences.md) | | | + +### Return type + +[**GroupPreferences**](GroupPreferences.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/HasReferences.md b/src/docs/HasReferences.md new file mode 100644 index 0000000..23fd2ff --- /dev/null +++ b/src/docs/HasReferences.md @@ -0,0 +1,34 @@ + +# HasReferences + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } + +## Example + +```typescript +import type { HasReferences } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, +} satisfies HasReferences + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as HasReferences +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/HistoricalFeatureUsage.md b/src/docs/HistoricalFeatureUsage.md new file mode 100644 index 0000000..8f6f130 --- /dev/null +++ b/src/docs/HistoricalFeatureUsage.md @@ -0,0 +1,36 @@ + +# HistoricalFeatureUsage + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`usage` | [Array<HistoricalUsage>](HistoricalUsage.md) + +## Example + +```typescript +import type { HistoricalFeatureUsage } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "usage": null, +} satisfies HistoricalFeatureUsage + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as HistoricalFeatureUsage +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/HistoricalUsage.md b/src/docs/HistoricalUsage.md new file mode 100644 index 0000000..bb0cb02 --- /dev/null +++ b/src/docs/HistoricalUsage.md @@ -0,0 +1,36 @@ + +# HistoricalUsage + + +## Properties + +Name | Type +------------ | ------------- +`count` | number +`unit_start` | string + +## Example + +```typescript +import type { HistoricalUsage } from '' + +// TODO: Update the object below with actual values +const example = { + "count": null, + "unit_start": null, +} satisfies HistoricalUsage + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as HistoricalUsage +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/InstallPreference.md b/src/docs/InstallPreference.md new file mode 100644 index 0000000..e9e3283 --- /dev/null +++ b/src/docs/InstallPreference.md @@ -0,0 +1,32 @@ + +# InstallPreference + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { InstallPreference } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies InstallPreference + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as InstallPreference +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/InternalError.md b/src/docs/InternalError.md new file mode 100644 index 0000000..0d64a96 --- /dev/null +++ b/src/docs/InternalError.md @@ -0,0 +1,41 @@ + +# InternalError + +INTERNAL_ERROR + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { InternalError } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies InternalError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as InternalError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/LinkClicks.md b/src/docs/LinkClicks.md new file mode 100644 index 0000000..3f21a23 --- /dev/null +++ b/src/docs/LinkClicks.md @@ -0,0 +1,36 @@ + +# LinkClicks + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`date` | string + +## Example + +```typescript +import type { LinkClicks } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": null, + "date": null, +} satisfies LinkClicks + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LinkClicks +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/LinkDeletionResponse.md b/src/docs/LinkDeletionResponse.md new file mode 100644 index 0000000..5735fd3 --- /dev/null +++ b/src/docs/LinkDeletionResponse.md @@ -0,0 +1,34 @@ + +# LinkDeletionResponse + + +## Properties + +Name | Type +------------ | ------------- +`links_deleted` | [Array<DeletedLink>](DeletedLink.md) + +## Example + +```typescript +import type { LinkDeletionResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "links_deleted": [{"id":"bit.ly/12a4b6c"},{"id":"chauncey.ly/documentation"}], +} satisfies LinkDeletionResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LinkDeletionResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/MethodLimit.md b/src/docs/MethodLimit.md new file mode 100644 index 0000000..90cc7e1 --- /dev/null +++ b/src/docs/MethodLimit.md @@ -0,0 +1,38 @@ + +# MethodLimit + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`limit` | number +`count` | number + +## Example + +```typescript +import type { MethodLimit } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "limit": null, + "count": null, +} satisfies MethodLimit + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as MethodLimit +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Metric.md b/src/docs/Metric.md new file mode 100644 index 0000000..0250bc0 --- /dev/null +++ b/src/docs/Metric.md @@ -0,0 +1,36 @@ + +# Metric + + +## Properties + +Name | Type +------------ | ------------- +`key` | string +`value` | number + +## Example + +```typescript +import type { Metric } from '' + +// TODO: Update the object below with actual values +const example = { + "key": null, + "value": null, +} satisfies Metric + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Metric +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Metrics.md b/src/docs/Metrics.md new file mode 100644 index 0000000..ddd4161 --- /dev/null +++ b/src/docs/Metrics.md @@ -0,0 +1,42 @@ + +# Metrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<Metric>](Metric.md) + +## Example + +```typescript +import type { Metrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, +} satisfies Metrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Metrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/MobileOS.md b/src/docs/MobileOS.md new file mode 100644 index 0000000..8ff9156 --- /dev/null +++ b/src/docs/MobileOS.md @@ -0,0 +1,32 @@ + +# MobileOS + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { MobileOS } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies MobileOS + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as MobileOS +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ModelError.md b/src/docs/ModelError.md new file mode 100644 index 0000000..482fcee --- /dev/null +++ b/src/docs/ModelError.md @@ -0,0 +1,40 @@ + +# ModelError + + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { ModelError } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies ModelError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ModelError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/MonthlyLimitExceeded.md b/src/docs/MonthlyLimitExceeded.md new file mode 100644 index 0000000..ce28cc7 --- /dev/null +++ b/src/docs/MonthlyLimitExceeded.md @@ -0,0 +1,39 @@ + +# MonthlyLimitExceeded + +MONTHLY_LIMIT_EXCEEDED + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string + +## Example + +```typescript +import type { MonthlyLimitExceeded } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, +} satisfies MonthlyLimitExceeded + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as MonthlyLimitExceeded +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/NotFound.md b/src/docs/NotFound.md new file mode 100644 index 0000000..540595f --- /dev/null +++ b/src/docs/NotFound.md @@ -0,0 +1,41 @@ + +# NotFound + +NOT_FOUND + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { NotFound } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies NotFound + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as NotFound +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/OAuthApp.md b/src/docs/OAuthApp.md new file mode 100644 index 0000000..933595d --- /dev/null +++ b/src/docs/OAuthApp.md @@ -0,0 +1,42 @@ + +# OAuthApp + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`client_id` | string +`description` | string +`link` | string +`require_oauth_pkce` | boolean + +## Example + +```typescript +import type { OAuthApp } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "client_id": null, + "description": null, + "link": null, + "require_oauth_pkce": null, +} satisfies OAuthApp + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as OAuthApp +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Organization.md b/src/docs/Organization.md new file mode 100644 index 0000000..ec1bd98 --- /dev/null +++ b/src/docs/Organization.md @@ -0,0 +1,58 @@ + +# Organization + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`name` | string +`is_active` | boolean +`guid` | string +`tier` | string +`tier_family` | string +`tier_display_name` | string +`role` | string +`created` | string +`modified` | string +`bsds` | Array<string> +`require_sso` | string +`require_2fa` | string + +## Example + +```typescript +import type { Organization } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "name": null, + "is_active": null, + "guid": null, + "tier": null, + "tier_family": null, + "tier_display_name": null, + "role": null, + "created": null, + "modified": null, + "bsds": null, + "require_sso": null, + "require_2fa": null, +} satisfies Organization + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Organization +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Organizations.md b/src/docs/Organizations.md new file mode 100644 index 0000000..86d9858 --- /dev/null +++ b/src/docs/Organizations.md @@ -0,0 +1,34 @@ + +# Organizations + + +## Properties + +Name | Type +------------ | ------------- +`organizations` | [Array<Organization>](Organization.md) + +## Example + +```typescript +import type { Organizations } from '' + +// TODO: Update the object below with actual values +const example = { + "organizations": null, +} satisfies Organizations + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Organizations +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/OrganizationsApi.md b/src/docs/OrganizationsApi.md new file mode 100644 index 0000000..68b9d34 --- /dev/null +++ b/src/docs/OrganizationsApi.md @@ -0,0 +1,396 @@ +# OrganizationsApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getOrganization**](OrganizationsApi.md#getorganization) | **GET** /organizations/{organization_guid} | Retrieve an Organization | +| [**getOrganizationShortenCounts**](OrganizationsApi.md#getorganizationshortencounts) | **GET** /organizations/{organization_guid}/shorten_counts | Get Shorten Counts for an Organization | +| [**getOrganizationShortenCountsByGroup**](OrganizationsApi.md#getorganizationshortencountsbygroup) | **GET** /organizations/{organization_guid}/shorten_counts_by_group | Get Shorten Counts for an Organization by Group | +| [**getOrganizations**](OrganizationsApi.md#getorganizations) | **GET** /organizations | Retrieve Organizations | +| [**getPlanLimits**](OrganizationsApi.md#getplanlimits) | **GET** /organizations/{organization_guid}/plan_limits | Get Plan Limits | + + + +## getOrganization + +> Organization getOrganization(organization_guid) + +Retrieve an Organization + +Retrive details for the specified organization. + +### Example + +```ts +import { + Configuration, + OrganizationsApi, +} from ''; +import type { GetOrganizationRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new OrganizationsApi(config); + + const body = { + // string | A GUID for a Bitly organization + organization_guid: Oa1bcd234eF, + } satisfies GetOrganizationRequest; + + try { + const data = await api.getOrganization(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **organization_guid** | `string` | A GUID for a Bitly organization | [Defaults to `undefined`] | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getOrganizationShortenCounts + +> Metrics getOrganizationShortenCounts(organization_guid, unit, units, unit_reference) + +Get Shorten Counts for an Organization + +Returns the shorten counts for a specific organization over a specified time period. + +### Example + +```ts +import { + Configuration, + OrganizationsApi, +} from ''; +import type { GetOrganizationShortenCountsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new OrganizationsApi(config); + + const body = { + // string | A GUID for a Bitly organization + organization_guid: Oa1bcd234eF, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetOrganizationShortenCountsRequest; + + try { + const data = await api.getOrganizationShortenCounts(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **organization_guid** | `string` | A GUID for a Bitly organization | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getOrganizationShortenCountsByGroup + +> Metrics getOrganizationShortenCountsByGroup(organization_guid) + +Get Shorten Counts for an Organization by Group + +Returns the shorten counts for a specific organization by group for the current month. + +### Example + +```ts +import { + Configuration, + OrganizationsApi, +} from ''; +import type { GetOrganizationShortenCountsByGroupRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new OrganizationsApi(config); + + const body = { + // string | A GUID for a Bitly organization + organization_guid: Oa1bcd234eF, + } satisfies GetOrganizationShortenCountsByGroupRequest; + + try { + const data = await api.getOrganizationShortenCountsByGroup(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **organization_guid** | `string` | A GUID for a Bitly organization | [Defaults to `undefined`] | + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getOrganizations + +> Organizations getOrganizations(include_all) + +Retrieve Organizations + +Retrieve a list of organizations for the authenticated user. By default, only organizations permitted by the token\'s allowed_orgs are returned. Use include_all=true to return all organizations regardless of token restrictions. Each organization is annotated with its authentication requirements (require_sso, require_2fa) when configured. + +### Example + +```ts +import { + Configuration, + OrganizationsApi, +} from ''; +import type { GetOrganizationsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new OrganizationsApi(config); + + const body = { + // boolean | When set to true, returns all of the user\'s organizations regardless of the token\'s allowed_orgs restrictions. (optional) + include_all: true, + } satisfies GetOrganizationsRequest; + + try { + const data = await api.getOrganizations(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **include_all** | `boolean` | When set to true, returns all of the user\'s organizations regardless of the token\'s allowed_orgs restrictions. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**Organizations**](Organizations.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getPlanLimits + +> PlanLimits getPlanLimits(organization_guid) + +Get Plan Limits + +Returns all plan limits and counts available for an organization. + +### Example + +```ts +import { + Configuration, + OrganizationsApi, +} from ''; +import type { GetPlanLimitsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new OrganizationsApi(config); + + const body = { + // string | A GUID for a Bitly organization + organization_guid: Oa1bcd234eF, + } satisfies GetPlanLimitsRequest; + + try { + const data = await api.getPlanLimits(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **organization_guid** | `string` | A GUID for a Bitly organization | [Defaults to `undefined`] | + +### Return type + +[**PlanLimits**](PlanLimits.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/OtherMetrics.md b/src/docs/OtherMetrics.md new file mode 100644 index 0000000..4eefd1f --- /dev/null +++ b/src/docs/OtherMetrics.md @@ -0,0 +1,36 @@ + +# OtherMetrics + + +## Properties + +Name | Type +------------ | ------------- +`other_city_clicks` | number +`no_city_clicks` | number + +## Example + +```typescript +import type { OtherMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "other_city_clicks": null, + "no_city_clicks": null, +} satisfies OtherMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as OtherMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/OtherScanMetrics.md b/src/docs/OtherScanMetrics.md new file mode 100644 index 0000000..b92094b --- /dev/null +++ b/src/docs/OtherScanMetrics.md @@ -0,0 +1,36 @@ + +# OtherScanMetrics + + +## Properties + +Name | Type +------------ | ------------- +`other_city_scans` | number +`no_city_scans` | number + +## Example + +```typescript +import type { OtherScanMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "other_city_scans": null, + "no_city_scans": null, +} satisfies OtherScanMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as OtherScanMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PlanLimit.md b/src/docs/PlanLimit.md new file mode 100644 index 0000000..5e36d6b --- /dev/null +++ b/src/docs/PlanLimit.md @@ -0,0 +1,40 @@ + +# PlanLimit + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`description` | string +`limit` | number +`count` | number + +## Example + +```typescript +import type { PlanLimit } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "description": null, + "limit": null, + "count": null, +} satisfies PlanLimit + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PlanLimit +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PlanLimits.md b/src/docs/PlanLimits.md new file mode 100644 index 0000000..1cbebf6 --- /dev/null +++ b/src/docs/PlanLimits.md @@ -0,0 +1,38 @@ + +# PlanLimits + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`organization_guid` | string +`plan_limits` | [Array<PlanLimit>](PlanLimit.md) + +## Example + +```typescript +import type { PlanLimits } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "organization_guid": null, + "plan_limits": null, +} satisfies PlanLimits + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PlanLimits +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PlatformLimit.md b/src/docs/PlatformLimit.md new file mode 100644 index 0000000..51835e8 --- /dev/null +++ b/src/docs/PlatformLimit.md @@ -0,0 +1,36 @@ + +# PlatformLimit + + +## Properties + +Name | Type +------------ | ------------- +`endpoint` | string +`methods` | [Array<MethodLimit>](MethodLimit.md) + +## Example + +```typescript +import type { PlatformLimit } from '' + +// TODO: Update the object below with actual values +const example = { + "endpoint": null, + "methods": null, +} satisfies PlatformLimit + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PlatformLimit +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PlatformLimits.md b/src/docs/PlatformLimits.md new file mode 100644 index 0000000..db05127 --- /dev/null +++ b/src/docs/PlatformLimits.md @@ -0,0 +1,34 @@ + +# PlatformLimits + + +## Properties + +Name | Type +------------ | ------------- +`platform_limits` | [Array<PlatformLimit>](PlatformLimit.md) + +## Example + +```typescript +import type { PlatformLimits } from '' + +// TODO: Update the object below with actual values +const example = { + "platform_limits": null, +} satisfies PlatformLimits + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PlatformLimits +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PublicCreateQRCodeRequest.md b/src/docs/PublicCreateQRCodeRequest.md new file mode 100644 index 0000000..f739c07 --- /dev/null +++ b/src/docs/PublicCreateQRCodeRequest.md @@ -0,0 +1,49 @@ + +# PublicCreateQRCodeRequest + +Customization and content values for a QR code created through the public API + +## Properties + +Name | Type +------------ | ------------- +`title` | string +`group_guid` | string +`render_customizations` | [QRCodeCustomizationsPublic](QRCodeCustomizationsPublic.md) +`archived` | boolean +`destination` | [QRCodeDestination](QRCodeDestination.md) +`gs1` | [GS1Metadata](GS1Metadata.md) +`expiration_at` | string +`tags` | Array<string> + +## Example + +```typescript +import type { PublicCreateQRCodeRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "title": null, + "group_guid": null, + "render_customizations": null, + "archived": null, + "destination": null, + "gs1": null, + "expiration_at": null, + "tags": null, +} satisfies PublicCreateQRCodeRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PublicCreateQRCodeRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PublicCreateStaticQRCodeRequest.md b/src/docs/PublicCreateStaticQRCodeRequest.md new file mode 100644 index 0000000..309b00f --- /dev/null +++ b/src/docs/PublicCreateStaticQRCodeRequest.md @@ -0,0 +1,39 @@ + +# PublicCreateStaticQRCodeRequest + +Request body for generating a static QR code image. Customizations such as gradient, background_gradient, frame, text and logo are not supported. + +## Properties + +Name | Type +------------ | ------------- +`content` | string +`group_guid` | string +`render_customizations` | [QRCodeCustomizationsStaticPublic](QRCodeCustomizationsStaticPublic.md) + +## Example + +```typescript +import type { PublicCreateStaticQRCodeRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "content": https://bitly.com, + "group_guid": Ba1bc23dE4F, + "render_customizations": null, +} satisfies PublicCreateStaticQRCodeRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PublicCreateStaticQRCodeRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PublicDeleteQRCodeResponse.md b/src/docs/PublicDeleteQRCodeResponse.md new file mode 100644 index 0000000..23df3ee --- /dev/null +++ b/src/docs/PublicDeleteQRCodeResponse.md @@ -0,0 +1,37 @@ + +# PublicDeleteQRCodeResponse + +QR Code delete response + +## Properties + +Name | Type +------------ | ------------- +`qrcodes_deleted` | [Array<DeletedQRCode>](DeletedQRCode.md) +`links_deleted` | [Array<DeletedLink>](DeletedLink.md) + +## Example + +```typescript +import type { PublicDeleteQRCodeResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "qrcodes_deleted": null, + "links_deleted": null, +} satisfies PublicDeleteQRCodeResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PublicDeleteQRCodeResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PublicQRCodeImageResponse.md b/src/docs/PublicQRCodeImageResponse.md new file mode 100644 index 0000000..8e78cfd --- /dev/null +++ b/src/docs/PublicQRCodeImageResponse.md @@ -0,0 +1,35 @@ + +# PublicQRCodeImageResponse + +Wraps the image data for a QR code. + +## Properties + +Name | Type +------------ | ------------- +`qr_code_image` | string + +## Example + +```typescript +import type { PublicQRCodeImageResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "qr_code_image": null, +} satisfies PublicQRCodeImageResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PublicQRCodeImageResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PublicStaticQRCodeResponse.md b/src/docs/PublicStaticQRCodeResponse.md new file mode 100644 index 0000000..a920e28 --- /dev/null +++ b/src/docs/PublicStaticQRCodeResponse.md @@ -0,0 +1,35 @@ + +# PublicStaticQRCodeResponse + +Response containing a generated static QR code image. + +## Properties + +Name | Type +------------ | ------------- +`image` | string + +## Example + +```typescript +import type { PublicStaticQRCodeResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "image": null, +} satisfies PublicStaticQRCodeResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PublicStaticQRCodeResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/PublicUpdateQRCodeRequest.md b/src/docs/PublicUpdateQRCodeRequest.md new file mode 100644 index 0000000..fac6bbf --- /dev/null +++ b/src/docs/PublicUpdateQRCodeRequest.md @@ -0,0 +1,43 @@ + +# PublicUpdateQRCodeRequest + +Customization and content values for a QR code created through the public API + +## Properties + +Name | Type +------------ | ------------- +`title` | string +`render_customizations` | [QRCodeCustomizationsPublic](QRCodeCustomizationsPublic.md) +`archived` | boolean +`expiration_at` | string +`tags` | Array<string> + +## Example + +```typescript +import type { PublicUpdateQRCodeRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "title": null, + "render_customizations": null, + "archived": null, + "expiration_at": null, + "tags": null, +} satisfies PublicUpdateQRCodeRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PublicUpdateQRCodeRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeBranding.md b/src/docs/QRCodeBranding.md new file mode 100644 index 0000000..b1fb7f3 --- /dev/null +++ b/src/docs/QRCodeBranding.md @@ -0,0 +1,34 @@ + +# QRCodeBranding + + +## Properties + +Name | Type +------------ | ------------- +`bitly_brand` | boolean + +## Example + +```typescript +import type { QRCodeBranding } from '' + +// TODO: Update the object below with actual values +const example = { + "bitly_brand": null, +} satisfies QRCodeBranding + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeBranding +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeCorner.md b/src/docs/QRCodeCorner.md new file mode 100644 index 0000000..2f47719 --- /dev/null +++ b/src/docs/QRCodeCorner.md @@ -0,0 +1,39 @@ + +# QRCodeCorner + +Represents one corner, both inner and outer, of a QR code, with color and shape values + +## Properties + +Name | Type +------------ | ------------- +`inner_color` | string +`outer_color` | string +`shape` | string + +## Example + +```typescript +import type { QRCodeCorner } from '' + +// TODO: Update the object below with actual values +const example = { + "inner_color": null, + "outer_color": null, + "shape": null, +} satisfies QRCodeCorner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeCorner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeCorners.md b/src/docs/QRCodeCorners.md new file mode 100644 index 0000000..701a2db --- /dev/null +++ b/src/docs/QRCodeCorners.md @@ -0,0 +1,39 @@ + +# QRCodeCorners + +An object representing all three corners of the QR code. The corners corresponding to each property are: corner_1 = top left, corner_2 = top right, and corner_3 = bottom right + +## Properties + +Name | Type +------------ | ------------- +`corner_1` | [QRCodeCorner](QRCodeCorner.md) +`corner_2` | [QRCodeCorner](QRCodeCorner.md) +`corner_3` | [QRCodeCorner](QRCodeCorner.md) + +## Example + +```typescript +import type { QRCodeCorners } from '' + +// TODO: Update the object below with actual values +const example = { + "corner_1": null, + "corner_2": null, + "corner_3": null, +} satisfies QRCodeCorners + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeCorners +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeCustomizationsPublic.md b/src/docs/QRCodeCustomizationsPublic.md new file mode 100644 index 0000000..31559ab --- /dev/null +++ b/src/docs/QRCodeCustomizationsPublic.md @@ -0,0 +1,55 @@ + +# QRCodeCustomizationsPublic + +Options for customizing a QR Code\'s appearance + +## Properties + +Name | Type +------------ | ------------- +`background_color` | string +`dot_pattern_color` | string +`dot_pattern_type` | [QRCodeDotPatternType](QRCodeDotPatternType.md) +`corners` | [QRCodeCorners](QRCodeCorners.md) +`gradient` | [QRCodeGradient](QRCodeGradient.md) +`background_gradient` | [QRCodeGradient](QRCodeGradient.md) +`logo` | [QRCodeLogoPublic](QRCodeLogoPublic.md) +`frame` | [QRCodeFrameRequest](QRCodeFrameRequest.md) +`text` | [QRCodeText](QRCodeText.md) +`branding` | [QRCodeBranding](QRCodeBranding.md) +`spec_settings` | [QRCodeSpecSettingsPublic](QRCodeSpecSettingsPublic.md) + +## Example + +```typescript +import type { QRCodeCustomizationsPublic } from '' + +// TODO: Update the object below with actual values +const example = { + "background_color": #ff07d280, + "dot_pattern_color": #ff07d2, + "dot_pattern_type": null, + "corners": null, + "gradient": null, + "background_gradient": null, + "logo": null, + "frame": null, + "text": null, + "branding": null, + "spec_settings": null, +} satisfies QRCodeCustomizationsPublic + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeCustomizationsPublic +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeCustomizationsStaticPublic.md b/src/docs/QRCodeCustomizationsStaticPublic.md new file mode 100644 index 0000000..dcfe0b1 --- /dev/null +++ b/src/docs/QRCodeCustomizationsStaticPublic.md @@ -0,0 +1,45 @@ + +# QRCodeCustomizationsStaticPublic + +Appearance options for a static QR code. gradient, background_gradient, frame, text, and logo are not supported. + +## Properties + +Name | Type +------------ | ------------- +`background_color` | string +`dot_pattern_color` | string +`dot_pattern_type` | [QRCodeDotPatternType](QRCodeDotPatternType.md) +`corners` | [QRCodeCorners](QRCodeCorners.md) +`branding` | [QRCodeBranding](QRCodeBranding.md) +`spec_settings` | [QRCodeSpecSettingsPublic](QRCodeSpecSettingsPublic.md) + +## Example + +```typescript +import type { QRCodeCustomizationsStaticPublic } from '' + +// TODO: Update the object below with actual values +const example = { + "background_color": #ff07d280, + "dot_pattern_color": #ff07d2, + "dot_pattern_type": null, + "corners": null, + "branding": null, + "spec_settings": null, +} satisfies QRCodeCustomizationsStaticPublic + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeCustomizationsStaticPublic +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeDestination.md b/src/docs/QRCodeDestination.md new file mode 100644 index 0000000..862d9a3 --- /dev/null +++ b/src/docs/QRCodeDestination.md @@ -0,0 +1,38 @@ + +# QRCodeDestination + + +## Properties + +Name | Type +------------ | ------------- +`bitlink_id` | string +`long_url` | string +`site_id` | string + +## Example + +```typescript +import type { QRCodeDestination } from '' + +// TODO: Update the object below with actual values +const example = { + "bitlink_id": null, + "long_url": null, + "site_id": null, +} satisfies QRCodeDestination + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeDestination +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeDetails.md b/src/docs/QRCodeDetails.md new file mode 100644 index 0000000..5fc8858 --- /dev/null +++ b/src/docs/QRCodeDetails.md @@ -0,0 +1,58 @@ + +# QRCodeDetails + + +## Properties + +Name | Type +------------ | ------------- +`qrcode_id` | string +`group_guid` | string +`title` | string +`gs1` | [GS1Metadata](GS1Metadata.md) +`render_customizations` | [QRCodeCustomizationsPublic](QRCodeCustomizationsPublic.md) +`qr_code_type` | [QRCodeTypeEnum](QRCodeTypeEnum.md) +`bitlink_id` | string +`long_urls` | Array<string> +`serialized_content` | string +`archived` | boolean +`created` | string +`modified` | string +`expiration_at` | string + +## Example + +```typescript +import type { QRCodeDetails } from '' + +// TODO: Update the object below with actual values +const example = { + "qrcode_id": null, + "group_guid": null, + "title": null, + "gs1": null, + "render_customizations": null, + "qr_code_type": null, + "bitlink_id": null, + "long_urls": null, + "serialized_content": null, + "archived": null, + "created": null, + "modified": null, + "expiration_at": null, +} satisfies QRCodeDetails + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeDetails +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeDotPatternType.md b/src/docs/QRCodeDotPatternType.md new file mode 100644 index 0000000..776baa2 --- /dev/null +++ b/src/docs/QRCodeDotPatternType.md @@ -0,0 +1,32 @@ + +# QRCodeDotPatternType + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { QRCodeDotPatternType } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies QRCodeDotPatternType + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeDotPatternType +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeFrameRequest.md b/src/docs/QRCodeFrameRequest.md new file mode 100644 index 0000000..cee5775 --- /dev/null +++ b/src/docs/QRCodeFrameRequest.md @@ -0,0 +1,38 @@ + +# QRCodeFrameRequest + + +## Properties + +Name | Type +------------ | ------------- +`id` | [QRCodeFrameType](QRCodeFrameType.md) +`colors` | [QRCodeFrameRequestColors](QRCodeFrameRequestColors.md) +`text` | [QRCodeFrameRequestText](QRCodeFrameRequestText.md) + +## Example + +```typescript +import type { QRCodeFrameRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "id": null, + "colors": null, + "text": null, +} satisfies QRCodeFrameRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeFrameRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeFrameRequestColors.md b/src/docs/QRCodeFrameRequestColors.md new file mode 100644 index 0000000..75a2a5f --- /dev/null +++ b/src/docs/QRCodeFrameRequestColors.md @@ -0,0 +1,39 @@ + +# QRCodeFrameRequestColors + +An object of named colors denoting which color should go to which area of the frame + +## Properties + +Name | Type +------------ | ------------- +`primary` | string +`secondary` | string +`background` | string + +## Example + +```typescript +import type { QRCodeFrameRequestColors } from '' + +// TODO: Update the object below with actual values +const example = { + "primary": null, + "secondary": null, + "background": null, +} satisfies QRCodeFrameRequestColors + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeFrameRequestColors +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeFrameRequestText.md b/src/docs/QRCodeFrameRequestText.md new file mode 100644 index 0000000..c3f7748 --- /dev/null +++ b/src/docs/QRCodeFrameRequestText.md @@ -0,0 +1,37 @@ + +# QRCodeFrameRequestText + +The text to be inserted into the QR code\'s frame + +## Properties + +Name | Type +------------ | ------------- +`primary` | [Text](Text.md) +`secondary` | [Text](Text.md) + +## Example + +```typescript +import type { QRCodeFrameRequestText } from '' + +// TODO: Update the object below with actual values +const example = { + "primary": null, + "secondary": null, +} satisfies QRCodeFrameRequestText + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeFrameRequestText +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeFrameType.md b/src/docs/QRCodeFrameType.md new file mode 100644 index 0000000..aa71222 --- /dev/null +++ b/src/docs/QRCodeFrameType.md @@ -0,0 +1,32 @@ + +# QRCodeFrameType + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { QRCodeFrameType } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies QRCodeFrameType + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeFrameType +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeGradient.md b/src/docs/QRCodeGradient.md new file mode 100644 index 0000000..87f08bd --- /dev/null +++ b/src/docs/QRCodeGradient.md @@ -0,0 +1,40 @@ + +# QRCodeGradient + + +## Properties + +Name | Type +------------ | ------------- +`style` | string +`angle` | number +`colors` | [Array<GradientColor>](GradientColor.md) +`exclude_corners` | boolean + +## Example + +```typescript +import type { QRCodeGradient } from '' + +// TODO: Update the object below with actual values +const example = { + "style": null, + "angle": null, + "colors": null, + "exclude_corners": null, +} satisfies QRCodeGradient + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeGradient +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeLogoPublic.md b/src/docs/QRCodeLogoPublic.md new file mode 100644 index 0000000..8e0d56e --- /dev/null +++ b/src/docs/QRCodeLogoPublic.md @@ -0,0 +1,34 @@ + +# QRCodeLogoPublic + + +## Properties + +Name | Type +------------ | ------------- +`image_guid` | string + +## Example + +```typescript +import type { QRCodeLogoPublic } from '' + +// TODO: Update the object below with actual values +const example = { + "image_guid": null, +} satisfies QRCodeLogoPublic + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeLogoPublic +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeMinimal.md b/src/docs/QRCodeMinimal.md new file mode 100644 index 0000000..7c7873a --- /dev/null +++ b/src/docs/QRCodeMinimal.md @@ -0,0 +1,62 @@ + +# QRCodeMinimal + + +## Properties + +Name | Type +------------ | ------------- +`qrcode_id` | string +`group_guid` | string +`title` | string +`is_customized` | boolean +`serialized_content` | string +`qr_code_type` | [QRCodeTypeEnum](QRCodeTypeEnum.md) +`long_urls` | Array<string> +`bitlink_id` | string +`is_gs1` | boolean +`created_by` | string +`tags` | Array<string> +`archived` | boolean +`expiration_at` | string +`created` | string +`modified` | string + +## Example + +```typescript +import type { QRCodeMinimal } from '' + +// TODO: Update the object below with actual values +const example = { + "qrcode_id": null, + "group_guid": null, + "title": null, + "is_customized": null, + "serialized_content": null, + "qr_code_type": null, + "long_urls": null, + "bitlink_id": null, + "is_gs1": null, + "created_by": null, + "tags": null, + "archived": null, + "expiration_at": null, + "created": null, + "modified": null, +} satisfies QRCodeMinimal + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeMinimal +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeSpecSettingsPublic.md b/src/docs/QRCodeSpecSettingsPublic.md new file mode 100644 index 0000000..df6d36e --- /dev/null +++ b/src/docs/QRCodeSpecSettingsPublic.md @@ -0,0 +1,35 @@ + +# QRCodeSpecSettingsPublic + +The QR code\'s editable spec settings, which for now is just the error correction + +## Properties + +Name | Type +------------ | ------------- +`error_correction` | number + +## Example + +```typescript +import type { QRCodeSpecSettingsPublic } from '' + +// TODO: Update the object below with actual values +const example = { + "error_correction": null, +} satisfies QRCodeSpecSettingsPublic + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeSpecSettingsPublic +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeText.md b/src/docs/QRCodeText.md new file mode 100644 index 0000000..2e61243 --- /dev/null +++ b/src/docs/QRCodeText.md @@ -0,0 +1,39 @@ + +# QRCodeText + +Contains the center, top, and bottom text to be used in the QR code + +## Properties + +Name | Type +------------ | ------------- +`center` | [Text](Text.md) +`top` | [Text](Text.md) +`bottom` | [Text](Text.md) + +## Example + +```typescript +import type { QRCodeText } from '' + +// TODO: Update the object below with actual values +const example = { + "center": null, + "top": null, + "bottom": null, +} satisfies QRCodeText + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeText +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodeTypeEnum.md b/src/docs/QRCodeTypeEnum.md new file mode 100644 index 0000000..05750e4 --- /dev/null +++ b/src/docs/QRCodeTypeEnum.md @@ -0,0 +1,33 @@ + +# QRCodeTypeEnum + +The type of dynamic/static content the QR serves, e.g. Link In Bio page, micro site, bitlink, email, text, Wifi, etc. + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { QRCodeTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies QRCodeTypeEnum + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodeTypeEnum +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRCodesApi.md b/src/docs/QRCodesApi.md new file mode 100644 index 0000000..be2bcf5 --- /dev/null +++ b/src/docs/QRCodesApi.md @@ -0,0 +1,1143 @@ +# QRCodesApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createQRCodePublic**](QRCodesApi.md#createqrcodepublic) | **POST** /qr-codes | Create a QR Code | +| [**createStaticQRCodePublic**](QRCodesApi.md#createstaticqrcodepublic) | **POST** /qr-codes/static | Generate a static QR Code image | +| [**deleteQRCode**](QRCodesApi.md#deleteqrcode) | **DELETE** /qr-codes/{qrcode_id} | Delete a QR Code | +| [**getQRCodeByIdPublic**](QRCodesApi.md#getqrcodebyidpublic) | **GET** /qr-codes/{qrcode_id} | Retrieve a QR Code | +| [**getQRCodeImagePublic**](QRCodesApi.md#getqrcodeimagepublic) | **GET** /qr-codes/{qrcode_id}/image | Retrieve a QR Code image | +| [**getScanMetricsForQRCode**](QRCodesApi.md#getscanmetricsforqrcode) | **GET** /qr-codes/{qrcode_id}/scans | Get Scans for a QR Code | +| [**getScanMetricsForQRCodeByBrowser**](QRCodesApi.md#getscanmetricsforqrcodebybrowser) | **GET** /qr-codes/{qrcode_id}/scans/browsers | Get Scans for a QR Code by Browser | +| [**getScanMetricsForQRCodeByCities**](QRCodesApi.md#getscanmetricsforqrcodebycities) | **GET** /qr-codes/{qrcode_id}/scans/cities | Get Metrics for a QR Code by City | +| [**getScanMetricsForQRCodeByCountries**](QRCodesApi.md#getscanmetricsforqrcodebycountries) | **GET** /qr-codes/{qrcode_id}/scans/countries | Get Scans for a QR Code by Country | +| [**getScanMetricsForQRCodeByDevicesOS**](QRCodesApi.md#getscanmetricsforqrcodebydevicesos) | **GET** /qr-codes/{qrcode_id}/scans/device_os | Get Scans for a QR Code by Device OS | +| [**getScanMetricsSummaryForQRCode**](QRCodesApi.md#getscanmetricssummaryforqrcode) | **GET** /qr-codes/{qrcode_id}/scans/summary | Get Scans Summary for a QR Code | +| [**listQRMinimal**](QRCodesApi.md#listqrminimal) | **GET** /groups/{group_guid}/qr-codes | Retrieve QR Codes by Group | +| [**updateQRCodePublic**](QRCodesApi.md#updateqrcodepublic) | **PATCH** /qr-codes/{qrcode_id} | Update a QR Code | + + + +## createQRCodePublic + +> QRCodeMinimal createQRCodePublic(public_create_qr_code_request) + +Create a QR Code + +Create a new QR Code and return its metadata + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { CreateQRCodePublicRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // PublicCreateQRCodeRequest + public_create_qr_code_request: {"title":"Minimal QR Code","group_guid":"Ba1bc23dE4F","destination":{"bitlink_id":"bit.ly/abc123"},"tags":["tag1","tag2"]}, + } satisfies CreateQRCodePublicRequest; + + try { + const data = await api.createQRCodePublic(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **public_create_qr_code_request** | [PublicCreateQRCodeRequest](PublicCreateQRCodeRequest.md) | | | + +### Return type + +[**QRCodeMinimal**](QRCodeMinimal.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | CREATED | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## createStaticQRCodePublic + +> PublicStaticQRCodeResponse createStaticQRCodePublic(public_create_static_qr_code_request, accept, format) + +Generate a static QR Code image + +Generate a static QR code image without creating or saving a QR code resource. SVG and PNG output are supported via the Accept header Contact your Account Manager to discuss enabling this feature for your account. The `render_customizations` field supports basic appearance options. Customizations that require the rasterize API are not supported: `gradient`, `background_gradient`, `frame`, `text`, and `logo`. The Accept header controls the response format: - `application/json` (default): Returns a JSON object with the image as a base64-encoded byte string. - `image/svg+xml`: Returns the raw SVG image. - `image/png`: Returns the raw PNG image. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { CreateStaticQRCodePublicRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // PublicCreateStaticQRCodeRequest + public_create_static_qr_code_request: {"content":"https://bitly.com","group_guid":"Ba1bc23dE4F"}, + // 'application/json' | 'image/svg+xml' | 'image/png' | Controls the response format. Use `application/json` (default) to receive a JSON-wrapped base64 image, `image/svg+xml` to receive the raw SVG, or `image/png` to receive the raw PNG. (optional) + accept: image/svg+xml, + // 'svg' | 'png' | The image format. Supports `svg` and `png`. Ignored if the Accept header specifies an image type. (optional) + format: format_example, + } satisfies CreateStaticQRCodePublicRequest; + + try { + const data = await api.createStaticQRCodePublic(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **public_create_static_qr_code_request** | [PublicCreateStaticQRCodeRequest](PublicCreateStaticQRCodeRequest.md) | | | +| **accept** | `application/json`, `image/svg+xml`, `image/png` | Controls the response format. Use `application/json` (default) to receive a JSON-wrapped base64 image, `image/svg+xml` to receive the raw SVG, or `image/png` to receive the raw PNG. | [Optional] [Defaults to `undefined`] [Enum: application/json, image/svg+xml, image/png] | +| **format** | `svg`, `png` | The image format. Supports `svg` and `png`. Ignored if the Accept header specifies an image type. | [Optional] [Defaults to `'svg'`] [Enum: svg, png] | + +### Return type + +[**PublicStaticQRCodeResponse**](PublicStaticQRCodeResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `image/svg+xml`, `image/png` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **406** | NOT_ACCEPTABLE | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## deleteQRCode + +> PublicDeleteQRCodeResponse deleteQRCode(qrcode_id) + +Delete a QR Code + +Delete a QR Code that has not been redirected and is not for a custom link. Also deletes the associated link (if applicable). + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { DeleteQRCodeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + } satisfies DeleteQRCodeRequest; + + try { + const data = await api.deleteQRCode(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | + +### Return type + +[**PublicDeleteQRCodeResponse**](PublicDeleteQRCodeResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getQRCodeByIdPublic + +> QRCodeDetails getQRCodeByIdPublic(qrcode_id) + +Retrieve a QR Code + +Gets the QR code with a matching id. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetQRCodeByIdPublicRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + } satisfies GetQRCodeByIdPublicRequest; + + try { + const data = await api.getQRCodeByIdPublic(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | + +### Return type + +[**QRCodeDetails**](QRCodeDetails.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getQRCodeImagePublic + +> PublicQRCodeImageResponse getQRCodeImagePublic(qrcode_id, accept, format) + +Retrieve a QR Code image + +Get the image of a given QR Code. The Accept header controls how this is returned (options are \"application/json\", \"image/svg+xml\", and \"image/png\"). If the Accept header is \"application/json\" the format query parameter will determine the image format inside of the json (which will be base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag). To Return the QR Code image itself, set the Accept header to \"image/svg+xml\" or \"image/png\", or remove the Accept header and set the format query parameter to “svg” or “png” (if no format is specified the default will be “svg”). + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetQRCodeImagePublicRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // string | The file format for the QR code\'s image. If the accept header is application/json the image data will be wrapped in a json object, base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag. (optional) + accept: image/svg+xml, + // 'svg' | 'png' | The format type of the image. If there is an image format in the header it takes precedence. (optional) + format: svg, + } satisfies GetQRCodeImagePublicRequest; + + try { + const data = await api.getQRCodeImagePublic(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **accept** | `string` | The file format for the QR code\'s image. If the accept header is application/json the image data will be wrapped in a json object, base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag. | [Optional] [Defaults to `undefined`] | +| **format** | `svg`, `png` | The format type of the image. If there is an image format in the header it takes precedence. | [Optional] [Defaults to `'svg'`] [Enum: svg, png] | + +### Return type + +[**PublicQRCodeImageResponse**](PublicQRCodeImageResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `image/svg+xml`, `image/png` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getScanMetricsForQRCode + +> BitlinkScans getScanMetricsForQRCode(qrcode_id, unit, units, unit_reference) + +Get Scans for a QR Code + +Returns an array of scan counts for the specified QR code. The array is comprised of scan counts for each time window, where the window is based on the provided unit. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetScanMetricsForQRCodeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetScanMetricsForQRCodeRequest; + + try { + const data = await api.getScanMetricsForQRCode(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**BitlinkScans**](BitlinkScans.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getScanMetricsForQRCodeByBrowser + +> ScanMetrics getScanMetricsForQRCodeByBrowser(qrcode_id, unit, units, size, unit_reference) + +Get Scans for a QR Code by Browser + +Returns the browsers generating scan traffic to the specified QR Code. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetScanMetricsForQRCodeByBrowserRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetScanMetricsForQRCodeByBrowserRequest; + + try { + const data = await api.getScanMetricsForQRCodeByBrowser(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ScanMetrics**](ScanMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getScanMetricsForQRCodeByCities + +> CityScanMetrics getScanMetricsForQRCodeByCities(qrcode_id, unit, units, size, unit_reference) + +Get Metrics for a QR Code by City + +Returns the city origins of scan traffic for the specified QR Code. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetScanMetricsForQRCodeByCitiesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetScanMetricsForQRCodeByCitiesRequest; + + try { + const data = await api.getScanMetricsForQRCodeByCities(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**CityScanMetrics**](CityScanMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getScanMetricsForQRCodeByCountries + +> ScanMetrics getScanMetricsForQRCodeByCountries(qrcode_id, unit, units, size, unit_reference) + +Get Scans for a QR Code by Country + +Returns the country origins of scan traffic for the specified QR Code. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetScanMetricsForQRCodeByCountriesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetScanMetricsForQRCodeByCountriesRequest; + + try { + const data = await api.getScanMetricsForQRCodeByCountries(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ScanMetrics**](ScanMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getScanMetricsForQRCodeByDevicesOS + +> ScanMetrics getScanMetricsForQRCodeByDevicesOS(qrcode_id, unit, units, size, unit_reference) + +Get Scans for a QR Code by Device OS + +Returns the device os generating scan traffic for the specified QR Code. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetScanMetricsForQRCodeByDevicesOSRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetScanMetricsForQRCodeByDevicesOSRequest; + + try { + const data = await api.getScanMetricsForQRCodeByDevicesOS(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ScanMetrics**](ScanMetrics.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getScanMetricsSummaryForQRCode + +> BitlinkScansSummary getScanMetricsSummaryForQRCode(qrcode_id, unit, units, unit_reference) + +Get Scans Summary for a QR Code + +Returns the scan counts for a QR Code rolled up into a single field for a specified time window, where the window is based on the provided unit. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { GetScanMetricsSummaryForQRCodeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR Code ID + qrcode_id: Qabcde12345, + // TimeUnit | A unit of time + unit: month, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) (optional) + unit_reference: 2006-01-02T15:04:05-0700, + } satisfies GetScanMetricsSummaryForQRCodeRequest; + + try { + const data = await api.getScanMetricsSummaryForQRCode(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR Code ID | [Defaults to `undefined`] | +| **unit** | `TimeUnit` | A unit of time | [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit_reference** | `string` | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace \'+\' with \'%2B\' and \':\' with \'%3A\'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000) | [Optional] [Defaults to `undefined`] | + +### Return type + +[**BitlinkScansSummary**](BitlinkScansSummary.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## listQRMinimal + +> QRCodesMinimal listQRMinimal(group_guid, has_render_customizations, size, search_after, query, hostname_path_query, created_before, created_after, archived, creating_login, qrc_type, is_gs1, is_expired, has_expiration, tags) + +Retrieve QR Codes by Group + +Retrieves a list of QR codes matching the filter settings. Values are in reverse chronological order. The pagination occurs by calling the next link in the pagination response object. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { ListQRMinimalRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // 'on' | 'off' | 'both' | Whether or not QRCode has any render customizations (like color or shape changes) (optional) + has_render_customizations: both, + // number | The quantity of items to be be returned (optional) + size: 10, + // string | Token used to search next batch of qr codes, only use response from API as input value. (optional) + search_after: search_after_example, + // string | The value that you would like to search (optional) + query: api, + // string | The hostname and/or path you would like to search (case-insensitive). Subdomains included; query params and fragment ignored. (optional) + hostname_path_query: dev.bitly.com/api-reference, + // number | Timestamp as an integer unix epoch (seconds only) (optional) + created_before: 1694529902, + // number | Timestamp as an integer unix epoch (seconds only) (optional) + created_after: 1694529902, + // 'on' | 'off' | 'both' | Whether or not to include archived resources (optional) + archived: both, + // Array | Filter by the login of the authenticated user that created the QR Code (optional) + creating_login: ["chauncey"], + // Array<'bitlink' | 'long_url'> (optional) + qrc_type: ["bitlink"], + // 'on' | 'off' | 'both' | a filter value if the resource is a GS1 QR code (optional) + is_gs1: both, + // 'on' | 'off' | 'both' | filter bitlinks by expiration status (optional) + is_expired: is_expired_example, + // 'on' | 'off' | 'both' | filter bitlinks by presence of expiration (optional) + has_expiration: has_expiration_example, + // Array | Filter by given tags (optional) + tags: ["bitly","api"], + } satisfies ListQRMinimalRequest; + + try { + const data = await api.listQRMinimal(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **group_guid** | `string` | A GUID for a Bitly group | [Defaults to `undefined`] | +| **has_render_customizations** | `on`, `off`, `both` | Whether or not QRCode has any render customizations (like color or shape changes) | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **search_after** | `string` | Token used to search next batch of qr codes, only use response from API as input value. | [Optional] [Defaults to `undefined`] | +| **query** | `string` | The value that you would like to search | [Optional] [Defaults to `undefined`] | +| **hostname_path_query** | `string` | The hostname and/or path you would like to search (case-insensitive). Subdomains included; query params and fragment ignored. | [Optional] [Defaults to `undefined`] | +| **created_before** | `number` | Timestamp as an integer unix epoch (seconds only) | [Optional] [Defaults to `undefined`] | +| **created_after** | `number` | Timestamp as an integer unix epoch (seconds only) | [Optional] [Defaults to `undefined`] | +| **archived** | `on`, `off`, `both` | Whether or not to include archived resources | [Optional] [Defaults to `'off'`] [Enum: on, off, both] | +| **creating_login** | `Array` | Filter by the login of the authenticated user that created the QR Code | [Optional] | +| **qrc_type** | `bitlink`, `long_url` | | [Optional] [Enum: bitlink, long_url] | +| **is_gs1** | `on`, `off`, `both` | a filter value if the resource is a GS1 QR code | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **is_expired** | `on`, `off`, `both` | filter bitlinks by expiration status | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **has_expiration** | `on`, `off`, `both` | filter bitlinks by presence of expiration | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | +| **tags** | `Array` | Filter by given tags | [Optional] | + +### Return type + +[**QRCodesMinimal**](QRCodesMinimal.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateQRCodePublic + +> QRCodeMinimal updateQRCodePublic(qrcode_id, public_update_qr_code_request) + +Update a QR Code + +Updates the QR code with a matching id and returns it. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { UpdateQRCodePublicRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new QRCodesApi(config); + + const body = { + // string | The QR code ID + qrcode_id: Qabc123, + // PublicUpdateQRCodeRequest + public_update_qr_code_request: {"title":"Minimal QR Code Updated","tags":["tag1","tag2"]}, + } satisfies UpdateQRCodePublicRequest; + + try { + const data = await api.updateQRCodePublic(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | The QR code ID | [Defaults to `undefined`] | +| **public_update_qr_code_request** | [PublicUpdateQRCodeRequest](PublicUpdateQRCodeRequest.md) | | | + +### Return type + +[**QRCodeMinimal**](QRCodeMinimal.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **500** | INTERNAL_ERROR | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/QRCodesMinimal.md b/src/docs/QRCodesMinimal.md new file mode 100644 index 0000000..a36e9ed --- /dev/null +++ b/src/docs/QRCodesMinimal.md @@ -0,0 +1,37 @@ + +# QRCodesMinimal + +QR code paginated list Response + +## Properties + +Name | Type +------------ | ------------- +`qr_codes` | [Array<QRCodeMinimal>](QRCodeMinimal.md) +`pagination` | [QRPagination](QRPagination.md) + +## Example + +```typescript +import type { QRCodesMinimal } from '' + +// TODO: Update the object below with actual values +const example = { + "qr_codes": null, + "pagination": null, +} satisfies QRCodesMinimal + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRCodesMinimal +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRPagination.md b/src/docs/QRPagination.md new file mode 100644 index 0000000..e867c20 --- /dev/null +++ b/src/docs/QRPagination.md @@ -0,0 +1,39 @@ + +# QRPagination + +This object specifies how to query the next set of results. + +## Properties + +Name | Type +------------ | ------------- +`next` | string +`search_after` | string +`size` | number + +## Example + +```typescript +import type { QRPagination } from '' + +// TODO: Update the object below with actual values +const example = { + "next": null, + "search_after": Qn8sfFRC2tm, + "size": 50, +} satisfies QRPagination + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRPagination +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/QRScans.md b/src/docs/QRScans.md new file mode 100644 index 0000000..e8ee254 --- /dev/null +++ b/src/docs/QRScans.md @@ -0,0 +1,36 @@ + +# QRScans + + +## Properties + +Name | Type +------------ | ------------- +`scans` | number +`date` | string + +## Example + +```typescript +import type { QRScans } from '' + +// TODO: Update the object below with actual values +const example = { + "scans": null, + "date": null, +} satisfies QRScans + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as QRScans +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ReferrersByDomain.md b/src/docs/ReferrersByDomain.md new file mode 100644 index 0000000..c5d8e32 --- /dev/null +++ b/src/docs/ReferrersByDomain.md @@ -0,0 +1,36 @@ + +# ReferrersByDomain + + +## Properties + +Name | Type +------------ | ------------- +`network` | string +`referrers` | [Array<Metric>](Metric.md) + +## Example + +```typescript +import type { ReferrersByDomain } from '' + +// TODO: Update the object below with actual values +const example = { + "network": null, + "referrers": null, +} satisfies ReferrersByDomain + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ReferrersByDomain +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ReferrersByDomains.md b/src/docs/ReferrersByDomains.md new file mode 100644 index 0000000..290d37e --- /dev/null +++ b/src/docs/ReferrersByDomains.md @@ -0,0 +1,42 @@ + +# ReferrersByDomains + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`referrers_by_domain` | [Array<ReferrersByDomain>](ReferrersByDomain.md) + +## Example + +```typescript +import type { ReferrersByDomains } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "referrers_by_domain": null, +} satisfies ReferrersByDomains + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ReferrersByDomains +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ScanMetric.md b/src/docs/ScanMetric.md new file mode 100644 index 0000000..b22fd52 --- /dev/null +++ b/src/docs/ScanMetric.md @@ -0,0 +1,36 @@ + +# ScanMetric + + +## Properties + +Name | Type +------------ | ------------- +`scans` | number +`value` | string + +## Example + +```typescript +import type { ScanMetric } from '' + +// TODO: Update the object below with actual values +const example = { + "scans": null, + "value": null, +} satisfies ScanMetric + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ScanMetric +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ScanMetrics.md b/src/docs/ScanMetrics.md new file mode 100644 index 0000000..b516b06 --- /dev/null +++ b/src/docs/ScanMetrics.md @@ -0,0 +1,42 @@ + +# ScanMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`metrics` | [Array<ScanMetric>](ScanMetric.md) + +## Example + +```typescript +import type { ScanMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "metrics": null, +} satisfies ScanMetrics + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ScanMetrics +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Shorten.md b/src/docs/Shorten.md new file mode 100644 index 0000000..32f9836 --- /dev/null +++ b/src/docs/Shorten.md @@ -0,0 +1,40 @@ + +# Shorten + + +## Properties + +Name | Type +------------ | ------------- +`long_url` | string +`domain` | string +`group_guid` | string +`force_new_link` | boolean + +## Example + +```typescript +import type { Shorten } from '' + +// TODO: Update the object below with actual values +const example = { + "long_url": null, + "domain": null, + "group_guid": null, + "force_new_link": null, +} satisfies Shorten + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Shorten +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/ShortenBitlinkBody.md b/src/docs/ShortenBitlinkBody.md new file mode 100644 index 0000000..9fcbbf2 --- /dev/null +++ b/src/docs/ShortenBitlinkBody.md @@ -0,0 +1,50 @@ + +# ShortenBitlinkBody + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`link` | string +`id` | string +`long_url` | string +`archived` | boolean +`created_at` | string +`custom_bitlinks` | Array<string> +`tags` | Array<string> +`deeplinks` | [Array<DeeplinkRule>](DeeplinkRule.md) + +## Example + +```typescript +import type { ShortenBitlinkBody } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "link": null, + "id": null, + "long_url": null, + "archived": null, + "created_at": null, + "custom_bitlinks": null, + "tags": null, + "deeplinks": null, +} satisfies ShortenBitlinkBody + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ShortenBitlinkBody +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/SimplifiedError.md b/src/docs/SimplifiedError.md new file mode 100644 index 0000000..4aafe94 --- /dev/null +++ b/src/docs/SimplifiedError.md @@ -0,0 +1,38 @@ + +# SimplifiedError + + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string + +## Example + +```typescript +import type { SimplifiedError } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, +} satisfies SimplifiedError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SimplifiedError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/SortedLinks.md b/src/docs/SortedLinks.md new file mode 100644 index 0000000..d736485 --- /dev/null +++ b/src/docs/SortedLinks.md @@ -0,0 +1,36 @@ + +# SortedLinks + + +## Properties + +Name | Type +------------ | ------------- +`links` | [Array<BitlinkBody>](BitlinkBody.md) +`sorted_links` | [Array<ClickLink>](ClickLink.md) + +## Example + +```typescript +import type { SortedLinks } from '' + +// TODO: Update the object below with actual values +const example = { + "links": null, + "sorted_links": null, +} satisfies SortedLinks + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SortedLinks +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Tags.md b/src/docs/Tags.md new file mode 100644 index 0000000..0c4b4a7 --- /dev/null +++ b/src/docs/Tags.md @@ -0,0 +1,34 @@ + +# Tags + + +## Properties + +Name | Type +------------ | ------------- +`tags` | Array<string> + +## Example + +```typescript +import type { Tags } from '' + +// TODO: Update the object below with actual values +const example = { + "tags": null, +} satisfies Tags + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Tags +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/TemporarilyUnavailable.md b/src/docs/TemporarilyUnavailable.md new file mode 100644 index 0000000..64ab6c1 --- /dev/null +++ b/src/docs/TemporarilyUnavailable.md @@ -0,0 +1,41 @@ + +# TemporarilyUnavailable + +TEMPORARILY_UNAVAILABLE + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { TemporarilyUnavailable } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies TemporarilyUnavailable + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as TemporarilyUnavailable +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Text.md b/src/docs/Text.md new file mode 100644 index 0000000..537c8ab --- /dev/null +++ b/src/docs/Text.md @@ -0,0 +1,37 @@ + +# Text + +An object describing text with color + +## Properties + +Name | Type +------------ | ------------- +`content` | string +`color` | string + +## Example + +```typescript +import type { Text } from '' + +// TODO: Update the object below with actual values +const example = { + "content": null, + "color": null, +} satisfies Text + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Text +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/TimeUnit.md b/src/docs/TimeUnit.md new file mode 100644 index 0000000..cdd2dce --- /dev/null +++ b/src/docs/TimeUnit.md @@ -0,0 +1,33 @@ + +# TimeUnit + +the unit of time queried for (minute, hour, day, week, month) + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { TimeUnit } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies TimeUnit + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as TimeUnit +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/TimeUnitDWM.md b/src/docs/TimeUnitDWM.md new file mode 100644 index 0000000..a966308 --- /dev/null +++ b/src/docs/TimeUnitDWM.md @@ -0,0 +1,33 @@ + +# TimeUnitDWM + +the unit of time queried for (day, week, month) + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { TimeUnitDWM } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies TimeUnitDWM + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as TimeUnitDWM +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/TotalEngagements.md b/src/docs/TotalEngagements.md new file mode 100644 index 0000000..013353b --- /dev/null +++ b/src/docs/TotalEngagements.md @@ -0,0 +1,40 @@ + +# TotalEngagements + + +## Properties + +Name | Type +------------ | ------------- +`engagements` | [Array<Engagements>](Engagements.md) +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { TotalEngagements } from '' + +// TODO: Update the object below with actual values +const example = { + "engagements": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies TotalEngagements + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as TotalEngagements +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/TotalEngagementsSummary.md b/src/docs/TotalEngagementsSummary.md new file mode 100644 index 0000000..1de9f8e --- /dev/null +++ b/src/docs/TotalEngagementsSummary.md @@ -0,0 +1,42 @@ + +# TotalEngagementsSummary + + +## Properties + +Name | Type +------------ | ------------- +`total_engagements` | number +`engagements` | [Engagement](Engagement.md) +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { TotalEngagementsSummary } from '' + +// TODO: Update the object below with actual values +const example = { + "total_engagements": null, + "engagements": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies TotalEngagementsSummary + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as TotalEngagementsSummary +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/UnprocessableEntity.md b/src/docs/UnprocessableEntity.md new file mode 100644 index 0000000..5a7a3c8 --- /dev/null +++ b/src/docs/UnprocessableEntity.md @@ -0,0 +1,41 @@ + +# UnprocessableEntity + +UNPROCESSABLE_ENTITY + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { UnprocessableEntity } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies UnprocessableEntity + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as UnprocessableEntity +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/UpdateCustomBitlink.md b/src/docs/UpdateCustomBitlink.md new file mode 100644 index 0000000..063b962 --- /dev/null +++ b/src/docs/UpdateCustomBitlink.md @@ -0,0 +1,34 @@ + +# UpdateCustomBitlink + + +## Properties + +Name | Type +------------ | ------------- +`bitlink_id` | string + +## Example + +```typescript +import type { UpdateCustomBitlink } from '' + +// TODO: Update the object below with actual values +const example = { + "bitlink_id": null, +} satisfies UpdateCustomBitlink + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as UpdateCustomBitlink +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/UpgradeRequired.md b/src/docs/UpgradeRequired.md new file mode 100644 index 0000000..42b577e --- /dev/null +++ b/src/docs/UpgradeRequired.md @@ -0,0 +1,41 @@ + +# UpgradeRequired + +UPGRADE_REQUIRED + +## Properties + +Name | Type +------------ | ------------- +`message` | string +`description` | string +`resource` | string +`errors` | [Array<FieldError>](FieldError.md) + +## Example + +```typescript +import type { UpgradeRequired } from '' + +// TODO: Update the object below with actual values +const example = { + "message": null, + "description": null, + "resource": null, + "errors": null, +} satisfies UpgradeRequired + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as UpgradeRequired +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/User.md b/src/docs/User.md new file mode 100644 index 0000000..bc7df6b --- /dev/null +++ b/src/docs/User.md @@ -0,0 +1,50 @@ + +# User + + +## Properties + +Name | Type +------------ | ------------- +`login` | string +`name` | string +`is_active` | boolean +`created` | string +`modified` | string +`is_sso_user` | boolean +`emails` | [Array<Email>](Email.md) +`is_2fa_enabled` | boolean +`default_group_guid` | string + +## Example + +```typescript +import type { User } from '' + +// TODO: Update the object below with actual values +const example = { + "login": null, + "name": null, + "is_active": null, + "created": null, + "modified": null, + "is_sso_user": null, + "emails": null, + "is_2fa_enabled": null, + "default_group_guid": null, +} satisfies User + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as User +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/UserApi.md b/src/docs/UserApi.md new file mode 100644 index 0000000..b06d374 --- /dev/null +++ b/src/docs/UserApi.md @@ -0,0 +1,230 @@ +# UserApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getPlatformLimits**](UserApi.md#getplatformlimits) | **GET** /user/platform_limits | Get Platform Limits | +| [**getUser**](UserApi.md#getuser) | **GET** /user | Retrieve a User | +| [**updateUser**](UserApi.md#updateuser) | **PATCH** /user | Update a User | + + + +## getPlatformLimits + +> PlatformLimits getPlatformLimits(path) + +Get Platform Limits + +Fetch all platform limits and counts available for an organization + +### Example + +```ts +import { + Configuration, + UserApi, +} from ''; +import type { GetPlatformLimitsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new UserApi(config); + + const body = { + // string | The specific path for which information is requested (optional) + path: /organizations/{organization_guid}, + } satisfies GetPlatformLimitsRequest; + + try { + const data = await api.getPlatformLimits(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **path** | `string` | The specific path for which information is requested | [Optional] [Defaults to `undefined`] | + +### Return type + +[**PlatformLimits**](PlatformLimits.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getUser + +> User getUser() + +Retrieve a User + +Returns information for the current authenticated user. + +### Example + +```ts +import { + Configuration, + UserApi, +} from ''; +import type { GetUserRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new UserApi(config); + + try { + const data = await api.getUser(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateUser + +> User updateUser(user_update) + +Update a User + +Update fields in the user + +### Example + +```ts +import { + Configuration, + UserApi, +} from ''; +import type { UpdateUserRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new UserApi(config); + + const body = { + // UserUpdate + user_update: ..., + } satisfies UpdateUserRequest; + + try { + const data = await api.updateUser(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user_update** | [UserUpdate](UserUpdate.md) | | | + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/docs/UserUpdate.md b/src/docs/UserUpdate.md new file mode 100644 index 0000000..2a45919 --- /dev/null +++ b/src/docs/UserUpdate.md @@ -0,0 +1,36 @@ + +# UserUpdate + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`default_group_guid` | string + +## Example + +```typescript +import type { UserUpdate } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "default_group_guid": null, +} satisfies UserUpdate + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as UserUpdate +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Webhook.md b/src/docs/Webhook.md new file mode 100644 index 0000000..67037ed --- /dev/null +++ b/src/docs/Webhook.md @@ -0,0 +1,70 @@ + +# Webhook + + +## Properties + +Name | Type +------------ | ------------- +`references` | { [key: string]: string; } +`guid` | string +`created` | string +`modified` | string +`modified_by` | string +`alerted` | string +`deactivated` | string +`is_active` | boolean +`is_alert` | boolean +`organization_guid` | string +`group_guid` | string +`name` | string +`event` | string +`url` | string +`status` | string +`oauth_url` | string +`client_id` | string +`client_secret` | string +`fetch_tags` | boolean + +## Example + +```typescript +import type { Webhook } from '' + +// TODO: Update the object below with actual values +const example = { + "references": null, + "guid": null, + "created": null, + "modified": null, + "modified_by": null, + "alerted": null, + "deactivated": null, + "is_active": null, + "is_alert": null, + "organization_guid": null, + "group_guid": null, + "name": null, + "event": null, + "url": null, + "status": null, + "oauth_url": null, + "client_id": null, + "client_secret": null, + "fetch_tags": null, +} satisfies Webhook + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Webhook +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/WebhookCreate.md b/src/docs/WebhookCreate.md new file mode 100644 index 0000000..c627b79 --- /dev/null +++ b/src/docs/WebhookCreate.md @@ -0,0 +1,52 @@ + +# WebhookCreate + + +## Properties + +Name | Type +------------ | ------------- +`is_active` | boolean +`organization_guid` | string +`group_guid` | string +`name` | string +`event` | string +`url` | string +`oauth_url` | string +`client_id` | string +`client_secret` | string +`fetch_tags` | boolean + +## Example + +```typescript +import type { WebhookCreate } from '' + +// TODO: Update the object below with actual values +const example = { + "is_active": null, + "organization_guid": null, + "group_guid": null, + "name": null, + "event": null, + "url": null, + "oauth_url": null, + "client_id": null, + "client_secret": null, + "fetch_tags": null, +} satisfies WebhookCreate + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as WebhookCreate +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/WebhookUpdate.md b/src/docs/WebhookUpdate.md new file mode 100644 index 0000000..0a53d52 --- /dev/null +++ b/src/docs/WebhookUpdate.md @@ -0,0 +1,54 @@ + +# WebhookUpdate + + +## Properties + +Name | Type +------------ | ------------- +`guid` | string +`is_active` | boolean +`organization_guid` | string +`group_guid` | string +`name` | string +`event` | string +`url` | string +`oauth_url` | string +`client_id` | string +`client_secret` | string +`fetch_tags` | boolean + +## Example + +```typescript +import type { WebhookUpdate } from '' + +// TODO: Update the object below with actual values +const example = { + "guid": null, + "is_active": null, + "organization_guid": null, + "group_guid": null, + "name": null, + "event": null, + "url": null, + "oauth_url": null, + "client_id": null, + "client_secret": null, + "fetch_tags": null, +} satisfies WebhookUpdate + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as WebhookUpdate +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/Webhooks.md b/src/docs/Webhooks.md new file mode 100644 index 0000000..1b7b1c0 --- /dev/null +++ b/src/docs/Webhooks.md @@ -0,0 +1,34 @@ + +# Webhooks + + +## Properties + +Name | Type +------------ | ------------- +`webhooks` | [Array<Webhook>](Webhook.md) + +## Example + +```typescript +import type { Webhooks } from '' + +// TODO: Update the object below with actual values +const example = { + "webhooks": null, +} satisfies Webhooks + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Webhooks +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/src/docs/WebhooksApi.md b/src/docs/WebhooksApi.md new file mode 100644 index 0000000..7f9a45a --- /dev/null +++ b/src/docs/WebhooksApi.md @@ -0,0 +1,484 @@ +# WebhooksApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createWebhook**](WebhooksApi.md#createwebhook) | **POST** /webhooks | Create Webhook | +| [**deleteWebhook**](WebhooksApi.md#deletewebhook) | **DELETE** /webhooks/{webhook_guid} | Delete Webhook | +| [**getWebhook**](WebhooksApi.md#getwebhook) | **GET** /webhooks/{webhook_guid} | Retrieve Webhook | +| [**getWebhooks**](WebhooksApi.md#getwebhooks) | **GET** /organizations/{organization_guid}/webhooks | Get Webhooks | +| [**updateWebhook**](WebhooksApi.md#updatewebhook) | **PATCH** /webhooks/{webhook_guid} | Update Webhook | +| [**verifyWebhook**](WebhooksApi.md#verifywebhook) | **POST** /webhooks/{webhook_guid}/verify | Verify Webhook | + + + +## createWebhook + +> Webhook createWebhook(webhook_create) + +Create Webhook + +Creates a webhook. + +### Example + +```ts +import { + Configuration, + WebhooksApi, +} from ''; +import type { CreateWebhookRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new WebhooksApi(config); + + const body = { + // WebhookCreate + webhook_create: ..., + } satisfies CreateWebhookRequest; + + try { + const data = await api.createWebhook(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhook_create** | [WebhookCreate](WebhookCreate.md) | | | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | CREATED | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## deleteWebhook + +> deleteWebhook(webhook_guid) + +Delete Webhook + +Deletes a webhook. + +### Example + +```ts +import { + Configuration, + WebhooksApi, +} from ''; +import type { DeleteWebhookRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new WebhooksApi(config); + + const body = { + // string | A GUID for a Bitly webhook + webhook_guid: Wa1bcDefG23, + } satisfies DeleteWebhookRequest; + + try { + const data = await api.deleteWebhook(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhook_guid** | `string` | A GUID for a Bitly webhook | [Defaults to `undefined`] | + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getWebhook + +> Webhook getWebhook(webhook_guid) + +Retrieve Webhook + +Returns a webhook. + +### Example + +```ts +import { + Configuration, + WebhooksApi, +} from ''; +import type { GetWebhookRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new WebhooksApi(config); + + const body = { + // string | A GUID for a Bitly webhook + webhook_guid: Wa1bcDefG23, + } satisfies GetWebhookRequest; + + try { + const data = await api.getWebhook(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhook_guid** | `string` | A GUID for a Bitly webhook | [Defaults to `undefined`] | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getWebhooks + +> Webhooks getWebhooks(organization_guid) + +Get Webhooks + +Fetch all webhooks available for an Organization + +### Example + +```ts +import { + Configuration, + WebhooksApi, +} from ''; +import type { GetWebhooksRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new WebhooksApi(config); + + const body = { + // string | A GUID for a Bitly organization + organization_guid: Oa1bcd234eF, + } satisfies GetWebhooksRequest; + + try { + const data = await api.getWebhooks(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **organization_guid** | `string` | A GUID for a Bitly organization | [Defaults to `undefined`] | + +### Return type + +[**Webhooks**](Webhooks.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateWebhook + +> Webhook updateWebhook(webhook_guid, webhook_update) + +Update Webhook + +Update a webhook + +### Example + +```ts +import { + Configuration, + WebhooksApi, +} from ''; +import type { UpdateWebhookRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new WebhooksApi(config); + + const body = { + // string | A GUID for a Bitly webhook + webhook_guid: Wa1bcDefG23, + // WebhookUpdate + webhook_update: ..., + } satisfies UpdateWebhookRequest; + + try { + const data = await api.updateWebhook(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhook_guid** | `string` | A GUID for a Bitly webhook | [Defaults to `undefined`] | +| **webhook_update** | [WebhookUpdate](WebhookUpdate.md) | | | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **429** | MONTHLY_LIMIT_EXCEEDED | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## verifyWebhook + +> Webhook verifyWebhook(webhook_guid) + +Verify Webhook + +Sends ping event to test webhook configuration. + +### Example + +```ts +import { + Configuration, + WebhooksApi, +} from ''; +import type { VerifyWebhookRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new WebhooksApi(config); + + const body = { + // string | A GUID for a Bitly webhook + webhook_guid: Wa1bcDefG23, + } satisfies VerifyWebhookRequest; + + try { + const data = await api.verifyWebhook(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhook_guid** | `string` | A GUID for a Bitly webhook | [Defaults to `undefined`] | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **500** | INTERNAL_ERROR | - | +| **503** | TEMPORARILY_UNAVAILABLE | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/src/models/BaseMetrics.ts b/src/models/BaseMetrics.ts index fb14443..0291285 100644 --- a/src/models/BaseMetrics.ts +++ b/src/models/BaseMetrics.ts @@ -33,7 +33,7 @@ export interface BaseMetrics { units?: number; /** * - * @type {string} + * @type {BaseMetricsFacetEnum} * @memberof BaseMetrics */ facet?: BaseMetricsFacetEnum; diff --git a/src/models/BaseScanMetrics.ts b/src/models/BaseScanMetrics.ts index 0443f6e..795c316 100644 --- a/src/models/BaseScanMetrics.ts +++ b/src/models/BaseScanMetrics.ts @@ -33,7 +33,7 @@ export interface BaseScanMetrics { units?: number; /** * - * @type {string} + * @type {BaseScanMetricsFacetEnum} * @memberof BaseScanMetrics */ facet?: BaseScanMetricsFacetEnum; diff --git a/src/models/BitlinkBody.ts b/src/models/BitlinkBody.ts index 8a976e6..fac9e56 100644 --- a/src/models/BitlinkBody.ts +++ b/src/models/BitlinkBody.ts @@ -124,7 +124,7 @@ export interface BitlinkBody { */ campaign_ids?: Array; /** - * Coming soon + * Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000) * @type {string} * @memberof BitlinkBody */ diff --git a/src/models/BitlinkScans.ts b/src/models/BitlinkScans.ts index c3dd2fc..5fc4eb9 100644 --- a/src/models/BitlinkScans.ts +++ b/src/models/BitlinkScans.ts @@ -41,7 +41,7 @@ export interface BitlinkScans { units?: number; /** * - * @type {string} + * @type {BitlinkScansUnitEnum} * @memberof BitlinkScans */ unit?: BitlinkScansUnitEnum; diff --git a/src/models/BitlinkScansSummary.ts b/src/models/BitlinkScansSummary.ts index 6672ec3..d5920c7 100644 --- a/src/models/BitlinkScansSummary.ts +++ b/src/models/BitlinkScansSummary.ts @@ -33,7 +33,7 @@ export interface BitlinkScansSummary { units?: number; /** * - * @type {string} + * @type {BitlinkScansSummaryUnitEnum} * @memberof BitlinkScansSummary */ unit?: BitlinkScansSummaryUnitEnum; diff --git a/src/models/BitlinkUpdate.ts b/src/models/BitlinkUpdate.ts index 967f583..06bb858 100644 --- a/src/models/BitlinkUpdate.ts +++ b/src/models/BitlinkUpdate.ts @@ -118,7 +118,7 @@ export interface BitlinkUpdate { */ campaign_ids?: Array; /** - * Coming soon + * Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000) * @type {string} * @memberof BitlinkUpdate */ diff --git a/src/models/BitlinkUpdateBody.ts b/src/models/BitlinkUpdateBody.ts index 69f3f91..c9f1a6c 100644 --- a/src/models/BitlinkUpdateBody.ts +++ b/src/models/BitlinkUpdateBody.ts @@ -58,7 +58,7 @@ export interface BitlinkUpdateBody { */ long_url?: string; /** - * Coming soon + * Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year. * @type {string} * @memberof BitlinkUpdateBody */ diff --git a/src/models/BulkUpdateRequest.ts b/src/models/BulkUpdateRequest.ts index eeeb818..c31ae25 100644 --- a/src/models/BulkUpdateRequest.ts +++ b/src/models/BulkUpdateRequest.ts @@ -21,7 +21,7 @@ import { mapValues } from '../runtime'; export interface BulkUpdateRequest { /** * archive or edit_tags - * @type {string} + * @type {BulkUpdateRequestActionEnum} * @memberof BulkUpdateRequest */ action: BulkUpdateRequestActionEnum; diff --git a/src/models/CityMetrics.ts b/src/models/CityMetrics.ts index d3fe0de..a1c5dd3 100644 --- a/src/models/CityMetrics.ts +++ b/src/models/CityMetrics.ts @@ -48,7 +48,7 @@ export interface CityMetrics { units?: number; /** * - * @type {string} + * @type {CityMetricsFacetEnum} * @memberof CityMetrics */ facet?: CityMetricsFacetEnum; diff --git a/src/models/CityScanMetrics.ts b/src/models/CityScanMetrics.ts index d975c45..e9f911d 100644 --- a/src/models/CityScanMetrics.ts +++ b/src/models/CityScanMetrics.ts @@ -48,7 +48,7 @@ export interface CityScanMetrics { units?: number; /** * - * @type {string} + * @type {CityScanMetricsFacetEnum} * @memberof CityScanMetrics */ facet?: CityScanMetricsFacetEnum; diff --git a/src/models/ClickMetrics.ts b/src/models/ClickMetrics.ts index 4b98480..942692a 100644 --- a/src/models/ClickMetrics.ts +++ b/src/models/ClickMetrics.ts @@ -41,7 +41,7 @@ export interface ClickMetrics { units?: number; /** * - * @type {string} + * @type {ClickMetricsFacetEnum} * @memberof ClickMetrics */ facet?: ClickMetricsFacetEnum; diff --git a/src/models/Clicks.ts b/src/models/Clicks.ts index c9306c4..2a4ad0f 100644 --- a/src/models/Clicks.ts +++ b/src/models/Clicks.ts @@ -41,7 +41,7 @@ export interface Clicks { units?: number; /** * - * @type {string} + * @type {ClicksUnitEnum} * @memberof Clicks */ unit?: ClicksUnitEnum; diff --git a/src/models/ClicksSummary.ts b/src/models/ClicksSummary.ts index 28bc083..461e248 100644 --- a/src/models/ClicksSummary.ts +++ b/src/models/ClicksSummary.ts @@ -33,7 +33,7 @@ export interface ClicksSummary { units?: number; /** * - * @type {string} + * @type {ClicksSummaryUnitEnum} * @memberof ClicksSummary */ unit?: ClicksSummaryUnitEnum; diff --git a/src/models/DeviceMetrics.ts b/src/models/DeviceMetrics.ts index facb4a1..bab3805 100644 --- a/src/models/DeviceMetrics.ts +++ b/src/models/DeviceMetrics.ts @@ -41,7 +41,7 @@ export interface DeviceMetrics { units?: number; /** * - * @type {string} + * @type {DeviceMetricsFacetEnum} * @memberof DeviceMetrics */ facet?: DeviceMetricsFacetEnum; diff --git a/src/models/Engagement.ts b/src/models/Engagement.ts new file mode 100644 index 0000000..e21096d --- /dev/null +++ b/src/models/Engagement.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Engagement + */ +export interface Engagement { + /** + * + * @type {number} + * @memberof Engagement + */ + lib_button_clicks?: number; + /** + * + * @type {number} + * @memberof Engagement + */ + clicks?: number; + /** + * + * @type {number} + * @memberof Engagement + */ + scans?: number; +} + +/** + * Check if a given object implements the Engagement interface. + */ +export function instanceOfEngagement(value: object): value is Engagement { + return true; +} + +export function EngagementFromJSON(json: any): Engagement { + return EngagementFromJSONTyped(json, false); +} + +export function EngagementFromJSONTyped(json: any, ignoreDiscriminator: boolean): Engagement { + if (json == null) { + return json; + } + return { + + 'lib_button_clicks': json['lib_button_clicks'] == null ? undefined : json['lib_button_clicks'], + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + 'scans': json['scans'] == null ? undefined : json['scans'], + }; +} + +export function EngagementToJSON(json: any): Engagement { + return EngagementToJSONTyped(json, false); +} + +export function EngagementToJSONTyped(value?: Engagement | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'lib_button_clicks': value['lib_button_clicks'], + 'clicks': value['clicks'], + 'scans': value['scans'], + }; +} + diff --git a/src/models/Engagements.ts b/src/models/Engagements.ts new file mode 100644 index 0000000..33ade6f --- /dev/null +++ b/src/models/Engagements.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Engagement } from './Engagement'; +import { + EngagementFromJSON, + EngagementFromJSONTyped, + EngagementToJSON, + EngagementToJSONTyped, +} from './Engagement'; + +/** + * + * @export + * @interface Engagements + */ +export interface Engagements { + /** + * + * @type {number} + * @memberof Engagements + */ + engagement_count?: number; + /** + * + * @type {Engagement} + * @memberof Engagements + */ + engagements?: Engagement; + /** + * + * @type {string} + * @memberof Engagements + */ + date?: string; +} + +/** + * Check if a given object implements the Engagements interface. + */ +export function instanceOfEngagements(value: object): value is Engagements { + return true; +} + +export function EngagementsFromJSON(json: any): Engagements { + return EngagementsFromJSONTyped(json, false); +} + +export function EngagementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Engagements { + if (json == null) { + return json; + } + return { + + 'engagement_count': json['engagement_count'] == null ? undefined : json['engagement_count'], + 'engagements': json['engagements'] == null ? undefined : EngagementFromJSON(json['engagements']), + 'date': json['date'] == null ? undefined : json['date'], + }; +} + +export function EngagementsToJSON(json: any): Engagements { + return EngagementsToJSONTyped(json, false); +} + +export function EngagementsToJSONTyped(value?: Engagements | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'engagement_count': value['engagement_count'], + 'engagements': EngagementToJSON(value['engagements']), + 'date': value['date'], + }; +} + diff --git a/src/models/FullShorten.ts b/src/models/FullShorten.ts index 1ee713c..160fa13 100644 --- a/src/models/FullShorten.ts +++ b/src/models/FullShorten.ts @@ -82,7 +82,7 @@ export interface FullShorten { */ bitlink_id?: string; /** - * Coming soon + * Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year. * @type {string} * @memberof FullShorten */ diff --git a/src/models/GetGroupLinkClicksByDevice200Response.ts b/src/models/GetGroupLinkClicksByDevice200Response.ts index 3243ab3..6cd6880 100644 --- a/src/models/GetGroupLinkClicksByDevice200Response.ts +++ b/src/models/GetGroupLinkClicksByDevice200Response.ts @@ -41,7 +41,7 @@ export interface GetGroupLinkClicksByDevice200Response { units?: number; /** * - * @type {string} + * @type {GetGroupLinkClicksByDevice200ResponseFacetEnum} * @memberof GetGroupLinkClicksByDevice200Response */ facet?: GetGroupLinkClicksByDevice200ResponseFacetEnum; diff --git a/src/models/Metrics.ts b/src/models/Metrics.ts index 5906039..b6958fc 100644 --- a/src/models/Metrics.ts +++ b/src/models/Metrics.ts @@ -41,7 +41,7 @@ export interface Metrics { units?: number; /** * - * @type {string} + * @type {MetricsFacetEnum} * @memberof Metrics */ facet?: MetricsFacetEnum; diff --git a/src/models/Organization.ts b/src/models/Organization.ts index 8d450b2..2d9fe73 100644 --- a/src/models/Organization.ts +++ b/src/models/Organization.ts @@ -85,7 +85,39 @@ export interface Organization { * @memberof Organization */ bsds: Array; + /** + * SSO authentication requirement for this organization. Possible values: "none", "any". Omitted when no auth requirements are configured. + * + * @type {OrganizationRequireSsoEnum} + * @memberof Organization + */ + require_sso?: OrganizationRequireSsoEnum; + /** + * Two-factor authentication requirement for this organization. Possible values: "none", "sms". Omitted when no auth requirements are configured. + * + * @type {OrganizationRequire2faEnum} + * @memberof Organization + */ + require_2fa?: OrganizationRequire2faEnum; +} + +/** +* @export +* @enum {string} +*/ +export enum OrganizationRequireSsoEnum { + none = 'none', + any = 'any' } +/** +* @export +* @enum {string} +*/ +export enum OrganizationRequire2faEnum { + none = 'none', + sms = 'sms' +} + /** * Check if a given object implements the Organization interface. @@ -125,6 +157,8 @@ export function OrganizationFromJSONTyped(json: any, ignoreDiscriminator: boolea 'created': json['created'], 'modified': json['modified'], 'bsds': json['bsds'], + 'require_sso': json['require_sso'] == null ? undefined : json['require_sso'], + 'require_2fa': json['require_2fa'] == null ? undefined : json['require_2fa'], }; } @@ -150,6 +184,8 @@ export function OrganizationToJSONTyped(value?: Organization | null, ignoreDiscr 'created': value['created'], 'modified': value['modified'], 'bsds': value['bsds'], + 'require_sso': value['require_sso'], + 'require_2fa': value['require_2fa'], }; } diff --git a/src/models/PublicCreateQRCodeRequest.ts b/src/models/PublicCreateQRCodeRequest.ts index 10d0961..08b3018 100644 --- a/src/models/PublicCreateQRCodeRequest.ts +++ b/src/models/PublicCreateQRCodeRequest.ts @@ -78,11 +78,17 @@ export interface PublicCreateQRCodeRequest { */ gs1?: GS1Metadata; /** - * Coming soon + * Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year. * @type {string} * @memberof PublicCreateQRCodeRequest */ expiration_at?: string; + /** + * A list of tags to add to the QR code + * @type {Array} + * @memberof PublicCreateQRCodeRequest + */ + tags?: Array; } /** @@ -111,6 +117,7 @@ export function PublicCreateQRCodeRequestFromJSONTyped(json: any, ignoreDiscrimi 'destination': QRCodeDestinationFromJSON(json['destination']), 'gs1': json['gs1'] == null ? undefined : GS1MetadataFromJSON(json['gs1']), 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'tags': json['tags'] == null ? undefined : json['tags'], }; } @@ -132,6 +139,7 @@ export function PublicCreateQRCodeRequestToJSONTyped(value?: PublicCreateQRCodeR 'destination': QRCodeDestinationToJSON(value['destination']), 'gs1': GS1MetadataToJSON(value['gs1']), 'expiration_at': value['expiration_at'], + 'tags': value['tags'], }; } diff --git a/src/models/PublicCreateStaticQRCodeRequest.ts b/src/models/PublicCreateStaticQRCodeRequest.ts new file mode 100644 index 0000000..2927664 --- /dev/null +++ b/src/models/PublicCreateStaticQRCodeRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { QRCodeCustomizationsStaticPublic } from './QRCodeCustomizationsStaticPublic'; +import { + QRCodeCustomizationsStaticPublicFromJSON, + QRCodeCustomizationsStaticPublicFromJSONTyped, + QRCodeCustomizationsStaticPublicToJSON, + QRCodeCustomizationsStaticPublicToJSONTyped, +} from './QRCodeCustomizationsStaticPublic'; + +/** + * Request body for generating a static QR code image. Customizations such as gradient, background_gradient, frame, text and logo are not supported. + * @export + * @interface PublicCreateStaticQRCodeRequest + */ +export interface PublicCreateStaticQRCodeRequest { + /** + * The raw content to encode in the QR code (e.g. a URL). + * @type {string} + * @memberof PublicCreateStaticQRCodeRequest + */ + content: string; + /** + * The group (brand) GUID used for access control and analytics. + * @type {string} + * @memberof PublicCreateStaticQRCodeRequest + */ + group_guid: string; + /** + * + * @type {QRCodeCustomizationsStaticPublic} + * @memberof PublicCreateStaticQRCodeRequest + */ + render_customizations?: QRCodeCustomizationsStaticPublic; +} + +/** + * Check if a given object implements the PublicCreateStaticQRCodeRequest interface. + */ +export function instanceOfPublicCreateStaticQRCodeRequest(value: object): value is PublicCreateStaticQRCodeRequest { + if (!('content' in value) || value['content'] === undefined) return false; + if (!('group_guid' in value) || value['group_guid'] === undefined) return false; + return true; +} + +export function PublicCreateStaticQRCodeRequestFromJSON(json: any): PublicCreateStaticQRCodeRequest { + return PublicCreateStaticQRCodeRequestFromJSONTyped(json, false); +} + +export function PublicCreateStaticQRCodeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicCreateStaticQRCodeRequest { + if (json == null) { + return json; + } + return { + + 'content': json['content'], + 'group_guid': json['group_guid'], + 'render_customizations': json['render_customizations'] == null ? undefined : QRCodeCustomizationsStaticPublicFromJSON(json['render_customizations']), + }; +} + +export function PublicCreateStaticQRCodeRequestToJSON(json: any): PublicCreateStaticQRCodeRequest { + return PublicCreateStaticQRCodeRequestToJSONTyped(json, false); +} + +export function PublicCreateStaticQRCodeRequestToJSONTyped(value?: PublicCreateStaticQRCodeRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content': value['content'], + 'group_guid': value['group_guid'], + 'render_customizations': QRCodeCustomizationsStaticPublicToJSON(value['render_customizations']), + }; +} + diff --git a/src/models/PublicStaticQRCodeResponse.ts b/src/models/PublicStaticQRCodeResponse.ts new file mode 100644 index 0000000..1001590 --- /dev/null +++ b/src/models/PublicStaticQRCodeResponse.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response containing a generated static QR code image. + * @export + * @interface PublicStaticQRCodeResponse + */ +export interface PublicStaticQRCodeResponse { + /** + * The image data, base64-encoded. Format is SVG or PNG depending on the requested format. + * @type {string} + * @memberof PublicStaticQRCodeResponse + */ + image?: string; +} + +/** + * Check if a given object implements the PublicStaticQRCodeResponse interface. + */ +export function instanceOfPublicStaticQRCodeResponse(value: object): value is PublicStaticQRCodeResponse { + return true; +} + +export function PublicStaticQRCodeResponseFromJSON(json: any): PublicStaticQRCodeResponse { + return PublicStaticQRCodeResponseFromJSONTyped(json, false); +} + +export function PublicStaticQRCodeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicStaticQRCodeResponse { + if (json == null) { + return json; + } + return { + + 'image': json['image'] == null ? undefined : json['image'], + }; +} + +export function PublicStaticQRCodeResponseToJSON(json: any): PublicStaticQRCodeResponse { + return PublicStaticQRCodeResponseToJSONTyped(json, false); +} + +export function PublicStaticQRCodeResponseToJSONTyped(value?: PublicStaticQRCodeResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'image': value['image'], + }; +} + diff --git a/src/models/PublicUpdateQRCodeRequest.ts b/src/models/PublicUpdateQRCodeRequest.ts index ae9580d..30838d3 100644 --- a/src/models/PublicUpdateQRCodeRequest.ts +++ b/src/models/PublicUpdateQRCodeRequest.ts @@ -46,11 +46,17 @@ export interface PublicUpdateQRCodeRequest { */ archived?: boolean; /** - * Coming soon + * Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year. * @type {string} * @memberof PublicUpdateQRCodeRequest */ expiration_at?: string; + /** + * A list of tags to add to the QR code + * @type {Array} + * @memberof PublicUpdateQRCodeRequest + */ + tags?: Array; } /** @@ -74,6 +80,7 @@ export function PublicUpdateQRCodeRequestFromJSONTyped(json: any, ignoreDiscrimi 'render_customizations': json['render_customizations'] == null ? undefined : QRCodeCustomizationsPublicFromJSON(json['render_customizations']), 'archived': json['archived'] == null ? undefined : json['archived'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'tags': json['tags'] == null ? undefined : json['tags'], }; } @@ -92,6 +99,7 @@ export function PublicUpdateQRCodeRequestToJSONTyped(value?: PublicUpdateQRCodeR 'render_customizations': QRCodeCustomizationsPublicToJSON(value['render_customizations']), 'archived': value['archived'], 'expiration_at': value['expiration_at'], + 'tags': value['tags'], }; } diff --git a/src/models/QRCodeCorner.ts b/src/models/QRCodeCorner.ts index a83b9fd..0a49cfa 100644 --- a/src/models/QRCodeCorner.ts +++ b/src/models/QRCodeCorner.ts @@ -33,7 +33,7 @@ export interface QRCodeCorner { outer_color?: string; /** * The shape one of the QR code's corners should take - * @type {string} + * @type {QRCodeCornerShapeEnum} * @memberof QRCodeCorner */ shape?: QRCodeCornerShapeEnum; diff --git a/src/models/QRCodeCustomizationsStaticPublic.ts b/src/models/QRCodeCustomizationsStaticPublic.ts new file mode 100644 index 0000000..4dabae8 --- /dev/null +++ b/src/models/QRCodeCustomizationsStaticPublic.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { QRCodeDotPatternType } from './QRCodeDotPatternType'; +import { + QRCodeDotPatternTypeFromJSON, + QRCodeDotPatternTypeFromJSONTyped, + QRCodeDotPatternTypeToJSON, + QRCodeDotPatternTypeToJSONTyped, +} from './QRCodeDotPatternType'; +import type { QRCodeSpecSettingsPublic } from './QRCodeSpecSettingsPublic'; +import { + QRCodeSpecSettingsPublicFromJSON, + QRCodeSpecSettingsPublicFromJSONTyped, + QRCodeSpecSettingsPublicToJSON, + QRCodeSpecSettingsPublicToJSONTyped, +} from './QRCodeSpecSettingsPublic'; +import type { QRCodeCorners } from './QRCodeCorners'; +import { + QRCodeCornersFromJSON, + QRCodeCornersFromJSONTyped, + QRCodeCornersToJSON, + QRCodeCornersToJSONTyped, +} from './QRCodeCorners'; +import type { QRCodeBranding } from './QRCodeBranding'; +import { + QRCodeBrandingFromJSON, + QRCodeBrandingFromJSONTyped, + QRCodeBrandingToJSON, + QRCodeBrandingToJSONTyped, +} from './QRCodeBranding'; + +/** + * Appearance options for a static QR code. gradient, background_gradient, frame, text, and logo are not supported. + * @export + * @interface QRCodeCustomizationsStaticPublic + */ +export interface QRCodeCustomizationsStaticPublic { + /** + * The QR code's background color in hex code format with values for alpha channel + * @type {string} + * @memberof QRCodeCustomizationsStaticPublic + */ + background_color?: string; + /** + * The QR code's dot pattern color in hex code format + * @type {string} + * @memberof QRCodeCustomizationsStaticPublic + */ + dot_pattern_color?: string; + /** + * + * @type {QRCodeDotPatternType} + * @memberof QRCodeCustomizationsStaticPublic + */ + dot_pattern_type?: QRCodeDotPatternType; + /** + * + * @type {QRCodeCorners} + * @memberof QRCodeCustomizationsStaticPublic + */ + corners?: QRCodeCorners; + /** + * + * @type {QRCodeBranding} + * @memberof QRCodeCustomizationsStaticPublic + */ + branding?: QRCodeBranding; + /** + * + * @type {QRCodeSpecSettingsPublic} + * @memberof QRCodeCustomizationsStaticPublic + */ + spec_settings?: QRCodeSpecSettingsPublic; +} + + + +/** + * Check if a given object implements the QRCodeCustomizationsStaticPublic interface. + */ +export function instanceOfQRCodeCustomizationsStaticPublic(value: object): value is QRCodeCustomizationsStaticPublic { + return true; +} + +export function QRCodeCustomizationsStaticPublicFromJSON(json: any): QRCodeCustomizationsStaticPublic { + return QRCodeCustomizationsStaticPublicFromJSONTyped(json, false); +} + +export function QRCodeCustomizationsStaticPublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): QRCodeCustomizationsStaticPublic { + if (json == null) { + return json; + } + return { + + 'background_color': json['background_color'] == null ? undefined : json['background_color'], + 'dot_pattern_color': json['dot_pattern_color'] == null ? undefined : json['dot_pattern_color'], + 'dot_pattern_type': json['dot_pattern_type'] == null ? undefined : QRCodeDotPatternTypeFromJSON(json['dot_pattern_type']), + 'corners': json['corners'] == null ? undefined : QRCodeCornersFromJSON(json['corners']), + 'branding': json['branding'] == null ? undefined : QRCodeBrandingFromJSON(json['branding']), + 'spec_settings': json['spec_settings'] == null ? undefined : QRCodeSpecSettingsPublicFromJSON(json['spec_settings']), + }; +} + +export function QRCodeCustomizationsStaticPublicToJSON(json: any): QRCodeCustomizationsStaticPublic { + return QRCodeCustomizationsStaticPublicToJSONTyped(json, false); +} + +export function QRCodeCustomizationsStaticPublicToJSONTyped(value?: QRCodeCustomizationsStaticPublic | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'background_color': value['background_color'], + 'dot_pattern_color': value['dot_pattern_color'], + 'dot_pattern_type': QRCodeDotPatternTypeToJSON(value['dot_pattern_type']), + 'corners': QRCodeCornersToJSON(value['corners']), + 'branding': QRCodeBrandingToJSON(value['branding']), + 'spec_settings': QRCodeSpecSettingsPublicToJSON(value['spec_settings']), + }; +} + diff --git a/src/models/QRCodeDetails.ts b/src/models/QRCodeDetails.ts index 2520fc6..b398138 100644 --- a/src/models/QRCodeDetails.ts +++ b/src/models/QRCodeDetails.ts @@ -114,7 +114,7 @@ export interface QRCodeDetails { */ modified?: string; /** - * Coming soon + * Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000) * @type {string} * @memberof QRCodeDetails */ diff --git a/src/models/QRCodeGradient.ts b/src/models/QRCodeGradient.ts index 0fda83d..60e0a3f 100644 --- a/src/models/QRCodeGradient.ts +++ b/src/models/QRCodeGradient.ts @@ -29,7 +29,7 @@ import { export interface QRCodeGradient { /** * The style of the gradient. Can be either linear or radial. - * @type {string} + * @type {QRCodeGradientStyleEnum} * @memberof QRCodeGradient */ style?: QRCodeGradientStyleEnum; diff --git a/src/models/QRCodeMinimal.ts b/src/models/QRCodeMinimal.ts index 6bd8ea5..97ecab1 100644 --- a/src/models/QRCodeMinimal.ts +++ b/src/models/QRCodeMinimal.ts @@ -87,6 +87,12 @@ export interface QRCodeMinimal { * @memberof QRCodeMinimal */ created_by?: string; + /** + * A list of tags associated with QR code + * @type {Array} + * @memberof QRCodeMinimal + */ + tags?: Array; /** * * @type {boolean} @@ -94,7 +100,7 @@ export interface QRCodeMinimal { */ archived?: boolean; /** - * Coming soon + * Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000) * @type {string} * @memberof QRCodeMinimal */ @@ -142,6 +148,7 @@ export function QRCodeMinimalFromJSONTyped(json: any, ignoreDiscriminator: boole 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], 'is_gs1': json['is_gs1'] == null ? undefined : json['is_gs1'], 'created_by': json['created_by'] == null ? undefined : json['created_by'], + 'tags': json['tags'] == null ? undefined : json['tags'], 'archived': json['archived'] == null ? undefined : json['archived'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], 'created': json['created'] == null ? undefined : json['created'], @@ -170,6 +177,7 @@ export function QRCodeMinimalToJSONTyped(value?: QRCodeMinimal | null, ignoreDis 'bitlink_id': value['bitlink_id'], 'is_gs1': value['is_gs1'], 'created_by': value['created_by'], + 'tags': value['tags'], 'archived': value['archived'], 'expiration_at': value['expiration_at'], 'created': value['created'], diff --git a/src/models/ReferrersByDomains.ts b/src/models/ReferrersByDomains.ts index addeaba..37260e7 100644 --- a/src/models/ReferrersByDomains.ts +++ b/src/models/ReferrersByDomains.ts @@ -41,7 +41,7 @@ export interface ReferrersByDomains { units?: number; /** * - * @type {string} + * @type {ReferrersByDomainsFacetEnum} * @memberof ReferrersByDomains */ facet?: ReferrersByDomainsFacetEnum; diff --git a/src/models/ScanMetrics.ts b/src/models/ScanMetrics.ts index 4a19c0a..b096b5e 100644 --- a/src/models/ScanMetrics.ts +++ b/src/models/ScanMetrics.ts @@ -41,7 +41,7 @@ export interface ScanMetrics { units?: number; /** * - * @type {string} + * @type {ScanMetricsFacetEnum} * @memberof ScanMetrics */ facet?: ScanMetricsFacetEnum; diff --git a/src/models/TotalEngagements.ts b/src/models/TotalEngagements.ts new file mode 100644 index 0000000..0298862 --- /dev/null +++ b/src/models/TotalEngagements.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Engagements } from './Engagements'; +import { + EngagementsFromJSON, + EngagementsFromJSONTyped, + EngagementsToJSON, + EngagementsToJSONTyped, +} from './Engagements'; + +/** + * + * @export + * @interface TotalEngagements + */ +export interface TotalEngagements { + /** + * + * @type {Array} + * @memberof TotalEngagements + */ + engagements?: Array; + /** + * + * @type {number} + * @memberof TotalEngagements + */ + units?: number; + /** + * + * @type {TotalEngagementsUnitEnum} + * @memberof TotalEngagements + */ + unit?: TotalEngagementsUnitEnum; + /** + * + * @type {string} + * @memberof TotalEngagements + */ + unit_reference?: string; +} + +/** +* @export +* @enum {string} +*/ +export enum TotalEngagementsUnitEnum { + minute = 'minute', + hour = 'hour', + day = 'day', + week = 'week', + month = 'month' +} + + +/** + * Check if a given object implements the TotalEngagements interface. + */ +export function instanceOfTotalEngagements(value: object): value is TotalEngagements { + return true; +} + +export function TotalEngagementsFromJSON(json: any): TotalEngagements { + return TotalEngagementsFromJSONTyped(json, false); +} + +export function TotalEngagementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TotalEngagements { + if (json == null) { + return json; + } + return { + + 'engagements': json['engagements'] == null ? undefined : ((json['engagements'] as Array).map(EngagementsFromJSON)), + 'units': json['units'] == null ? undefined : json['units'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + }; +} + +export function TotalEngagementsToJSON(json: any): TotalEngagements { + return TotalEngagementsToJSONTyped(json, false); +} + +export function TotalEngagementsToJSONTyped(value?: TotalEngagements | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'engagements': value['engagements'] == null ? undefined : ((value['engagements'] as Array).map(EngagementsToJSON)), + 'units': value['units'], + 'unit': value['unit'], + 'unit_reference': value['unit_reference'], + }; +} + diff --git a/src/models/TotalEngagementsSummary.ts b/src/models/TotalEngagementsSummary.ts new file mode 100644 index 0000000..a624285 --- /dev/null +++ b/src/models/TotalEngagementsSummary.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Bitly API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Engagement } from './Engagement'; +import { + EngagementFromJSON, + EngagementFromJSONTyped, + EngagementToJSON, + EngagementToJSONTyped, +} from './Engagement'; + +/** + * + * @export + * @interface TotalEngagementsSummary + */ +export interface TotalEngagementsSummary { + /** + * + * @type {number} + * @memberof TotalEngagementsSummary + */ + total_engagements?: number; + /** + * + * @type {Engagement} + * @memberof TotalEngagementsSummary + */ + engagements?: Engagement; + /** + * + * @type {number} + * @memberof TotalEngagementsSummary + */ + units?: number; + /** + * + * @type {TotalEngagementsSummaryUnitEnum} + * @memberof TotalEngagementsSummary + */ + unit?: TotalEngagementsSummaryUnitEnum; + /** + * + * @type {string} + * @memberof TotalEngagementsSummary + */ + unit_reference?: string; +} + +/** +* @export +* @enum {string} +*/ +export enum TotalEngagementsSummaryUnitEnum { + minute = 'minute', + hour = 'hour', + day = 'day', + week = 'week', + month = 'month' +} + + +/** + * Check if a given object implements the TotalEngagementsSummary interface. + */ +export function instanceOfTotalEngagementsSummary(value: object): value is TotalEngagementsSummary { + return true; +} + +export function TotalEngagementsSummaryFromJSON(json: any): TotalEngagementsSummary { + return TotalEngagementsSummaryFromJSONTyped(json, false); +} + +export function TotalEngagementsSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): TotalEngagementsSummary { + if (json == null) { + return json; + } + return { + + 'total_engagements': json['total_engagements'] == null ? undefined : json['total_engagements'], + 'engagements': json['engagements'] == null ? undefined : EngagementFromJSON(json['engagements']), + 'units': json['units'] == null ? undefined : json['units'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + }; +} + +export function TotalEngagementsSummaryToJSON(json: any): TotalEngagementsSummary { + return TotalEngagementsSummaryToJSONTyped(json, false); +} + +export function TotalEngagementsSummaryToJSONTyped(value?: TotalEngagementsSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'total_engagements': value['total_engagements'], + 'engagements': EngagementToJSON(value['engagements']), + 'units': value['units'], + 'unit': value['unit'], + 'unit_reference': value['unit_reference'], + }; +} + diff --git a/src/models/index.ts b/src/models/index.ts index 0551390..6460360 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -43,6 +43,8 @@ export * from './DeletedQRCode'; export * from './DeviceMetric'; export * from './DeviceMetrics'; export * from './Email'; +export * from './Engagement'; +export * from './Engagements'; export * from './ExpandBitlink'; export * from './ExpandedBitlink'; export * from './ExpectationFailed'; @@ -87,13 +89,16 @@ export * from './PlanLimits'; export * from './PlatformLimit'; export * from './PlatformLimits'; export * from './PublicCreateQRCodeRequest'; +export * from './PublicCreateStaticQRCodeRequest'; export * from './PublicDeleteQRCodeResponse'; export * from './PublicQRCodeImageResponse'; +export * from './PublicStaticQRCodeResponse'; export * from './PublicUpdateQRCodeRequest'; export * from './QRCodeBranding'; export * from './QRCodeCorner'; export * from './QRCodeCorners'; export * from './QRCodeCustomizationsPublic'; +export * from './QRCodeCustomizationsStaticPublic'; export * from './QRCodeDestination'; export * from './QRCodeDetails'; export * from './QRCodeDotPatternType'; @@ -123,6 +128,8 @@ export * from './TemporarilyUnavailable'; export * from './Text'; export * from './TimeUnit'; export * from './TimeUnitDWM'; +export * from './TotalEngagements'; +export * from './TotalEngagementsSummary'; export * from './UnprocessableEntity'; export * from './UpdateCustomBitlink'; export * from './UpgradeRequired'; diff --git a/src/runtime.ts b/src/runtime.ts index ccb021d..ba0f894 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -261,6 +261,12 @@ export class ResponseError extends Error { override name: "ResponseError" = "ResponseError"; constructor(public response: Response, msg?: string) { super(msg); + + // restore prototype chain + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } } } @@ -268,6 +274,12 @@ export class FetchError extends Error { override name: "FetchError" = "FetchError"; constructor(public cause: Error, msg?: string) { super(msg); + + // restore prototype chain + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } } } @@ -275,6 +287,12 @@ export class RequiredError extends Error { override name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + + // restore prototype chain + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } } }