diff --git a/src/apis/BitlinksApi.ts b/src/apis/BitlinksApi.ts index 4129a11..1f33977 100644 --- a/src/apis/BitlinksApi.ts +++ b/src/apis/BitlinksApi.ts @@ -216,6 +216,7 @@ export interface GetBitlinksByGroupRequest { has_qr_codes?: GetBitlinksByGroupHasQrCodesEnum; is_expired?: GetBitlinksByGroupIsExpiredEnum; has_expiration?: GetBitlinksByGroupHasExpirationEnum; + has_dynamic_routing?: GetBitlinksByGroupHasDynamicRoutingEnum; tags?: Array; launchpad_ids?: Array; encoding_login?: Array; @@ -691,6 +692,10 @@ export class BitlinksApi extends runtime.BaseAPI { queryParameters['has_expiration'] = requestParameters['has_expiration']; } + if (requestParameters['has_dynamic_routing'] != null) { + queryParameters['has_dynamic_routing'] = requestParameters['has_dynamic_routing']; + } + if (requestParameters['tags'] != null) { queryParameters['tags'] = requestParameters['tags']; } @@ -2009,6 +2014,15 @@ export enum GetBitlinksByGroupHasExpirationEnum { off = 'off', both = 'both' } +/** + * @export + * @enum {string} + */ +export enum GetBitlinksByGroupHasDynamicRoutingEnum { + on = 'on', + off = 'off', + both = 'both' +} /** * @export * @enum {string} diff --git a/src/apis/BitlySitesApi.ts b/src/apis/BitlySitesApi.ts new file mode 100644 index 0000000..ba9f633 --- /dev/null +++ b/src/apis/BitlySitesApi.ts @@ -0,0 +1,3078 @@ +/* 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 * as runtime from '../runtime'; +import { + type AggregateClicksForBitlinks, + AggregateClicksForBitlinksFromJSON, + AggregateClicksForBitlinksToJSON, +} from '../models/AggregateClicksForBitlinks'; +import { + type AggregateClicksForBitlinksByCitiesFacet, + AggregateClicksForBitlinksByCitiesFacetFromJSON, + AggregateClicksForBitlinksByCitiesFacetToJSON, +} from '../models/AggregateClicksForBitlinksByCitiesFacet'; +import { + type AggregateClicksForBitlinksByFacet, + AggregateClicksForBitlinksByFacetFromJSON, + AggregateClicksForBitlinksByFacetToJSON, +} from '../models/AggregateClicksForBitlinksByFacet'; +import { + type ApplyTemplateRequest, + ApplyTemplateRequestFromJSON, + ApplyTemplateRequestToJSON, +} from '../models/ApplyTemplateRequest'; +import { + type BadRequest, + BadRequestFromJSON, + BadRequestToJSON, +} from '../models/BadRequest'; +import { + type BitlySite, + BitlySiteFromJSON, + BitlySiteToJSON, +} from '../models/BitlySite'; +import { + type BitlySiteAppearance, + BitlySiteAppearanceFromJSON, + BitlySiteAppearanceToJSON, +} from '../models/BitlySiteAppearance'; +import { + type BitlySites, + BitlySitesFromJSON, + BitlySitesToJSON, +} from '../models/BitlySites'; +import { + type CreateLaunchpad, + CreateLaunchpadFromJSON, + CreateLaunchpadToJSON, +} from '../models/CreateLaunchpad'; +import { + type Forbidden, + ForbiddenFromJSON, + ForbiddenToJSON, +} from '../models/Forbidden'; +import { + type GetAggregateSitesOverview200Response, + GetAggregateSitesOverview200ResponseFromJSON, + GetAggregateSitesOverview200ResponseToJSON, +} from '../models/GetAggregateSitesOverview200Response'; +import { + type ImageUploadResponse, + ImageUploadResponseFromJSON, + ImageUploadResponseToJSON, +} from '../models/ImageUploadResponse'; +import { + type InternalError, + InternalErrorFromJSON, + InternalErrorToJSON, +} from '../models/InternalError'; +import { + type NotFound, + NotFoundFromJSON, + NotFoundToJSON, +} from '../models/NotFound'; +import { + type PrevalidateYouTubeVideoRequest, + PrevalidateYouTubeVideoRequestFromJSON, + PrevalidateYouTubeVideoRequestToJSON, +} from '../models/PrevalidateYouTubeVideoRequest'; +import { + type SiteBlock, + SiteBlockFromJSON, + SiteBlockToJSON, +} from '../models/SiteBlock'; +import { + type SiteBlockContainerRequest, + SiteBlockContainerRequestFromJSON, + SiteBlockContainerRequestToJSON, +} from '../models/SiteBlockContainerRequest'; +import { + type SiteBlockCreateRequest, + SiteBlockCreateRequestFromJSON, + SiteBlockCreateRequestToJSON, +} from '../models/SiteBlockCreateRequest'; +import { + type SiteBlockRequest, + SiteBlockRequestFromJSON, + SiteBlockRequestToJSON, +} from '../models/SiteBlockRequest'; +import { + type SiteCityViewMetrics, + SiteCityViewMetricsFromJSON, + SiteCityViewMetricsToJSON, +} from '../models/SiteCityViewMetrics'; +import { + type SiteCloneRequest, + SiteCloneRequestFromJSON, + SiteCloneRequestToJSON, +} from '../models/SiteCloneRequest'; +import { + type SiteImageUpload, + SiteImageUploadFromJSON, + SiteImageUploadToJSON, +} from '../models/SiteImageUpload'; +import { + type SiteLinkPerformance, + SiteLinkPerformanceFromJSON, + SiteLinkPerformanceToJSON, +} from '../models/SiteLinkPerformance'; +import { + type SiteViewMetrics, + SiteViewMetricsFromJSON, + SiteViewMetricsToJSON, +} from '../models/SiteViewMetrics'; +import { + type SiteViewsSummary, + SiteViewsSummaryFromJSON, + SiteViewsSummaryToJSON, +} from '../models/SiteViewsSummary'; +import { + type SortedButtons, + SortedButtonsFromJSON, + SortedButtonsToJSON, +} from '../models/SortedButtons'; +import { + type Template, + TemplateFromJSON, + TemplateToJSON, +} from '../models/Template'; +import { + type TemporarilyUnavailable, + TemporarilyUnavailableFromJSON, + TemporarilyUnavailableToJSON, +} from '../models/TemporarilyUnavailable'; +import { + type TimeUnit, + TimeUnitFromJSON, + TimeUnitToJSON, +} from '../models/TimeUnit'; +import { + type UnprocessableEntity, + UnprocessableEntityFromJSON, + UnprocessableEntityToJSON, +} from '../models/UnprocessableEntity'; +import { + type UpdateSite, + UpdateSiteFromJSON, + UpdateSiteToJSON, +} from '../models/UpdateSite'; +import { + type UpgradeRequired, + UpgradeRequiredFromJSON, + UpgradeRequiredToJSON, +} from '../models/UpgradeRequired'; +import { + type YoutubeVideoRequest, + YoutubeVideoRequestFromJSON, + YoutubeVideoRequestToJSON, +} from '../models/YoutubeVideoRequest'; + +export interface ApplyTemplateOperationRequest { + site_id: string; + apply_template_request?: ApplyTemplateRequest; +} + +export interface CloneSiteRequest { + site_id: string; + site_clone_request: SiteCloneRequest; +} + +export interface CreateContainerRequest { + site_id: string; + site_block_container_request: SiteBlockContainerRequest; +} + +export interface CreateSiteRequest { + create_launchpad: CreateLaunchpad; +} + +export interface CreateSiteBlockRequest { + site_id: string; + site_block_create_request: SiteBlockCreateRequest; +} + +export interface CreateSiteImageRequest { + site_id: string; + site_image_upload: SiteImageUpload; +} + +export interface DeleteSiteRequest { + site_id: string; +} + +export interface DeleteSiteBlockRequest { + site_id: string; + block_id: string; +} + +export interface DeleteSiteRedirectRequest { + site_id: string; + domain: string; + keyword: string; +} + +export interface DiscardSiteDraftRequest { + site_id: string; +} + +export interface GetAggregateSiteViewsByCityRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetAggregateSiteViewsByCountryRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetAggregateSiteViewsByDeviceRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetAggregateSiteViewsByReferrerRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetAggregateSiteViewsOverTimeRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetAggregateSitesOverviewRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetLaunchpadDigitalBusinessCardDownloadsOverTimeRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetLinkPerformanceForSiteRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; + page?: number; +} + +export interface GetMetricsForSiteByCitiesRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; +} + +export interface GetMetricsForSiteByDevicesRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; +} + +export interface GetMetricsForSiteByReferrersRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; +} + +export interface GetMetricsForSitesByCountriesRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; +} + +export interface GetSiteRequest { + site_id: string; +} + +export interface GetSiteClicksByCitiesRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetSiteClicksByCountriesRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetSiteClicksByDevicesRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetSiteClicksOverTimeRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + report_guid?: string; +} + +export interface GetSiteFilteredTopPageButtonsRequest { + unit: TimeUnit; + units: number; + site?: Array; + unit_reference?: string; + brand_guid?: string; + report_guid?: string; +} + +export interface GetSitesForGroupRequest { + group_guid: string; + search_after?: string; + size?: number; + sites_url_param?: string; +} + +export interface GetTemplatesRequest { + category?: GetTemplatesCategoryEnum; +} + +export interface GetViewsForSiteRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; +} + +export interface GetViewsSummaryForSiteRequest { + site_id: string; + units: number; + unit?: TimeUnit; + size?: number; + unit_reference?: string; +} + +export interface PrevalidateYouTubeVideoButtonRequest { + launchpad_id: string; + prevalidate_you_tube_video_request: PrevalidateYouTubeVideoRequest; +} + +export interface PublishSiteRequest { + site_id: string; +} + +export interface UpdateSiteRequest { + site_id: string; + update_site: UpdateSite; +} + +export interface UpdateSiteAppearanceRequest { + site_id: string; + bitly_site_appearance: BitlySiteAppearance; +} + +export interface UpdateSiteBlockRequest { + site_id: string; + block_id: string; + site_block_request: SiteBlockRequest; +} + +/** + * + */ +export class BitlySitesApi extends runtime.BaseAPI { + + /** + * Creates request options for applyTemplate without sending the request + */ + async applyTemplateRequestOpts(requestParameters: ApplyTemplateOperationRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling applyTemplate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/template`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApplyTemplateRequestToJSON(requestParameters['apply_template_request']), + }; + } + + /** + * Applies a template\'s appearance and optionally sample content to a Bitly Site + * Apply a template to a site + */ + async applyTemplateRaw(requestParameters: ApplyTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.applyTemplateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySiteFromJSON(jsonValue)); + } + + /** + * Applies a template\'s appearance and optionally sample content to a Bitly Site + * Apply a template to a site + */ + async applyTemplate(requestParameters: ApplyTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.applyTemplateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cloneSite without sending the request + */ + async cloneSiteRequestOpts(requestParameters: CloneSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling cloneSite().' + ); + } + + if (requestParameters['site_clone_request'] == null) { + throw new runtime.RequiredError( + 'site_clone_request', + 'Required parameter "site_clone_request" was null or undefined when calling cloneSite().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/clone`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SiteCloneRequestToJSON(requestParameters['site_clone_request']), + }; + } + + /** + * Creates a new Bitly site by cloning content and appearance from an existing site + * Clone a Bitly Site from an existing one + */ + async cloneSiteRaw(requestParameters: CloneSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cloneSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySiteFromJSON(jsonValue)); + } + + /** + * Creates a new Bitly site by cloning content and appearance from an existing site + * Clone a Bitly Site from an existing one + */ + async cloneSite(requestParameters: CloneSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cloneSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createContainer without sending the request + */ + async createContainerRequestOpts(requestParameters: CreateContainerRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling createContainer().' + ); + } + + if (requestParameters['site_block_container_request'] == null) { + throw new runtime.RequiredError( + 'site_block_container_request', + 'Required parameter "site_block_container_request" was null or undefined when calling createContainer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/containers`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SiteBlockContainerRequestToJSON(requestParameters['site_block_container_request']), + }; + } + + /** + * Creates a container which contains a set of other content + * Creates a container + */ + async createContainerRaw(requestParameters: CreateContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createContainerRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteBlockFromJSON(jsonValue)); + } + + /** + * Creates a container which contains a set of other content + * Creates a container + */ + async createContainer(requestParameters: CreateContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createContainerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createSite without sending the request + */ + async createSiteRequestOpts(requestParameters: CreateSiteRequest): Promise { + if (requestParameters['create_launchpad'] == null) { + throw new runtime.RequiredError( + 'create_launchpad', + 'Required parameter "create_launchpad" was null or undefined when calling createSite().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateLaunchpadToJSON(requestParameters['create_launchpad']), + }; + } + + /** + * Creates an empty Bitly Site for a group using default appearance settings + * Creates a New Bitly Site for a Group + */ + async createSiteRaw(requestParameters: CreateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySiteFromJSON(jsonValue)); + } + + /** + * Creates an empty Bitly Site for a group using default appearance settings + * Creates a New Bitly Site for a Group + */ + async createSite(requestParameters: CreateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createSiteBlock without sending the request + */ + async createSiteBlockRequestOpts(requestParameters: CreateSiteBlockRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling createSiteBlock().' + ); + } + + if (requestParameters['site_block_create_request'] == null) { + throw new runtime.RequiredError( + 'site_block_create_request', + 'Required parameter "site_block_create_request" was null or undefined when calling createSiteBlock().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/blocks`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SiteBlockCreateRequestToJSON(requestParameters['site_block_create_request']), + }; + } + + /** + * Creates a block of the given type on the provided Site ID (excluding grid and carousel; see Creates a container to create those) + * Create a block on the provided Site ID + */ + async createSiteBlockRaw(requestParameters: CreateSiteBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createSiteBlockRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteBlockFromJSON(jsonValue)); + } + + /** + * Creates a block of the given type on the provided Site ID (excluding grid and carousel; see Creates a container to create those) + * Create a block on the provided Site ID + */ + async createSiteBlock(requestParameters: CreateSiteBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSiteBlockRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for createSiteImage without sending the request + */ + async createSiteImageRequestOpts(requestParameters: CreateSiteImageRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling createSiteImage().' + ); + } + + if (requestParameters['site_image_upload'] == null) { + throw new runtime.RequiredError( + 'site_image_upload', + 'Required parameter "site_image_upload" was null or undefined when calling createSiteImage().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/images`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SiteImageUploadToJSON(requestParameters['site_image_upload']), + }; + } + + /** + * Takes a previously uploaded image and attaches it to a site + * Create a microsite image for a site + */ + async createSiteImageRaw(requestParameters: CreateSiteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.createSiteImageRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImageUploadResponseFromJSON(jsonValue)); + } + + /** + * Takes a previously uploaded image and attaches it to a site + * Create a microsite image for a site + */ + async createSiteImage(requestParameters: CreateSiteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSiteImageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for deleteSite without sending the request + */ + async deleteSiteRequestOpts(requestParameters: DeleteSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling deleteSite().' + ); + } + + const queryParameters: any = {}; + + 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 = `/sites/{site_id}`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Deletes an existing Site + * Deletes an existing Site + */ + async deleteSiteRaw(requestParameters: DeleteSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Deletes an existing Site + * Deletes an existing Site + */ + async deleteSite(requestParameters: DeleteSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSiteRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for deleteSiteBlock without sending the request + */ + async deleteSiteBlockRequestOpts(requestParameters: DeleteSiteBlockRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling deleteSiteBlock().' + ); + } + + if (requestParameters['block_id'] == null) { + throw new runtime.RequiredError( + 'block_id', + 'Required parameter "block_id" was null or undefined when calling deleteSiteBlock().' + ); + } + + const queryParameters: any = {}; + + 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 = `/sites/{site_id}/blocks/{block_id}`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + urlPath = urlPath.replace('{block_id}', encodeURIComponent(String(requestParameters['block_id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Deletes a block of any type from a given site - does not deactivate. Does not delete the link tied to the block. Deleting a container block (grid or carousel) also deletes the blocks it contains. + * Delete Site Block + */ + async deleteSiteBlockRaw(requestParameters: DeleteSiteBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteSiteBlockRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Deletes a block of any type from a given site - does not deactivate. Does not delete the link tied to the block. Deleting a container block (grid or carousel) also deletes the blocks it contains. + * Delete Site Block + */ + async deleteSiteBlock(requestParameters: DeleteSiteBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSiteBlockRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for deleteSiteRedirect without sending the request + */ + async deleteSiteRedirectRequestOpts(requestParameters: DeleteSiteRedirectRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling deleteSiteRedirect().' + ); + } + + if (requestParameters['domain'] == null) { + throw new runtime.RequiredError( + 'domain', + 'Required parameter "domain" was null or undefined when calling deleteSiteRedirect().' + ); + } + + if (requestParameters['keyword'] == null) { + throw new runtime.RequiredError( + 'keyword', + 'Required parameter "keyword" was null or undefined when calling deleteSiteRedirect().' + ); + } + + const queryParameters: any = {}; + + 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 = `/sites/{site_id}/redirects/{domain}/{keyword}`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + urlPath = urlPath.replace('{domain}', encodeURIComponent(String(requestParameters['domain']))); + urlPath = urlPath.replace('{keyword}', encodeURIComponent(String(requestParameters['keyword']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Deletes a redirect for a site + * Delete a redirect for a site + */ + async deleteSiteRedirectRaw(requestParameters: DeleteSiteRedirectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.deleteSiteRedirectRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Deletes a redirect for a site + * Delete a redirect for a site + */ + async deleteSiteRedirect(requestParameters: DeleteSiteRedirectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSiteRedirectRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for discardSiteDraft without sending the request + */ + async discardSiteDraftRequestOpts(requestParameters: DiscardSiteDraftRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling discardSiteDraft().' + ); + } + + const queryParameters: any = {}; + + 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 = `/sites/{site_id}/draft`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Discards a given site\'s in-progress draft + * Discard a Site Draft + */ + async discardSiteDraftRaw(requestParameters: DiscardSiteDraftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.discardSiteDraftRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Discards a given site\'s in-progress draft + * Discard a Site Draft + */ + async discardSiteDraft(requestParameters: DiscardSiteDraftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.discardSiteDraftRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for getAggregateSiteViewsByCity without sending the request + */ + async getAggregateSiteViewsByCityRequestOpts(requestParameters: GetAggregateSiteViewsByCityRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getAggregateSiteViewsByCity().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getAggregateSiteViewsByCity().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/views/cities`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the city origins of view traffic for the requested Sites. + * Get Site Views by City + */ + async getAggregateSiteViewsByCityRaw(requestParameters: GetAggregateSiteViewsByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getAggregateSiteViewsByCityRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByCitiesFacetFromJSON(jsonValue)); + } + + /** + * Returns the city origins of view traffic for the requested Sites. + * Get Site Views by City + */ + async getAggregateSiteViewsByCity(requestParameters: GetAggregateSiteViewsByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAggregateSiteViewsByCityRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getAggregateSiteViewsByCountry without sending the request + */ + async getAggregateSiteViewsByCountryRequestOpts(requestParameters: GetAggregateSiteViewsByCountryRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getAggregateSiteViewsByCountry().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getAggregateSiteViewsByCountry().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/views/countries`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the country origins of view traffic for the requested Sites. + * Get Site Views by Country + */ + async getAggregateSiteViewsByCountryRaw(requestParameters: GetAggregateSiteViewsByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getAggregateSiteViewsByCountryRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByFacetFromJSON(jsonValue)); + } + + /** + * Returns the country origins of view traffic for the requested Sites. + * Get Site Views by Country + */ + async getAggregateSiteViewsByCountry(requestParameters: GetAggregateSiteViewsByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAggregateSiteViewsByCountryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getAggregateSiteViewsByDevice without sending the request + */ + async getAggregateSiteViewsByDeviceRequestOpts(requestParameters: GetAggregateSiteViewsByDeviceRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getAggregateSiteViewsByDevice().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getAggregateSiteViewsByDevice().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/views/devices`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the device types generating view traffic for the requested Sites. + * Get Site Views by Device + */ + async getAggregateSiteViewsByDeviceRaw(requestParameters: GetAggregateSiteViewsByDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getAggregateSiteViewsByDeviceRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByFacetFromJSON(jsonValue)); + } + + /** + * Returns the device types generating view traffic for the requested Sites. + * Get Site Views by Device + */ + async getAggregateSiteViewsByDevice(requestParameters: GetAggregateSiteViewsByDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAggregateSiteViewsByDeviceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getAggregateSiteViewsByReferrer without sending the request + */ + async getAggregateSiteViewsByReferrerRequestOpts(requestParameters: GetAggregateSiteViewsByReferrerRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getAggregateSiteViewsByReferrer().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getAggregateSiteViewsByReferrer().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/views/referrers`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns referrer view counts for the requested Sites. + * Get Site Views by Referrer + */ + async getAggregateSiteViewsByReferrerRaw(requestParameters: GetAggregateSiteViewsByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getAggregateSiteViewsByReferrerRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByFacetFromJSON(jsonValue)); + } + + /** + * Returns referrer view counts for the requested Sites. + * Get Site Views by Referrer + */ + async getAggregateSiteViewsByReferrer(requestParameters: GetAggregateSiteViewsByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAggregateSiteViewsByReferrerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getAggregateSiteViewsOverTime without sending the request + */ + async getAggregateSiteViewsOverTimeRequestOpts(requestParameters: GetAggregateSiteViewsOverTimeRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getAggregateSiteViewsOverTime().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getAggregateSiteViewsOverTime().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/views/over_time`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns view counts over time for the requested Sites, grouped by the provided time unit. + * Get Site Views Over Time + */ + async getAggregateSiteViewsOverTimeRaw(requestParameters: GetAggregateSiteViewsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getAggregateSiteViewsOverTimeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksFromJSON(jsonValue)); + } + + /** + * Returns view counts over time for the requested Sites, grouped by the provided time unit. + * Get Site Views Over Time + */ + async getAggregateSiteViewsOverTime(requestParameters: GetAggregateSiteViewsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAggregateSiteViewsOverTimeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getAggregateSitesOverview without sending the request + */ + async getAggregateSitesOverviewRequestOpts(requestParameters: GetAggregateSitesOverviewRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getAggregateSitesOverview().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getAggregateSitesOverview().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/overview`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns total button clicks and page views for the requested Sites. + * Get Overview Metrics for Sites + */ + async getAggregateSitesOverviewRaw(requestParameters: GetAggregateSitesOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getAggregateSitesOverviewRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetAggregateSitesOverview200ResponseFromJSON(jsonValue)); + } + + /** + * Returns total button clicks and page views for the requested Sites. + * Get Overview Metrics for Sites + */ + async getAggregateSitesOverview(requestParameters: GetAggregateSitesOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAggregateSitesOverviewRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getLaunchpadDigitalBusinessCardDownloadsOverTime without sending the request + */ + async getLaunchpadDigitalBusinessCardDownloadsOverTimeRequestOpts(requestParameters: GetLaunchpadDigitalBusinessCardDownloadsOverTimeRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getLaunchpadDigitalBusinessCardDownloadsOverTime().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getLaunchpadDigitalBusinessCardDownloadsOverTime().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/digital_business_card_downloads/over_time`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns digital business card download counts over time for the requested Sites, grouped by the provided time unit. + * Get Site Digital Business Card Downloads Over Time + */ + async getLaunchpadDigitalBusinessCardDownloadsOverTimeRaw(requestParameters: GetLaunchpadDigitalBusinessCardDownloadsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getLaunchpadDigitalBusinessCardDownloadsOverTimeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksFromJSON(jsonValue)); + } + + /** + * Returns digital business card download counts over time for the requested Sites, grouped by the provided time unit. + * Get Site Digital Business Card Downloads Over Time + */ + async getLaunchpadDigitalBusinessCardDownloadsOverTime(requestParameters: GetLaunchpadDigitalBusinessCardDownloadsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLaunchpadDigitalBusinessCardDownloadsOverTimeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getLinkPerformanceForSite without sending the request + */ + async getLinkPerformanceForSiteRequestOpts(requestParameters: GetLinkPerformanceForSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getLinkPerformanceForSite().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getLinkPerformanceForSite().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + 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 = `/sites/{site_id}/link_performance`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the click counts for all active and inactive links that were associated with a site + * Get Link Performance counts for a Site + */ + async getLinkPerformanceForSiteRaw(requestParameters: GetLinkPerformanceForSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getLinkPerformanceForSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteLinkPerformanceFromJSON(jsonValue)); + } + + /** + * Returns the click counts for all active and inactive links that were associated with a site + * Get Link Performance counts for a Site + */ + async getLinkPerformanceForSite(requestParameters: GetLinkPerformanceForSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLinkPerformanceForSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getMetricsForSiteByCities without sending the request + */ + async getMetricsForSiteByCitiesRequestOpts(requestParameters: GetMetricsForSiteByCitiesRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getMetricsForSiteByCities().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getMetricsForSiteByCities().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + 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 = `/sites/{site_id}/cities`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the city origins of view traffic for the specified Site. + * Get Metrics for a Site by City + */ + async getMetricsForSiteByCitiesRaw(requestParameters: GetMetricsForSiteByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForSiteByCitiesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteCityViewMetricsFromJSON(jsonValue)); + } + + /** + * Returns the city origins of view traffic for the specified Site. + * Get Metrics for a Site by City + */ + async getMetricsForSiteByCities(requestParameters: GetMetricsForSiteByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMetricsForSiteByCitiesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getMetricsForSiteByDevices without sending the request + */ + async getMetricsForSiteByDevicesRequestOpts(requestParameters: GetMetricsForSiteByDevicesRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getMetricsForSiteByDevices().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getMetricsForSiteByDevices().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + 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 = `/sites/{site_id}/devices`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the device types generating view traffic to the specified site. + * Get Metrics for a Site by Device Type + */ + async getMetricsForSiteByDevicesRaw(requestParameters: GetMetricsForSiteByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForSiteByDevicesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteViewMetricsFromJSON(jsonValue)); + } + + /** + * Returns the device types generating view traffic to the specified site. + * Get Metrics for a Site by Device Type + */ + async getMetricsForSiteByDevices(requestParameters: GetMetricsForSiteByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMetricsForSiteByDevicesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getMetricsForSiteByReferrers without sending the request + */ + async getMetricsForSiteByReferrersRequestOpts(requestParameters: GetMetricsForSiteByReferrersRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getMetricsForSiteByReferrers().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getMetricsForSiteByReferrers().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + 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 = `/sites/{site_id}/referrers`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns referrer view counts for the specified site. + * Get Metrics for a Site by Referrers + */ + async getMetricsForSiteByReferrersRaw(requestParameters: GetMetricsForSiteByReferrersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForSiteByReferrersRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteViewMetricsFromJSON(jsonValue)); + } + + /** + * Returns referrer view counts for the specified site. + * Get Metrics for a Site by Referrers + */ + async getMetricsForSiteByReferrers(requestParameters: GetMetricsForSiteByReferrersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMetricsForSiteByReferrersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getMetricsForSitesByCountries without sending the request + */ + async getMetricsForSitesByCountriesRequestOpts(requestParameters: GetMetricsForSitesByCountriesRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getMetricsForSitesByCountries().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getMetricsForSitesByCountries().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + 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 = `/sites/{site_id}/countries`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the country origins of view traffic for the specified Site. + * Get Metrics for a Site by Country + */ + async getMetricsForSitesByCountriesRaw(requestParameters: GetMetricsForSitesByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getMetricsForSitesByCountriesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteViewMetricsFromJSON(jsonValue)); + } + + /** + * Returns the country origins of view traffic for the specified Site. + * Get Metrics for a Site by Country + */ + async getMetricsForSitesByCountries(requestParameters: GetMetricsForSitesByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMetricsForSitesByCountriesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSite without sending the request + */ + async getSiteRequestOpts(requestParameters: GetSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getSite().' + ); + } + + const queryParameters: any = {}; + + 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 = `/sites/{site_id}`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Retrieves a Bitly Site by ID + * Retrieve All Data Necessary To Render a Bitly Site + */ + async getSiteRaw(requestParameters: GetSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySiteFromJSON(jsonValue)); + } + + /** + * Retrieves a Bitly Site by ID + * Retrieve All Data Necessary To Render a Bitly Site + */ + async getSite(requestParameters: GetSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSiteClicksByCities without sending the request + */ + async getSiteClicksByCitiesRequestOpts(requestParameters: GetSiteClicksByCitiesRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getSiteClicksByCities().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getSiteClicksByCities().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/clicks/cities`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the city origins of button click traffic for the requested Sites. + * Get Site Button Clicks by City + */ + async getSiteClicksByCitiesRaw(requestParameters: GetSiteClicksByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSiteClicksByCitiesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByCitiesFacetFromJSON(jsonValue)); + } + + /** + * Returns the city origins of button click traffic for the requested Sites. + * Get Site Button Clicks by City + */ + async getSiteClicksByCities(requestParameters: GetSiteClicksByCitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSiteClicksByCitiesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSiteClicksByCountries without sending the request + */ + async getSiteClicksByCountriesRequestOpts(requestParameters: GetSiteClicksByCountriesRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getSiteClicksByCountries().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getSiteClicksByCountries().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/clicks/countries`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the country origins of button click traffic for the requested Sites. + * Get Site Button Clicks by Country + */ + async getSiteClicksByCountriesRaw(requestParameters: GetSiteClicksByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSiteClicksByCountriesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByFacetFromJSON(jsonValue)); + } + + /** + * Returns the country origins of button click traffic for the requested Sites. + * Get Site Button Clicks by Country + */ + async getSiteClicksByCountries(requestParameters: GetSiteClicksByCountriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSiteClicksByCountriesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSiteClicksByDevices without sending the request + */ + async getSiteClicksByDevicesRequestOpts(requestParameters: GetSiteClicksByDevicesRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getSiteClicksByDevices().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getSiteClicksByDevices().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/clicks/devices`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the device types generating button click traffic for the requested Sites. + * Get Site Button Clicks by Device + */ + async getSiteClicksByDevicesRaw(requestParameters: GetSiteClicksByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSiteClicksByDevicesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksByFacetFromJSON(jsonValue)); + } + + /** + * Returns the device types generating button click traffic for the requested Sites. + * Get Site Button Clicks by Device + */ + async getSiteClicksByDevices(requestParameters: GetSiteClicksByDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSiteClicksByDevicesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSiteClicksOverTime without sending the request + */ + async getSiteClicksOverTimeRequestOpts(requestParameters: GetSiteClicksOverTimeRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getSiteClicksOverTime().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getSiteClicksOverTime().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/clicks/over_time`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns button click counts over time for the requested Sites, grouped by the provided time unit. + * Get Site Button Clicks Over Time + */ + async getSiteClicksOverTimeRaw(requestParameters: GetSiteClicksOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSiteClicksOverTimeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AggregateClicksForBitlinksFromJSON(jsonValue)); + } + + /** + * Returns button click counts over time for the requested Sites, grouped by the provided time unit. + * Get Site Button Clicks Over Time + */ + async getSiteClicksOverTime(requestParameters: GetSiteClicksOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSiteClicksOverTimeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSiteFilteredTopPageButtons without sending the request + */ + async getSiteFilteredTopPageButtonsRequestOpts(requestParameters: GetSiteFilteredTopPageButtonsRequest): Promise { + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getSiteFilteredTopPageButtons().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getSiteFilteredTopPageButtons().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['site'] != null) { + queryParameters['site'] = requestParameters['site']; + } + + 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']; + } + + if (requestParameters['brand_guid'] != null) { + queryParameters['brand_guid'] = requestParameters['brand_guid']; + } + + if (requestParameters['report_guid'] != null) { + queryParameters['report_guid'] = requestParameters['report_guid']; + } + + 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 = `/aggregate/sites/clicks/top`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the top performing buttons by click count for the requested Sites. + * Get Top Performing Site Buttons by Clicks + */ + async getSiteFilteredTopPageButtonsRaw(requestParameters: GetSiteFilteredTopPageButtonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSiteFilteredTopPageButtonsRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SortedButtonsFromJSON(jsonValue)); + } + + /** + * Returns the top performing buttons by click count for the requested Sites. + * Get Top Performing Site Buttons by Clicks + */ + async getSiteFilteredTopPageButtons(requestParameters: GetSiteFilteredTopPageButtonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSiteFilteredTopPageButtonsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getSitesForGroup without sending the request + */ + async getSitesForGroupRequestOpts(requestParameters: GetSitesForGroupRequest): Promise { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getSitesForGroup().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['search_after'] != null) { + queryParameters['search_after'] = requestParameters['search_after']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + if (requestParameters['sites_url_param'] != null) { + queryParameters['sites_url_param'] = requestParameters['sites_url_param']; + } + + 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 = `/groups/{group_guid}/sites`; + urlPath = urlPath.replace('{group_guid}', encodeURIComponent(String(requestParameters['group_guid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Gets all active Bitly Sites owned by the provided Group GUID + * Get Bitly Sites for Group + */ + async getSitesForGroupRaw(requestParameters: GetSitesForGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getSitesForGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySitesFromJSON(jsonValue)); + } + + /** + * Gets all active Bitly Sites owned by the provided Group GUID + * Get Bitly Sites for Group + */ + async getSitesForGroup(requestParameters: GetSitesForGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSitesForGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getTemplates without sending the request + */ + async getTemplatesRequestOpts(requestParameters: GetTemplatesRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['category'] != null) { + queryParameters['category'] = requestParameters['category']; + } + + 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 = `/site_templates`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Retrieves all templates optionally sorted by a Site\'s onboarding category + * Retrieve\'s Bitly templates + */ + async getTemplatesRaw(requestParameters: GetTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.getTemplatesRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TemplateFromJSON)); + } + + /** + * Retrieves all templates optionally sorted by a Site\'s onboarding category + * Retrieve\'s Bitly templates + */ + async getTemplates(requestParameters: GetTemplatesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getTemplatesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getViewsForSite without sending the request + */ + async getViewsForSiteRequestOpts(requestParameters: GetViewsForSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getViewsForSite().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getViewsForSite().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + 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 = `/sites/{site_id}/views`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the view counts for the specified link in an array based on a date. + * Get Views for a Site + */ + async getViewsForSiteRaw(requestParameters: GetViewsForSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getViewsForSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteViewMetricsFromJSON(jsonValue)); + } + + /** + * Returns the view counts for the specified link in an array based on a date. + * Get Views for a Site + */ + async getViewsForSite(requestParameters: GetViewsForSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getViewsForSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for getViewsSummaryForSite without sending the request + */ + async getViewsSummaryForSiteRequestOpts(requestParameters: GetViewsSummaryForSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling getViewsSummaryForSite().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getViewsSummaryForSite().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + 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 = `/sites/{site_id}/views/summary`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Returns the view counts for the specified site rolled up into a single field. + * Get a Views Summary for a Site + */ + async getViewsSummaryForSiteRaw(requestParameters: GetViewsSummaryForSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getViewsSummaryForSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteViewsSummaryFromJSON(jsonValue)); + } + + /** + * Returns the view counts for the specified site rolled up into a single field. + * Get a Views Summary for a Site + */ + async getViewsSummaryForSite(requestParameters: GetViewsSummaryForSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getViewsSummaryForSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for prevalidateYouTubeVideoButton without sending the request + */ + async prevalidateYouTubeVideoButtonRequestOpts(requestParameters: PrevalidateYouTubeVideoButtonRequest): Promise { + if (requestParameters['launchpad_id'] == null) { + throw new runtime.RequiredError( + 'launchpad_id', + 'Required parameter "launchpad_id" was null or undefined when calling prevalidateYouTubeVideoButton().' + ); + } + + if (requestParameters['prevalidate_you_tube_video_request'] == null) { + throw new runtime.RequiredError( + 'prevalidate_you_tube_video_request', + 'Required parameter "prevalidate_you_tube_video_request" was null or undefined when calling prevalidateYouTubeVideoButton().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{launchpad_id}/buttons/youtubeVideo/prevalidate`; + urlPath = urlPath.replace('{launchpad_id}', encodeURIComponent(String(requestParameters['launchpad_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PrevalidateYouTubeVideoRequestToJSON(requestParameters['prevalidate_you_tube_video_request']), + }; + } + + /** + * constructs the content blob required to create a YouTube video button + * Prevalidate a youtube video button + */ + async prevalidateYouTubeVideoButtonRaw(requestParameters: PrevalidateYouTubeVideoButtonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.prevalidateYouTubeVideoButtonRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => YoutubeVideoRequestFromJSON(jsonValue)); + } + + /** + * constructs the content blob required to create a YouTube video button + * Prevalidate a youtube video button + */ + async prevalidateYouTubeVideoButton(requestParameters: PrevalidateYouTubeVideoButtonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.prevalidateYouTubeVideoButtonRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for publishSite without sending the request + */ + async publishSiteRequestOpts(requestParameters: PublishSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling publishSite().' + ); + } + + const queryParameters: any = {}; + + 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 = `/sites/{site_id}/publish`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Replaces a production Site with its draft Site if changes are made + * Publishes a Draft Site to become Production Site + */ + async publishSiteRaw(requestParameters: PublishSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.publishSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySiteFromJSON(jsonValue)); + } + + /** + * Replaces a production Site with its draft Site if changes are made + * Publishes a Draft Site to become Production Site + */ + async publishSite(requestParameters: PublishSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.publishSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for updateSite without sending the request + */ + async updateSiteRequestOpts(requestParameters: UpdateSiteRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling updateSite().' + ); + } + + if (requestParameters['update_site'] == null) { + throw new runtime.RequiredError( + 'update_site', + 'Required parameter "update_site" was null or undefined when calling updateSite().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: UpdateSiteToJSON(requestParameters['update_site']), + }; + } + + /** + * Updates a Bitly Site\'s URI, display name, description and attached QR code. Changing the URI also creates a redirect from the previous URI. + * Updates an existing Bitly Site + */ + async updateSiteRaw(requestParameters: UpdateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateSiteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlySiteFromJSON(jsonValue)); + } + + /** + * Updates a Bitly Site\'s URI, display name, description and attached QR code. Changing the URI also creates a redirect from the previous URI. + * Updates an existing Bitly Site + */ + async updateSite(requestParameters: UpdateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateSiteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for updateSiteAppearance without sending the request + */ + async updateSiteAppearanceRequestOpts(requestParameters: UpdateSiteAppearanceRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling updateSiteAppearance().' + ); + } + + if (requestParameters['bitly_site_appearance'] == null) { + throw new runtime.RequiredError( + 'bitly_site_appearance', + 'Required parameter "bitly_site_appearance" was null or undefined when calling updateSiteAppearance().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/appearance`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: BitlySiteAppearanceToJSON(requestParameters['bitly_site_appearance']), + }; + } + + /** + * Updates the appearance of a Bitly Site + * Update the appearance of a Bitly Site + */ + async updateSiteAppearanceRaw(requestParameters: UpdateSiteAppearanceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateSiteAppearanceRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Updates the appearance of a Bitly Site + * Update the appearance of a Bitly Site + */ + async updateSiteAppearance(requestParameters: UpdateSiteAppearanceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateSiteAppearanceRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for updateSiteBlock without sending the request + */ + async updateSiteBlockRequestOpts(requestParameters: UpdateSiteBlockRequest): Promise { + if (requestParameters['site_id'] == null) { + throw new runtime.RequiredError( + 'site_id', + 'Required parameter "site_id" was null or undefined when calling updateSiteBlock().' + ); + } + + if (requestParameters['block_id'] == null) { + throw new runtime.RequiredError( + 'block_id', + 'Required parameter "block_id" was null or undefined when calling updateSiteBlock().' + ); + } + + if (requestParameters['site_block_request'] == null) { + throw new runtime.RequiredError( + 'site_block_request', + 'Required parameter "site_block_request" was null or undefined when calling updateSiteBlock().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sites/{site_id}/blocks/{block_id}`; + urlPath = urlPath.replace('{site_id}', encodeURIComponent(String(requestParameters['site_id']))); + urlPath = urlPath.replace('{block_id}', encodeURIComponent(String(requestParameters['block_id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: SiteBlockRequestToJSON(requestParameters['site_block_request']), + }; + } + + /** + * Updates a block on the provided Site ID. The block type is derived from the stored block and cannot be changed. + * Update a block on the provided Site ID + */ + async updateSiteBlockRaw(requestParameters: UpdateSiteBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateSiteBlockRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SiteBlockFromJSON(jsonValue)); + } + + /** + * Updates a block on the provided Site ID. The block type is derived from the stored block and cannot be changed. + * Update a block on the provided Site ID + */ + async updateSiteBlock(requestParameters: UpdateSiteBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateSiteBlockRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + * @enum {string} + */ +export enum GetTemplatesCategoryEnum { + link_in_bio = 'Link-in-bio', + products_and_services = 'Products and services', + promotions = 'Promotions', + digital_business_card = 'Digital business card', + image_gallery = 'Image gallery', + recommended = 'Recommended' +} diff --git a/src/apis/GroupsApi.ts b/src/apis/GroupsApi.ts index 739d3fd..e56b6f1 100644 --- a/src/apis/GroupsApi.ts +++ b/src/apis/GroupsApi.ts @@ -53,6 +53,11 @@ import { GroupFromJSON, GroupToJSON, } from '../models/Group'; +import { + type GroupBitlinksCountRollup, + GroupBitlinksCountRollupFromJSON, + GroupBitlinksCountRollupToJSON, +} from '../models/GroupBitlinksCountRollup'; import { type GroupClicks, GroupClicksFromJSON, @@ -153,6 +158,10 @@ export interface GetGroupRequest { group_guid: string; } +export interface GetGroupAgenticTrafficRollupRequest { + group_guid: string; +} + export interface GetGroupClicksRequest { group_guid: string; unit: TimeUnit; @@ -399,6 +408,61 @@ export class GroupsApi extends runtime.BaseAPI { return await response.value(); } + /** + * Creates request options for getGroupAgenticTrafficRollup without sending the request + */ + async getGroupAgenticTrafficRollupRequestOpts(requestParameters: GetGroupAgenticTrafficRollupRequest): Promise { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupAgenticTrafficRollup().' + ); + } + + const queryParameters: any = {}; + + 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 = `/groups/{group_guid}/agentic_traffic/rollup`; + urlPath = urlPath.replace('{group_guid}', encodeURIComponent(String(requestParameters['group_guid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get the total agentic traffic (AI agents and assistants) count over the last 90 days for a group. + * Get Group Agentic Traffic Rollup + */ + async getGroupAgenticTrafficRollupRaw(requestParameters: GetGroupAgenticTrafficRollupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.getGroupAgenticTrafficRollupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupBitlinksCountRollupFromJSON(jsonValue)); + } + + /** + * Get the total agentic traffic (AI agents and assistants) count over the last 90 days for a group. + * Get Group Agentic Traffic Rollup + */ + async getGroupAgenticTrafficRollup(requestParameters: GetGroupAgenticTrafficRollupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupAgenticTrafficRollupRaw(requestParameters, initOverrides); + return await response.value(); + } + /** * Creates request options for getGroupClicks without sending the request */ diff --git a/src/apis/QRCodesApi.ts b/src/apis/QRCodesApi.ts index aee5189..c3d16bd 100644 --- a/src/apis/QRCodesApi.ts +++ b/src/apis/QRCodesApi.ts @@ -18,6 +18,11 @@ import { BadRequestFromJSON, BadRequestToJSON, } from '../models/BadRequest'; +import { + type BitlinkBody, + BitlinkBodyFromJSON, + BitlinkBodyToJSON, +} from '../models/BitlinkBody'; import { type BitlinkScans, BitlinkScansFromJSON, @@ -88,6 +93,16 @@ import { PublicUpdateQRCodeRequestFromJSON, PublicUpdateQRCodeRequestToJSON, } from '../models/PublicUpdateQRCodeRequest'; +import { + type QRCBulkUpdate, + QRCBulkUpdateFromJSON, + QRCBulkUpdateToJSON, +} from '../models/QRCBulkUpdate'; +import { + type QRCBulkUpdateRequest, + QRCBulkUpdateRequestFromJSON, + QRCBulkUpdateRequestToJSON, +} from '../models/QRCBulkUpdateRequest'; import { type QRCodeDetails, QRCodeDetailsFromJSON, @@ -103,6 +118,11 @@ import { QRCodesMinimalFromJSON, QRCodesMinimalToJSON, } from '../models/QRCodesMinimal'; +import { + type RedirectQRCodeRequest, + RedirectQRCodeRequestFromJSON, + RedirectQRCodeRequestToJSON, +} from '../models/RedirectQRCodeRequest'; import { type ScanMetrics, ScanMetricsFromJSON, @@ -214,12 +234,27 @@ export interface ListQRMinimalRequest { is_gs1?: ListQRMinimalIsGs1Enum; is_expired?: ListQRMinimalIsExpiredEnum; has_expiration?: ListQRMinimalHasExpirationEnum; + has_dynamic_routing?: ListQRMinimalHasDynamicRoutingEnum; tags?: Array; } +export interface RedirectQRCodeDestinationRequest { + qrcode_id: string; + redirect_qr_code_request: RedirectQRCodeRequest; +} + export interface UpdateQRCodePublicRequest { qrcode_id: string; - public_update_qr_code_request: PublicUpdateQRCodeRequest; + public_update_qr_code_request?: PublicUpdateQRCodeRequest; +} + +export interface UpdateQRCodesByGroupRequest { + group_guid: string; + qrc_bulk_update_request: QRCBulkUpdateRequest; +} + +export interface UpgradeQRCodeToBitlinkRequest { + qrcode_id: string; } /** @@ -1089,6 +1124,10 @@ export class QRCodesApi extends runtime.BaseAPI { queryParameters['has_expiration'] = requestParameters['has_expiration']; } + if (requestParameters['has_dynamic_routing'] != null) { + queryParameters['has_dynamic_routing'] = requestParameters['has_dynamic_routing']; + } + if (requestParameters['tags'] != null) { queryParameters['tags'] = requestParameters['tags']; } @@ -1136,20 +1175,78 @@ export class QRCodesApi extends runtime.BaseAPI { } /** - * Creates request options for updateQRCodePublic without sending the request + * Creates request options for redirectQRCodeDestination without sending the request */ - async updateQRCodePublicRequestOpts(requestParameters: UpdateQRCodePublicRequest): Promise { + async redirectQRCodeDestinationRequestOpts(requestParameters: RedirectQRCodeDestinationRequest): Promise { if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( 'qrcode_id', - 'Required parameter "qrcode_id" was null or undefined when calling updateQRCodePublic().' + 'Required parameter "qrcode_id" was null or undefined when calling redirectQRCodeDestination().' ); } - if (requestParameters['public_update_qr_code_request'] == null) { + if (requestParameters['redirect_qr_code_request'] == null) { + throw new runtime.RequiredError( + 'redirect_qr_code_request', + 'Required parameter "redirect_qr_code_request" was null or undefined when calling redirectQRCodeDestination().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + 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/{qrcode_id}/redirect`; + urlPath = urlPath.replace('{qrcode_id}', encodeURIComponent(String(requestParameters['qrcode_id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: RedirectQRCodeRequestToJSON(requestParameters['redirect_qr_code_request']), + }; + } + + /** + * Changes the destination URL that a stand alone QR Code redirects to. This only works for stand alone QR Codes; a QR Code already associated with a bitlink must be updated via the Bitlinks API. + * Redirect a QR Code + */ + async redirectQRCodeDestinationRaw(requestParameters: RedirectQRCodeDestinationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.redirectQRCodeDestinationRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => QRCodeMinimalFromJSON(jsonValue)); + } + + /** + * Changes the destination URL that a stand alone QR Code redirects to. This only works for stand alone QR Codes; a QR Code already associated with a bitlink must be updated via the Bitlinks API. + * Redirect a QR Code + */ + async redirectQRCodeDestination(requestParameters: RedirectQRCodeDestinationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.redirectQRCodeDestinationRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for updateQRCodePublic without sending the request + */ + async updateQRCodePublicRequestOpts(requestParameters: UpdateQRCodePublicRequest): Promise { + if (requestParameters['qrcode_id'] == null) { throw new runtime.RequiredError( - 'public_update_qr_code_request', - 'Required parameter "public_update_qr_code_request" was null or undefined when calling updateQRCodePublic().' + 'qrcode_id', + 'Required parameter "qrcode_id" was null or undefined when calling updateQRCodePublic().' ); } @@ -1200,6 +1297,126 @@ export class QRCodesApi extends runtime.BaseAPI { return await response.value(); } + /** + * Creates request options for updateQRCodesByGroup without sending the request + */ + async updateQRCodesByGroupRequestOpts(requestParameters: UpdateQRCodesByGroupRequest): Promise { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling updateQRCodesByGroup().' + ); + } + + if (requestParameters['qrc_bulk_update_request'] == null) { + throw new runtime.RequiredError( + 'qrc_bulk_update_request', + 'Required parameter "qrc_bulk_update_request" was null or undefined when calling updateQRCodesByGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/groups/{group_guid}/qr-codes`; + urlPath = urlPath.replace('{group_guid}', encodeURIComponent(String(requestParameters['group_guid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: QRCBulkUpdateRequestToJSON(requestParameters['qrc_bulk_update_request']), + }; + } + + /** + * Bulk update can add or remove tags, or archive/un-archive, up to 100 QR codes at a time. Pages QR codes cannot be updated with this endpoint. The response includes a list of QR code ids that were updated. + * Bulk update QR codes + */ + async updateQRCodesByGroupRaw(requestParameters: UpdateQRCodesByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.updateQRCodesByGroupRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => QRCBulkUpdateFromJSON(jsonValue)); + } + + /** + * Bulk update can add or remove tags, or archive/un-archive, up to 100 QR codes at a time. Pages QR codes cannot be updated with this endpoint. The response includes a list of QR code ids that were updated. + * Bulk update QR codes + */ + async updateQRCodesByGroup(requestParameters: UpdateQRCodesByGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateQRCodesByGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for upgradeQRCodeToBitlink without sending the request + */ + async upgradeQRCodeToBitlinkRequestOpts(requestParameters: UpgradeQRCodeToBitlinkRequest): Promise { + if (requestParameters['qrcode_id'] == null) { + throw new runtime.RequiredError( + 'qrcode_id', + 'Required parameter "qrcode_id" was null or undefined when calling upgradeQRCodeToBitlink().' + ); + } + + const queryParameters: any = {}; + + 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 = `/qr-codes/{qrcode_id}/to-bitlink`; + urlPath = urlPath.replace('{qrcode_id}', encodeURIComponent(String(requestParameters['qrcode_id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Upgrades a stand alone (decoupled) QR Code to a coupled QR Code by associating it with its underlying Bitly short link. This operation consumes one encode from the organization\'s monthly Link limit. If the QR Code is already coupled, no encode is consumed. + * Upgrade a QR Code to a bitlink + */ + async upgradeQRCodeToBitlinkRaw(requestParameters: UpgradeQRCodeToBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.upgradeQRCodeToBitlinkRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BitlinkBodyFromJSON(jsonValue)); + } + + /** + * Upgrades a stand alone (decoupled) QR Code to a coupled QR Code by associating it with its underlying Bitly short link. This operation consumes one encode from the organization\'s monthly Link limit. If the QR Code is already coupled, no encode is consumed. + * Upgrade a QR Code to a bitlink + */ + async upgradeQRCodeToBitlink(requestParameters: UpgradeQRCodeToBitlinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.upgradeQRCodeToBitlinkRaw(requestParameters, initOverrides); + return await response.value(); + } + } /** @@ -1280,3 +1497,12 @@ export enum ListQRMinimalHasExpirationEnum { off = 'off', both = 'both' } +/** + * @export + * @enum {string} + */ +export enum ListQRMinimalHasDynamicRoutingEnum { + on = 'on', + off = 'off', + both = 'both' +} diff --git a/src/apis/index.ts b/src/apis/index.ts index 23cfadd..defa8ce 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -2,6 +2,7 @@ /* eslint-disable */ export * from './BSDsApi'; export * from './BitlinksApi'; +export * from './BitlySitesApi'; export * from './CampaignsApi'; export * from './CustomBitlinksApi'; export * from './DefaultApi'; diff --git a/src/docs/AggregateClicksForBitlinks.md b/src/docs/AggregateClicksForBitlinks.md new file mode 100644 index 0000000..17882fc --- /dev/null +++ b/src/docs/AggregateClicksForBitlinks.md @@ -0,0 +1,42 @@ + +# AggregateClicksForBitlinks + + +## Properties + +Name | Type +------------ | ------------- +`unit_reference` | string +`unit` | string +`units` | number +`info` | string +`clicks` | [Array<ClicksForAggregate>](ClicksForAggregate.md) + +## Example + +```typescript +import type { AggregateClicksForBitlinks } from '' + +// TODO: Update the object below with actual values +const example = { + "unit_reference": null, + "unit": null, + "units": null, + "info": null, + "clicks": null, +} satisfies AggregateClicksForBitlinks + +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 AggregateClicksForBitlinks +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/AggregateClicksForBitlinksByCitiesFacet.md b/src/docs/AggregateClicksForBitlinksByCitiesFacet.md new file mode 100644 index 0000000..b6b7afd --- /dev/null +++ b/src/docs/AggregateClicksForBitlinksByCitiesFacet.md @@ -0,0 +1,44 @@ + +# AggregateClicksForBitlinksByCitiesFacet + + +## Properties + +Name | Type +------------ | ------------- +`unit_reference` | string +`unit` | string +`units` | number +`info` | string +`facet` | string +`totals_for_time_period` | [Array<ClicksByCitiesFacet>](ClicksByCitiesFacet.md) + +## Example + +```typescript +import type { AggregateClicksForBitlinksByCitiesFacet } from '' + +// TODO: Update the object below with actual values +const example = { + "unit_reference": null, + "unit": null, + "units": null, + "info": null, + "facet": null, + "totals_for_time_period": null, +} satisfies AggregateClicksForBitlinksByCitiesFacet + +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 AggregateClicksForBitlinksByCitiesFacet +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/AggregateClicksForBitlinksByFacet.md b/src/docs/AggregateClicksForBitlinksByFacet.md new file mode 100644 index 0000000..26f3a04 --- /dev/null +++ b/src/docs/AggregateClicksForBitlinksByFacet.md @@ -0,0 +1,44 @@ + +# AggregateClicksForBitlinksByFacet + + +## Properties + +Name | Type +------------ | ------------- +`unit_reference` | string +`unit` | string +`units` | number +`info` | string +`facet` | string +`totals_for_time_period` | [Array<ClicksByFacet>](ClicksByFacet.md) + +## Example + +```typescript +import type { AggregateClicksForBitlinksByFacet } from '' + +// TODO: Update the object below with actual values +const example = { + "unit_reference": null, + "unit": null, + "units": null, + "info": null, + "facet": null, + "totals_for_time_period": null, +} satisfies AggregateClicksForBitlinksByFacet + +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 AggregateClicksForBitlinksByFacet +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/ApplyTemplateRequest.md b/src/docs/ApplyTemplateRequest.md new file mode 100644 index 0000000..3ced2b9 --- /dev/null +++ b/src/docs/ApplyTemplateRequest.md @@ -0,0 +1,34 @@ + +# ApplyTemplateRequest + + +## Properties + +Name | Type +------------ | ------------- +`template_guid` | string + +## Example + +```typescript +import type { ApplyTemplateRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "template_guid": T1234567890, +} satisfies ApplyTemplateRequest + +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 ApplyTemplateRequest +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 index 57e8c43..48aecb9 100644 --- a/src/docs/BitlinkBody.md +++ b/src/docs/BitlinkBody.md @@ -23,6 +23,7 @@ Name | Type `is_deleted` | boolean `campaign_ids` | Array<string> `expiration_at` | string +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -48,6 +49,7 @@ const example = { "is_deleted": null, "campaign_ids": null, "expiration_at": null, + "dynamic_routing": null, } satisfies BitlinkBody console.log(example) diff --git a/src/docs/BitlinkContent.md b/src/docs/BitlinkContent.md new file mode 100644 index 0000000..a72412c --- /dev/null +++ b/src/docs/BitlinkContent.md @@ -0,0 +1,46 @@ + +# BitlinkContent + + +## Properties + +Name | Type +------------ | ------------- +`bitlink_id` | string +`link_title` | string +`description` | string +`is_pinned` | boolean +`image_url` | string +`image_guid` | string +`crop` | string + +## Example + +```typescript +import type { BitlinkContent } from '' + +// TODO: Update the object below with actual values +const example = { + "bitlink_id": bit.ly/GzmMT6, + "link_title": Short links, big results, + "description": my description, + "is_pinned": null, + "image_url": null, + "image_guid": null, + "crop": {"Min": {"X": 0, "Y": 0}, "Max": {"X": 1, "Y": 1}}, +} satisfies BitlinkContent + +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 BitlinkContent +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 index 7ddb685..9f54653 100644 --- a/src/docs/BitlinkUpdate.md +++ b/src/docs/BitlinkUpdate.md @@ -22,6 +22,7 @@ Name | Type `is_deleted` | boolean `campaign_ids` | Array<string> `expiration_at` | string +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -46,6 +47,7 @@ const example = { "is_deleted": null, "campaign_ids": null, "expiration_at": null, + "dynamic_routing": null, } satisfies BitlinkUpdate console.log(example) diff --git a/src/docs/BitlinkUpdateBody.md b/src/docs/BitlinkUpdateBody.md index 0f83df1..3952dd0 100644 --- a/src/docs/BitlinkUpdateBody.md +++ b/src/docs/BitlinkUpdateBody.md @@ -12,6 +12,7 @@ Name | Type `deeplinks` | [Array<DeeplinkRule>](DeeplinkRule.md) `long_url` | string `expiration_at` | string +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -26,6 +27,7 @@ const example = { "deeplinks": null, "long_url": null, "expiration_at": null, + "dynamic_routing": null, } satisfies BitlinkUpdateBody console.log(example) diff --git a/src/docs/BitlinksApi.md b/src/docs/BitlinksApi.md index e5edd56..ab399a8 100644 --- a/src/docs/BitlinksApi.md +++ b/src/docs/BitlinksApi.md @@ -421,7 +421,7 @@ example().catch(console.error); ## 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) +> 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, has_dynamic_routing, tags, launchpad_ids, encoding_login) Retrieve Bitlinks by Group @@ -477,6 +477,8 @@ async function example() { is_expired: is_expired_example, // 'on' | 'off' | 'both' | filter bitlinks by presence of expiration (optional) has_expiration: has_expiration_example, + // 'on' | 'off' | 'both' | filter bitlinks by presence of dynamic routing rules (optional) + has_dynamic_routing: has_dynamic_routing_example, // Array | Filter by given tags (optional) tags: ["bitly","api"], // Array | Filter by launchpad id (optional) @@ -518,6 +520,7 @@ example().catch(console.error); | **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] | +| **has_dynamic_routing** | `on`, `off`, `both` | filter bitlinks by presence of dynamic routing rules | [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] | diff --git a/src/docs/BitlySite.md b/src/docs/BitlySite.md new file mode 100644 index 0000000..729df10 --- /dev/null +++ b/src/docs/BitlySite.md @@ -0,0 +1,58 @@ + +# BitlySite + + +## Properties + +Name | Type +------------ | ------------- +`site_guid` | string +`group_guid` | string +`status` | string +`is_edited` | boolean +`url` | string +`content` | [BitlySiteContent](BitlySiteContent.md) +`appearance` | [BitlySiteAppearance](BitlySiteAppearance.md) +`button_count` | number +`last_published` | string +`created` | string +`modified` | string +`qr_code_id` | string +`redirects` | [Array<SiteRedirects>](SiteRedirects.md) + +## Example + +```typescript +import type { BitlySite } from '' + +// TODO: Update the object below with actual values +const example = { + "site_guid": null, + "group_guid": null, + "status": null, + "is_edited": null, + "url": null, + "content": null, + "appearance": null, + "button_count": null, + "last_published": null, + "created": null, + "modified": null, + "qr_code_id": null, + "redirects": null, +} satisfies BitlySite + +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 BitlySite +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/BitlySiteAppearance.md b/src/docs/BitlySiteAppearance.md new file mode 100644 index 0000000..16f1d18 --- /dev/null +++ b/src/docs/BitlySiteAppearance.md @@ -0,0 +1,80 @@ + +# BitlySiteAppearance + + +## Properties + +Name | Type +------------ | ------------- +`layout_v2` | number +`header_appearance` | [BitlySiteHeaderAppearance](BitlySiteHeaderAppearance.md) +`theme_id` | number +`hide_bitly_logo` | boolean +`layout` | string +`font` | string +`style_preference` | [SiteStylePreference](SiteStylePreference.md) +`background_color` | string +`bottom_background_color` | string +`text_color` | string +`description_color` | string +`background_preference` | string +`background_image_alignment` | [SiteImageAlignment](SiteImageAlignment.md) +`background_image_url` | string +`background_image_guid` | string +`avatar_image_url` | string +`avatar_image_guid` | string +`default_button_background_color` | string +`default_button_text_color` | string +`default_button_shape` | string +`default_button_shadow` | string +`default_social_icon_color` | string +`default_social_icon_layout` | string +`default_social_icon_position` | string + +## Example + +```typescript +import type { BitlySiteAppearance } from '' + +// TODO: Update the object below with actual values +const example = { + "layout_v2": null, + "header_appearance": null, + "theme_id": null, + "hide_bitly_logo": null, + "layout": null, + "font": null, + "style_preference": null, + "background_color": null, + "bottom_background_color": null, + "text_color": null, + "description_color": null, + "background_preference": null, + "background_image_alignment": null, + "background_image_url": null, + "background_image_guid": null, + "avatar_image_url": null, + "avatar_image_guid": null, + "default_button_background_color": null, + "default_button_text_color": null, + "default_button_shape": null, + "default_button_shadow": null, + "default_social_icon_color": null, + "default_social_icon_layout": null, + "default_social_icon_position": null, +} satisfies BitlySiteAppearance + +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 BitlySiteAppearance +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/BitlySiteContent.md b/src/docs/BitlySiteContent.md new file mode 100644 index 0000000..90cbab3 --- /dev/null +++ b/src/docs/BitlySiteContent.md @@ -0,0 +1,36 @@ + +# BitlySiteContent + + +## Properties + +Name | Type +------------ | ------------- +`display_name` | string +`description` | string + +## Example + +```typescript +import type { BitlySiteContent } from '' + +// TODO: Update the object below with actual values +const example = { + "display_name": null, + "description": null, +} satisfies BitlySiteContent + +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 BitlySiteContent +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/BitlySiteHeaderAppearance.md b/src/docs/BitlySiteHeaderAppearance.md new file mode 100644 index 0000000..d2d3308 --- /dev/null +++ b/src/docs/BitlySiteHeaderAppearance.md @@ -0,0 +1,72 @@ + +# BitlySiteHeaderAppearance + + +## Properties + +Name | Type +------------ | ------------- +`banner_type` | [SiteBannerType](SiteBannerType.md) +`profile_image_size` | [SiteProfileImageSize](SiteProfileImageSize.md) +`profile_image_shape` | [SiteProfileImageShape](SiteProfileImageShape.md) +`profile_image_border_size` | [SiteProfileImageBorderSize](SiteProfileImageBorderSize.md) +`profile_image_type` | [SiteProfileImageType](SiteProfileImageType.md) +`profile_image_location` | [SiteProfileImageLocation](SiteProfileImageLocation.md) +`profile_image_overflow` | boolean +`text_location` | [SiteTextLocation](SiteTextLocation.md) +`title_size` | [SiteTextSizeEnum](SiteTextSizeEnum.md) +`title_alignment` | [SiteTextAlignmentEnum](SiteTextAlignmentEnum.md) +`title_weight` | [SiteTextWeightEnum](SiteTextWeightEnum.md) +`title_border_type` | [SiteTextBorderTypeEnum](SiteTextBorderTypeEnum.md) +`description_size` | [SiteTextSizeEnum](SiteTextSizeEnum.md) +`description_alignment` | [SiteTextAlignmentEnum](SiteTextAlignmentEnum.md) +`description_weight` | [SiteTextWeightEnum](SiteTextWeightEnum.md) +`description_border_type` | [SiteTextBorderTypeEnum](SiteTextBorderTypeEnum.md) +`header_background_color` | string +`banner_image_url` | string +`header_style_preference` | [SiteStylePreference](SiteStylePreference.md) +`banner_image_alignment` | [SiteImageAlignment](SiteImageAlignment.md) + +## Example + +```typescript +import type { BitlySiteHeaderAppearance } from '' + +// TODO: Update the object below with actual values +const example = { + "banner_type": null, + "profile_image_size": null, + "profile_image_shape": null, + "profile_image_border_size": null, + "profile_image_type": null, + "profile_image_location": null, + "profile_image_overflow": null, + "text_location": null, + "title_size": null, + "title_alignment": null, + "title_weight": null, + "title_border_type": null, + "description_size": null, + "description_alignment": null, + "description_weight": null, + "description_border_type": null, + "header_background_color": null, + "banner_image_url": null, + "header_style_preference": null, + "banner_image_alignment": null, +} satisfies BitlySiteHeaderAppearance + +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 BitlySiteHeaderAppearance +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/BitlySites.md b/src/docs/BitlySites.md new file mode 100644 index 0000000..488e3e5 --- /dev/null +++ b/src/docs/BitlySites.md @@ -0,0 +1,38 @@ + +# BitlySites + + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`sites` | [Array<BitlySite>](BitlySite.md) +`pagination` | [MicrositePagination](MicrositePagination.md) + +## Example + +```typescript +import type { BitlySites } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": null, + "sites": null, + "pagination": null, +} satisfies BitlySites + +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 BitlySites +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/BitlySitesApi.md b/src/docs/BitlySitesApi.md new file mode 100644 index 0000000..92910ca --- /dev/null +++ b/src/docs/BitlySitesApi.md @@ -0,0 +1,3113 @@ +# BitlySitesApi + +All URIs are relative to *https://api-ssl.bitly.com/v4* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**applyTemplate**](BitlySitesApi.md#applytemplateoperation) | **POST** /sites/{site_id}/template | Apply a template to a site | +| [**cloneSite**](BitlySitesApi.md#clonesite) | **POST** /sites/{site_id}/clone | Clone a Bitly Site from an existing one | +| [**createContainer**](BitlySitesApi.md#createcontainer) | **POST** /sites/{site_id}/containers | Creates a container | +| [**createSite**](BitlySitesApi.md#createsite) | **POST** /sites | Creates a New Bitly Site for a Group | +| [**createSiteBlock**](BitlySitesApi.md#createsiteblock) | **POST** /sites/{site_id}/blocks | Create a block on the provided Site ID | +| [**createSiteImage**](BitlySitesApi.md#createsiteimage) | **POST** /sites/{site_id}/images | Create a microsite image for a site | +| [**deleteSite**](BitlySitesApi.md#deletesite) | **DELETE** /sites/{site_id} | Deletes an existing Site | +| [**deleteSiteBlock**](BitlySitesApi.md#deletesiteblock) | **DELETE** /sites/{site_id}/blocks/{block_id} | Delete Site Block | +| [**deleteSiteRedirect**](BitlySitesApi.md#deletesiteredirect) | **DELETE** /sites/{site_id}/redirects/{domain}/{keyword} | Delete a redirect for a site | +| [**discardSiteDraft**](BitlySitesApi.md#discardsitedraft) | **DELETE** /sites/{site_id}/draft | Discard a Site Draft | +| [**getAggregateSiteViewsByCity**](BitlySitesApi.md#getaggregatesiteviewsbycity) | **GET** /aggregate/sites/views/cities | Get Site Views by City | +| [**getAggregateSiteViewsByCountry**](BitlySitesApi.md#getaggregatesiteviewsbycountry) | **GET** /aggregate/sites/views/countries | Get Site Views by Country | +| [**getAggregateSiteViewsByDevice**](BitlySitesApi.md#getaggregatesiteviewsbydevice) | **GET** /aggregate/sites/views/devices | Get Site Views by Device | +| [**getAggregateSiteViewsByReferrer**](BitlySitesApi.md#getaggregatesiteviewsbyreferrer) | **GET** /aggregate/sites/views/referrers | Get Site Views by Referrer | +| [**getAggregateSiteViewsOverTime**](BitlySitesApi.md#getaggregatesiteviewsovertime) | **GET** /aggregate/sites/views/over_time | Get Site Views Over Time | +| [**getAggregateSitesOverview**](BitlySitesApi.md#getaggregatesitesoverview) | **GET** /aggregate/sites/overview | Get Overview Metrics for Sites | +| [**getLaunchpadDigitalBusinessCardDownloadsOverTime**](BitlySitesApi.md#getlaunchpaddigitalbusinesscarddownloadsovertime) | **GET** /aggregate/sites/digital_business_card_downloads/over_time | Get Site Digital Business Card Downloads Over Time | +| [**getLinkPerformanceForSite**](BitlySitesApi.md#getlinkperformanceforsite) | **GET** /sites/{site_id}/link_performance | Get Link Performance counts for a Site | +| [**getMetricsForSiteByCities**](BitlySitesApi.md#getmetricsforsitebycities) | **GET** /sites/{site_id}/cities | Get Metrics for a Site by City | +| [**getMetricsForSiteByDevices**](BitlySitesApi.md#getmetricsforsitebydevices) | **GET** /sites/{site_id}/devices | Get Metrics for a Site by Device Type | +| [**getMetricsForSiteByReferrers**](BitlySitesApi.md#getmetricsforsitebyreferrers) | **GET** /sites/{site_id}/referrers | Get Metrics for a Site by Referrers | +| [**getMetricsForSitesByCountries**](BitlySitesApi.md#getmetricsforsitesbycountries) | **GET** /sites/{site_id}/countries | Get Metrics for a Site by Country | +| [**getSite**](BitlySitesApi.md#getsite) | **GET** /sites/{site_id} | Retrieve All Data Necessary To Render a Bitly Site | +| [**getSiteClicksByCities**](BitlySitesApi.md#getsiteclicksbycities) | **GET** /aggregate/sites/clicks/cities | Get Site Button Clicks by City | +| [**getSiteClicksByCountries**](BitlySitesApi.md#getsiteclicksbycountries) | **GET** /aggregate/sites/clicks/countries | Get Site Button Clicks by Country | +| [**getSiteClicksByDevices**](BitlySitesApi.md#getsiteclicksbydevices) | **GET** /aggregate/sites/clicks/devices | Get Site Button Clicks by Device | +| [**getSiteClicksOverTime**](BitlySitesApi.md#getsiteclicksovertime) | **GET** /aggregate/sites/clicks/over_time | Get Site Button Clicks Over Time | +| [**getSiteFilteredTopPageButtons**](BitlySitesApi.md#getsitefilteredtoppagebuttons) | **GET** /aggregate/sites/clicks/top | Get Top Performing Site Buttons by Clicks | +| [**getSitesForGroup**](BitlySitesApi.md#getsitesforgroup) | **GET** /groups/{group_guid}/sites | Get Bitly Sites for Group | +| [**getTemplates**](BitlySitesApi.md#gettemplates) | **GET** /site_templates | Retrieve\'s Bitly templates | +| [**getViewsForSite**](BitlySitesApi.md#getviewsforsite) | **GET** /sites/{site_id}/views | Get Views for a Site | +| [**getViewsSummaryForSite**](BitlySitesApi.md#getviewssummaryforsite) | **GET** /sites/{site_id}/views/summary | Get a Views Summary for a Site | +| [**prevalidateYouTubeVideoButton**](BitlySitesApi.md#prevalidateyoutubevideobutton) | **POST** /sites/{launchpad_id}/buttons/youtubeVideo/prevalidate | Prevalidate a youtube video button | +| [**publishSite**](BitlySitesApi.md#publishsite) | **POST** /sites/{site_id}/publish | Publishes a Draft Site to become Production Site | +| [**updateSite**](BitlySitesApi.md#updatesite) | **PATCH** /sites/{site_id} | Updates an existing Bitly Site | +| [**updateSiteAppearance**](BitlySitesApi.md#updatesiteappearance) | **PUT** /sites/{site_id}/appearance | Update the appearance of a Bitly Site | +| [**updateSiteBlock**](BitlySitesApi.md#updatesiteblock) | **PATCH** /sites/{site_id}/blocks/{block_id} | Update a block on the provided Site ID | + + + +## applyTemplate + +> BitlySite applyTemplate(site_id, apply_template_request) + +Apply a template to a site + +Applies a template\'s appearance and optionally sample content to a Bitly Site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { ApplyTemplateOperationRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // ApplyTemplateRequest (optional) + apply_template_request: {"template_guid":"T1234567890"}, + } satisfies ApplyTemplateOperationRequest; + + try { + const data = await api.applyTemplate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **apply_template_request** | [ApplyTemplateRequest](ApplyTemplateRequest.md) | | [Optional] | + +### Return type + +[**BitlySite**](BitlySite.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 | - | +| **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) + + +## cloneSite + +> BitlySite cloneSite(site_id, site_clone_request) + +Clone a Bitly Site from an existing one + +Creates a new Bitly site by cloning content and appearance from an existing site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { CloneSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // SiteCloneRequest + site_clone_request: {"uri":"bit.ly/m/mysite-copy"}, + } satisfies CloneSiteRequest; + + try { + const data = await api.cloneSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **site_clone_request** | [SiteCloneRequest](SiteCloneRequest.md) | | | + +### Return type + +[**BitlySite**](BitlySite.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 | - | +| **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) + + +## createContainer + +> SiteBlock createContainer(site_id, site_block_container_request) + +Creates a container + +Creates a container which contains a set of other content + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { CreateContainerRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // SiteBlockContainerRequest + site_block_container_request: {"type":"grid"}, + } satisfies CreateContainerRequest; + + try { + const data = await api.createContainer(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **site_block_container_request** | [SiteBlockContainerRequest](SiteBlockContainerRequest.md) | | | + +### Return type + +[**SiteBlock**](SiteBlock.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 | - | +| **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) + + +## createSite + +> BitlySite createSite(create_launchpad) + +Creates a New Bitly Site for a Group + +Creates an empty Bitly Site for a group using default appearance settings + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { CreateSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // CreateLaunchpad + create_launchpad: {"group_guid":"Ba1bc23dE4F","domain":"bit.ly","keyword":"mysite","uri":"bit.ly/m/mysite"}, + } satisfies CreateSiteRequest; + + try { + const data = await api.createSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **create_launchpad** | [CreateLaunchpad](CreateLaunchpad.md) | | | + +### Return type + +[**BitlySite**](BitlySite.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 | - | +| **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) + + +## createSiteBlock + +> SiteBlock createSiteBlock(site_id, site_block_create_request) + +Create a block on the provided Site ID + +Creates a block of the given type on the provided Site ID (excluding grid and carousel; see Creates a container to create those) + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { CreateSiteBlockRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // SiteBlockCreateRequest + site_block_create_request: {"type":"bitlink","content":{"bitlink_id":"bit.ly/GzmMT6","link_title":"Short links, big results","description":"my description"},"is_active":true}, + } satisfies CreateSiteBlockRequest; + + try { + const data = await api.createSiteBlock(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **site_block_create_request** | [SiteBlockCreateRequest](SiteBlockCreateRequest.md) | | | + +### Return type + +[**SiteBlock**](SiteBlock.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 | - | +| **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) + + +## createSiteImage + +> ImageUploadResponse createSiteImage(site_id, site_image_upload) + +Create a microsite image for a site + +Takes a previously uploaded image and attaches it to a site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { CreateSiteImageRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // SiteImageUpload + site_image_upload: {"image_guid":"Ia1bcd234eF","url":"https://example.com/image.png","image_use":"profile","crop":"{\"Min\": {\"X\": 0, \"Y\": 0}, \"Max\": {\"X\": 1, \"Y\": 1}}"}, + } satisfies CreateSiteImageRequest; + + try { + const data = await api.createSiteImage(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **site_image_upload** | [SiteImageUpload](SiteImageUpload.md) | | | + +### Return type + +[**ImageUploadResponse**](ImageUploadResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## deleteSite + +> deleteSite(site_id) + +Deletes an existing Site + +Deletes an existing Site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { DeleteSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + } satisfies DeleteSiteRequest; + + try { + const data = await api.deleteSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [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** | NO_CONTENT | - | +| **400** | BAD_REQUEST | - | +| **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) + + +## deleteSiteBlock + +> deleteSiteBlock(site_id, block_id) + +Delete Site Block + +Deletes a block of any type from a given site - does not deactivate. Does not delete the link tied to the block. Deleting a container block (grid or carousel) also deletes the blocks it contains. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { DeleteSiteBlockRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // string | A GUID for a Bitly Site content block + block_id: La1bcd234eF, + } satisfies DeleteSiteBlockRequest; + + try { + const data = await api.deleteSiteBlock(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **block_id** | `string` | A GUID for a Bitly Site content block | [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** | NO_CONTENT | - | +| **400** | BAD_REQUEST | - | +| **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) + + +## deleteSiteRedirect + +> deleteSiteRedirect(site_id, domain, keyword) + +Delete a redirect for a site + +Deletes a redirect for a site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { DeleteSiteRedirectRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // string | The custom domain the redirect is configured on + domain: es.pn, + // string | The keyword (back-half) of the redirect to delete + keyword: promo, + } satisfies DeleteSiteRedirectRequest; + + try { + const data = await api.deleteSiteRedirect(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **domain** | `string` | The custom domain the redirect is configured on | [Defaults to `undefined`] | +| **keyword** | `string` | The keyword (back-half) of the redirect to delete | [Defaults to `undefined`] | + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | SUCCESS | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## discardSiteDraft + +> discardSiteDraft(site_id) + +Discard a Site Draft + +Discards a given site\'s in-progress draft + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { DiscardSiteDraftRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + } satisfies DiscardSiteDraftRequest; + + try { + const data = await api.discardSiteDraft(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [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 | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **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) + + +## getAggregateSiteViewsByCity + +> AggregateClicksForBitlinksByCitiesFacet getAggregateSiteViewsByCity(unit, units, site, unit_reference, report_guid) + +Get Site Views by City + +Returns the city origins of view traffic for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetAggregateSiteViewsByCityRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetAggregateSiteViewsByCityRequest; + + try { + const data = await api.getAggregateSiteViewsByCity(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByCitiesFacet**](AggregateClicksForBitlinksByCitiesFacet.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) + + +## getAggregateSiteViewsByCountry + +> AggregateClicksForBitlinksByFacet getAggregateSiteViewsByCountry(unit, units, site, unit_reference, report_guid) + +Get Site Views by Country + +Returns the country origins of view traffic for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetAggregateSiteViewsByCountryRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetAggregateSiteViewsByCountryRequest; + + try { + const data = await api.getAggregateSiteViewsByCountry(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByFacet**](AggregateClicksForBitlinksByFacet.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) + + +## getAggregateSiteViewsByDevice + +> AggregateClicksForBitlinksByFacet getAggregateSiteViewsByDevice(unit, units, site, unit_reference, report_guid) + +Get Site Views by Device + +Returns the device types generating view traffic for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetAggregateSiteViewsByDeviceRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetAggregateSiteViewsByDeviceRequest; + + try { + const data = await api.getAggregateSiteViewsByDevice(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByFacet**](AggregateClicksForBitlinksByFacet.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) + + +## getAggregateSiteViewsByReferrer + +> AggregateClicksForBitlinksByFacet getAggregateSiteViewsByReferrer(unit, units, site, unit_reference, report_guid) + +Get Site Views by Referrer + +Returns referrer view counts for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetAggregateSiteViewsByReferrerRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetAggregateSiteViewsByReferrerRequest; + + try { + const data = await api.getAggregateSiteViewsByReferrer(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByFacet**](AggregateClicksForBitlinksByFacet.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) + + +## getAggregateSiteViewsOverTime + +> AggregateClicksForBitlinks getAggregateSiteViewsOverTime(unit, units, site, unit_reference, report_guid) + +Get Site Views Over Time + +Returns view counts over time for the requested Sites, grouped by the provided time unit. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetAggregateSiteViewsOverTimeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetAggregateSiteViewsOverTimeRequest; + + try { + const data = await api.getAggregateSiteViewsOverTime(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinks**](AggregateClicksForBitlinks.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) + + +## getAggregateSitesOverview + +> GetAggregateSitesOverview200Response getAggregateSitesOverview(unit, units, site, unit_reference, report_guid) + +Get Overview Metrics for Sites + +Returns total button clicks and page views for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetAggregateSitesOverviewRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetAggregateSitesOverviewRequest; + + try { + const data = await api.getAggregateSitesOverview(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GetAggregateSitesOverview200Response**](GetAggregateSitesOverview200Response.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) + + +## getLaunchpadDigitalBusinessCardDownloadsOverTime + +> AggregateClicksForBitlinks getLaunchpadDigitalBusinessCardDownloadsOverTime(unit, units, site, unit_reference, report_guid) + +Get Site Digital Business Card Downloads Over Time + +Returns digital business card download counts over time for the requested Sites, grouped by the provided time unit. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetLaunchpadDigitalBusinessCardDownloadsOverTimeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetLaunchpadDigitalBusinessCardDownloadsOverTimeRequest; + + try { + const data = await api.getLaunchpadDigitalBusinessCardDownloadsOverTime(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinks**](AggregateClicksForBitlinks.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) + + +## getLinkPerformanceForSite + +> SiteLinkPerformance getLinkPerformanceForSite(site_id, units, unit, size, unit_reference, page) + +Get Link Performance counts for a Site + +Returns the click counts for all active and inactive links that were associated with a site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetLinkPerformanceForSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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, + // number | Integer specifying the numbered result at which to start (optional) + page: 1, + } satisfies GetLinkPerformanceForSiteRequest; + + try { + const data = await api.getLinkPerformanceForSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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`] | +| **page** | `number` | Integer specifying the numbered result at which to start | [Optional] [Defaults to `1`] | + +### Return type + +[**SiteLinkPerformance**](SiteLinkPerformance.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) + + +## getMetricsForSiteByCities + +> SiteCityViewMetrics getMetricsForSiteByCities(site_id, units, unit, size, unit_reference) + +Get Metrics for a Site by City + +Returns the city origins of view traffic for the specified Site. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetMetricsForSiteByCitiesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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 GetMetricsForSiteByCitiesRequest; + + try { + const data = await api.getMetricsForSiteByCities(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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 + +[**SiteCityViewMetrics**](SiteCityViewMetrics.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) + + +## getMetricsForSiteByDevices + +> SiteViewMetrics getMetricsForSiteByDevices(site_id, units, unit, size, unit_reference) + +Get Metrics for a Site by Device Type + +Returns the device types generating view traffic to the specified site. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetMetricsForSiteByDevicesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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 GetMetricsForSiteByDevicesRequest; + + try { + const data = await api.getMetricsForSiteByDevices(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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 + +[**SiteViewMetrics**](SiteViewMetrics.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) + + +## getMetricsForSiteByReferrers + +> SiteViewMetrics getMetricsForSiteByReferrers(site_id, units, unit, size, unit_reference) + +Get Metrics for a Site by Referrers + +Returns referrer view counts for the specified site. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetMetricsForSiteByReferrersRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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 GetMetricsForSiteByReferrersRequest; + + try { + const data = await api.getMetricsForSiteByReferrers(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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 + +[**SiteViewMetrics**](SiteViewMetrics.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 | - | +| **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) + + +## getMetricsForSitesByCountries + +> SiteViewMetrics getMetricsForSitesByCountries(site_id, units, unit, size, unit_reference) + +Get Metrics for a Site by Country + +Returns the country origins of view traffic for the specified Site. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetMetricsForSitesByCountriesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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 GetMetricsForSitesByCountriesRequest; + + try { + const data = await api.getMetricsForSitesByCountries(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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 + +[**SiteViewMetrics**](SiteViewMetrics.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 | - | +| **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) + + +## getSite + +> BitlySite getSite(site_id) + +Retrieve All Data Necessary To Render a Bitly Site + +Retrieves a Bitly Site by ID + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + } satisfies GetSiteRequest; + + try { + const data = await api.getSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | + +### Return type + +[**BitlySite**](BitlySite.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 | - | +| **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) + + +## getSiteClicksByCities + +> AggregateClicksForBitlinksByCitiesFacet getSiteClicksByCities(unit, units, site, unit_reference, report_guid) + +Get Site Button Clicks by City + +Returns the city origins of button click traffic for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSiteClicksByCitiesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetSiteClicksByCitiesRequest; + + try { + const data = await api.getSiteClicksByCities(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByCitiesFacet**](AggregateClicksForBitlinksByCitiesFacet.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) + + +## getSiteClicksByCountries + +> AggregateClicksForBitlinksByFacet getSiteClicksByCountries(unit, units, site, unit_reference, report_guid) + +Get Site Button Clicks by Country + +Returns the country origins of button click traffic for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSiteClicksByCountriesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetSiteClicksByCountriesRequest; + + try { + const data = await api.getSiteClicksByCountries(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByFacet**](AggregateClicksForBitlinksByFacet.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) + + +## getSiteClicksByDevices + +> AggregateClicksForBitlinksByFacet getSiteClicksByDevices(unit, units, site, unit_reference, report_guid) + +Get Site Button Clicks by Device + +Returns the device types generating button click traffic for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSiteClicksByDevicesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetSiteClicksByDevicesRequest; + + try { + const data = await api.getSiteClicksByDevices(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinksByFacet**](AggregateClicksForBitlinksByFacet.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) + + +## getSiteClicksOverTime + +> AggregateClicksForBitlinks getSiteClicksOverTime(unit, units, site, unit_reference, report_guid) + +Get Site Button Clicks Over Time + +Returns button click counts over time for the requested Sites, grouped by the provided time unit. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSiteClicksOverTimeRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + report_guid: report_guid_example, + } satisfies GetSiteClicksOverTimeRequest; + + try { + const data = await api.getSiteClicksOverTime(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**AggregateClicksForBitlinks**](AggregateClicksForBitlinks.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) + + +## getSiteFilteredTopPageButtons + +> SortedButtons getSiteFilteredTopPageButtons(unit, units, site, unit_reference, brand_guid, report_guid) + +Get Top Performing Site Buttons by Clicks + +Returns the top performing buttons by click count for the requested Sites. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSiteFilteredTopPageButtonsRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 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, + // Array | Filter by given Bitly Site guids (optional) + site: ["M0123456789"], + // 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, + // string (optional) + brand_guid: brand_guid_example, + // string (optional) + report_guid: report_guid_example, + } satisfies GetSiteFilteredTopPageButtonsRequest; + + try { + const data = await api.getSiteFilteredTopPageButtons(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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`] | +| **site** | `Array` | Filter by given Bitly Site guids | [Optional] | +| **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`] | +| **brand_guid** | `string` | | [Optional] [Defaults to `undefined`] | +| **report_guid** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**SortedButtons**](SortedButtons.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) + + +## getSitesForGroup + +> BitlySites getSitesForGroup(group_guid, search_after, size, sites_url_param) + +Get Bitly Sites for Group + +Gets all active Bitly Sites owned by the provided Group GUID + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetSitesForGroupRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly group + group_guid: Ba1bc23dE4F, + // string | Token used to search next batch, only use response from API as input value. (optional) + search_after: search_after_example, + // number | The quantity of items to be be returned (optional) + size: 10, + // string (optional) + sites_url_param: https://example.com, + } satisfies GetSitesForGroupRequest; + + try { + const data = await api.getSitesForGroup(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`] | +| **search_after** | `string` | Token used to search next batch, only use response from API as input value. | [Optional] [Defaults to `undefined`] | +| **size** | `number` | The quantity of items to be be returned | [Optional] [Defaults to `50`] | +| **sites_url_param** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**BitlySites**](BitlySites.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTemplates + +> Array<Template> getTemplates(category) + +Retrieve\'s Bitly templates + +Retrieves all templates optionally sorted by a Site\'s onboarding category + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetTemplatesRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // 'Link-in-bio' | 'Products and services' | 'Promotions' | 'Digital business card' | 'Image gallery' | 'Recommended' | A filter option for template categories (optional) + category: Digital business card, + } satisfies GetTemplatesRequest; + + try { + const data = await api.getTemplates(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **category** | `Link-in-bio`, `Products and services`, `Promotions`, `Digital business card`, `Image gallery`, `Recommended` | A filter option for template categories | [Optional] [Defaults to `undefined`] [Enum: Link-in-bio, Products and services, Promotions, Digital business card, Image gallery, Recommended] | + +### Return type + +[**Array<Template>**](Template.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getViewsForSite + +> SiteViewMetrics getViewsForSite(site_id, units, unit, size, unit_reference) + +Get Views for a Site + +Returns the view counts for the specified link in an array based on a date. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetViewsForSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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 GetViewsForSiteRequest; + + try { + const data = await api.getViewsForSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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 + +[**SiteViewMetrics**](SiteViewMetrics.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) + + +## getViewsSummaryForSite + +> SiteViewsSummary getViewsSummaryForSite(site_id, units, unit, size, unit_reference) + +Get a Views Summary for a Site + +Returns the view counts for the specified site rolled up into a single field. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { GetViewsSummaryForSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // number | An integer representing the time units to query data for. pass -1 to return all units of time + units: 1, + // TimeUnit | A unit of time (optional) + unit: month, + // 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 GetViewsSummaryForSiteRequest; + + try { + const data = await api.getViewsSummaryForSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **units** | `number` | An integer representing the time units to query data for. pass -1 to return all units of time | [Defaults to `-1`] | +| **unit** | `TimeUnit` | A unit of time | [Optional] [Defaults to `undefined`] [Enum: minute, hour, day, week, month] | +| **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 + +[**SiteViewsSummary**](SiteViewsSummary.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) + + +## prevalidateYouTubeVideoButton + +> YoutubeVideoRequest prevalidateYouTubeVideoButton(launchpad_id, prevalidate_you_tube_video_request) + +Prevalidate a youtube video button + +constructs the content blob required to create a YouTube video button + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { PrevalidateYouTubeVideoButtonRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Link Launchpad + launchpad_id: Sa1bcd234eF, + // PrevalidateYouTubeVideoRequest + prevalidate_you_tube_video_request: {"video_id":"dQw4w9WgXcQ"}, + } satisfies PrevalidateYouTubeVideoButtonRequest; + + try { + const data = await api.prevalidateYouTubeVideoButton(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **launchpad_id** | `string` | A GUID for a Bitly Link Launchpad | [Defaults to `undefined`] | +| **prevalidate_you_tube_video_request** | [PrevalidateYouTubeVideoRequest](PrevalidateYouTubeVideoRequest.md) | | | + +### Return type + +[**YoutubeVideoRequest**](YoutubeVideoRequest.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 | - | +| **422** | UNPROCESSABLE_ENTITY | - | +| **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) + + +## publishSite + +> BitlySite publishSite(site_id) + +Publishes a Draft Site to become Production Site + +Replaces a production Site with its draft Site if changes are made + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { PublishSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + } satisfies PublishSiteRequest; + + try { + const data = await api.publishSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | + +### Return type + +[**BitlySite**](BitlySite.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | CREATED | - | +| **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) + + +## updateSite + +> BitlySite updateSite(site_id, update_site) + +Updates an existing Bitly Site + +Updates a Bitly Site\'s URI, display name, description and attached QR code. Changing the URI also creates a redirect from the previous URI. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { UpdateSiteRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // UpdateSite + update_site: {"uri":"bit.ly/m/bitlySocial","display_name":"Bitly Social","description":"All of our social links in one place","qr_code_id":"Qabc123"}, + } satisfies UpdateSiteRequest; + + try { + const data = await api.updateSite(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **update_site** | [UpdateSite](UpdateSite.md) | | | + +### Return type + +[**BitlySite**](BitlySite.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## updateSiteAppearance + +> updateSiteAppearance(site_id, bitly_site_appearance) + +Update the appearance of a Bitly Site + +Updates the appearance of a Bitly Site + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { UpdateSiteAppearanceRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // BitlySiteAppearance + bitly_site_appearance: {"theme_id":1,"layout":"default","font":"Inter","hide_bitly_logo":false,"style_preference":"theme","background_color":"#ffffff","bottom_background_color":"#f5f5f5","text_color":"#000000","description_color":"#333333","default_button_background_color":"#000000","default_button_text_color":"#ffffff","default_button_shape":"rounded"}, + } satisfies UpdateSiteAppearanceRequest; + + try { + const data = await api.updateSiteAppearance(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **bitly_site_appearance** | [BitlySiteAppearance](BitlySiteAppearance.md) | | | + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | SUCCESS | - | +| **400** | BAD_REQUEST | - | +| **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) + + +## updateSiteBlock + +> SiteBlock updateSiteBlock(site_id, block_id, site_block_request) + +Update a block on the provided Site ID + +Updates a block on the provided Site ID. The block type is derived from the stored block and cannot be changed. + +### Example + +```ts +import { + Configuration, + BitlySitesApi, +} from ''; +import type { UpdateSiteBlockRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new BitlySitesApi(config); + + const body = { + // string | A GUID for a Bitly Site + site_id: M0000guid01, + // string | A GUID for a Bitly Site content block + block_id: La1bcd234eF, + // SiteBlockRequest + site_block_request: {"content":{"text":"Updated text content"},"appearance":{"alignment":"center","font_size":"large"},"is_active":true,"is_pinned":true}, + } satisfies UpdateSiteBlockRequest; + + try { + const data = await api.updateSiteBlock(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **site_id** | `string` | A GUID for a Bitly Site | [Defaults to `undefined`] | +| **block_id** | `string` | A GUID for a Bitly Site content block | [Defaults to `undefined`] | +| **site_block_request** | [SiteBlockRequest](SiteBlockRequest.md) | | | + +### Return type + +[**SiteBlock**](SiteBlock.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** | OK | - | +| **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/BlockContentDigitalBusinessCard.md b/src/docs/BlockContentDigitalBusinessCard.md new file mode 100644 index 0000000..bf1b110 --- /dev/null +++ b/src/docs/BlockContentDigitalBusinessCard.md @@ -0,0 +1,50 @@ + +# BlockContentDigitalBusinessCard + + +## Properties + +Name | Type +------------ | ------------- +`digital_business_card_id` | string +`layout` | [DigitalBusinessCardLayout](DigitalBusinessCardLayout.md) +`first_name` | string +`last_name` | string +`job_title` | string +`company` | string +`pronouns` | string +`contacts` | [Array<DigitalBusinessCardContact>](DigitalBusinessCardContact.md) +`download_enabled` | boolean + +## Example + +```typescript +import type { BlockContentDigitalBusinessCard } from '' + +// TODO: Update the object below with actual values +const example = { + "digital_business_card_id": null, + "layout": null, + "first_name": null, + "last_name": null, + "job_title": null, + "company": null, + "pronouns": null, + "contacts": null, + "download_enabled": true, +} satisfies BlockContentDigitalBusinessCard + +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 BlockContentDigitalBusinessCard +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/BlockContentSocial.md b/src/docs/BlockContentSocial.md new file mode 100644 index 0000000..067532a --- /dev/null +++ b/src/docs/BlockContentSocial.md @@ -0,0 +1,36 @@ + +# BlockContentSocial + + +## Properties + +Name | Type +------------ | ------------- +`channel` | string +`channel_url` | string + +## Example + +```typescript +import type { BlockContentSocial } from '' + +// TODO: Update the object below with actual values +const example = { + "channel": null, + "channel_url": null, +} satisfies BlockContentSocial + +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 BlockContentSocial +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/BlockContentYoutube.md b/src/docs/BlockContentYoutube.md new file mode 100644 index 0000000..589e2cc --- /dev/null +++ b/src/docs/BlockContentYoutube.md @@ -0,0 +1,34 @@ + +# BlockContentYoutube + + +## Properties + +Name | Type +------------ | ------------- +`thumbnail_url` | string + +## Example + +```typescript +import type { BlockContentYoutube } from '' + +// TODO: Update the object below with actual values +const example = { + "thumbnail_url": null, +} satisfies BlockContentYoutube + +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 BlockContentYoutube +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/ClicksByCitiesFacet.md b/src/docs/ClicksByCitiesFacet.md new file mode 100644 index 0000000..bec65e6 --- /dev/null +++ b/src/docs/ClicksByCitiesFacet.md @@ -0,0 +1,42 @@ + +# ClicksByCitiesFacet + + +## Properties + +Name | Type +------------ | ------------- +`city` | string +`clicks` | number +`region` | string +`subregion` | string +`country` | string + +## Example + +```typescript +import type { ClicksByCitiesFacet } from '' + +// TODO: Update the object below with actual values +const example = { + "city": null, + "clicks": null, + "region": null, + "subregion": null, + "country": null, +} satisfies ClicksByCitiesFacet + +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 ClicksByCitiesFacet +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/ClicksByFacet.md b/src/docs/ClicksByFacet.md new file mode 100644 index 0000000..09a44bd --- /dev/null +++ b/src/docs/ClicksByFacet.md @@ -0,0 +1,36 @@ + +# ClicksByFacet + + +## Properties + +Name | Type +------------ | ------------- +`value` | string +`clicks` | number + +## Example + +```typescript +import type { ClicksByFacet } from '' + +// TODO: Update the object below with actual values +const example = { + "value": null, + "clicks": null, +} satisfies ClicksByFacet + +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 ClicksByFacet +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/ClicksForAggregate.md b/src/docs/ClicksForAggregate.md new file mode 100644 index 0000000..252dfe3 --- /dev/null +++ b/src/docs/ClicksForAggregate.md @@ -0,0 +1,36 @@ + +# ClicksForAggregate + + +## Properties + +Name | Type +------------ | ------------- +`date` | number +`clicks` | number + +## Example + +```typescript +import type { ClicksForAggregate } from '' + +// TODO: Update the object below with actual values +const example = { + "date": null, + "clicks": null, +} satisfies ClicksForAggregate + +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 ClicksForAggregate +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/CreateLaunchpad.md b/src/docs/CreateLaunchpad.md new file mode 100644 index 0000000..ab41aa3 --- /dev/null +++ b/src/docs/CreateLaunchpad.md @@ -0,0 +1,41 @@ + +# CreateLaunchpad + +@deprecated LL-2507 + +## Properties + +Name | Type +------------ | ------------- +`group_guid` | string +`domain` | string +`keyword` | string +`uri` | string + +## Example + +```typescript +import type { CreateLaunchpad } from '' + +// TODO: Update the object below with actual values +const example = { + "group_guid": B1234567890, + "domain": bit.ly, + "keyword": bitlySocial, + "uri": bit.ly/m/bitlySocial, +} satisfies CreateLaunchpad + +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 CreateLaunchpad +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/DigitalBusinessCardContact.md b/src/docs/DigitalBusinessCardContact.md new file mode 100644 index 0000000..a00cfe7 --- /dev/null +++ b/src/docs/DigitalBusinessCardContact.md @@ -0,0 +1,42 @@ + +# DigitalBusinessCardContact + + +## Properties + +Name | Type +------------ | ------------- +`contact_method` | string +`method_type` | string +`value` | string +`sort_order` | number +`bitlink_id` | string + +## Example + +```typescript +import type { DigitalBusinessCardContact } from '' + +// TODO: Update the object below with actual values +const example = { + "contact_method": null, + "method_type": null, + "value": chauncey@bit.ly, + "sort_order": 1, + "bitlink_id": bit.ly/123, +} satisfies DigitalBusinessCardContact + +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 DigitalBusinessCardContact +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/DigitalBusinessCardContent.md b/src/docs/DigitalBusinessCardContent.md new file mode 100644 index 0000000..7f5e764 --- /dev/null +++ b/src/docs/DigitalBusinessCardContent.md @@ -0,0 +1,54 @@ + +# DigitalBusinessCardContent + + +## Properties + +Name | Type +------------ | ------------- +`digital_business_card_id` | string +`link_title` | string +`layout` | [DigitalBusinessCardLayout](DigitalBusinessCardLayout.md) +`first_name` | string +`last_name` | string +`pronouns` | string +`company` | string +`job_title` | string +`contacts` | [Array<DigitalBusinessCardContact>](DigitalBusinessCardContact.md) +`download_enabled` | boolean +`file` | [DigitalBusinessCardContentFile](DigitalBusinessCardContentFile.md) + +## Example + +```typescript +import type { DigitalBusinessCardContent } from '' + +// TODO: Update the object below with actual values +const example = { + "digital_business_card_id": null, + "link_title": My Contact Info, + "layout": null, + "first_name": Jane, + "last_name": Doe, + "pronouns": she/them, + "company": Bitly, + "job_title": Developer, + "contacts": null, + "download_enabled": true, + "file": null, +} satisfies DigitalBusinessCardContent + +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 DigitalBusinessCardContent +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/DigitalBusinessCardContentFile.md b/src/docs/DigitalBusinessCardContentFile.md new file mode 100644 index 0000000..00f9245 --- /dev/null +++ b/src/docs/DigitalBusinessCardContentFile.md @@ -0,0 +1,36 @@ + +# DigitalBusinessCardContentFile + + +## Properties + +Name | Type +------------ | ------------- +`file_name` | string +`data` | string + +## Example + +```typescript +import type { DigitalBusinessCardContentFile } from '' + +// TODO: Update the object below with actual values +const example = { + "file_name": JaneDoe.vcf, + "data": BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Bitly\nTITLE:Developer\nTEL;TYPE=WORK,VOICE:555-555-5555\nEMAIL:, +} satisfies DigitalBusinessCardContentFile + +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 DigitalBusinessCardContentFile +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/DigitalBusinessCardLayout.md b/src/docs/DigitalBusinessCardLayout.md new file mode 100644 index 0000000..970687b --- /dev/null +++ b/src/docs/DigitalBusinessCardLayout.md @@ -0,0 +1,32 @@ + +# DigitalBusinessCardLayout + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { DigitalBusinessCardLayout } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies DigitalBusinessCardLayout + +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 DigitalBusinessCardLayout +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/DynamicRoutingDeviceEnum.md b/src/docs/DynamicRoutingDeviceEnum.md new file mode 100644 index 0000000..ddb6991 --- /dev/null +++ b/src/docs/DynamicRoutingDeviceEnum.md @@ -0,0 +1,33 @@ + +# DynamicRoutingDeviceEnum + +Device type values for use in dynamic routing rules (device_match / device_exclude) + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { DynamicRoutingDeviceEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies DynamicRoutingDeviceEnum + +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 DynamicRoutingDeviceEnum +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/DynamicRoutingPlatformEnum.md b/src/docs/DynamicRoutingPlatformEnum.md new file mode 100644 index 0000000..1980e7e --- /dev/null +++ b/src/docs/DynamicRoutingPlatformEnum.md @@ -0,0 +1,33 @@ + +# DynamicRoutingPlatformEnum + +Platform (OS) values for use in dynamic routing rules (os_match / os_exclude) + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { DynamicRoutingPlatformEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies DynamicRoutingPlatformEnum + +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 DynamicRoutingPlatformEnum +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/DynamicRoutingRule.md b/src/docs/DynamicRoutingRule.md new file mode 100644 index 0000000..0954309 --- /dev/null +++ b/src/docs/DynamicRoutingRule.md @@ -0,0 +1,51 @@ + +# DynamicRoutingRule + +A dynamic routing rule that redirects traffic to a different destination based on user attributes. + +## Properties + +Name | Type +------------ | ------------- +`long_url` | string +`country_match` | Array<string> +`country_exclude` | Array<string> +`region_match` | Array<string> +`region_exclude` | Array<string> +`device_match` | [Array<DynamicRoutingDeviceEnum>](DynamicRoutingDeviceEnum.md) +`device_exclude` | [Array<DynamicRoutingDeviceEnum>](DynamicRoutingDeviceEnum.md) +`os_match` | [Array<DynamicRoutingPlatformEnum>](DynamicRoutingPlatformEnum.md) +`os_exclude` | [Array<DynamicRoutingPlatformEnum>](DynamicRoutingPlatformEnum.md) + +## Example + +```typescript +import type { DynamicRoutingRule } from '' + +// TODO: Update the object below with actual values +const example = { + "long_url": null, + "country_match": null, + "country_exclude": null, + "region_match": null, + "region_exclude": null, + "device_match": null, + "device_exclude": null, + "os_match": null, + "os_exclude": null, +} satisfies DynamicRoutingRule + +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 DynamicRoutingRule +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 index e0780b5..ffeb40a 100644 --- a/src/docs/ExpandedBitlink.md +++ b/src/docs/ExpandedBitlink.md @@ -9,6 +9,7 @@ Name | Type `link` | string `id` | string `long_url` | string +`long_urls` | Array<string> `created_at` | string ## Example @@ -21,6 +22,7 @@ const example = { "link": null, "id": null, "long_url": null, + "long_urls": null, "created_at": null, } satisfies ExpandedBitlink diff --git a/src/docs/FullShorten.md b/src/docs/FullShorten.md index 2888635..1525e89 100644 --- a/src/docs/FullShorten.md +++ b/src/docs/FullShorten.md @@ -17,6 +17,7 @@ Name | Type `keyword` | string `bitlink_id` | string `expiration_at` | string +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -35,6 +36,7 @@ const example = { "keyword": null, "bitlink_id": null, "expiration_at": null, + "dynamic_routing": null, } satisfies FullShorten console.log(example) diff --git a/src/docs/GetAggregateSitesOverview200Response.md b/src/docs/GetAggregateSitesOverview200Response.md new file mode 100644 index 0000000..19f562b --- /dev/null +++ b/src/docs/GetAggregateSitesOverview200Response.md @@ -0,0 +1,38 @@ + +# GetAggregateSitesOverview200Response + + +## Properties + +Name | Type +------------ | ------------- +`views` | number +`clicks` | number +`info` | string + +## Example + +```typescript +import type { GetAggregateSitesOverview200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "views": null, + "clicks": null, + "info": null, +} satisfies GetAggregateSitesOverview200Response + +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 GetAggregateSitesOverview200Response +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/GroupBitlinksCountRollup.md b/src/docs/GroupBitlinksCountRollup.md new file mode 100644 index 0000000..d03dd91 --- /dev/null +++ b/src/docs/GroupBitlinksCountRollup.md @@ -0,0 +1,40 @@ + +# GroupBitlinksCountRollup + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`unit_reference` | string +`total_clicks` | number + +## Example + +```typescript +import type { GroupBitlinksCountRollup } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "unit_reference": null, + "total_clicks": null, +} satisfies GroupBitlinksCountRollup + +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 GroupBitlinksCountRollup +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 index 9039de7..e8c0fb6 100644 --- a/src/docs/GroupsApi.md +++ b/src/docs/GroupsApi.md @@ -5,6 +5,7 @@ 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 | +| [**getGroupAgenticTrafficRollup**](GroupsApi.md#getgroupagentictrafficrollup) | **GET** /groups/{group_guid}/agentic_traffic/rollup | Get Group Agentic Traffic Rollup | | [**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 | @@ -111,6 +112,80 @@ example().catch(console.error); [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) +## getGroupAgenticTrafficRollup + +> GroupBitlinksCountRollup getGroupAgenticTrafficRollup(group_guid) + +Get Group Agentic Traffic Rollup + +Get the total agentic traffic (AI agents and assistants) count over the last 90 days for a group. + +### Example + +```ts +import { + Configuration, + GroupsApi, +} from ''; +import type { GetGroupAgenticTrafficRollupRequest } 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 GetGroupAgenticTrafficRollupRequest; + + try { + const data = await api.getGroupAgenticTrafficRollup(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 + +[**GroupBitlinksCountRollup**](GroupBitlinksCountRollup.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) + + ## getGroupClicks > GroupClicks getGroupClicks(group_guid, unit, units, unit_reference) diff --git a/src/docs/ImageCommon.md b/src/docs/ImageCommon.md new file mode 100644 index 0000000..51e7f8c --- /dev/null +++ b/src/docs/ImageCommon.md @@ -0,0 +1,38 @@ + +# ImageCommon + + +## Properties + +Name | Type +------------ | ------------- +`image_guid` | string +`image_url` | string +`crop` | string + +## Example + +```typescript +import type { ImageCommon } from '' + +// TODO: Update the object below with actual values +const example = { + "image_guid": null, + "image_url": null, + "crop": {"Min": {"X": 0, "Y": 0}, "Max": {"X": 1, "Y": 1}}, +} satisfies ImageCommon + +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 ImageCommon +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/ImageContent.md b/src/docs/ImageContent.md new file mode 100644 index 0000000..2265a7e --- /dev/null +++ b/src/docs/ImageContent.md @@ -0,0 +1,46 @@ + +# ImageContent + + +## Properties + +Name | Type +------------ | ------------- +`image_guid` | string +`image_url` | string +`crop` | string +`aspect_ratio` | string +`link_title` | string +`description` | string +`bitlink_id` | string + +## Example + +```typescript +import type { ImageContent } from '' + +// TODO: Update the object below with actual values +const example = { + "image_guid": null, + "image_url": null, + "crop": {"Min": {"X": 0, "Y": 0}, "Max": {"X": 1, "Y": 1}}, + "aspect_ratio": 1:1, + "link_title": my image, + "description": more about my image, + "bitlink_id": bit.ly/123, +} satisfies ImageContent + +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 ImageContent +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/ImageUploadResponse.md b/src/docs/ImageUploadResponse.md new file mode 100644 index 0000000..cc1fc1f --- /dev/null +++ b/src/docs/ImageUploadResponse.md @@ -0,0 +1,36 @@ + +# ImageUploadResponse + + +## Properties + +Name | Type +------------ | ------------- +`image_url` | string +`image_guid` | string + +## Example + +```typescript +import type { ImageUploadResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "image_url": null, + "image_guid": null, +} satisfies ImageUploadResponse + +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 ImageUploadResponse +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/LaunchpadButtonTypeEnum.md b/src/docs/LaunchpadButtonTypeEnum.md new file mode 100644 index 0000000..f524e15 --- /dev/null +++ b/src/docs/LaunchpadButtonTypeEnum.md @@ -0,0 +1,33 @@ + +# LaunchpadButtonTypeEnum + +Available button types for Launchpad content + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { LaunchpadButtonTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies LaunchpadButtonTypeEnum + +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 LaunchpadButtonTypeEnum +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/MicrositePagination.md b/src/docs/MicrositePagination.md new file mode 100644 index 0000000..f916070 --- /dev/null +++ b/src/docs/MicrositePagination.md @@ -0,0 +1,39 @@ + +# MicrositePagination + +Specifies how to query the next set of results. + +## Properties + +Name | Type +------------ | ------------- +`next` | string +`search_after` | string +`size` | number + +## Example + +```typescript +import type { MicrositePagination } from '' + +// TODO: Update the object below with actual values +const example = { + "next": null, + "search_after": bryhzW:Mo81ihn1syE, + "size": 50, +} satisfies MicrositePagination + +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 MicrositePagination +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 index 933595d..c75643d 100644 --- a/src/docs/OAuthApp.md +++ b/src/docs/OAuthApp.md @@ -11,6 +11,7 @@ Name | Type `description` | string `link` | string `require_oauth_pkce` | boolean +`internal_app` | boolean ## Example @@ -24,6 +25,7 @@ const example = { "description": null, "link": null, "require_oauth_pkce": null, + "internal_app": null, } satisfies OAuthApp console.log(example) diff --git a/src/docs/OtherViewMetrics.md b/src/docs/OtherViewMetrics.md new file mode 100644 index 0000000..eb0b363 --- /dev/null +++ b/src/docs/OtherViewMetrics.md @@ -0,0 +1,36 @@ + +# OtherViewMetrics + + +## Properties + +Name | Type +------------ | ------------- +`other_city_views` | number +`no_city_views` | number + +## Example + +```typescript +import type { OtherViewMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "other_city_views": null, + "no_city_views": null, +} satisfies OtherViewMetrics + +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 OtherViewMetrics +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/PageLinkInfo.md b/src/docs/PageLinkInfo.md new file mode 100644 index 0000000..44505ac --- /dev/null +++ b/src/docs/PageLinkInfo.md @@ -0,0 +1,47 @@ + +# PageLinkInfo + +Versioned bitlink data from decodes_api for rendering links on Sites and Launchpads + +## Properties + +Name | Type +------------ | ------------- +`link` | string +`long_url` | string +`expiration_at` | number +`has_override` | boolean +`is_override` | boolean +`is_deleted` | boolean +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) + +## Example + +```typescript +import type { PageLinkInfo } from '' + +// TODO: Update the object below with actual values +const example = { + "link": null, + "long_url": null, + "expiration_at": null, + "has_override": null, + "is_override": null, + "is_deleted": null, + "dynamic_routing": null, +} satisfies PageLinkInfo + +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 PageLinkInfo +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/PrevalidateYouTubeVideoRequest.md b/src/docs/PrevalidateYouTubeVideoRequest.md new file mode 100644 index 0000000..cf8a389 --- /dev/null +++ b/src/docs/PrevalidateYouTubeVideoRequest.md @@ -0,0 +1,34 @@ + +# PrevalidateYouTubeVideoRequest + + +## Properties + +Name | Type +------------ | ------------- +`video_id` | string + +## Example + +```typescript +import type { PrevalidateYouTubeVideoRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "video_id": null, +} satisfies PrevalidateYouTubeVideoRequest + +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 PrevalidateYouTubeVideoRequest +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 index f739c07..b2ec404 100644 --- a/src/docs/PublicCreateQRCodeRequest.md +++ b/src/docs/PublicCreateQRCodeRequest.md @@ -15,6 +15,8 @@ Name | Type `gs1` | [GS1Metadata](GS1Metadata.md) `expiration_at` | string `tags` | Array<string> +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) +`domain` | string ## Example @@ -31,6 +33,8 @@ const example = { "gs1": null, "expiration_at": null, "tags": null, + "dynamic_routing": null, + "domain": null, } satisfies PublicCreateQRCodeRequest console.log(example) diff --git a/src/docs/PublicUpdateQRCodeRequest.md b/src/docs/PublicUpdateQRCodeRequest.md index fac6bbf..819235d 100644 --- a/src/docs/PublicUpdateQRCodeRequest.md +++ b/src/docs/PublicUpdateQRCodeRequest.md @@ -12,6 +12,7 @@ Name | Type `archived` | boolean `expiration_at` | string `tags` | Array<string> +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -25,6 +26,7 @@ const example = { "archived": null, "expiration_at": null, "tags": null, + "dynamic_routing": null, } satisfies PublicUpdateQRCodeRequest console.log(example) diff --git a/src/docs/QRCBulkUpdate.md b/src/docs/QRCBulkUpdate.md new file mode 100644 index 0000000..51b4a9a --- /dev/null +++ b/src/docs/QRCBulkUpdate.md @@ -0,0 +1,34 @@ + +# QRCBulkUpdate + + +## Properties + +Name | Type +------------ | ------------- +`qr_code_ids` | Array<string> + +## Example + +```typescript +import type { QRCBulkUpdate } from '' + +// TODO: Update the object below with actual values +const example = { + "qr_code_ids": null, +} satisfies QRCBulkUpdate + +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 QRCBulkUpdate +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/QRCBulkUpdateRequest.md b/src/docs/QRCBulkUpdateRequest.md new file mode 100644 index 0000000..f0f7b2d --- /dev/null +++ b/src/docs/QRCBulkUpdateRequest.md @@ -0,0 +1,42 @@ + +# QRCBulkUpdateRequest + + +## Properties + +Name | Type +------------ | ------------- +`action` | string +`archive` | boolean +`add_tags` | Array<string> +`remove_tags` | Array<string> +`qr_code_ids` | Array<string> + +## Example + +```typescript +import type { QRCBulkUpdateRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "action": null, + "archive": null, + "add_tags": null, + "remove_tags": null, + "qr_code_ids": null, +} satisfies QRCBulkUpdateRequest + +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 QRCBulkUpdateRequest +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 index e6acee7..1dc2747 100644 --- a/src/docs/QRCodeDetails.md +++ b/src/docs/QRCodeDetails.md @@ -13,6 +13,7 @@ Name | Type `render_customizations` | [QRCodeCustomizationsPublic](QRCodeCustomizationsPublic.md) `qr_code_type` | [QRCodeTypeEnum](QRCodeTypeEnum.md) `bitlink_id` | string +`domain` | string `long_urls` | Array<string> `serialized_content` | string `archived` | boolean @@ -20,6 +21,7 @@ Name | Type `modified` | string `expiration_at` | string `tags` | Array<string> +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -35,6 +37,7 @@ const example = { "render_customizations": null, "qr_code_type": null, "bitlink_id": null, + "domain": null, "long_urls": null, "serialized_content": null, "archived": null, @@ -42,6 +45,7 @@ const example = { "modified": null, "expiration_at": null, "tags": null, + "dynamic_routing": null, } satisfies QRCodeDetails console.log(example) diff --git a/src/docs/QRCodeMinimal.md b/src/docs/QRCodeMinimal.md index 7c7873a..e8314b9 100644 --- a/src/docs/QRCodeMinimal.md +++ b/src/docs/QRCodeMinimal.md @@ -14,11 +14,13 @@ Name | Type `qr_code_type` | [QRCodeTypeEnum](QRCodeTypeEnum.md) `long_urls` | Array<string> `bitlink_id` | string +`domain` | string `is_gs1` | boolean `created_by` | string `tags` | Array<string> `archived` | boolean `expiration_at` | string +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) `created` | string `modified` | string @@ -37,11 +39,13 @@ const example = { "qr_code_type": null, "long_urls": null, "bitlink_id": null, + "domain": null, "is_gs1": null, "created_by": null, "tags": null, "archived": null, "expiration_at": null, + "dynamic_routing": null, "created": null, "modified": null, } satisfies QRCodeMinimal diff --git a/src/docs/QRCodesApi.md b/src/docs/QRCodesApi.md index be2bcf5..ed9f2ef 100644 --- a/src/docs/QRCodesApi.md +++ b/src/docs/QRCodesApi.md @@ -16,7 +16,10 @@ All URIs are relative to *https://api-ssl.bitly.com/v4* | [**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 | +| [**redirectQRCodeDestination**](QRCodesApi.md#redirectqrcodedestination) | **PATCH** /qr-codes/{qrcode_id}/redirect | Redirect a QR Code | | [**updateQRCodePublic**](QRCodesApi.md#updateqrcodepublic) | **PATCH** /qr-codes/{qrcode_id} | Update a QR Code | +| [**updateQRCodesByGroup**](QRCodesApi.md#updateqrcodesbygroup) | **PATCH** /groups/{group_guid}/qr-codes | Bulk update QR codes | +| [**upgradeQRCodeToBitlink**](QRCodesApi.md#upgradeqrcodetobitlink) | **PUT** /qr-codes/{qrcode_id}/to-bitlink | Upgrade a QR Code to a bitlink | @@ -949,7 +952,7 @@ example().catch(console.error); ## 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) +> 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, has_dynamic_routing, tags) Retrieve QR Codes by Group @@ -1001,6 +1004,8 @@ async function example() { is_expired: is_expired_example, // 'on' | 'off' | 'both' | filter bitlinks by presence of expiration (optional) has_expiration: has_expiration_example, + // 'on' | 'off' | 'both' | filter bitlinks by presence of dynamic routing rules (optional) + has_dynamic_routing: has_dynamic_routing_example, // Array | Filter by given tags (optional) tags: ["bitly","api"], } satisfies ListQRMinimalRequest; @@ -1036,6 +1041,7 @@ example().catch(console.error); | **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] | +| **has_dynamic_routing** | `on`, `off`, `both` | filter bitlinks by presence of dynamic routing rules | [Optional] [Defaults to `'both'`] [Enum: on, off, both] | | **tags** | `Array` | Filter by given tags | [Optional] | ### Return type @@ -1063,6 +1069,88 @@ example().catch(console.error); [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) +## redirectQRCodeDestination + +> QRCodeMinimal redirectQRCodeDestination(qrcode_id, redirect_qr_code_request) + +Redirect a QR Code + +Changes the destination URL that a stand alone QR Code redirects to. This only works for stand alone QR Codes; a QR Code already associated with a bitlink must be updated via the Bitlinks API. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { RedirectQRCodeDestinationRequest } 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 + qrcode_id: qrcode_id_example, + // RedirectQRCodeRequest + redirect_qr_code_request: ..., + } satisfies RedirectQRCodeDestinationRequest; + + try { + const data = await api.redirectQRCodeDestination(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | | [Defaults to `undefined`] | +| **redirect_qr_code_request** | [RedirectQRCodeRequest](RedirectQRCodeRequest.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 | - | +| **402** | UPGRADE_REQUIRED | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **410** | GONE | - | +| **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) + + ## updateQRCodePublic > QRCodeMinimal updateQRCodePublic(qrcode_id, public_update_qr_code_request) @@ -1091,7 +1179,7 @@ async function example() { const body = { // string | The QR code ID qrcode_id: Qabc123, - // PublicUpdateQRCodeRequest + // PublicUpdateQRCodeRequest (optional) public_update_qr_code_request: {"title":"Minimal QR Code Updated","tags":["tag1","tag2"]}, } satisfies UpdateQRCodePublicRequest; @@ -1113,7 +1201,7 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **qrcode_id** | `string` | The QR code ID | [Defaults to `undefined`] | -| **public_update_qr_code_request** | [PublicUpdateQRCodeRequest](PublicUpdateQRCodeRequest.md) | | | +| **public_update_qr_code_request** | [PublicUpdateQRCodeRequest](PublicUpdateQRCodeRequest.md) | | [Optional] | ### Return type @@ -1141,3 +1229,161 @@ example().catch(console.error); [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + +## updateQRCodesByGroup + +> QRCBulkUpdate updateQRCodesByGroup(group_guid, qrc_bulk_update_request) + +Bulk update QR codes + +Bulk update can add or remove tags, or archive/un-archive, up to 100 QR codes at a time. Pages QR codes cannot be updated with this endpoint. The response includes a list of QR code ids that were updated. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { UpdateQRCodesByGroupRequest } 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, + // QRCBulkUpdateRequest + qrc_bulk_update_request: ..., + } satisfies UpdateQRCodesByGroupRequest; + + try { + const data = await api.updateQRCodesByGroup(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`] | +| **qrc_bulk_update_request** | [QRCBulkUpdateRequest](QRCBulkUpdateRequest.md) | | | + +### Return type + +[**QRCBulkUpdate**](QRCBulkUpdate.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 | - | +| **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) + + +## upgradeQRCodeToBitlink + +> BitlinkBody upgradeQRCodeToBitlink(qrcode_id) + +Upgrade a QR Code to a bitlink + +Upgrades a stand alone (decoupled) QR Code to a coupled QR Code by associating it with its underlying Bitly short link. This operation consumes one encode from the organization\'s monthly Link limit. If the QR Code is already coupled, no encode is consumed. + +### Example + +```ts +import { + Configuration, + QRCodesApi, +} from ''; +import type { UpgradeQRCodeToBitlinkRequest } 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 + qrcode_id: qrcode_id_example, + } satisfies UpgradeQRCodeToBitlinkRequest; + + try { + const data = await api.upgradeQRCodeToBitlink(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **qrcode_id** | `string` | | [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 | - | +| **400** | BAD_REQUEST | - | +| **403** | FORBIDDEN | - | +| **404** | NOT_FOUND | - | +| **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) + diff --git a/src/docs/RedirectQRCodeRequest.md b/src/docs/RedirectQRCodeRequest.md new file mode 100644 index 0000000..c45b8e1 --- /dev/null +++ b/src/docs/RedirectQRCodeRequest.md @@ -0,0 +1,35 @@ + +# RedirectQRCodeRequest + +Request to redirect a QRCode + +## Properties + +Name | Type +------------ | ------------- +`long_url` | string + +## Example + +```typescript +import type { RedirectQRCodeRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "long_url": https://www.google.com, +} satisfies RedirectQRCodeRequest + +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 RedirectQRCodeRequest +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/SiteBannerType.md b/src/docs/SiteBannerType.md new file mode 100644 index 0000000..7fefe7e --- /dev/null +++ b/src/docs/SiteBannerType.md @@ -0,0 +1,33 @@ + +# SiteBannerType + +Enum of banner type options on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteBannerType } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteBannerType + +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 SiteBannerType +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/SiteBlock.md b/src/docs/SiteBlock.md new file mode 100644 index 0000000..6ffe28a --- /dev/null +++ b/src/docs/SiteBlock.md @@ -0,0 +1,58 @@ + +# SiteBlock + + +## Properties + +Name | Type +------------ | ------------- +`site_id` | string +`block_id` | string +`sort_order` | number +`schedule_start` | string +`schedule_end` | string +`is_active` | boolean +`is_pinned` | boolean +`is_sample` | boolean +`type` | [SiteBlockTypeEnum](SiteBlockTypeEnum.md) +`container_id` | string +`scheme` | string +`content` | any +`appearance` | any + +## Example + +```typescript +import type { SiteBlock } from '' + +// TODO: Update the object below with actual values +const example = { + "site_id": M1234567890, + "block_id": L1234567890, + "sort_order": null, + "schedule_start": null, + "schedule_end": null, + "is_active": null, + "is_pinned": null, + "is_sample": null, + "type": null, + "container_id": L1234567890, + "scheme": https, + "content": null, + "appearance": null, +} satisfies SiteBlock + +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 SiteBlock +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/SiteBlockCommon.md b/src/docs/SiteBlockCommon.md new file mode 100644 index 0000000..9c907e8 --- /dev/null +++ b/src/docs/SiteBlockCommon.md @@ -0,0 +1,50 @@ + +# SiteBlockCommon + + +## Properties + +Name | Type +------------ | ------------- +`site_id` | string +`block_id` | string +`sort_order` | number +`schedule_start` | string +`schedule_end` | string +`is_active` | boolean +`is_pinned` | boolean +`is_sample` | boolean +`type` | [SiteBlockTypeEnum](SiteBlockTypeEnum.md) + +## Example + +```typescript +import type { SiteBlockCommon } from '' + +// TODO: Update the object below with actual values +const example = { + "site_id": M1234567890, + "block_id": L1234567890, + "sort_order": null, + "schedule_start": null, + "schedule_end": null, + "is_active": null, + "is_pinned": null, + "is_sample": null, + "type": null, +} satisfies SiteBlockCommon + +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 SiteBlockCommon +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/SiteBlockContainerRequest.md b/src/docs/SiteBlockContainerRequest.md new file mode 100644 index 0000000..17a4fd4 --- /dev/null +++ b/src/docs/SiteBlockContainerRequest.md @@ -0,0 +1,34 @@ + +# SiteBlockContainerRequest + + +## Properties + +Name | Type +------------ | ------------- +`type` | [SiteContainerTypeEnum](SiteContainerTypeEnum.md) + +## Example + +```typescript +import type { SiteBlockContainerRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "type": null, +} satisfies SiteBlockContainerRequest + +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 SiteBlockContainerRequest +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/SiteBlockContent.md b/src/docs/SiteBlockContent.md new file mode 100644 index 0000000..46a0c78 --- /dev/null +++ b/src/docs/SiteBlockContent.md @@ -0,0 +1,72 @@ + +# SiteBlockContent + + +## Properties + +Name | Type +------------ | ------------- +`thumbnail_url` | string +`channel` | string +`channel_url` | string +`digital_business_card_id` | string +`layout` | [DigitalBusinessCardLayout](DigitalBusinessCardLayout.md) +`first_name` | string +`last_name` | string +`job_title` | string +`company` | string +`pronouns` | string +`contacts` | [Array<DigitalBusinessCardContact>](DigitalBusinessCardContact.md) +`download_enabled` | boolean +`link_title` | string +`description` | string +`bitlink_id` | string +`image_guid` | string +`image_url` | string +`crop` | string +`aspect_ratio` | string +`link_info` | [PageLinkInfo](PageLinkInfo.md) + +## Example + +```typescript +import type { SiteBlockContent } from '' + +// TODO: Update the object below with actual values +const example = { + "thumbnail_url": null, + "channel": null, + "channel_url": null, + "digital_business_card_id": null, + "layout": null, + "first_name": null, + "last_name": null, + "job_title": null, + "company": null, + "pronouns": null, + "contacts": null, + "download_enabled": true, + "link_title": null, + "description": null, + "bitlink_id": null, + "image_guid": null, + "image_url": null, + "crop": {"Min": {"X": 0, "Y": 0}, "Max": {"X": 1, "Y": 1}}, + "aspect_ratio": null, + "link_info": null, +} satisfies SiteBlockContent + +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 SiteBlockContent +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/SiteBlockCreateRequest.md b/src/docs/SiteBlockCreateRequest.md new file mode 100644 index 0000000..9573c75 --- /dev/null +++ b/src/docs/SiteBlockCreateRequest.md @@ -0,0 +1,48 @@ + +# SiteBlockCreateRequest + + +## Properties + +Name | Type +------------ | ------------- +`content` | [SiteContentUnion](SiteContentUnion.md) +`appearance` | [TextBlockAppearanceRequest](TextBlockAppearanceRequest.md) +`schedule_start` | string +`schedule_end` | string +`is_active` | boolean +`is_pinned` | boolean +`parent` | string +`type` | [SiteBlockCreateTypeEnum](SiteBlockCreateTypeEnum.md) + +## Example + +```typescript +import type { SiteBlockCreateRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "content": null, + "appearance": null, + "schedule_start": null, + "schedule_end": null, + "is_active": null, + "is_pinned": null, + "parent": null, + "type": null, +} satisfies SiteBlockCreateRequest + +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 SiteBlockCreateRequest +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/SiteBlockCreateTypeEnum.md b/src/docs/SiteBlockCreateTypeEnum.md new file mode 100644 index 0000000..facd6d4 --- /dev/null +++ b/src/docs/SiteBlockCreateTypeEnum.md @@ -0,0 +1,33 @@ + +# SiteBlockCreateTypeEnum + +Block types that can be created directly (grid and carousel are created as containers) + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteBlockCreateTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteBlockCreateTypeEnum + +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 SiteBlockCreateTypeEnum +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/SiteBlockRequest.md b/src/docs/SiteBlockRequest.md new file mode 100644 index 0000000..a15578a --- /dev/null +++ b/src/docs/SiteBlockRequest.md @@ -0,0 +1,46 @@ + +# SiteBlockRequest + + +## Properties + +Name | Type +------------ | ------------- +`content` | [SiteContentUnion](SiteContentUnion.md) +`appearance` | [TextBlockAppearanceRequest](TextBlockAppearanceRequest.md) +`schedule_start` | string +`schedule_end` | string +`is_active` | boolean +`is_pinned` | boolean +`parent` | string + +## Example + +```typescript +import type { SiteBlockRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "content": null, + "appearance": null, + "schedule_start": null, + "schedule_end": null, + "is_active": null, + "is_pinned": null, + "parent": null, +} satisfies SiteBlockRequest + +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 SiteBlockRequest +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/SiteBlockTypeEnum.md b/src/docs/SiteBlockTypeEnum.md new file mode 100644 index 0000000..141d153 --- /dev/null +++ b/src/docs/SiteBlockTypeEnum.md @@ -0,0 +1,33 @@ + +# SiteBlockTypeEnum + +Available block types for Site blocks + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteBlockTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteBlockTypeEnum + +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 SiteBlockTypeEnum +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/SiteButtonTypeEnum.md b/src/docs/SiteButtonTypeEnum.md new file mode 100644 index 0000000..6db1f53 --- /dev/null +++ b/src/docs/SiteButtonTypeEnum.md @@ -0,0 +1,33 @@ + +# SiteButtonTypeEnum + +Available button types for Site content + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteButtonTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteButtonTypeEnum + +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 SiteButtonTypeEnum +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/SiteCityViewMetrics.md b/src/docs/SiteCityViewMetrics.md new file mode 100644 index 0000000..738b550 --- /dev/null +++ b/src/docs/SiteCityViewMetrics.md @@ -0,0 +1,44 @@ + +# SiteCityViewMetrics + + +## Properties + +Name | Type +------------ | ------------- +`unit` | string +`units` | number +`facet` | string +`unit_reference` | string +`site_views` | [Array<ViewMetric>](ViewMetric.md) +`other_metrics` | [OtherViewMetrics](OtherViewMetrics.md) + +## Example + +```typescript +import type { SiteCityViewMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "unit": null, + "units": null, + "facet": null, + "unit_reference": null, + "site_views": null, + "other_metrics": null, +} satisfies SiteCityViewMetrics + +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 SiteCityViewMetrics +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/SiteClicks.md b/src/docs/SiteClicks.md new file mode 100644 index 0000000..dcb15f2 --- /dev/null +++ b/src/docs/SiteClicks.md @@ -0,0 +1,48 @@ + +# SiteClicks + + +## Properties + +Name | Type +------------ | ------------- +`clicks` | number +`title` | string +`is_active` | boolean +`long_url` | string +`type` | [SiteButtonTypeEnum](SiteButtonTypeEnum.md) +`bitlink_id` | string +`domain` | string +`keyword` | string + +## Example + +```typescript +import type { SiteClicks } from '' + +// TODO: Update the object below with actual values +const example = { + "clicks": null, + "title": null, + "is_active": null, + "long_url": null, + "type": null, + "bitlink_id": null, + "domain": null, + "keyword": null, +} satisfies SiteClicks + +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 SiteClicks +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/SiteCloneRequest.md b/src/docs/SiteCloneRequest.md new file mode 100644 index 0000000..fa46230 --- /dev/null +++ b/src/docs/SiteCloneRequest.md @@ -0,0 +1,34 @@ + +# SiteCloneRequest + + +## Properties + +Name | Type +------------ | ------------- +`uri` | string + +## Example + +```typescript +import type { SiteCloneRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "uri": bit.ly/m/bitlySocial, +} satisfies SiteCloneRequest + +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 SiteCloneRequest +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/SiteContainerTypeEnum.md b/src/docs/SiteContainerTypeEnum.md new file mode 100644 index 0000000..9a429bc --- /dev/null +++ b/src/docs/SiteContainerTypeEnum.md @@ -0,0 +1,33 @@ + +# SiteContainerTypeEnum + +Available container types + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteContainerTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteContainerTypeEnum + +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 SiteContainerTypeEnum +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/SiteContentUnion.md b/src/docs/SiteContentUnion.md new file mode 100644 index 0000000..947bbcb --- /dev/null +++ b/src/docs/SiteContentUnion.md @@ -0,0 +1,80 @@ + +# SiteContentUnion + + +## Properties + +Name | Type +------------ | ------------- +`bitlink_id` | string +`link_title` | string +`description` | string +`is_pinned` | boolean +`image_url` | string +`image_guid` | string +`crop` | string +`video_url` | string +`thumbnail_url` | string +`domain` | string +`url` | string +`channel` | string +`aspect_ratio` | string +`digital_business_card_id` | string +`layout` | [DigitalBusinessCardLayout](DigitalBusinessCardLayout.md) +`first_name` | string +`last_name` | string +`pronouns` | string +`company` | string +`job_title` | string +`contacts` | [Array<DigitalBusinessCardContact>](DigitalBusinessCardContact.md) +`download_enabled` | boolean +`file` | [DigitalBusinessCardContentFile](DigitalBusinessCardContentFile.md) +`text` | string + +## Example + +```typescript +import type { SiteContentUnion } from '' + +// TODO: Update the object below with actual values +const example = { + "bitlink_id": bit.ly/123, + "link_title": My Contact Info, + "description": more about my image, + "is_pinned": null, + "image_url": null, + "image_guid": null, + "crop": {"Min": {"X": 0, "Y": 0}, "Max": {"X": 1, "Y": 1}}, + "video_url": youtube.com/embed/, + "thumbnail_url": https://i.ytimg.com, + "domain": bit.ly, + "url": facebook.com/profile, + "channel": facebook, + "aspect_ratio": 1:1, + "digital_business_card_id": null, + "layout": null, + "first_name": Jane, + "last_name": Doe, + "pronouns": she/them, + "company": Bitly, + "job_title": Developer, + "contacts": null, + "download_enabled": true, + "file": null, + "text": Hello, world!, +} satisfies SiteContentUnion + +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 SiteContentUnion +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/SiteImageAlignment.md b/src/docs/SiteImageAlignment.md new file mode 100644 index 0000000..83dd52a --- /dev/null +++ b/src/docs/SiteImageAlignment.md @@ -0,0 +1,33 @@ + +# SiteImageAlignment + +Available image alignment types for Site background images + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteImageAlignment } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteImageAlignment + +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 SiteImageAlignment +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/SiteImageUpload.md b/src/docs/SiteImageUpload.md new file mode 100644 index 0000000..1c5af92 --- /dev/null +++ b/src/docs/SiteImageUpload.md @@ -0,0 +1,40 @@ + +# SiteImageUpload + + +## Properties + +Name | Type +------------ | ------------- +`image_guid` | string +`url` | string +`image_use` | string +`crop` | string + +## Example + +```typescript +import type { SiteImageUpload } from '' + +// TODO: Update the object below with actual values +const example = { + "image_guid": null, + "url": null, + "image_use": null, + "crop": {"Min": {"X": 0, "Y": 0}, "Max": {"X": 1, "Y": 1}}, +} satisfies SiteImageUpload + +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 SiteImageUpload +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/SiteLinkPerformance.md b/src/docs/SiteLinkPerformance.md new file mode 100644 index 0000000..91d1f19 --- /dev/null +++ b/src/docs/SiteLinkPerformance.md @@ -0,0 +1,48 @@ + +# SiteLinkPerformance + + +## Properties + +Name | Type +------------ | ------------- +`total` | number +`link_clicks` | [Array<SiteClicks>](SiteClicks.md) +`performance_start` | string +`performance_end` | string +`units` | number +`unit` | string +`unit_reference` | string +`page` | [SitesPagination](SitesPagination.md) + +## Example + +```typescript +import type { SiteLinkPerformance } from '' + +// TODO: Update the object below with actual values +const example = { + "total": null, + "link_clicks": null, + "performance_start": null, + "performance_end": null, + "units": null, + "unit": null, + "unit_reference": null, + "page": null, +} satisfies SiteLinkPerformance + +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 SiteLinkPerformance +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/SiteProfileImageBorderSize.md b/src/docs/SiteProfileImageBorderSize.md new file mode 100644 index 0000000..49b288a --- /dev/null +++ b/src/docs/SiteProfileImageBorderSize.md @@ -0,0 +1,33 @@ + +# SiteProfileImageBorderSize + +Enum of profile image border sizes on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteProfileImageBorderSize } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteProfileImageBorderSize + +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 SiteProfileImageBorderSize +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/SiteProfileImageLocation.md b/src/docs/SiteProfileImageLocation.md new file mode 100644 index 0000000..1928724 --- /dev/null +++ b/src/docs/SiteProfileImageLocation.md @@ -0,0 +1,33 @@ + +# SiteProfileImageLocation + +Enum of the profile image locations available on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteProfileImageLocation } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteProfileImageLocation + +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 SiteProfileImageLocation +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/SiteProfileImageShape.md b/src/docs/SiteProfileImageShape.md new file mode 100644 index 0000000..51ec043 --- /dev/null +++ b/src/docs/SiteProfileImageShape.md @@ -0,0 +1,33 @@ + +# SiteProfileImageShape + +Enum of profile image shapes on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteProfileImageShape } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteProfileImageShape + +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 SiteProfileImageShape +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/SiteProfileImageSize.md b/src/docs/SiteProfileImageSize.md new file mode 100644 index 0000000..393858b --- /dev/null +++ b/src/docs/SiteProfileImageSize.md @@ -0,0 +1,33 @@ + +# SiteProfileImageSize + +Enum of profile image sizes on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteProfileImageSize } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteProfileImageSize + +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 SiteProfileImageSize +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/SiteProfileImageType.md b/src/docs/SiteProfileImageType.md new file mode 100644 index 0000000..29cc11d --- /dev/null +++ b/src/docs/SiteProfileImageType.md @@ -0,0 +1,33 @@ + +# SiteProfileImageType + +Enum of the profile image type options on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteProfileImageType } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteProfileImageType + +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 SiteProfileImageType +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/SiteRedirects.md b/src/docs/SiteRedirects.md new file mode 100644 index 0000000..62574b8 --- /dev/null +++ b/src/docs/SiteRedirects.md @@ -0,0 +1,54 @@ + +# SiteRedirects + + +## Properties + +Name | Type +------------ | ------------- +`redirect_guid` | string +`microsite_guid` | string +`uri` | string +`domain` | string +`keyword` | string +`redirect_uri` | string +`redirect_domain` | string +`redirect_keyword` | string +`status` | string +`created` | string +`modified` | string + +## Example + +```typescript +import type { SiteRedirects } from '' + +// TODO: Update the object below with actual values +const example = { + "redirect_guid": E0000guid01, + "microsite_guid": M1234567890, + "uri": bit.ly/m/newKeyword, + "domain": bit.ly, + "keyword": newKeyword, + "redirect_uri": bit.ly/m/oldKeyword, + "redirect_domain": bit.ly, + "redirect_keyword": oldKeyword, + "status": active, + "created": null, + "modified": null, +} satisfies SiteRedirects + +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 SiteRedirects +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/SiteStylePreference.md b/src/docs/SiteStylePreference.md new file mode 100644 index 0000000..684d080 --- /dev/null +++ b/src/docs/SiteStylePreference.md @@ -0,0 +1,33 @@ + +# SiteStylePreference + +Enum of style preference values on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteStylePreference } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteStylePreference + +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 SiteStylePreference +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/SiteTextAlignmentEnum.md b/src/docs/SiteTextAlignmentEnum.md new file mode 100644 index 0000000..08edbbc --- /dev/null +++ b/src/docs/SiteTextAlignmentEnum.md @@ -0,0 +1,33 @@ + +# SiteTextAlignmentEnum + +Enum of text alignment values on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteTextAlignmentEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteTextAlignmentEnum + +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 SiteTextAlignmentEnum +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/SiteTextBorderTypeEnum.md b/src/docs/SiteTextBorderTypeEnum.md new file mode 100644 index 0000000..7def531 --- /dev/null +++ b/src/docs/SiteTextBorderTypeEnum.md @@ -0,0 +1,33 @@ + +# SiteTextBorderTypeEnum + +Enum of border type values on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteTextBorderTypeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteTextBorderTypeEnum + +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 SiteTextBorderTypeEnum +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/SiteTextLocation.md b/src/docs/SiteTextLocation.md new file mode 100644 index 0000000..c520940 --- /dev/null +++ b/src/docs/SiteTextLocation.md @@ -0,0 +1,33 @@ + +# SiteTextLocation + +Enum of the available text locations on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteTextLocation } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteTextLocation + +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 SiteTextLocation +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/SiteTextSizeEnum.md b/src/docs/SiteTextSizeEnum.md new file mode 100644 index 0000000..0db1b05 --- /dev/null +++ b/src/docs/SiteTextSizeEnum.md @@ -0,0 +1,33 @@ + +# SiteTextSizeEnum + +Enum of text sizes on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteTextSizeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteTextSizeEnum + +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 SiteTextSizeEnum +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/SiteTextWeightEnum.md b/src/docs/SiteTextWeightEnum.md new file mode 100644 index 0000000..7d5778f --- /dev/null +++ b/src/docs/SiteTextWeightEnum.md @@ -0,0 +1,33 @@ + +# SiteTextWeightEnum + +Enum of text sizes on a Bitly Site + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { SiteTextWeightEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies SiteTextWeightEnum + +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 SiteTextWeightEnum +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/SiteViewMetrics.md b/src/docs/SiteViewMetrics.md new file mode 100644 index 0000000..a1dcb95 --- /dev/null +++ b/src/docs/SiteViewMetrics.md @@ -0,0 +1,42 @@ + +# SiteViewMetrics + + +## Properties + +Name | Type +------------ | ------------- +`site_views` | [Array<ViewMetric>](ViewMetric.md) +`units` | number +`unit` | string +`unit_reference` | string +`facet` | string + +## Example + +```typescript +import type { SiteViewMetrics } from '' + +// TODO: Update the object below with actual values +const example = { + "site_views": null, + "units": null, + "unit": null, + "unit_reference": null, + "facet": null, +} satisfies SiteViewMetrics + +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 SiteViewMetrics +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/SiteViewsSummary.md b/src/docs/SiteViewsSummary.md new file mode 100644 index 0000000..e1cd359 --- /dev/null +++ b/src/docs/SiteViewsSummary.md @@ -0,0 +1,40 @@ + +# SiteViewsSummary + + +## Properties + +Name | Type +------------ | ------------- +`total_views` | number +`units` | number +`unit` | string +`unit_reference` | string + +## Example + +```typescript +import type { SiteViewsSummary } from '' + +// TODO: Update the object below with actual values +const example = { + "total_views": null, + "units": null, + "unit": null, + "unit_reference": null, +} satisfies SiteViewsSummary + +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 SiteViewsSummary +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/SitesPagination.md b/src/docs/SitesPagination.md new file mode 100644 index 0000000..a820aa2 --- /dev/null +++ b/src/docs/SitesPagination.md @@ -0,0 +1,42 @@ + +# SitesPagination + + +## Properties + +Name | Type +------------ | ------------- +`prev` | string +`next` | string +`page` | number +`total` | number +`size` | number + +## Example + +```typescript +import type { SitesPagination } from '' + +// TODO: Update the object below with actual values +const example = { + "prev": null, + "next": null, + "page": null, + "total": null, + "size": null, +} satisfies SitesPagination + +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 SitesPagination +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/SocialContent.md b/src/docs/SocialContent.md new file mode 100644 index 0000000..b187831 --- /dev/null +++ b/src/docs/SocialContent.md @@ -0,0 +1,36 @@ + +# SocialContent + + +## Properties + +Name | Type +------------ | ------------- +`url` | string +`channel` | string + +## Example + +```typescript +import type { SocialContent } from '' + +// TODO: Update the object below with actual values +const example = { + "url": facebook.com/profile, + "channel": facebook, +} satisfies SocialContent + +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 SocialContent +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/SortedButtons.md b/src/docs/SortedButtons.md new file mode 100644 index 0000000..2bb4f41 --- /dev/null +++ b/src/docs/SortedButtons.md @@ -0,0 +1,40 @@ + +# SortedButtons + + +## Properties + +Name | Type +------------ | ------------- +`info` | string +`sorted_buttons` | [Array<ClickLink>](ClickLink.md) +`buttons` | [Array<SortedButtonsButtonsInner>](SortedButtonsButtonsInner.md) +`page_views` | [Array<SortedButtonsPageViewsInner>](SortedButtonsPageViewsInner.md) + +## Example + +```typescript +import type { SortedButtons } from '' + +// TODO: Update the object below with actual values +const example = { + "info": null, + "sorted_buttons": null, + "buttons": null, + "page_views": null, +} satisfies SortedButtons + +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 SortedButtons +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/SortedButtonsButtonsInner.md b/src/docs/SortedButtonsButtonsInner.md new file mode 100644 index 0000000..355f2f9 --- /dev/null +++ b/src/docs/SortedButtonsButtonsInner.md @@ -0,0 +1,40 @@ + +# SortedButtonsButtonsInner + + +## Properties + +Name | Type +------------ | ------------- +`id` | string +`button_type` | [LaunchpadButtonTypeEnum](LaunchpadButtonTypeEnum.md) +`title` | string +`microsite_guid` | string + +## Example + +```typescript +import type { SortedButtonsButtonsInner } from '' + +// TODO: Update the object below with actual values +const example = { + "id": null, + "button_type": null, + "title": null, + "microsite_guid": null, +} satisfies SortedButtonsButtonsInner + +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 SortedButtonsButtonsInner +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/SortedButtonsPageViewsInner.md b/src/docs/SortedButtonsPageViewsInner.md new file mode 100644 index 0000000..5d89ce7 --- /dev/null +++ b/src/docs/SortedButtonsPageViewsInner.md @@ -0,0 +1,38 @@ + +# SortedButtonsPageViewsInner + + +## Properties + +Name | Type +------------ | ------------- +`microsite_guid` | string +`uri` | string +`views` | number + +## Example + +```typescript +import type { SortedButtonsPageViewsInner } from '' + +// TODO: Update the object below with actual values +const example = { + "microsite_guid": null, + "uri": null, + "views": null, +} satisfies SortedButtonsPageViewsInner + +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 SortedButtonsPageViewsInner +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/Template.md b/src/docs/Template.md new file mode 100644 index 0000000..8a3cdba --- /dev/null +++ b/src/docs/Template.md @@ -0,0 +1,52 @@ + +# Template + + +## Properties + +Name | Type +------------ | ------------- +`template_guid` | string +`content` | [BitlySiteContent](BitlySiteContent.md) +`appearance` | [BitlySiteAppearance](BitlySiteAppearance.md) +`blocks` | [Array<SiteBlock>](SiteBlock.md) +`status` | string +`categories` | Array<string> +`created` | string +`modified` | string +`is_active` | boolean +`is_paid` | boolean + +## Example + +```typescript +import type { Template } from '' + +// TODO: Update the object below with actual values +const example = { + "template_guid": T1234567890, + "content": null, + "appearance": null, + "blocks": null, + "status": null, + "categories": null, + "created": null, + "modified": null, + "is_active": null, + "is_paid": null, +} satisfies Template + +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 Template +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/TextBlockAppearance.md b/src/docs/TextBlockAppearance.md new file mode 100644 index 0000000..627065b --- /dev/null +++ b/src/docs/TextBlockAppearance.md @@ -0,0 +1,42 @@ + +# TextBlockAppearance + + +## Properties + +Name | Type +------------ | ------------- +`background_color` | string +`text_color` | string +`alignment` | [TextBlockAppearanceRequestAlignmentEnum](TextBlockAppearanceRequestAlignmentEnum.md) +`text_block_style` | [TextBlockStyle](TextBlockStyle.md) +`font_size` | [TextBlockAppearanceRequestFontSizeEnum](TextBlockAppearanceRequestFontSizeEnum.md) + +## Example + +```typescript +import type { TextBlockAppearance } from '' + +// TODO: Update the object below with actual values +const example = { + "background_color": #fcba03, + "text_color": #e30b2c, + "alignment": null, + "text_block_style": null, + "font_size": null, +} satisfies TextBlockAppearance + +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 TextBlockAppearance +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/TextBlockAppearanceRequest.md b/src/docs/TextBlockAppearanceRequest.md new file mode 100644 index 0000000..e293707 --- /dev/null +++ b/src/docs/TextBlockAppearanceRequest.md @@ -0,0 +1,42 @@ + +# TextBlockAppearanceRequest + + +## Properties + +Name | Type +------------ | ------------- +`background_color` | string +`text_color` | string +`alignment` | [TextBlockAppearanceRequestAlignmentEnum](TextBlockAppearanceRequestAlignmentEnum.md) +`font_size` | [TextBlockAppearanceRequestFontSizeEnum](TextBlockAppearanceRequestFontSizeEnum.md) +`text_block_style` | [TextBlockStyle](TextBlockStyle.md) + +## Example + +```typescript +import type { TextBlockAppearanceRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "background_color": #fcba03, + "text_color": #e30b2c, + "alignment": null, + "font_size": null, + "text_block_style": null, +} satisfies TextBlockAppearanceRequest + +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 TextBlockAppearanceRequest +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/TextBlockAppearanceRequestAlignmentEnum.md b/src/docs/TextBlockAppearanceRequestAlignmentEnum.md new file mode 100644 index 0000000..55e5447 --- /dev/null +++ b/src/docs/TextBlockAppearanceRequestAlignmentEnum.md @@ -0,0 +1,32 @@ + +# TextBlockAppearanceRequestAlignmentEnum + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { TextBlockAppearanceRequestAlignmentEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies TextBlockAppearanceRequestAlignmentEnum + +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 TextBlockAppearanceRequestAlignmentEnum +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/TextBlockAppearanceRequestFontSizeEnum.md b/src/docs/TextBlockAppearanceRequestFontSizeEnum.md new file mode 100644 index 0000000..25718ff --- /dev/null +++ b/src/docs/TextBlockAppearanceRequestFontSizeEnum.md @@ -0,0 +1,32 @@ + +# TextBlockAppearanceRequestFontSizeEnum + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { TextBlockAppearanceRequestFontSizeEnum } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies TextBlockAppearanceRequestFontSizeEnum + +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 TextBlockAppearanceRequestFontSizeEnum +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/TextBlockContent.md b/src/docs/TextBlockContent.md new file mode 100644 index 0000000..4142126 --- /dev/null +++ b/src/docs/TextBlockContent.md @@ -0,0 +1,34 @@ + +# TextBlockContent + + +## Properties + +Name | Type +------------ | ------------- +`text` | string + +## Example + +```typescript +import type { TextBlockContent } from '' + +// TODO: Update the object below with actual values +const example = { + "text": Hello, world!, +} satisfies TextBlockContent + +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 TextBlockContent +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/TextBlockStyle.md b/src/docs/TextBlockStyle.md new file mode 100644 index 0000000..2fce62a --- /dev/null +++ b/src/docs/TextBlockStyle.md @@ -0,0 +1,38 @@ + +# TextBlockStyle + + +## Properties + +Name | Type +------------ | ------------- +`bold` | boolean +`italic` | boolean +`underline` | boolean + +## Example + +```typescript +import type { TextBlockStyle } from '' + +// TODO: Update the object below with actual values +const example = { + "bold": null, + "italic": null, + "underline": null, +} satisfies TextBlockStyle + +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 TextBlockStyle +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/UpdateSite.md b/src/docs/UpdateSite.md new file mode 100644 index 0000000..c475ebe --- /dev/null +++ b/src/docs/UpdateSite.md @@ -0,0 +1,40 @@ + +# UpdateSite + + +## Properties + +Name | Type +------------ | ------------- +`uri` | string +`display_name` | string +`description` | string +`qr_code_id` | string + +## Example + +```typescript +import type { UpdateSite } from '' + +// TODO: Update the object below with actual values +const example = { + "uri": bit.ly/m/bitlySocial, + "display_name": Bitly Social, + "description": All of our social links in one place, + "qr_code_id": Qabc123, +} satisfies UpdateSite + +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 UpdateSite +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/ViewMetric.md b/src/docs/ViewMetric.md new file mode 100644 index 0000000..882873c --- /dev/null +++ b/src/docs/ViewMetric.md @@ -0,0 +1,36 @@ + +# ViewMetric + + +## Properties + +Name | Type +------------ | ------------- +`views` | number +`value` | string + +## Example + +```typescript +import type { ViewMetric } from '' + +// TODO: Update the object below with actual values +const example = { + "views": null, + "value": null, +} satisfies ViewMetric + +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 ViewMetric +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/YoutubeVideoRequest.md b/src/docs/YoutubeVideoRequest.md new file mode 100644 index 0000000..cfeb01a --- /dev/null +++ b/src/docs/YoutubeVideoRequest.md @@ -0,0 +1,40 @@ + +# YoutubeVideoRequest + + +## Properties + +Name | Type +------------ | ------------- +`video_url` | string +`thumbnail_url` | string +`link_title` | string +`domain` | string + +## Example + +```typescript +import type { YoutubeVideoRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "video_url": youtube.com/embed/, + "thumbnail_url": https://i.ytimg.com, + "link_title": myvideo, + "domain": bit.ly, +} satisfies YoutubeVideoRequest + +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 YoutubeVideoRequest +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/models/AggregateClicksForBitlinks.ts b/src/models/AggregateClicksForBitlinks.ts new file mode 100644 index 0000000..7d87213 --- /dev/null +++ b/src/models/AggregateClicksForBitlinks.ts @@ -0,0 +1,105 @@ +/* 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 { ClicksForAggregate } from './ClicksForAggregate'; +import { + ClicksForAggregateFromJSON, + ClicksForAggregateFromJSONTyped, + ClicksForAggregateToJSON, + ClicksForAggregateToJSONTyped, +} from './ClicksForAggregate'; + +/** + * + * @export + * @interface AggregateClicksForBitlinks + */ +export interface AggregateClicksForBitlinks { + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinks + */ + unit_reference?: string; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinks + */ + unit?: string; + /** + * + * @type {number} + * @memberof AggregateClicksForBitlinks + */ + units?: number; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinks + */ + info?: string; + /** + * + * @type {Array} + * @memberof AggregateClicksForBitlinks + */ + clicks?: Array; +} + +/** + * Check if a given object implements the AggregateClicksForBitlinks interface. + */ +export function instanceOfAggregateClicksForBitlinks(value: object): value is AggregateClicksForBitlinks { + return true; +} + +export function AggregateClicksForBitlinksFromJSON(json: any): AggregateClicksForBitlinks { + return AggregateClicksForBitlinksFromJSONTyped(json, false); +} + +export function AggregateClicksForBitlinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): AggregateClicksForBitlinks { + if (json == null) { + return json; + } + return { + + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'units': json['units'] == null ? undefined : json['units'], + 'info': json['info'] == null ? undefined : json['info'], + 'clicks': json['clicks'] == null ? undefined : ((json['clicks'] as Array).map(ClicksForAggregateFromJSON)), + }; +} + +export function AggregateClicksForBitlinksToJSON(json: any): AggregateClicksForBitlinks { + return AggregateClicksForBitlinksToJSONTyped(json, false); +} + +export function AggregateClicksForBitlinksToJSONTyped(value?: AggregateClicksForBitlinks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'unit_reference': value['unit_reference'], + 'unit': value['unit'], + 'units': value['units'], + 'info': value['info'], + 'clicks': value['clicks'] == null ? undefined : ((value['clicks'] as Array).map(ClicksForAggregateToJSON)), + }; +} + diff --git a/src/models/AggregateClicksForBitlinksByCitiesFacet.ts b/src/models/AggregateClicksForBitlinksByCitiesFacet.ts new file mode 100644 index 0000000..1202b3e --- /dev/null +++ b/src/models/AggregateClicksForBitlinksByCitiesFacet.ts @@ -0,0 +1,113 @@ +/* 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 { ClicksByCitiesFacet } from './ClicksByCitiesFacet'; +import { + ClicksByCitiesFacetFromJSON, + ClicksByCitiesFacetFromJSONTyped, + ClicksByCitiesFacetToJSON, + ClicksByCitiesFacetToJSONTyped, +} from './ClicksByCitiesFacet'; + +/** + * + * @export + * @interface AggregateClicksForBitlinksByCitiesFacet + */ +export interface AggregateClicksForBitlinksByCitiesFacet { + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByCitiesFacet + */ + unit_reference?: string; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByCitiesFacet + */ + unit?: string; + /** + * + * @type {number} + * @memberof AggregateClicksForBitlinksByCitiesFacet + */ + units?: number; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByCitiesFacet + */ + info?: string; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByCitiesFacet + */ + facet?: string; + /** + * + * @type {Array} + * @memberof AggregateClicksForBitlinksByCitiesFacet + */ + totals_for_time_period?: Array; +} + +/** + * Check if a given object implements the AggregateClicksForBitlinksByCitiesFacet interface. + */ +export function instanceOfAggregateClicksForBitlinksByCitiesFacet(value: object): value is AggregateClicksForBitlinksByCitiesFacet { + return true; +} + +export function AggregateClicksForBitlinksByCitiesFacetFromJSON(json: any): AggregateClicksForBitlinksByCitiesFacet { + return AggregateClicksForBitlinksByCitiesFacetFromJSONTyped(json, false); +} + +export function AggregateClicksForBitlinksByCitiesFacetFromJSONTyped(json: any, ignoreDiscriminator: boolean): AggregateClicksForBitlinksByCitiesFacet { + if (json == null) { + return json; + } + return { + + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'units': json['units'] == null ? undefined : json['units'], + 'info': json['info'] == null ? undefined : json['info'], + 'facet': json['facet'] == null ? undefined : json['facet'], + 'totals_for_time_period': json['totals_for_time_period'] == null ? undefined : ((json['totals_for_time_period'] as Array).map(ClicksByCitiesFacetFromJSON)), + }; +} + +export function AggregateClicksForBitlinksByCitiesFacetToJSON(json: any): AggregateClicksForBitlinksByCitiesFacet { + return AggregateClicksForBitlinksByCitiesFacetToJSONTyped(json, false); +} + +export function AggregateClicksForBitlinksByCitiesFacetToJSONTyped(value?: AggregateClicksForBitlinksByCitiesFacet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'unit_reference': value['unit_reference'], + 'unit': value['unit'], + 'units': value['units'], + 'info': value['info'], + 'facet': value['facet'], + 'totals_for_time_period': value['totals_for_time_period'] == null ? undefined : ((value['totals_for_time_period'] as Array).map(ClicksByCitiesFacetToJSON)), + }; +} + diff --git a/src/models/AggregateClicksForBitlinksByFacet.ts b/src/models/AggregateClicksForBitlinksByFacet.ts new file mode 100644 index 0000000..498f665 --- /dev/null +++ b/src/models/AggregateClicksForBitlinksByFacet.ts @@ -0,0 +1,113 @@ +/* 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 { ClicksByFacet } from './ClicksByFacet'; +import { + ClicksByFacetFromJSON, + ClicksByFacetFromJSONTyped, + ClicksByFacetToJSON, + ClicksByFacetToJSONTyped, +} from './ClicksByFacet'; + +/** + * + * @export + * @interface AggregateClicksForBitlinksByFacet + */ +export interface AggregateClicksForBitlinksByFacet { + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByFacet + */ + unit_reference?: string; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByFacet + */ + unit?: string; + /** + * + * @type {number} + * @memberof AggregateClicksForBitlinksByFacet + */ + units?: number; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByFacet + */ + info?: string; + /** + * + * @type {string} + * @memberof AggregateClicksForBitlinksByFacet + */ + facet?: string; + /** + * + * @type {Array} + * @memberof AggregateClicksForBitlinksByFacet + */ + totals_for_time_period?: Array; +} + +/** + * Check if a given object implements the AggregateClicksForBitlinksByFacet interface. + */ +export function instanceOfAggregateClicksForBitlinksByFacet(value: object): value is AggregateClicksForBitlinksByFacet { + return true; +} + +export function AggregateClicksForBitlinksByFacetFromJSON(json: any): AggregateClicksForBitlinksByFacet { + return AggregateClicksForBitlinksByFacetFromJSONTyped(json, false); +} + +export function AggregateClicksForBitlinksByFacetFromJSONTyped(json: any, ignoreDiscriminator: boolean): AggregateClicksForBitlinksByFacet { + if (json == null) { + return json; + } + return { + + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'units': json['units'] == null ? undefined : json['units'], + 'info': json['info'] == null ? undefined : json['info'], + 'facet': json['facet'] == null ? undefined : json['facet'], + 'totals_for_time_period': json['totals_for_time_period'] == null ? undefined : ((json['totals_for_time_period'] as Array).map(ClicksByFacetFromJSON)), + }; +} + +export function AggregateClicksForBitlinksByFacetToJSON(json: any): AggregateClicksForBitlinksByFacet { + return AggregateClicksForBitlinksByFacetToJSONTyped(json, false); +} + +export function AggregateClicksForBitlinksByFacetToJSONTyped(value?: AggregateClicksForBitlinksByFacet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'unit_reference': value['unit_reference'], + 'unit': value['unit'], + 'units': value['units'], + 'info': value['info'], + 'facet': value['facet'], + 'totals_for_time_period': value['totals_for_time_period'] == null ? undefined : ((value['totals_for_time_period'] as Array).map(ClicksByFacetToJSON)), + }; +} + diff --git a/src/models/ApplyTemplateRequest.ts b/src/models/ApplyTemplateRequest.ts new file mode 100644 index 0000000..e27663b --- /dev/null +++ b/src/models/ApplyTemplateRequest.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'; +/** + * + * @export + * @interface ApplyTemplateRequest + */ +export interface ApplyTemplateRequest { + /** + * + * @type {string} + * @memberof ApplyTemplateRequest + */ + template_guid?: string; +} + +/** + * Check if a given object implements the ApplyTemplateRequest interface. + */ +export function instanceOfApplyTemplateRequest(value: object): value is ApplyTemplateRequest { + return true; +} + +export function ApplyTemplateRequestFromJSON(json: any): ApplyTemplateRequest { + return ApplyTemplateRequestFromJSONTyped(json, false); +} + +export function ApplyTemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplyTemplateRequest { + if (json == null) { + return json; + } + return { + + 'template_guid': json['template_guid'] == null ? undefined : json['template_guid'], + }; +} + +export function ApplyTemplateRequestToJSON(json: any): ApplyTemplateRequest { + return ApplyTemplateRequestToJSONTyped(json, false); +} + +export function ApplyTemplateRequestToJSONTyped(value?: ApplyTemplateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'template_guid': value['template_guid'], + }; +} + diff --git a/src/models/BitlinkBody.ts b/src/models/BitlinkBody.ts index fac9e56..6645152 100644 --- a/src/models/BitlinkBody.ts +++ b/src/models/BitlinkBody.ts @@ -20,6 +20,13 @@ import { DeeplinkRuleToJSON, DeeplinkRuleToJSONTyped, } from './DeeplinkRule'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * @@ -129,6 +136,12 @@ export interface BitlinkBody { * @memberof BitlinkBody */ expiration_at?: string; + /** + * Dynamic routing rules for this bitlink. Only present when at least one rule is configured. + * @type {Array} + * @memberof BitlinkBody + */ + dynamic_routing?: Array; } /** @@ -165,6 +178,7 @@ export function BitlinkBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean 'is_deleted': json['is_deleted'] == null ? undefined : json['is_deleted'], 'campaign_ids': json['campaign_ids'] == null ? undefined : json['campaign_ids'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), }; } @@ -196,6 +210,7 @@ export function BitlinkBodyToJSONTyped(value?: BitlinkBody | null, ignoreDiscrim 'is_deleted': value['is_deleted'], 'campaign_ids': value['campaign_ids'], 'expiration_at': value['expiration_at'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), }; } diff --git a/src/models/BitlinkContent.ts b/src/models/BitlinkContent.ts new file mode 100644 index 0000000..305f225 --- /dev/null +++ b/src/models/BitlinkContent.ts @@ -0,0 +1,113 @@ +/* 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 BitlinkContent + */ +export interface BitlinkContent { + /** + * The bitlink ID (domain/hash) of the short link displayed on this block + * @type {string} + * @memberof BitlinkContent + */ + bitlink_id?: string; + /** + * Display title of the bitlink block, up to 255 characters + * @type {string} + * @memberof BitlinkContent + */ + link_title?: string; + /** + * Optional subtitle shown on the bitlink block, up to 255 characters + * @type {string} + * @memberof BitlinkContent + */ + description?: string; + /** + * Whether this bitlink block is pinned to the top of the site + * @type {boolean} + * @memberof BitlinkContent + */ + is_pinned?: boolean; + /** + * Public URL of the thumbnail image shown on this bitlink block + * @type {string} + * @memberof BitlinkContent + */ + image_url?: string; + /** + * GUID of the uploaded thumbnail image for this bitlink block + * @type {string} + * @memberof BitlinkContent + */ + image_guid?: string; + /** + * JSON-encoded crop rectangle for the thumbnail image, with Min and Max coordinates in the range 0-1 + * @type {string} + * @memberof BitlinkContent + */ + crop?: string; +} + +/** + * Check if a given object implements the BitlinkContent interface. + */ +export function instanceOfBitlinkContent(value: object): value is BitlinkContent { + return true; +} + +export function BitlinkContentFromJSON(json: any): BitlinkContent { + return BitlinkContentFromJSONTyped(json, false); +} + +export function BitlinkContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitlinkContent { + if (json == null) { + return json; + } + return { + + 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + 'link_title': json['link_title'] == null ? undefined : json['link_title'], + 'description': json['description'] == null ? undefined : json['description'], + 'is_pinned': json['is_pinned'] == null ? undefined : json['is_pinned'], + 'image_url': json['image_url'] == null ? undefined : json['image_url'], + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + 'crop': json['crop'] == null ? undefined : json['crop'], + }; +} + +export function BitlinkContentToJSON(json: any): BitlinkContent { + return BitlinkContentToJSONTyped(json, false); +} + +export function BitlinkContentToJSONTyped(value?: BitlinkContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'bitlink_id': value['bitlink_id'], + 'link_title': value['link_title'], + 'description': value['description'], + 'is_pinned': value['is_pinned'], + 'image_url': value['image_url'], + 'image_guid': value['image_guid'], + 'crop': value['crop'], + }; +} + diff --git a/src/models/BitlinkUpdate.ts b/src/models/BitlinkUpdate.ts index 06bb858..d7fcbf5 100644 --- a/src/models/BitlinkUpdate.ts +++ b/src/models/BitlinkUpdate.ts @@ -20,6 +20,13 @@ import { DeeplinkRuleToJSON, DeeplinkRuleToJSONTyped, } from './DeeplinkRule'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * @@ -123,6 +130,12 @@ export interface BitlinkUpdate { * @memberof BitlinkUpdate */ expiration_at?: string; + /** + * Dynamic routing rules for this bitlink. Only present when at least one rule is configured. + * @type {Array} + * @memberof BitlinkUpdate + */ + dynamic_routing?: Array; } /** @@ -158,6 +171,7 @@ export function BitlinkUpdateFromJSONTyped(json: any, ignoreDiscriminator: boole 'is_deleted': json['is_deleted'] == null ? undefined : json['is_deleted'], 'campaign_ids': json['campaign_ids'] == null ? undefined : json['campaign_ids'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), }; } @@ -188,6 +202,7 @@ export function BitlinkUpdateToJSONTyped(value?: BitlinkUpdate | null, ignoreDis 'is_deleted': value['is_deleted'], 'campaign_ids': value['campaign_ids'], 'expiration_at': value['expiration_at'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), }; } diff --git a/src/models/BitlinkUpdateBody.ts b/src/models/BitlinkUpdateBody.ts index c9f1a6c..424bc2f 100644 --- a/src/models/BitlinkUpdateBody.ts +++ b/src/models/BitlinkUpdateBody.ts @@ -20,6 +20,13 @@ import { DeeplinkRuleToJSON, DeeplinkRuleToJSONTyped, } from './DeeplinkRule'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * @@ -63,6 +70,12 @@ export interface BitlinkUpdateBody { * @memberof BitlinkUpdateBody */ expiration_at?: string; + /** + * Dynamic routing rules for this bitlink. Providing this field replaces all existing rules. Send an empty array to clear all rules. + * @type {Array} + * @memberof BitlinkUpdateBody + */ + dynamic_routing?: Array; } /** @@ -88,6 +101,7 @@ export function BitlinkUpdateBodyFromJSONTyped(json: any, ignoreDiscriminator: b 'deeplinks': json['deeplinks'] == null ? undefined : ((json['deeplinks'] as Array).map(DeeplinkRuleFromJSON)), 'long_url': json['long_url'] == null ? undefined : json['long_url'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), }; } @@ -108,6 +122,7 @@ export function BitlinkUpdateBodyToJSONTyped(value?: BitlinkUpdateBody | null, i 'deeplinks': value['deeplinks'] == null ? undefined : ((value['deeplinks'] as Array).map(DeeplinkRuleToJSON)), 'long_url': value['long_url'], 'expiration_at': value['expiration_at'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), }; } diff --git a/src/models/BitlySite.ts b/src/models/BitlySite.ts new file mode 100644 index 0000000..1e37ff1 --- /dev/null +++ b/src/models/BitlySite.ts @@ -0,0 +1,183 @@ +/* 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 { BitlySiteAppearance } from './BitlySiteAppearance'; +import { + BitlySiteAppearanceFromJSON, + BitlySiteAppearanceFromJSONTyped, + BitlySiteAppearanceToJSON, + BitlySiteAppearanceToJSONTyped, +} from './BitlySiteAppearance'; +import type { SiteRedirects } from './SiteRedirects'; +import { + SiteRedirectsFromJSON, + SiteRedirectsFromJSONTyped, + SiteRedirectsToJSON, + SiteRedirectsToJSONTyped, +} from './SiteRedirects'; +import type { BitlySiteContent } from './BitlySiteContent'; +import { + BitlySiteContentFromJSON, + BitlySiteContentFromJSONTyped, + BitlySiteContentToJSON, + BitlySiteContentToJSONTyped, +} from './BitlySiteContent'; + +/** + * + * @export + * @interface BitlySite + */ +export interface BitlySite { + /** + * + * @type {string} + * @memberof BitlySite + */ + site_guid?: string; + /** + * + * @type {string} + * @memberof BitlySite + */ + group_guid?: string; + /** + * + * @type {string} + * @memberof BitlySite + */ + status?: string; + /** + * + * @type {boolean} + * @memberof BitlySite + */ + is_edited?: boolean; + /** + * + * @type {string} + * @memberof BitlySite + */ + url?: string; + /** + * + * @type {BitlySiteContent} + * @memberof BitlySite + */ + content?: BitlySiteContent; + /** + * + * @type {BitlySiteAppearance} + * @memberof BitlySite + */ + appearance?: BitlySiteAppearance; + /** + * + * @type {number} + * @memberof BitlySite + */ + button_count?: number; + /** + * + * @type {string} + * @memberof BitlySite + */ + last_published?: string; + /** + * + * @type {string} + * @memberof BitlySite + */ + created?: string; + /** + * + * @type {string} + * @memberof BitlySite + */ + modified?: string; + /** + * + * @type {string} + * @memberof BitlySite + */ + qr_code_id?: string; + /** + * + * @type {Array} + * @memberof BitlySite + */ + redirects?: Array; +} + +/** + * Check if a given object implements the BitlySite interface. + */ +export function instanceOfBitlySite(value: object): value is BitlySite { + return true; +} + +export function BitlySiteFromJSON(json: any): BitlySite { + return BitlySiteFromJSONTyped(json, false); +} + +export function BitlySiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitlySite { + if (json == null) { + return json; + } + return { + + 'site_guid': json['site_guid'] == null ? undefined : json['site_guid'], + 'group_guid': json['group_guid'] == null ? undefined : json['group_guid'], + 'status': json['status'] == null ? undefined : json['status'], + 'is_edited': json['is_edited'] == null ? undefined : json['is_edited'], + 'url': json['url'] == null ? undefined : json['url'], + 'content': json['content'] == null ? undefined : BitlySiteContentFromJSON(json['content']), + 'appearance': json['appearance'] == null ? undefined : BitlySiteAppearanceFromJSON(json['appearance']), + 'button_count': json['button_count'] == null ? undefined : json['button_count'], + 'last_published': json['last_published'] == null ? undefined : json['last_published'], + 'created': json['created'] == null ? undefined : json['created'], + 'modified': json['modified'] == null ? undefined : json['modified'], + 'qr_code_id': json['qr_code_id'] == null ? undefined : json['qr_code_id'], + 'redirects': json['redirects'] == null ? undefined : ((json['redirects'] as Array).map(SiteRedirectsFromJSON)), + }; +} + +export function BitlySiteToJSON(json: any): BitlySite { + return BitlySiteToJSONTyped(json, false); +} + +export function BitlySiteToJSONTyped(value?: BitlySite | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'site_guid': value['site_guid'], + 'group_guid': value['group_guid'], + 'status': value['status'], + 'is_edited': value['is_edited'], + 'url': value['url'], + 'content': BitlySiteContentToJSON(value['content']), + 'appearance': BitlySiteAppearanceToJSON(value['appearance']), + 'button_count': value['button_count'], + 'last_published': value['last_published'], + 'created': value['created'], + 'modified': value['modified'], + 'qr_code_id': value['qr_code_id'], + 'redirects': value['redirects'] == null ? undefined : ((value['redirects'] as Array).map(SiteRedirectsToJSON)), + }; +} + diff --git a/src/models/BitlySiteAppearance.ts b/src/models/BitlySiteAppearance.ts new file mode 100644 index 0000000..a497db8 --- /dev/null +++ b/src/models/BitlySiteAppearance.ts @@ -0,0 +1,273 @@ +/* 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 { SiteStylePreference } from './SiteStylePreference'; +import { + SiteStylePreferenceFromJSON, + SiteStylePreferenceFromJSONTyped, + SiteStylePreferenceToJSON, + SiteStylePreferenceToJSONTyped, +} from './SiteStylePreference'; +import type { SiteImageAlignment } from './SiteImageAlignment'; +import { + SiteImageAlignmentFromJSON, + SiteImageAlignmentFromJSONTyped, + SiteImageAlignmentToJSON, + SiteImageAlignmentToJSONTyped, +} from './SiteImageAlignment'; +import type { BitlySiteHeaderAppearance } from './BitlySiteHeaderAppearance'; +import { + BitlySiteHeaderAppearanceFromJSON, + BitlySiteHeaderAppearanceFromJSONTyped, + BitlySiteHeaderAppearanceToJSON, + BitlySiteHeaderAppearanceToJSONTyped, +} from './BitlySiteHeaderAppearance'; + +/** + * + * @export + * @interface BitlySiteAppearance + */ +export interface BitlySiteAppearance { + /** + * + * @type {number} + * @memberof BitlySiteAppearance + */ + layout_v2?: number; + /** + * + * @type {BitlySiteHeaderAppearance} + * @memberof BitlySiteAppearance + */ + header_appearance?: BitlySiteHeaderAppearance; + /** + * + * @type {number} + * @memberof BitlySiteAppearance + */ + theme_id?: number; + /** + * + * @type {boolean} + * @memberof BitlySiteAppearance + */ + hide_bitly_logo?: boolean; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + layout?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + font?: string; + /** + * + * @type {SiteStylePreference} + * @memberof BitlySiteAppearance + */ + style_preference?: SiteStylePreference; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + background_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + bottom_background_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + text_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + description_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + background_preference?: string; + /** + * + * @type {SiteImageAlignment} + * @memberof BitlySiteAppearance + */ + background_image_alignment?: SiteImageAlignment; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + background_image_url?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + background_image_guid?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + avatar_image_url?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + avatar_image_guid?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_button_background_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_button_text_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_button_shape?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_button_shadow?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_social_icon_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_social_icon_layout?: string; + /** + * + * @type {string} + * @memberof BitlySiteAppearance + */ + default_social_icon_position?: string; +} + + + +/** + * Check if a given object implements the BitlySiteAppearance interface. + */ +export function instanceOfBitlySiteAppearance(value: object): value is BitlySiteAppearance { + return true; +} + +export function BitlySiteAppearanceFromJSON(json: any): BitlySiteAppearance { + return BitlySiteAppearanceFromJSONTyped(json, false); +} + +export function BitlySiteAppearanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitlySiteAppearance { + if (json == null) { + return json; + } + return { + + 'layout_v2': json['layout_v2'] == null ? undefined : json['layout_v2'], + 'header_appearance': json['header_appearance'] == null ? undefined : BitlySiteHeaderAppearanceFromJSON(json['header_appearance']), + 'theme_id': json['theme_id'] == null ? undefined : json['theme_id'], + 'hide_bitly_logo': json['hide_bitly_logo'] == null ? undefined : json['hide_bitly_logo'], + 'layout': json['layout'] == null ? undefined : json['layout'], + 'font': json['font'] == null ? undefined : json['font'], + 'style_preference': json['style_preference'] == null ? undefined : SiteStylePreferenceFromJSON(json['style_preference']), + 'background_color': json['background_color'] == null ? undefined : json['background_color'], + 'bottom_background_color': json['bottom_background_color'] == null ? undefined : json['bottom_background_color'], + 'text_color': json['text_color'] == null ? undefined : json['text_color'], + 'description_color': json['description_color'] == null ? undefined : json['description_color'], + 'background_preference': json['background_preference'] == null ? undefined : json['background_preference'], + 'background_image_alignment': json['background_image_alignment'] == null ? undefined : SiteImageAlignmentFromJSON(json['background_image_alignment']), + 'background_image_url': json['background_image_url'] == null ? undefined : json['background_image_url'], + 'background_image_guid': json['background_image_guid'] == null ? undefined : json['background_image_guid'], + 'avatar_image_url': json['avatar_image_url'] == null ? undefined : json['avatar_image_url'], + 'avatar_image_guid': json['avatar_image_guid'] == null ? undefined : json['avatar_image_guid'], + 'default_button_background_color': json['default_button_background_color'] == null ? undefined : json['default_button_background_color'], + 'default_button_text_color': json['default_button_text_color'] == null ? undefined : json['default_button_text_color'], + 'default_button_shape': json['default_button_shape'] == null ? undefined : json['default_button_shape'], + 'default_button_shadow': json['default_button_shadow'] == null ? undefined : json['default_button_shadow'], + 'default_social_icon_color': json['default_social_icon_color'] == null ? undefined : json['default_social_icon_color'], + 'default_social_icon_layout': json['default_social_icon_layout'] == null ? undefined : json['default_social_icon_layout'], + 'default_social_icon_position': json['default_social_icon_position'] == null ? undefined : json['default_social_icon_position'], + }; +} + +export function BitlySiteAppearanceToJSON(json: any): BitlySiteAppearance { + return BitlySiteAppearanceToJSONTyped(json, false); +} + +export function BitlySiteAppearanceToJSONTyped(value?: BitlySiteAppearance | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'layout_v2': value['layout_v2'], + 'header_appearance': BitlySiteHeaderAppearanceToJSON(value['header_appearance']), + 'theme_id': value['theme_id'], + 'hide_bitly_logo': value['hide_bitly_logo'], + 'layout': value['layout'], + 'font': value['font'], + 'style_preference': SiteStylePreferenceToJSON(value['style_preference']), + 'background_color': value['background_color'], + 'bottom_background_color': value['bottom_background_color'], + 'text_color': value['text_color'], + 'description_color': value['description_color'], + 'background_preference': value['background_preference'], + 'background_image_alignment': SiteImageAlignmentToJSON(value['background_image_alignment']), + 'background_image_url': value['background_image_url'], + 'background_image_guid': value['background_image_guid'], + 'avatar_image_url': value['avatar_image_url'], + 'avatar_image_guid': value['avatar_image_guid'], + 'default_button_background_color': value['default_button_background_color'], + 'default_button_text_color': value['default_button_text_color'], + 'default_button_shape': value['default_button_shape'], + 'default_button_shadow': value['default_button_shadow'], + 'default_social_icon_color': value['default_social_icon_color'], + 'default_social_icon_layout': value['default_social_icon_layout'], + 'default_social_icon_position': value['default_social_icon_position'], + }; +} + diff --git a/src/models/BitlySiteContent.ts b/src/models/BitlySiteContent.ts new file mode 100644 index 0000000..49d4589 --- /dev/null +++ b/src/models/BitlySiteContent.ts @@ -0,0 +1,73 @@ +/* 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 BitlySiteContent + */ +export interface BitlySiteContent { + /** + * + * @type {string} + * @memberof BitlySiteContent + */ + display_name?: string; + /** + * + * @type {string} + * @memberof BitlySiteContent + */ + description?: string; +} + +/** + * Check if a given object implements the BitlySiteContent interface. + */ +export function instanceOfBitlySiteContent(value: object): value is BitlySiteContent { + return true; +} + +export function BitlySiteContentFromJSON(json: any): BitlySiteContent { + return BitlySiteContentFromJSONTyped(json, false); +} + +export function BitlySiteContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitlySiteContent { + if (json == null) { + return json; + } + return { + + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function BitlySiteContentToJSON(json: any): BitlySiteContent { + return BitlySiteContentToJSONTyped(json, false); +} + +export function BitlySiteContentToJSONTyped(value?: BitlySiteContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'display_name': value['display_name'], + 'description': value['description'], + }; +} + diff --git a/src/models/BitlySiteHeaderAppearance.ts b/src/models/BitlySiteHeaderAppearance.ts new file mode 100644 index 0000000..286360b --- /dev/null +++ b/src/models/BitlySiteHeaderAppearance.ts @@ -0,0 +1,311 @@ +/* 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 { SiteStylePreference } from './SiteStylePreference'; +import { + SiteStylePreferenceFromJSON, + SiteStylePreferenceFromJSONTyped, + SiteStylePreferenceToJSON, + SiteStylePreferenceToJSONTyped, +} from './SiteStylePreference'; +import type { SiteTextBorderTypeEnum } from './SiteTextBorderTypeEnum'; +import { + SiteTextBorderTypeEnumFromJSON, + SiteTextBorderTypeEnumFromJSONTyped, + SiteTextBorderTypeEnumToJSON, + SiteTextBorderTypeEnumToJSONTyped, +} from './SiteTextBorderTypeEnum'; +import type { SiteTextWeightEnum } from './SiteTextWeightEnum'; +import { + SiteTextWeightEnumFromJSON, + SiteTextWeightEnumFromJSONTyped, + SiteTextWeightEnumToJSON, + SiteTextWeightEnumToJSONTyped, +} from './SiteTextWeightEnum'; +import type { SiteImageAlignment } from './SiteImageAlignment'; +import { + SiteImageAlignmentFromJSON, + SiteImageAlignmentFromJSONTyped, + SiteImageAlignmentToJSON, + SiteImageAlignmentToJSONTyped, +} from './SiteImageAlignment'; +import type { SiteTextSizeEnum } from './SiteTextSizeEnum'; +import { + SiteTextSizeEnumFromJSON, + SiteTextSizeEnumFromJSONTyped, + SiteTextSizeEnumToJSON, + SiteTextSizeEnumToJSONTyped, +} from './SiteTextSizeEnum'; +import type { SiteTextLocation } from './SiteTextLocation'; +import { + SiteTextLocationFromJSON, + SiteTextLocationFromJSONTyped, + SiteTextLocationToJSON, + SiteTextLocationToJSONTyped, +} from './SiteTextLocation'; +import type { SiteTextAlignmentEnum } from './SiteTextAlignmentEnum'; +import { + SiteTextAlignmentEnumFromJSON, + SiteTextAlignmentEnumFromJSONTyped, + SiteTextAlignmentEnumToJSON, + SiteTextAlignmentEnumToJSONTyped, +} from './SiteTextAlignmentEnum'; +import type { SiteProfileImageSize } from './SiteProfileImageSize'; +import { + SiteProfileImageSizeFromJSON, + SiteProfileImageSizeFromJSONTyped, + SiteProfileImageSizeToJSON, + SiteProfileImageSizeToJSONTyped, +} from './SiteProfileImageSize'; +import type { SiteProfileImageBorderSize } from './SiteProfileImageBorderSize'; +import { + SiteProfileImageBorderSizeFromJSON, + SiteProfileImageBorderSizeFromJSONTyped, + SiteProfileImageBorderSizeToJSON, + SiteProfileImageBorderSizeToJSONTyped, +} from './SiteProfileImageBorderSize'; +import type { SiteProfileImageShape } from './SiteProfileImageShape'; +import { + SiteProfileImageShapeFromJSON, + SiteProfileImageShapeFromJSONTyped, + SiteProfileImageShapeToJSON, + SiteProfileImageShapeToJSONTyped, +} from './SiteProfileImageShape'; +import type { SiteProfileImageType } from './SiteProfileImageType'; +import { + SiteProfileImageTypeFromJSON, + SiteProfileImageTypeFromJSONTyped, + SiteProfileImageTypeToJSON, + SiteProfileImageTypeToJSONTyped, +} from './SiteProfileImageType'; +import type { SiteBannerType } from './SiteBannerType'; +import { + SiteBannerTypeFromJSON, + SiteBannerTypeFromJSONTyped, + SiteBannerTypeToJSON, + SiteBannerTypeToJSONTyped, +} from './SiteBannerType'; +import type { SiteProfileImageLocation } from './SiteProfileImageLocation'; +import { + SiteProfileImageLocationFromJSON, + SiteProfileImageLocationFromJSONTyped, + SiteProfileImageLocationToJSON, + SiteProfileImageLocationToJSONTyped, +} from './SiteProfileImageLocation'; + +/** + * + * @export + * @interface BitlySiteHeaderAppearance + */ +export interface BitlySiteHeaderAppearance { + /** + * + * @type {SiteBannerType} + * @memberof BitlySiteHeaderAppearance + */ + banner_type?: SiteBannerType; + /** + * + * @type {SiteProfileImageSize} + * @memberof BitlySiteHeaderAppearance + */ + profile_image_size?: SiteProfileImageSize; + /** + * + * @type {SiteProfileImageShape} + * @memberof BitlySiteHeaderAppearance + */ + profile_image_shape?: SiteProfileImageShape; + /** + * + * @type {SiteProfileImageBorderSize} + * @memberof BitlySiteHeaderAppearance + */ + profile_image_border_size?: SiteProfileImageBorderSize; + /** + * + * @type {SiteProfileImageType} + * @memberof BitlySiteHeaderAppearance + */ + profile_image_type?: SiteProfileImageType; + /** + * + * @type {SiteProfileImageLocation} + * @memberof BitlySiteHeaderAppearance + */ + profile_image_location?: SiteProfileImageLocation; + /** + * + * @type {boolean} + * @memberof BitlySiteHeaderAppearance + */ + profile_image_overflow?: boolean; + /** + * + * @type {SiteTextLocation} + * @memberof BitlySiteHeaderAppearance + */ + text_location?: SiteTextLocation; + /** + * + * @type {SiteTextSizeEnum} + * @memberof BitlySiteHeaderAppearance + */ + title_size?: SiteTextSizeEnum; + /** + * + * @type {SiteTextAlignmentEnum} + * @memberof BitlySiteHeaderAppearance + */ + title_alignment?: SiteTextAlignmentEnum; + /** + * + * @type {SiteTextWeightEnum} + * @memberof BitlySiteHeaderAppearance + */ + title_weight?: SiteTextWeightEnum; + /** + * + * @type {SiteTextBorderTypeEnum} + * @memberof BitlySiteHeaderAppearance + */ + title_border_type?: SiteTextBorderTypeEnum; + /** + * + * @type {SiteTextSizeEnum} + * @memberof BitlySiteHeaderAppearance + */ + description_size?: SiteTextSizeEnum; + /** + * + * @type {SiteTextAlignmentEnum} + * @memberof BitlySiteHeaderAppearance + */ + description_alignment?: SiteTextAlignmentEnum; + /** + * + * @type {SiteTextWeightEnum} + * @memberof BitlySiteHeaderAppearance + */ + description_weight?: SiteTextWeightEnum; + /** + * + * @type {SiteTextBorderTypeEnum} + * @memberof BitlySiteHeaderAppearance + */ + description_border_type?: SiteTextBorderTypeEnum; + /** + * + * @type {string} + * @memberof BitlySiteHeaderAppearance + */ + header_background_color?: string; + /** + * + * @type {string} + * @memberof BitlySiteHeaderAppearance + */ + banner_image_url?: string; + /** + * + * @type {SiteStylePreference} + * @memberof BitlySiteHeaderAppearance + */ + header_style_preference?: SiteStylePreference; + /** + * + * @type {SiteImageAlignment} + * @memberof BitlySiteHeaderAppearance + */ + banner_image_alignment?: SiteImageAlignment; +} + + + +/** + * Check if a given object implements the BitlySiteHeaderAppearance interface. + */ +export function instanceOfBitlySiteHeaderAppearance(value: object): value is BitlySiteHeaderAppearance { + return true; +} + +export function BitlySiteHeaderAppearanceFromJSON(json: any): BitlySiteHeaderAppearance { + return BitlySiteHeaderAppearanceFromJSONTyped(json, false); +} + +export function BitlySiteHeaderAppearanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitlySiteHeaderAppearance { + if (json == null) { + return json; + } + return { + + 'banner_type': json['banner_type'] == null ? undefined : SiteBannerTypeFromJSON(json['banner_type']), + 'profile_image_size': json['profile_image_size'] == null ? undefined : SiteProfileImageSizeFromJSON(json['profile_image_size']), + 'profile_image_shape': json['profile_image_shape'] == null ? undefined : SiteProfileImageShapeFromJSON(json['profile_image_shape']), + 'profile_image_border_size': json['profile_image_border_size'] == null ? undefined : SiteProfileImageBorderSizeFromJSON(json['profile_image_border_size']), + 'profile_image_type': json['profile_image_type'] == null ? undefined : SiteProfileImageTypeFromJSON(json['profile_image_type']), + 'profile_image_location': json['profile_image_location'] == null ? undefined : SiteProfileImageLocationFromJSON(json['profile_image_location']), + 'profile_image_overflow': json['profile_image_overflow'] == null ? undefined : json['profile_image_overflow'], + 'text_location': json['text_location'] == null ? undefined : SiteTextLocationFromJSON(json['text_location']), + 'title_size': json['title_size'] == null ? undefined : SiteTextSizeEnumFromJSON(json['title_size']), + 'title_alignment': json['title_alignment'] == null ? undefined : SiteTextAlignmentEnumFromJSON(json['title_alignment']), + 'title_weight': json['title_weight'] == null ? undefined : SiteTextWeightEnumFromJSON(json['title_weight']), + 'title_border_type': json['title_border_type'] == null ? undefined : SiteTextBorderTypeEnumFromJSON(json['title_border_type']), + 'description_size': json['description_size'] == null ? undefined : SiteTextSizeEnumFromJSON(json['description_size']), + 'description_alignment': json['description_alignment'] == null ? undefined : SiteTextAlignmentEnumFromJSON(json['description_alignment']), + 'description_weight': json['description_weight'] == null ? undefined : SiteTextWeightEnumFromJSON(json['description_weight']), + 'description_border_type': json['description_border_type'] == null ? undefined : SiteTextBorderTypeEnumFromJSON(json['description_border_type']), + 'header_background_color': json['header_background_color'] == null ? undefined : json['header_background_color'], + 'banner_image_url': json['banner_image_url'] == null ? undefined : json['banner_image_url'], + 'header_style_preference': json['header_style_preference'] == null ? undefined : SiteStylePreferenceFromJSON(json['header_style_preference']), + 'banner_image_alignment': json['banner_image_alignment'] == null ? undefined : SiteImageAlignmentFromJSON(json['banner_image_alignment']), + }; +} + +export function BitlySiteHeaderAppearanceToJSON(json: any): BitlySiteHeaderAppearance { + return BitlySiteHeaderAppearanceToJSONTyped(json, false); +} + +export function BitlySiteHeaderAppearanceToJSONTyped(value?: BitlySiteHeaderAppearance | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'banner_type': SiteBannerTypeToJSON(value['banner_type']), + 'profile_image_size': SiteProfileImageSizeToJSON(value['profile_image_size']), + 'profile_image_shape': SiteProfileImageShapeToJSON(value['profile_image_shape']), + 'profile_image_border_size': SiteProfileImageBorderSizeToJSON(value['profile_image_border_size']), + 'profile_image_type': SiteProfileImageTypeToJSON(value['profile_image_type']), + 'profile_image_location': SiteProfileImageLocationToJSON(value['profile_image_location']), + 'profile_image_overflow': value['profile_image_overflow'], + 'text_location': SiteTextLocationToJSON(value['text_location']), + 'title_size': SiteTextSizeEnumToJSON(value['title_size']), + 'title_alignment': SiteTextAlignmentEnumToJSON(value['title_alignment']), + 'title_weight': SiteTextWeightEnumToJSON(value['title_weight']), + 'title_border_type': SiteTextBorderTypeEnumToJSON(value['title_border_type']), + 'description_size': SiteTextSizeEnumToJSON(value['description_size']), + 'description_alignment': SiteTextAlignmentEnumToJSON(value['description_alignment']), + 'description_weight': SiteTextWeightEnumToJSON(value['description_weight']), + 'description_border_type': SiteTextBorderTypeEnumToJSON(value['description_border_type']), + 'header_background_color': value['header_background_color'], + 'banner_image_url': value['banner_image_url'], + 'header_style_preference': SiteStylePreferenceToJSON(value['header_style_preference']), + 'banner_image_alignment': SiteImageAlignmentToJSON(value['banner_image_alignment']), + }; +} + diff --git a/src/models/BitlySites.ts b/src/models/BitlySites.ts new file mode 100644 index 0000000..e75c42c --- /dev/null +++ b/src/models/BitlySites.ts @@ -0,0 +1,98 @@ +/* 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 { MicrositePagination } from './MicrositePagination'; +import { + MicrositePaginationFromJSON, + MicrositePaginationFromJSONTyped, + MicrositePaginationToJSON, + MicrositePaginationToJSONTyped, +} from './MicrositePagination'; +import type { BitlySite } from './BitlySite'; +import { + BitlySiteFromJSON, + BitlySiteFromJSONTyped, + BitlySiteToJSON, + BitlySiteToJSONTyped, +} from './BitlySite'; + +/** + * + * @export + * @interface BitlySites + */ +export interface BitlySites { + /** + * + * @type {string} + * @memberof BitlySites + */ + group_guid: string; + /** + * + * @type {Array} + * @memberof BitlySites + */ + sites: Array; + /** + * + * @type {MicrositePagination} + * @memberof BitlySites + */ + pagination?: MicrositePagination; +} + +/** + * Check if a given object implements the BitlySites interface. + */ +export function instanceOfBitlySites(value: object): value is BitlySites { + if (!('group_guid' in value) || value['group_guid'] === undefined) return false; + if (!('sites' in value) || value['sites'] === undefined) return false; + return true; +} + +export function BitlySitesFromJSON(json: any): BitlySites { + return BitlySitesFromJSONTyped(json, false); +} + +export function BitlySitesFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitlySites { + if (json == null) { + return json; + } + return { + + 'group_guid': json['group_guid'], + 'sites': ((json['sites'] as Array).map(BitlySiteFromJSON)), + 'pagination': json['pagination'] == null ? undefined : MicrositePaginationFromJSON(json['pagination']), + }; +} + +export function BitlySitesToJSON(json: any): BitlySites { + return BitlySitesToJSONTyped(json, false); +} + +export function BitlySitesToJSONTyped(value?: BitlySites | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group_guid': value['group_guid'], + 'sites': ((value['sites'] as Array).map(BitlySiteToJSON)), + 'pagination': MicrositePaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/BlockContentDigitalBusinessCard.ts b/src/models/BlockContentDigitalBusinessCard.ts new file mode 100644 index 0000000..98dd982 --- /dev/null +++ b/src/models/BlockContentDigitalBusinessCard.ts @@ -0,0 +1,146 @@ +/* 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 { DigitalBusinessCardLayout } from './DigitalBusinessCardLayout'; +import { + DigitalBusinessCardLayoutFromJSON, + DigitalBusinessCardLayoutFromJSONTyped, + DigitalBusinessCardLayoutToJSON, + DigitalBusinessCardLayoutToJSONTyped, +} from './DigitalBusinessCardLayout'; +import type { DigitalBusinessCardContact } from './DigitalBusinessCardContact'; +import { + DigitalBusinessCardContactFromJSON, + DigitalBusinessCardContactFromJSONTyped, + DigitalBusinessCardContactToJSON, + DigitalBusinessCardContactToJSONTyped, +} from './DigitalBusinessCardContact'; + +/** + * + * @export + * @interface BlockContentDigitalBusinessCard + */ +export interface BlockContentDigitalBusinessCard { + /** + * + * @type {string} + * @memberof BlockContentDigitalBusinessCard + */ + digital_business_card_id?: string; + /** + * + * @type {DigitalBusinessCardLayout} + * @memberof BlockContentDigitalBusinessCard + */ + layout?: DigitalBusinessCardLayout; + /** + * + * @type {string} + * @memberof BlockContentDigitalBusinessCard + */ + first_name?: string; + /** + * + * @type {string} + * @memberof BlockContentDigitalBusinessCard + */ + last_name?: string; + /** + * + * @type {string} + * @memberof BlockContentDigitalBusinessCard + */ + job_title?: string; + /** + * + * @type {string} + * @memberof BlockContentDigitalBusinessCard + */ + company?: string; + /** + * + * @type {string} + * @memberof BlockContentDigitalBusinessCard + */ + pronouns?: string; + /** + * + * @type {Array} + * @memberof BlockContentDigitalBusinessCard + */ + contacts?: Array; + /** + * + * @type {boolean} + * @memberof BlockContentDigitalBusinessCard + */ + download_enabled?: boolean; +} + + + +/** + * Check if a given object implements the BlockContentDigitalBusinessCard interface. + */ +export function instanceOfBlockContentDigitalBusinessCard(value: object): value is BlockContentDigitalBusinessCard { + return true; +} + +export function BlockContentDigitalBusinessCardFromJSON(json: any): BlockContentDigitalBusinessCard { + return BlockContentDigitalBusinessCardFromJSONTyped(json, false); +} + +export function BlockContentDigitalBusinessCardFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlockContentDigitalBusinessCard { + if (json == null) { + return json; + } + return { + + 'digital_business_card_id': json['digital_business_card_id'] == null ? undefined : json['digital_business_card_id'], + 'layout': json['layout'] == null ? undefined : DigitalBusinessCardLayoutFromJSON(json['layout']), + 'first_name': json['first_name'] == null ? undefined : json['first_name'], + 'last_name': json['last_name'] == null ? undefined : json['last_name'], + 'job_title': json['job_title'] == null ? undefined : json['job_title'], + 'company': json['company'] == null ? undefined : json['company'], + 'pronouns': json['pronouns'] == null ? undefined : json['pronouns'], + 'contacts': json['contacts'] == null ? undefined : ((json['contacts'] as Array).map(DigitalBusinessCardContactFromJSON)), + 'download_enabled': json['download_enabled'] == null ? undefined : json['download_enabled'], + }; +} + +export function BlockContentDigitalBusinessCardToJSON(json: any): BlockContentDigitalBusinessCard { + return BlockContentDigitalBusinessCardToJSONTyped(json, false); +} + +export function BlockContentDigitalBusinessCardToJSONTyped(value?: BlockContentDigitalBusinessCard | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'digital_business_card_id': value['digital_business_card_id'], + 'layout': DigitalBusinessCardLayoutToJSON(value['layout']), + 'first_name': value['first_name'], + 'last_name': value['last_name'], + 'job_title': value['job_title'], + 'company': value['company'], + 'pronouns': value['pronouns'], + 'contacts': value['contacts'] == null ? undefined : ((value['contacts'] as Array).map(DigitalBusinessCardContactToJSON)), + 'download_enabled': value['download_enabled'], + }; +} + diff --git a/src/models/BlockContentSocial.ts b/src/models/BlockContentSocial.ts new file mode 100644 index 0000000..239b3dd --- /dev/null +++ b/src/models/BlockContentSocial.ts @@ -0,0 +1,73 @@ +/* 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 BlockContentSocial + */ +export interface BlockContentSocial { + /** + * + * @type {string} + * @memberof BlockContentSocial + */ + channel?: string; + /** + * + * @type {string} + * @memberof BlockContentSocial + */ + channel_url?: string; +} + +/** + * Check if a given object implements the BlockContentSocial interface. + */ +export function instanceOfBlockContentSocial(value: object): value is BlockContentSocial { + return true; +} + +export function BlockContentSocialFromJSON(json: any): BlockContentSocial { + return BlockContentSocialFromJSONTyped(json, false); +} + +export function BlockContentSocialFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlockContentSocial { + if (json == null) { + return json; + } + return { + + 'channel': json['channel'] == null ? undefined : json['channel'], + 'channel_url': json['channel_url'] == null ? undefined : json['channel_url'], + }; +} + +export function BlockContentSocialToJSON(json: any): BlockContentSocial { + return BlockContentSocialToJSONTyped(json, false); +} + +export function BlockContentSocialToJSONTyped(value?: BlockContentSocial | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'channel': value['channel'], + 'channel_url': value['channel_url'], + }; +} + diff --git a/src/models/BlockContentYoutube.ts b/src/models/BlockContentYoutube.ts new file mode 100644 index 0000000..640decf --- /dev/null +++ b/src/models/BlockContentYoutube.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'; +/** + * + * @export + * @interface BlockContentYoutube + */ +export interface BlockContentYoutube { + /** + * + * @type {string} + * @memberof BlockContentYoutube + */ + thumbnail_url?: string; +} + +/** + * Check if a given object implements the BlockContentYoutube interface. + */ +export function instanceOfBlockContentYoutube(value: object): value is BlockContentYoutube { + return true; +} + +export function BlockContentYoutubeFromJSON(json: any): BlockContentYoutube { + return BlockContentYoutubeFromJSONTyped(json, false); +} + +export function BlockContentYoutubeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlockContentYoutube { + if (json == null) { + return json; + } + return { + + 'thumbnail_url': json['thumbnail_url'] == null ? undefined : json['thumbnail_url'], + }; +} + +export function BlockContentYoutubeToJSON(json: any): BlockContentYoutube { + return BlockContentYoutubeToJSONTyped(json, false); +} + +export function BlockContentYoutubeToJSONTyped(value?: BlockContentYoutube | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'thumbnail_url': value['thumbnail_url'], + }; +} + diff --git a/src/models/ClicksByCitiesFacet.ts b/src/models/ClicksByCitiesFacet.ts new file mode 100644 index 0000000..df97553 --- /dev/null +++ b/src/models/ClicksByCitiesFacet.ts @@ -0,0 +1,97 @@ +/* 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 ClicksByCitiesFacet + */ +export interface ClicksByCitiesFacet { + /** + * + * @type {string} + * @memberof ClicksByCitiesFacet + */ + city?: string; + /** + * + * @type {number} + * @memberof ClicksByCitiesFacet + */ + clicks?: number; + /** + * + * @type {string} + * @memberof ClicksByCitiesFacet + */ + region?: string; + /** + * + * @type {string} + * @memberof ClicksByCitiesFacet + */ + subregion?: string; + /** + * + * @type {string} + * @memberof ClicksByCitiesFacet + */ + country?: string; +} + +/** + * Check if a given object implements the ClicksByCitiesFacet interface. + */ +export function instanceOfClicksByCitiesFacet(value: object): value is ClicksByCitiesFacet { + return true; +} + +export function ClicksByCitiesFacetFromJSON(json: any): ClicksByCitiesFacet { + return ClicksByCitiesFacetFromJSONTyped(json, false); +} + +export function ClicksByCitiesFacetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClicksByCitiesFacet { + if (json == null) { + return json; + } + return { + + 'city': json['city'] == null ? undefined : json['city'], + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + 'region': json['region'] == null ? undefined : json['region'], + 'subregion': json['subregion'] == null ? undefined : json['subregion'], + 'country': json['country'] == null ? undefined : json['country'], + }; +} + +export function ClicksByCitiesFacetToJSON(json: any): ClicksByCitiesFacet { + return ClicksByCitiesFacetToJSONTyped(json, false); +} + +export function ClicksByCitiesFacetToJSONTyped(value?: ClicksByCitiesFacet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'city': value['city'], + 'clicks': value['clicks'], + 'region': value['region'], + 'subregion': value['subregion'], + 'country': value['country'], + }; +} + diff --git a/src/models/ClicksByFacet.ts b/src/models/ClicksByFacet.ts new file mode 100644 index 0000000..f26cbd6 --- /dev/null +++ b/src/models/ClicksByFacet.ts @@ -0,0 +1,73 @@ +/* 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 ClicksByFacet + */ +export interface ClicksByFacet { + /** + * + * @type {string} + * @memberof ClicksByFacet + */ + value?: string; + /** + * + * @type {number} + * @memberof ClicksByFacet + */ + clicks?: number; +} + +/** + * Check if a given object implements the ClicksByFacet interface. + */ +export function instanceOfClicksByFacet(value: object): value is ClicksByFacet { + return true; +} + +export function ClicksByFacetFromJSON(json: any): ClicksByFacet { + return ClicksByFacetFromJSONTyped(json, false); +} + +export function ClicksByFacetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClicksByFacet { + if (json == null) { + return json; + } + return { + + 'value': json['value'] == null ? undefined : json['value'], + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + }; +} + +export function ClicksByFacetToJSON(json: any): ClicksByFacet { + return ClicksByFacetToJSONTyped(json, false); +} + +export function ClicksByFacetToJSONTyped(value?: ClicksByFacet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'value': value['value'], + 'clicks': value['clicks'], + }; +} + diff --git a/src/models/ClicksForAggregate.ts b/src/models/ClicksForAggregate.ts new file mode 100644 index 0000000..b0672bd --- /dev/null +++ b/src/models/ClicksForAggregate.ts @@ -0,0 +1,73 @@ +/* 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 ClicksForAggregate + */ +export interface ClicksForAggregate { + /** + * + * @type {number} + * @memberof ClicksForAggregate + */ + date?: number; + /** + * + * @type {number} + * @memberof ClicksForAggregate + */ + clicks?: number; +} + +/** + * Check if a given object implements the ClicksForAggregate interface. + */ +export function instanceOfClicksForAggregate(value: object): value is ClicksForAggregate { + return true; +} + +export function ClicksForAggregateFromJSON(json: any): ClicksForAggregate { + return ClicksForAggregateFromJSONTyped(json, false); +} + +export function ClicksForAggregateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClicksForAggregate { + if (json == null) { + return json; + } + return { + + 'date': json['date'] == null ? undefined : json['date'], + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + }; +} + +export function ClicksForAggregateToJSON(json: any): ClicksForAggregate { + return ClicksForAggregateToJSONTyped(json, false); +} + +export function ClicksForAggregateToJSONTyped(value?: ClicksForAggregate | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'date': value['date'], + 'clicks': value['clicks'], + }; +} + diff --git a/src/models/CreateLaunchpad.ts b/src/models/CreateLaunchpad.ts new file mode 100644 index 0000000..88fa97d --- /dev/null +++ b/src/models/CreateLaunchpad.ts @@ -0,0 +1,92 @@ +/* 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'; +/** + * @deprecated LL-2507 + * @export + * @interface CreateLaunchpad + */ +export interface CreateLaunchpad { + /** + * + * @type {string} + * @memberof CreateLaunchpad + */ + group_guid: string; + /** + * + * @type {string} + * @memberof CreateLaunchpad + */ + domain: string; + /** + * + * @type {string} + * @memberof CreateLaunchpad + */ + keyword: string; + /** + * + * @type {string} + * @memberof CreateLaunchpad + */ + uri?: string; +} + +/** + * Check if a given object implements the CreateLaunchpad interface. + */ +export function instanceOfCreateLaunchpad(value: object): value is CreateLaunchpad { + if (!('group_guid' in value) || value['group_guid'] === undefined) return false; + if (!('domain' in value) || value['domain'] === undefined) return false; + if (!('keyword' in value) || value['keyword'] === undefined) return false; + return true; +} + +export function CreateLaunchpadFromJSON(json: any): CreateLaunchpad { + return CreateLaunchpadFromJSONTyped(json, false); +} + +export function CreateLaunchpadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateLaunchpad { + if (json == null) { + return json; + } + return { + + 'group_guid': json['group_guid'], + 'domain': json['domain'], + 'keyword': json['keyword'], + 'uri': json['uri'] == null ? undefined : json['uri'], + }; +} + +export function CreateLaunchpadToJSON(json: any): CreateLaunchpad { + return CreateLaunchpadToJSONTyped(json, false); +} + +export function CreateLaunchpadToJSONTyped(value?: CreateLaunchpad | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group_guid': value['group_guid'], + 'domain': value['domain'], + 'keyword': value['keyword'], + 'uri': value['uri'], + }; +} + diff --git a/src/models/DigitalBusinessCardContact.ts b/src/models/DigitalBusinessCardContact.ts new file mode 100644 index 0000000..28eb26d --- /dev/null +++ b/src/models/DigitalBusinessCardContact.ts @@ -0,0 +1,133 @@ +/* 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 DigitalBusinessCardContact + */ +export interface DigitalBusinessCardContact { + /** + * + * @type {DigitalBusinessCardContactContactMethodEnum} + * @memberof DigitalBusinessCardContact + */ + contact_method: DigitalBusinessCardContactContactMethodEnum; + /** + * + * @type {DigitalBusinessCardContactMethodTypeEnum} + * @memberof DigitalBusinessCardContact + */ + method_type?: DigitalBusinessCardContactMethodTypeEnum; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContact + */ + value: string; + /** + * + * @type {number} + * @memberof DigitalBusinessCardContact + */ + sort_order: number; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContact + */ + bitlink_id?: string; +} + +/** +* @export +* @enum {string} +*/ +export enum DigitalBusinessCardContactContactMethodEnum { + email = 'email', + phone = 'phone', + location = 'location', + note = 'note', + website = 'website' +} +/** +* @export +* @enum {string} +*/ +export enum DigitalBusinessCardContactMethodTypeEnum { + no_label = 'no_label', + email = 'email', + work = 'work', + personal = 'personal', + home = 'home', + other = 'other', + mobile = 'mobile', + direct = 'direct', + main = 'main', + fax = 'fax', + office = 'office', + address = 'address', + company = 'company', + homepage = 'homepage' +} + + +/** + * Check if a given object implements the DigitalBusinessCardContact interface. + */ +export function instanceOfDigitalBusinessCardContact(value: object): value is DigitalBusinessCardContact { + if (!('contact_method' in value) || value['contact_method'] === undefined) return false; + if (!('value' in value) || value['value'] === undefined) return false; + if (!('sort_order' in value) || value['sort_order'] === undefined) return false; + return true; +} + +export function DigitalBusinessCardContactFromJSON(json: any): DigitalBusinessCardContact { + return DigitalBusinessCardContactFromJSONTyped(json, false); +} + +export function DigitalBusinessCardContactFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigitalBusinessCardContact { + if (json == null) { + return json; + } + return { + + 'contact_method': json['contact_method'], + 'method_type': json['method_type'] == null ? undefined : json['method_type'], + 'value': json['value'], + 'sort_order': json['sort_order'], + 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + }; +} + +export function DigitalBusinessCardContactToJSON(json: any): DigitalBusinessCardContact { + return DigitalBusinessCardContactToJSONTyped(json, false); +} + +export function DigitalBusinessCardContactToJSONTyped(value?: DigitalBusinessCardContact | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'contact_method': value['contact_method'], + 'method_type': value['method_type'], + 'value': value['value'], + 'sort_order': value['sort_order'], + 'bitlink_id': value['bitlink_id'], + }; +} + diff --git a/src/models/DigitalBusinessCardContent.ts b/src/models/DigitalBusinessCardContent.ts new file mode 100644 index 0000000..1cbcd81 --- /dev/null +++ b/src/models/DigitalBusinessCardContent.ts @@ -0,0 +1,169 @@ +/* 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 { DigitalBusinessCardLayout } from './DigitalBusinessCardLayout'; +import { + DigitalBusinessCardLayoutFromJSON, + DigitalBusinessCardLayoutFromJSONTyped, + DigitalBusinessCardLayoutToJSON, + DigitalBusinessCardLayoutToJSONTyped, +} from './DigitalBusinessCardLayout'; +import type { DigitalBusinessCardContentFile } from './DigitalBusinessCardContentFile'; +import { + DigitalBusinessCardContentFileFromJSON, + DigitalBusinessCardContentFileFromJSONTyped, + DigitalBusinessCardContentFileToJSON, + DigitalBusinessCardContentFileToJSONTyped, +} from './DigitalBusinessCardContentFile'; +import type { DigitalBusinessCardContact } from './DigitalBusinessCardContact'; +import { + DigitalBusinessCardContactFromJSON, + DigitalBusinessCardContactFromJSONTyped, + DigitalBusinessCardContactToJSON, + DigitalBusinessCardContactToJSONTyped, +} from './DigitalBusinessCardContact'; + +/** + * + * @export + * @interface DigitalBusinessCardContent + */ +export interface DigitalBusinessCardContent { + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + digital_business_card_id?: string; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + link_title?: string; + /** + * + * @type {DigitalBusinessCardLayout} + * @memberof DigitalBusinessCardContent + */ + layout?: DigitalBusinessCardLayout; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + first_name?: string; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + last_name?: string; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + pronouns?: string; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + company?: string; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContent + */ + job_title?: string; + /** + * + * @type {Array} + * @memberof DigitalBusinessCardContent + */ + contacts?: Array; + /** + * + * @type {boolean} + * @memberof DigitalBusinessCardContent + */ + download_enabled?: boolean; + /** + * + * @type {DigitalBusinessCardContentFile} + * @memberof DigitalBusinessCardContent + */ + file?: DigitalBusinessCardContentFile; +} + + + +/** + * Check if a given object implements the DigitalBusinessCardContent interface. + */ +export function instanceOfDigitalBusinessCardContent(value: object): value is DigitalBusinessCardContent { + return true; +} + +export function DigitalBusinessCardContentFromJSON(json: any): DigitalBusinessCardContent { + return DigitalBusinessCardContentFromJSONTyped(json, false); +} + +export function DigitalBusinessCardContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigitalBusinessCardContent { + if (json == null) { + return json; + } + return { + + 'digital_business_card_id': json['digital_business_card_id'] == null ? undefined : json['digital_business_card_id'], + 'link_title': json['link_title'] == null ? undefined : json['link_title'], + 'layout': json['layout'] == null ? undefined : DigitalBusinessCardLayoutFromJSON(json['layout']), + 'first_name': json['first_name'] == null ? undefined : json['first_name'], + 'last_name': json['last_name'] == null ? undefined : json['last_name'], + 'pronouns': json['pronouns'] == null ? undefined : json['pronouns'], + 'company': json['company'] == null ? undefined : json['company'], + 'job_title': json['job_title'] == null ? undefined : json['job_title'], + 'contacts': json['contacts'] == null ? undefined : ((json['contacts'] as Array).map(DigitalBusinessCardContactFromJSON)), + 'download_enabled': json['download_enabled'] == null ? undefined : json['download_enabled'], + 'file': json['file'] == null ? undefined : DigitalBusinessCardContentFileFromJSON(json['file']), + }; +} + +export function DigitalBusinessCardContentToJSON(json: any): DigitalBusinessCardContent { + return DigitalBusinessCardContentToJSONTyped(json, false); +} + +export function DigitalBusinessCardContentToJSONTyped(value?: DigitalBusinessCardContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'digital_business_card_id': value['digital_business_card_id'], + 'link_title': value['link_title'], + 'layout': DigitalBusinessCardLayoutToJSON(value['layout']), + 'first_name': value['first_name'], + 'last_name': value['last_name'], + 'pronouns': value['pronouns'], + 'company': value['company'], + 'job_title': value['job_title'], + 'contacts': value['contacts'] == null ? undefined : ((value['contacts'] as Array).map(DigitalBusinessCardContactToJSON)), + 'download_enabled': value['download_enabled'], + 'file': DigitalBusinessCardContentFileToJSON(value['file']), + }; +} + diff --git a/src/models/DigitalBusinessCardContentFile.ts b/src/models/DigitalBusinessCardContentFile.ts new file mode 100644 index 0000000..8e8ccd7 --- /dev/null +++ b/src/models/DigitalBusinessCardContentFile.ts @@ -0,0 +1,75 @@ +/* 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 DigitalBusinessCardContentFile + */ +export interface DigitalBusinessCardContentFile { + /** + * + * @type {string} + * @memberof DigitalBusinessCardContentFile + */ + file_name: string; + /** + * + * @type {string} + * @memberof DigitalBusinessCardContentFile + */ + data: string; +} + +/** + * Check if a given object implements the DigitalBusinessCardContentFile interface. + */ +export function instanceOfDigitalBusinessCardContentFile(value: object): value is DigitalBusinessCardContentFile { + if (!('file_name' in value) || value['file_name'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; +} + +export function DigitalBusinessCardContentFileFromJSON(json: any): DigitalBusinessCardContentFile { + return DigitalBusinessCardContentFileFromJSONTyped(json, false); +} + +export function DigitalBusinessCardContentFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigitalBusinessCardContentFile { + if (json == null) { + return json; + } + return { + + 'file_name': json['file_name'], + 'data': json['data'], + }; +} + +export function DigitalBusinessCardContentFileToJSON(json: any): DigitalBusinessCardContentFile { + return DigitalBusinessCardContentFileToJSONTyped(json, false); +} + +export function DigitalBusinessCardContentFileToJSONTyped(value?: DigitalBusinessCardContentFile | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'file_name': value['file_name'], + 'data': value['data'], + }; +} + diff --git a/src/models/DigitalBusinessCardLayout.ts b/src/models/DigitalBusinessCardLayout.ts new file mode 100644 index 0000000..9056b70 --- /dev/null +++ b/src/models/DigitalBusinessCardLayout.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * + * @export + * @enum {string} + */ +export enum DigitalBusinessCardLayout { + button = 'button', + card = 'card', + inline = 'inline' +} + + +export function instanceOfDigitalBusinessCardLayout(value: any): boolean { + for (const key in DigitalBusinessCardLayout) { + if (Object.prototype.hasOwnProperty.call(DigitalBusinessCardLayout, key)) { + if (DigitalBusinessCardLayout[key as keyof typeof DigitalBusinessCardLayout] === value) { + return true; + } + } + } + return false; +} + +export function DigitalBusinessCardLayoutFromJSON(json: any): DigitalBusinessCardLayout { + return DigitalBusinessCardLayoutFromJSONTyped(json, false); +} + +export function DigitalBusinessCardLayoutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigitalBusinessCardLayout { + return json as DigitalBusinessCardLayout; +} + +export function DigitalBusinessCardLayoutToJSON(value?: DigitalBusinessCardLayout | null): any { + return value as any; +} + +export function DigitalBusinessCardLayoutToJSONTyped(value: any, ignoreDiscriminator: boolean): DigitalBusinessCardLayout { + return value as DigitalBusinessCardLayout; +} + diff --git a/src/models/DynamicRoutingDeviceEnum.ts b/src/models/DynamicRoutingDeviceEnum.ts new file mode 100644 index 0000000..67df9df --- /dev/null +++ b/src/models/DynamicRoutingDeviceEnum.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Device type values for use in dynamic routing rules (device_match / device_exclude) + * @export + * @enum {string} + */ +export enum DynamicRoutingDeviceEnum { + mobile = 'mobile', + tablet = 'tablet', + desktop = 'desktop' +} + + +export function instanceOfDynamicRoutingDeviceEnum(value: any): boolean { + for (const key in DynamicRoutingDeviceEnum) { + if (Object.prototype.hasOwnProperty.call(DynamicRoutingDeviceEnum, key)) { + if (DynamicRoutingDeviceEnum[key as keyof typeof DynamicRoutingDeviceEnum] === value) { + return true; + } + } + } + return false; +} + +export function DynamicRoutingDeviceEnumFromJSON(json: any): DynamicRoutingDeviceEnum { + return DynamicRoutingDeviceEnumFromJSONTyped(json, false); +} + +export function DynamicRoutingDeviceEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DynamicRoutingDeviceEnum { + return json as DynamicRoutingDeviceEnum; +} + +export function DynamicRoutingDeviceEnumToJSON(value?: DynamicRoutingDeviceEnum | null): any { + return value as any; +} + +export function DynamicRoutingDeviceEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DynamicRoutingDeviceEnum { + return value as DynamicRoutingDeviceEnum; +} + diff --git a/src/models/DynamicRoutingPlatformEnum.ts b/src/models/DynamicRoutingPlatformEnum.ts new file mode 100644 index 0000000..18657e7 --- /dev/null +++ b/src/models/DynamicRoutingPlatformEnum.ts @@ -0,0 +1,52 @@ +/* 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. + */ + +/** + * Platform (OS) values for use in dynamic routing rules (os_match / os_exclude) + * @export + * @enum {string} + */ +export enum DynamicRoutingPlatformEnum { + ios = 'ios', + android = 'android' +} + + +export function instanceOfDynamicRoutingPlatformEnum(value: any): boolean { + for (const key in DynamicRoutingPlatformEnum) { + if (Object.prototype.hasOwnProperty.call(DynamicRoutingPlatformEnum, key)) { + if (DynamicRoutingPlatformEnum[key as keyof typeof DynamicRoutingPlatformEnum] === value) { + return true; + } + } + } + return false; +} + +export function DynamicRoutingPlatformEnumFromJSON(json: any): DynamicRoutingPlatformEnum { + return DynamicRoutingPlatformEnumFromJSONTyped(json, false); +} + +export function DynamicRoutingPlatformEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DynamicRoutingPlatformEnum { + return json as DynamicRoutingPlatformEnum; +} + +export function DynamicRoutingPlatformEnumToJSON(value?: DynamicRoutingPlatformEnum | null): any { + return value as any; +} + +export function DynamicRoutingPlatformEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DynamicRoutingPlatformEnum { + return value as DynamicRoutingPlatformEnum; +} + diff --git a/src/models/DynamicRoutingRule.ts b/src/models/DynamicRoutingRule.ts new file mode 100644 index 0000000..bc72489 --- /dev/null +++ b/src/models/DynamicRoutingRule.ts @@ -0,0 +1,144 @@ +/* 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 { DynamicRoutingDeviceEnum } from './DynamicRoutingDeviceEnum'; +import { + DynamicRoutingDeviceEnumFromJSON, + DynamicRoutingDeviceEnumFromJSONTyped, + DynamicRoutingDeviceEnumToJSON, + DynamicRoutingDeviceEnumToJSONTyped, +} from './DynamicRoutingDeviceEnum'; +import type { DynamicRoutingPlatformEnum } from './DynamicRoutingPlatformEnum'; +import { + DynamicRoutingPlatformEnumFromJSON, + DynamicRoutingPlatformEnumFromJSONTyped, + DynamicRoutingPlatformEnumToJSON, + DynamicRoutingPlatformEnumToJSONTyped, +} from './DynamicRoutingPlatformEnum'; + +/** + * A dynamic routing rule that redirects traffic to a different destination based on user attributes. + * @export + * @interface DynamicRoutingRule + */ +export interface DynamicRoutingRule { + /** + * The destination URL for requests matching this rule. + * @type {string} + * @memberof DynamicRoutingRule + */ + long_url?: string; + /** + * ISO 3166-1 alpha-2 country codes that trigger this rule (e.g., ["US", "CA"]). + * @type {Array} + * @memberof DynamicRoutingRule + */ + country_match?: Array; + /** + * ISO 3166-1 alpha-2 country codes that must NOT match for this rule to apply. + * @type {Array} + * @memberof DynamicRoutingRule + */ + country_exclude?: Array; + /** + * ISO 3166-2 region codes that trigger this rule (e.g., ["US-CA", "CA-ON"]). + * @type {Array} + * @memberof DynamicRoutingRule + */ + region_match?: Array; + /** + * ISO 3166-2 region codes that must NOT match for this rule to apply (e.g., ["US-CA", "CA-ON"]). + * @type {Array} + * @memberof DynamicRoutingRule + */ + region_exclude?: Array; + /** + * Device types that trigger this rule (e.g., ["mobile", "tablet"]). + * @type {Array} + * @memberof DynamicRoutingRule + */ + device_match?: Array; + /** + * Device types that must NOT match for this rule to apply. + * @type {Array} + * @memberof DynamicRoutingRule + */ + device_exclude?: Array; + /** + * Operating systems that trigger this rule (e.g., ["ios", "android"]). + * @type {Array} + * @memberof DynamicRoutingRule + */ + os_match?: Array; + /** + * Operating systems that must NOT match for this rule to apply. + * @type {Array} + * @memberof DynamicRoutingRule + */ + os_exclude?: Array; +} + +/** + * Check if a given object implements the DynamicRoutingRule interface. + */ +export function instanceOfDynamicRoutingRule(value: object): value is DynamicRoutingRule { + return true; +} + +export function DynamicRoutingRuleFromJSON(json: any): DynamicRoutingRule { + return DynamicRoutingRuleFromJSONTyped(json, false); +} + +export function DynamicRoutingRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): DynamicRoutingRule { + if (json == null) { + return json; + } + return { + + 'long_url': json['long_url'] == null ? undefined : json['long_url'], + 'country_match': json['country_match'] == null ? undefined : json['country_match'], + 'country_exclude': json['country_exclude'] == null ? undefined : json['country_exclude'], + 'region_match': json['region_match'] == null ? undefined : json['region_match'], + 'region_exclude': json['region_exclude'] == null ? undefined : json['region_exclude'], + 'device_match': json['device_match'] == null ? undefined : ((json['device_match'] as Array).map(DynamicRoutingDeviceEnumFromJSON)), + 'device_exclude': json['device_exclude'] == null ? undefined : ((json['device_exclude'] as Array).map(DynamicRoutingDeviceEnumFromJSON)), + 'os_match': json['os_match'] == null ? undefined : ((json['os_match'] as Array).map(DynamicRoutingPlatformEnumFromJSON)), + 'os_exclude': json['os_exclude'] == null ? undefined : ((json['os_exclude'] as Array).map(DynamicRoutingPlatformEnumFromJSON)), + }; +} + +export function DynamicRoutingRuleToJSON(json: any): DynamicRoutingRule { + return DynamicRoutingRuleToJSONTyped(json, false); +} + +export function DynamicRoutingRuleToJSONTyped(value?: DynamicRoutingRule | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'long_url': value['long_url'], + 'country_match': value['country_match'], + 'country_exclude': value['country_exclude'], + 'region_match': value['region_match'], + 'region_exclude': value['region_exclude'], + 'device_match': value['device_match'] == null ? undefined : ((value['device_match'] as Array).map(DynamicRoutingDeviceEnumToJSON)), + 'device_exclude': value['device_exclude'] == null ? undefined : ((value['device_exclude'] as Array).map(DynamicRoutingDeviceEnumToJSON)), + 'os_match': value['os_match'] == null ? undefined : ((value['os_match'] as Array).map(DynamicRoutingPlatformEnumToJSON)), + 'os_exclude': value['os_exclude'] == null ? undefined : ((value['os_exclude'] as Array).map(DynamicRoutingPlatformEnumToJSON)), + }; +} + diff --git a/src/models/ExpandedBitlink.ts b/src/models/ExpandedBitlink.ts index 5cc548e..20be98e 100644 --- a/src/models/ExpandedBitlink.ts +++ b/src/models/ExpandedBitlink.ts @@ -37,6 +37,13 @@ export interface ExpandedBitlink { * @memberof ExpandedBitlink */ long_url?: string; + /** + * The list of destination URLs for this bitlink, including the default long URL and any dynamically routed destination URLs. + * + * @type {Array} + * @memberof ExpandedBitlink + */ + long_urls?: Array; /** * * @type {string} @@ -65,6 +72,7 @@ export function ExpandedBitlinkFromJSONTyped(json: any, ignoreDiscriminator: boo 'link': json['link'] == null ? undefined : json['link'], 'id': json['id'] == null ? undefined : json['id'], 'long_url': json['long_url'] == null ? undefined : json['long_url'], + 'long_urls': json['long_urls'] == null ? undefined : json['long_urls'], 'created_at': json['created_at'] == null ? undefined : json['created_at'], }; } @@ -83,6 +91,7 @@ export function ExpandedBitlinkToJSONTyped(value?: ExpandedBitlink | null, ignor 'link': value['link'], 'id': value['id'], 'long_url': value['long_url'], + 'long_urls': value['long_urls'], 'created_at': value['created_at'], }; } diff --git a/src/models/FullShorten.ts b/src/models/FullShorten.ts index 160fa13..14b7019 100644 --- a/src/models/FullShorten.ts +++ b/src/models/FullShorten.ts @@ -13,6 +13,13 @@ */ import { mapValues } from '../runtime'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; import type { Deeplink } from './Deeplink'; import { DeeplinkFromJSON, @@ -87,6 +94,12 @@ export interface FullShorten { * @memberof FullShorten */ expiration_at?: string; + /** + * dynamic routing rules for this bitlink. + * @type {Array} + * @memberof FullShorten + */ + dynamic_routing?: Array; } /** @@ -116,6 +129,7 @@ export function FullShortenFromJSONTyped(json: any, ignoreDiscriminator: boolean 'keyword': json['keyword'] == null ? undefined : json['keyword'], 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), }; } @@ -140,6 +154,7 @@ export function FullShortenToJSONTyped(value?: FullShorten | null, ignoreDiscrim 'keyword': value['keyword'], 'bitlink_id': value['bitlink_id'], 'expiration_at': value['expiration_at'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), }; } diff --git a/src/models/GetAggregateSitesOverview200Response.ts b/src/models/GetAggregateSitesOverview200Response.ts new file mode 100644 index 0000000..0a9ec6b --- /dev/null +++ b/src/models/GetAggregateSitesOverview200Response.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 GetAggregateSitesOverview200Response + */ +export interface GetAggregateSitesOverview200Response { + /** + * + * @type {number} + * @memberof GetAggregateSitesOverview200Response + */ + views?: number; + /** + * + * @type {number} + * @memberof GetAggregateSitesOverview200Response + */ + clicks?: number; + /** + * + * @type {string} + * @memberof GetAggregateSitesOverview200Response + */ + info?: string; +} + +/** + * Check if a given object implements the GetAggregateSitesOverview200Response interface. + */ +export function instanceOfGetAggregateSitesOverview200Response(value: object): value is GetAggregateSitesOverview200Response { + return true; +} + +export function GetAggregateSitesOverview200ResponseFromJSON(json: any): GetAggregateSitesOverview200Response { + return GetAggregateSitesOverview200ResponseFromJSONTyped(json, false); +} + +export function GetAggregateSitesOverview200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAggregateSitesOverview200Response { + if (json == null) { + return json; + } + return { + + 'views': json['views'] == null ? undefined : json['views'], + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + 'info': json['info'] == null ? undefined : json['info'], + }; +} + +export function GetAggregateSitesOverview200ResponseToJSON(json: any): GetAggregateSitesOverview200Response { + return GetAggregateSitesOverview200ResponseToJSONTyped(json, false); +} + +export function GetAggregateSitesOverview200ResponseToJSONTyped(value?: GetAggregateSitesOverview200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'views': value['views'], + 'clicks': value['clicks'], + 'info': value['info'], + }; +} + diff --git a/src/models/GroupBitlinksCountRollup.ts b/src/models/GroupBitlinksCountRollup.ts new file mode 100644 index 0000000..5f2854c --- /dev/null +++ b/src/models/GroupBitlinksCountRollup.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'; +/** + * + * @export + * @interface GroupBitlinksCountRollup + */ +export interface GroupBitlinksCountRollup { + /** + * + * @type {string} + * @memberof GroupBitlinksCountRollup + */ + unit?: string; + /** + * + * @type {number} + * @memberof GroupBitlinksCountRollup + */ + units?: number; + /** + * + * @type {string} + * @memberof GroupBitlinksCountRollup + */ + unit_reference?: string; + /** + * + * @type {number} + * @memberof GroupBitlinksCountRollup + */ + total_clicks?: number; +} + +/** + * Check if a given object implements the GroupBitlinksCountRollup interface. + */ +export function instanceOfGroupBitlinksCountRollup(value: object): value is GroupBitlinksCountRollup { + return true; +} + +export function GroupBitlinksCountRollupFromJSON(json: any): GroupBitlinksCountRollup { + return GroupBitlinksCountRollupFromJSONTyped(json, false); +} + +export function GroupBitlinksCountRollupFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupBitlinksCountRollup { + if (json == null) { + return json; + } + return { + + 'unit': json['unit'] == null ? undefined : json['unit'], + 'units': json['units'] == null ? undefined : json['units'], + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'total_clicks': json['total_clicks'] == null ? undefined : json['total_clicks'], + }; +} + +export function GroupBitlinksCountRollupToJSON(json: any): GroupBitlinksCountRollup { + return GroupBitlinksCountRollupToJSONTyped(json, false); +} + +export function GroupBitlinksCountRollupToJSONTyped(value?: GroupBitlinksCountRollup | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'unit': value['unit'], + 'units': value['units'], + 'unit_reference': value['unit_reference'], + 'total_clicks': value['total_clicks'], + }; +} + diff --git a/src/models/ImageCommon.ts b/src/models/ImageCommon.ts new file mode 100644 index 0000000..4b9501f --- /dev/null +++ b/src/models/ImageCommon.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 ImageCommon + */ +export interface ImageCommon { + /** + * + * @type {string} + * @memberof ImageCommon + */ + image_guid?: string; + /** + * + * @type {string} + * @memberof ImageCommon + */ + image_url?: string; + /** + * + * @type {string} + * @memberof ImageCommon + */ + crop?: string; +} + +/** + * Check if a given object implements the ImageCommon interface. + */ +export function instanceOfImageCommon(value: object): value is ImageCommon { + return true; +} + +export function ImageCommonFromJSON(json: any): ImageCommon { + return ImageCommonFromJSONTyped(json, false); +} + +export function ImageCommonFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageCommon { + if (json == null) { + return json; + } + return { + + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + 'image_url': json['image_url'] == null ? undefined : json['image_url'], + 'crop': json['crop'] == null ? undefined : json['crop'], + }; +} + +export function ImageCommonToJSON(json: any): ImageCommon { + return ImageCommonToJSONTyped(json, false); +} + +export function ImageCommonToJSONTyped(value?: ImageCommon | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'image_guid': value['image_guid'], + 'image_url': value['image_url'], + 'crop': value['crop'], + }; +} + diff --git a/src/models/ImageContent.ts b/src/models/ImageContent.ts new file mode 100644 index 0000000..b556701 --- /dev/null +++ b/src/models/ImageContent.ts @@ -0,0 +1,113 @@ +/* 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 ImageContent + */ +export interface ImageContent { + /** + * + * @type {string} + * @memberof ImageContent + */ + image_guid?: string; + /** + * + * @type {string} + * @memberof ImageContent + */ + image_url?: string; + /** + * + * @type {string} + * @memberof ImageContent + */ + crop?: string; + /** + * + * @type {string} + * @memberof ImageContent + */ + aspect_ratio?: string; + /** + * + * @type {string} + * @memberof ImageContent + */ + link_title?: string; + /** + * + * @type {string} + * @memberof ImageContent + */ + description?: string; + /** + * + * @type {string} + * @memberof ImageContent + */ + bitlink_id?: string; +} + +/** + * Check if a given object implements the ImageContent interface. + */ +export function instanceOfImageContent(value: object): value is ImageContent { + return true; +} + +export function ImageContentFromJSON(json: any): ImageContent { + return ImageContentFromJSONTyped(json, false); +} + +export function ImageContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageContent { + if (json == null) { + return json; + } + return { + + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + 'image_url': json['image_url'] == null ? undefined : json['image_url'], + 'crop': json['crop'] == null ? undefined : json['crop'], + 'aspect_ratio': json['aspect_ratio'] == null ? undefined : json['aspect_ratio'], + 'link_title': json['link_title'] == null ? undefined : json['link_title'], + 'description': json['description'] == null ? undefined : json['description'], + 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + }; +} + +export function ImageContentToJSON(json: any): ImageContent { + return ImageContentToJSONTyped(json, false); +} + +export function ImageContentToJSONTyped(value?: ImageContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'image_guid': value['image_guid'], + 'image_url': value['image_url'], + 'crop': value['crop'], + 'aspect_ratio': value['aspect_ratio'], + 'link_title': value['link_title'], + 'description': value['description'], + 'bitlink_id': value['bitlink_id'], + }; +} + diff --git a/src/models/ImageUploadResponse.ts b/src/models/ImageUploadResponse.ts new file mode 100644 index 0000000..a6853d1 --- /dev/null +++ b/src/models/ImageUploadResponse.ts @@ -0,0 +1,73 @@ +/* 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 ImageUploadResponse + */ +export interface ImageUploadResponse { + /** + * + * @type {string} + * @memberof ImageUploadResponse + */ + image_url?: string; + /** + * + * @type {string} + * @memberof ImageUploadResponse + */ + image_guid?: string; +} + +/** + * Check if a given object implements the ImageUploadResponse interface. + */ +export function instanceOfImageUploadResponse(value: object): value is ImageUploadResponse { + return true; +} + +export function ImageUploadResponseFromJSON(json: any): ImageUploadResponse { + return ImageUploadResponseFromJSONTyped(json, false); +} + +export function ImageUploadResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageUploadResponse { + if (json == null) { + return json; + } + return { + + 'image_url': json['image_url'] == null ? undefined : json['image_url'], + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + }; +} + +export function ImageUploadResponseToJSON(json: any): ImageUploadResponse { + return ImageUploadResponseToJSONTyped(json, false); +} + +export function ImageUploadResponseToJSONTyped(value?: ImageUploadResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'image_url': value['image_url'], + 'image_guid': value['image_guid'], + }; +} + diff --git a/src/models/LaunchpadButtonTypeEnum.ts b/src/models/LaunchpadButtonTypeEnum.ts new file mode 100644 index 0000000..95ccc9e --- /dev/null +++ b/src/models/LaunchpadButtonTypeEnum.ts @@ -0,0 +1,57 @@ +/* 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. + */ + +/** + * Available button types for Launchpad content + * @export + * @enum {string} + */ +export enum LaunchpadButtonTypeEnum { + bitlink = 'bitlink', + youtube_video = 'youtubeVideo', + image = 'image', + carousel = 'carousel', + grid = 'grid', + digital_business_card = 'digital_business_card', + text_block = 'text_block' +} + + +export function instanceOfLaunchpadButtonTypeEnum(value: any): boolean { + for (const key in LaunchpadButtonTypeEnum) { + if (Object.prototype.hasOwnProperty.call(LaunchpadButtonTypeEnum, key)) { + if (LaunchpadButtonTypeEnum[key as keyof typeof LaunchpadButtonTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function LaunchpadButtonTypeEnumFromJSON(json: any): LaunchpadButtonTypeEnum { + return LaunchpadButtonTypeEnumFromJSONTyped(json, false); +} + +export function LaunchpadButtonTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LaunchpadButtonTypeEnum { + return json as LaunchpadButtonTypeEnum; +} + +export function LaunchpadButtonTypeEnumToJSON(value?: LaunchpadButtonTypeEnum | null): any { + return value as any; +} + +export function LaunchpadButtonTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LaunchpadButtonTypeEnum { + return value as LaunchpadButtonTypeEnum; +} + diff --git a/src/models/MicrositePagination.ts b/src/models/MicrositePagination.ts new file mode 100644 index 0000000..c3dd679 --- /dev/null +++ b/src/models/MicrositePagination.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'; +/** + * Specifies how to query the next set of results. + * @export + * @interface MicrositePagination + */ +export interface MicrositePagination { + /** + * A hyperlink to the next set of results. + * @type {string} + * @memberof MicrositePagination + */ + next?: string; + /** + * The identifier of where to begin searching for the next set of results. + * @type {string} + * @memberof MicrositePagination + */ + search_after?: string; + /** + * The number of results returned from this query. + * @type {number} + * @memberof MicrositePagination + */ + size?: number; +} + +/** + * Check if a given object implements the MicrositePagination interface. + */ +export function instanceOfMicrositePagination(value: object): value is MicrositePagination { + return true; +} + +export function MicrositePaginationFromJSON(json: any): MicrositePagination { + return MicrositePaginationFromJSONTyped(json, false); +} + +export function MicrositePaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrositePagination { + if (json == null) { + return json; + } + return { + + 'next': json['next'] == null ? undefined : json['next'], + 'search_after': json['search_after'] == null ? undefined : json['search_after'], + 'size': json['size'] == null ? undefined : json['size'], + }; +} + +export function MicrositePaginationToJSON(json: any): MicrositePagination { + return MicrositePaginationToJSONTyped(json, false); +} + +export function MicrositePaginationToJSONTyped(value?: MicrositePagination | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'next': value['next'], + 'search_after': value['search_after'], + 'size': value['size'], + }; +} + diff --git a/src/models/OAuthApp.ts b/src/models/OAuthApp.ts index b657bff..09eafc2 100644 --- a/src/models/OAuthApp.ts +++ b/src/models/OAuthApp.ts @@ -49,6 +49,12 @@ export interface OAuthApp { * @memberof OAuthApp */ require_oauth_pkce: boolean; + /** + * True for Bitly's own first-party apps (dashboard, mobile apps), as opposed to third-party integrations. + * @type {boolean} + * @memberof OAuthApp + */ + internal_app?: boolean; } /** @@ -78,6 +84,7 @@ export function OAuthAppFromJSONTyped(json: any, ignoreDiscriminator: boolean): 'description': json['description'], 'link': json['link'], 'require_oauth_pkce': json['require_oauth_pkce'], + 'internal_app': json['internal_app'] == null ? undefined : json['internal_app'], }; } @@ -97,6 +104,7 @@ export function OAuthAppToJSONTyped(value?: OAuthApp | null, ignoreDiscriminator 'description': value['description'], 'link': value['link'], 'require_oauth_pkce': value['require_oauth_pkce'], + 'internal_app': value['internal_app'], }; } diff --git a/src/models/OtherViewMetrics.ts b/src/models/OtherViewMetrics.ts new file mode 100644 index 0000000..13d8a21 --- /dev/null +++ b/src/models/OtherViewMetrics.ts @@ -0,0 +1,73 @@ +/* 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 OtherViewMetrics + */ +export interface OtherViewMetrics { + /** + * + * @type {number} + * @memberof OtherViewMetrics + */ + other_city_views?: number; + /** + * + * @type {number} + * @memberof OtherViewMetrics + */ + no_city_views?: number; +} + +/** + * Check if a given object implements the OtherViewMetrics interface. + */ +export function instanceOfOtherViewMetrics(value: object): value is OtherViewMetrics { + return true; +} + +export function OtherViewMetricsFromJSON(json: any): OtherViewMetrics { + return OtherViewMetricsFromJSONTyped(json, false); +} + +export function OtherViewMetricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OtherViewMetrics { + if (json == null) { + return json; + } + return { + + 'other_city_views': json['other_city_views'] == null ? undefined : json['other_city_views'], + 'no_city_views': json['no_city_views'] == null ? undefined : json['no_city_views'], + }; +} + +export function OtherViewMetricsToJSON(json: any): OtherViewMetrics { + return OtherViewMetricsToJSONTyped(json, false); +} + +export function OtherViewMetricsToJSONTyped(value?: OtherViewMetrics | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'other_city_views': value['other_city_views'], + 'no_city_views': value['no_city_views'], + }; +} + diff --git a/src/models/PageLinkInfo.ts b/src/models/PageLinkInfo.ts new file mode 100644 index 0000000..c5b0491 --- /dev/null +++ b/src/models/PageLinkInfo.ts @@ -0,0 +1,121 @@ +/* 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 { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; + +/** + * Versioned bitlink data from decodes_api for rendering links on Sites and Launchpads + * @export + * @interface PageLinkInfo + */ +export interface PageLinkInfo { + /** + * The fully qualified short URL (e.g., "https://bit.ly/abc123") + * @type {string} + * @memberof PageLinkInfo + */ + link?: string; + /** + * The destination URL that the short link redirects to + * @type {string} + * @memberof PageLinkInfo + */ + long_url?: string; + /** + * Unix timestamp when the link expires, if set + * @type {number} + * @memberof PageLinkInfo + */ + expiration_at?: number; + /** + * Indicates if this link has a custom backhalf override + * @type {boolean} + * @memberof PageLinkInfo + */ + has_override?: boolean; + /** + * Indicates if this link IS an override of another link + * @type {boolean} + * @memberof PageLinkInfo + */ + is_override?: boolean; + /** + * Indicates if the link has been deleted + * @type {boolean} + * @memberof PageLinkInfo + */ + is_deleted?: boolean; + /** + * Dynamic routing rules for this link. Only present when at least one rule is configured. + * @type {Array} + * @memberof PageLinkInfo + */ + dynamic_routing?: Array; +} + +/** + * Check if a given object implements the PageLinkInfo interface. + */ +export function instanceOfPageLinkInfo(value: object): value is PageLinkInfo { + return true; +} + +export function PageLinkInfoFromJSON(json: any): PageLinkInfo { + return PageLinkInfoFromJSONTyped(json, false); +} + +export function PageLinkInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PageLinkInfo { + if (json == null) { + return json; + } + return { + + 'link': json['link'] == null ? undefined : json['link'], + 'long_url': json['long_url'] == null ? undefined : json['long_url'], + 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], + 'has_override': json['has_override'] == null ? undefined : json['has_override'], + 'is_override': json['is_override'] == null ? undefined : json['is_override'], + 'is_deleted': json['is_deleted'] == null ? undefined : json['is_deleted'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), + }; +} + +export function PageLinkInfoToJSON(json: any): PageLinkInfo { + return PageLinkInfoToJSONTyped(json, false); +} + +export function PageLinkInfoToJSONTyped(value?: PageLinkInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'link': value['link'], + 'long_url': value['long_url'], + 'expiration_at': value['expiration_at'], + 'has_override': value['has_override'], + 'is_override': value['is_override'], + 'is_deleted': value['is_deleted'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), + }; +} + diff --git a/src/models/PrevalidateYouTubeVideoRequest.ts b/src/models/PrevalidateYouTubeVideoRequest.ts new file mode 100644 index 0000000..ee78b29 --- /dev/null +++ b/src/models/PrevalidateYouTubeVideoRequest.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'; +/** + * + * @export + * @interface PrevalidateYouTubeVideoRequest + */ +export interface PrevalidateYouTubeVideoRequest { + /** + * + * @type {string} + * @memberof PrevalidateYouTubeVideoRequest + */ + video_id?: string; +} + +/** + * Check if a given object implements the PrevalidateYouTubeVideoRequest interface. + */ +export function instanceOfPrevalidateYouTubeVideoRequest(value: object): value is PrevalidateYouTubeVideoRequest { + return true; +} + +export function PrevalidateYouTubeVideoRequestFromJSON(json: any): PrevalidateYouTubeVideoRequest { + return PrevalidateYouTubeVideoRequestFromJSONTyped(json, false); +} + +export function PrevalidateYouTubeVideoRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PrevalidateYouTubeVideoRequest { + if (json == null) { + return json; + } + return { + + 'video_id': json['video_id'] == null ? undefined : json['video_id'], + }; +} + +export function PrevalidateYouTubeVideoRequestToJSON(json: any): PrevalidateYouTubeVideoRequest { + return PrevalidateYouTubeVideoRequestToJSONTyped(json, false); +} + +export function PrevalidateYouTubeVideoRequestToJSONTyped(value?: PrevalidateYouTubeVideoRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'video_id': value['video_id'], + }; +} + diff --git a/src/models/PublicCreateQRCodeRequest.ts b/src/models/PublicCreateQRCodeRequest.ts index 08b3018..7a672be 100644 --- a/src/models/PublicCreateQRCodeRequest.ts +++ b/src/models/PublicCreateQRCodeRequest.ts @@ -34,6 +34,13 @@ import { GS1MetadataToJSON, GS1MetadataToJSONTyped, } from './GS1Metadata'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * Customization and content values for a QR code created through the public API @@ -89,6 +96,18 @@ export interface PublicCreateQRCodeRequest { * @memberof PublicCreateQRCodeRequest */ tags?: Array; + /** + * Optional dynamic routing rules for this decoupled QR code. Only supported for long_url destinations. Providing this field replaces all existing rules. Send an empty array to clear all rules. + * @type {Array} + * @memberof PublicCreateQRCodeRequest + */ + dynamic_routing?: Array; + /** + * + * @type {string} + * @memberof PublicCreateQRCodeRequest + */ + domain?: string; } /** @@ -118,6 +137,8 @@ export function PublicCreateQRCodeRequestFromJSONTyped(json: any, ignoreDiscrimi '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'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), + 'domain': json['domain'] == null ? undefined : json['domain'], }; } @@ -140,6 +161,8 @@ export function PublicCreateQRCodeRequestToJSONTyped(value?: PublicCreateQRCodeR 'gs1': GS1MetadataToJSON(value['gs1']), 'expiration_at': value['expiration_at'], 'tags': value['tags'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), + 'domain': value['domain'], }; } diff --git a/src/models/PublicUpdateQRCodeRequest.ts b/src/models/PublicUpdateQRCodeRequest.ts index 30838d3..c9da30f 100644 --- a/src/models/PublicUpdateQRCodeRequest.ts +++ b/src/models/PublicUpdateQRCodeRequest.ts @@ -20,6 +20,13 @@ import { QRCodeCustomizationsPublicToJSON, QRCodeCustomizationsPublicToJSONTyped, } from './QRCodeCustomizationsPublic'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * Customization and content values for a QR code created through the public API @@ -57,6 +64,12 @@ export interface PublicUpdateQRCodeRequest { * @memberof PublicUpdateQRCodeRequest */ tags?: Array; + /** + * Dynamic routing rules for this QR code. Providing this field replaces all existing rules. Send an empty array to clear all rules. + * @type {Array} + * @memberof PublicUpdateQRCodeRequest + */ + dynamic_routing?: Array; } /** @@ -81,6 +94,7 @@ export function PublicUpdateQRCodeRequestFromJSONTyped(json: any, ignoreDiscrimi 'archived': json['archived'] == null ? undefined : json['archived'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], 'tags': json['tags'] == null ? undefined : json['tags'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), }; } @@ -100,6 +114,7 @@ export function PublicUpdateQRCodeRequestToJSONTyped(value?: PublicUpdateQRCodeR 'archived': value['archived'], 'expiration_at': value['expiration_at'], 'tags': value['tags'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), }; } diff --git a/src/models/QRCBulkUpdate.ts b/src/models/QRCBulkUpdate.ts new file mode 100644 index 0000000..74d936e --- /dev/null +++ b/src/models/QRCBulkUpdate.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'; +/** + * + * @export + * @interface QRCBulkUpdate + */ +export interface QRCBulkUpdate { + /** + * + * @type {Array} + * @memberof QRCBulkUpdate + */ + qr_code_ids?: Array; +} + +/** + * Check if a given object implements the QRCBulkUpdate interface. + */ +export function instanceOfQRCBulkUpdate(value: object): value is QRCBulkUpdate { + return true; +} + +export function QRCBulkUpdateFromJSON(json: any): QRCBulkUpdate { + return QRCBulkUpdateFromJSONTyped(json, false); +} + +export function QRCBulkUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): QRCBulkUpdate { + if (json == null) { + return json; + } + return { + + 'qr_code_ids': json['qr_code_ids'] == null ? undefined : json['qr_code_ids'], + }; +} + +export function QRCBulkUpdateToJSON(json: any): QRCBulkUpdate { + return QRCBulkUpdateToJSONTyped(json, false); +} + +export function QRCBulkUpdateToJSONTyped(value?: QRCBulkUpdate | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'qr_code_ids': value['qr_code_ids'], + }; +} + diff --git a/src/models/QRCBulkUpdateRequest.ts b/src/models/QRCBulkUpdateRequest.ts new file mode 100644 index 0000000..4b878b6 --- /dev/null +++ b/src/models/QRCBulkUpdateRequest.ts @@ -0,0 +1,108 @@ +/* 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 QRCBulkUpdateRequest + */ +export interface QRCBulkUpdateRequest { + /** + * archive or edit_tags + * @type {QRCBulkUpdateRequestActionEnum} + * @memberof QRCBulkUpdateRequest + */ + action: QRCBulkUpdateRequestActionEnum; + /** + * + * @type {boolean} + * @memberof QRCBulkUpdateRequest + */ + archive?: boolean; + /** + * + * @type {Array} + * @memberof QRCBulkUpdateRequest + */ + add_tags?: Array; + /** + * + * @type {Array} + * @memberof QRCBulkUpdateRequest + */ + remove_tags?: Array; + /** + * this is limited to 100 QR code ids; Pages QR codes are not supported + * @type {Array} + * @memberof QRCBulkUpdateRequest + */ + qr_code_ids?: Array; +} + +/** +* @export +* @enum {string} +*/ +export enum QRCBulkUpdateRequestActionEnum { + archive = 'archive', + edit_tags = 'edit_tags' +} + + +/** + * Check if a given object implements the QRCBulkUpdateRequest interface. + */ +export function instanceOfQRCBulkUpdateRequest(value: object): value is QRCBulkUpdateRequest { + if (!('action' in value) || value['action'] === undefined) return false; + return true; +} + +export function QRCBulkUpdateRequestFromJSON(json: any): QRCBulkUpdateRequest { + return QRCBulkUpdateRequestFromJSONTyped(json, false); +} + +export function QRCBulkUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): QRCBulkUpdateRequest { + if (json == null) { + return json; + } + return { + + 'action': json['action'], + 'archive': json['archive'] == null ? undefined : json['archive'], + 'add_tags': json['add_tags'] == null ? undefined : json['add_tags'], + 'remove_tags': json['remove_tags'] == null ? undefined : json['remove_tags'], + 'qr_code_ids': json['qr_code_ids'] == null ? undefined : json['qr_code_ids'], + }; +} + +export function QRCBulkUpdateRequestToJSON(json: any): QRCBulkUpdateRequest { + return QRCBulkUpdateRequestToJSONTyped(json, false); +} + +export function QRCBulkUpdateRequestToJSONTyped(value?: QRCBulkUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'action': value['action'], + 'archive': value['archive'], + 'add_tags': value['add_tags'], + 'remove_tags': value['remove_tags'], + 'qr_code_ids': value['qr_code_ids'], + }; +} + diff --git a/src/models/QRCodeDetails.ts b/src/models/QRCodeDetails.ts index f0405b7..48cd177 100644 --- a/src/models/QRCodeDetails.ts +++ b/src/models/QRCodeDetails.ts @@ -34,6 +34,13 @@ import { GS1MetadataToJSON, GS1MetadataToJSONTyped, } from './GS1Metadata'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * @@ -83,6 +90,12 @@ export interface QRCodeDetails { * @memberof QRCodeDetails */ bitlink_id?: string; + /** + * The short domain the qr code redirects from. Present for both bitlink and long_url qr codes. + * @type {string} + * @memberof QRCodeDetails + */ + domain?: string; /** * A list of destination URLs that the qr code leads to. * @type {Array} @@ -125,6 +138,12 @@ export interface QRCodeDetails { * @memberof QRCodeDetails */ tags?: Array; + /** + * Dynamic routing rules for this QR code. Only present when at least one rule is configured. + * @type {Array} + * @memberof QRCodeDetails + */ + dynamic_routing?: Array; } @@ -153,6 +172,7 @@ export function QRCodeDetailsFromJSONTyped(json: any, ignoreDiscriminator: boole 'render_customizations': json['render_customizations'] == null ? undefined : QRCodeCustomizationsPublicFromJSON(json['render_customizations']), 'qr_code_type': json['qr_code_type'] == null ? undefined : QRCodeTypeEnumFromJSON(json['qr_code_type']), 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + 'domain': json['domain'] == null ? undefined : json['domain'], 'long_urls': json['long_urls'] == null ? undefined : json['long_urls'], 'serialized_content': json['serialized_content'] == null ? undefined : json['serialized_content'], 'archived': json['archived'] == null ? undefined : json['archived'], @@ -160,6 +180,7 @@ export function QRCodeDetailsFromJSONTyped(json: any, ignoreDiscriminator: boole 'modified': json['modified'] == null ? undefined : json['modified'], 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], 'tags': json['tags'] == null ? undefined : json['tags'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), }; } @@ -181,6 +202,7 @@ export function QRCodeDetailsToJSONTyped(value?: QRCodeDetails | null, ignoreDis 'render_customizations': QRCodeCustomizationsPublicToJSON(value['render_customizations']), 'qr_code_type': QRCodeTypeEnumToJSON(value['qr_code_type']), 'bitlink_id': value['bitlink_id'], + 'domain': value['domain'], 'long_urls': value['long_urls'], 'serialized_content': value['serialized_content'], 'archived': value['archived'], @@ -188,6 +210,7 @@ export function QRCodeDetailsToJSONTyped(value?: QRCodeDetails | null, ignoreDis 'modified': value['modified'], 'expiration_at': value['expiration_at'], 'tags': value['tags'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), }; } diff --git a/src/models/QRCodeMinimal.ts b/src/models/QRCodeMinimal.ts index 97ecab1..5e0627c 100644 --- a/src/models/QRCodeMinimal.ts +++ b/src/models/QRCodeMinimal.ts @@ -20,6 +20,13 @@ import { QRCodeTypeEnumToJSON, QRCodeTypeEnumToJSONTyped, } from './QRCodeTypeEnum'; +import type { DynamicRoutingRule } from './DynamicRoutingRule'; +import { + DynamicRoutingRuleFromJSON, + DynamicRoutingRuleFromJSONTyped, + DynamicRoutingRuleToJSON, + DynamicRoutingRuleToJSONTyped, +} from './DynamicRoutingRule'; /** * @@ -75,6 +82,12 @@ export interface QRCodeMinimal { * @memberof QRCodeMinimal */ bitlink_id?: string; + /** + * The short domain the qr code redirects from. Present for both bitlink and long_url qr codes. + * @type {string} + * @memberof QRCodeMinimal + */ + domain?: string; /** * Set to true if QR code has GS1 values. * @type {boolean} @@ -105,6 +118,12 @@ export interface QRCodeMinimal { * @memberof QRCodeMinimal */ expiration_at?: string; + /** + * Dynamic routing rules for this QR code. Only present when at least one rule is configured. + * @type {Array} + * @memberof QRCodeMinimal + */ + dynamic_routing?: Array; /** * * @type {string} @@ -146,11 +165,13 @@ export function QRCodeMinimalFromJSONTyped(json: any, ignoreDiscriminator: boole 'qr_code_type': json['qr_code_type'] == null ? undefined : QRCodeTypeEnumFromJSON(json['qr_code_type']), 'long_urls': json['long_urls'] == null ? undefined : json['long_urls'], 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + 'domain': json['domain'] == null ? undefined : json['domain'], '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'], + 'dynamic_routing': json['dynamic_routing'] == null ? undefined : ((json['dynamic_routing'] as Array).map(DynamicRoutingRuleFromJSON)), 'created': json['created'] == null ? undefined : json['created'], 'modified': json['modified'] == null ? undefined : json['modified'], }; @@ -175,11 +196,13 @@ export function QRCodeMinimalToJSONTyped(value?: QRCodeMinimal | null, ignoreDis 'qr_code_type': QRCodeTypeEnumToJSON(value['qr_code_type']), 'long_urls': value['long_urls'], 'bitlink_id': value['bitlink_id'], + 'domain': value['domain'], 'is_gs1': value['is_gs1'], 'created_by': value['created_by'], 'tags': value['tags'], 'archived': value['archived'], 'expiration_at': value['expiration_at'], + 'dynamic_routing': value['dynamic_routing'] == null ? undefined : ((value['dynamic_routing'] as Array).map(DynamicRoutingRuleToJSON)), 'created': value['created'], 'modified': value['modified'], }; diff --git a/src/models/RedirectQRCodeRequest.ts b/src/models/RedirectQRCodeRequest.ts new file mode 100644 index 0000000..43a7bd9 --- /dev/null +++ b/src/models/RedirectQRCodeRequest.ts @@ -0,0 +1,66 @@ +/* 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'; +/** + * Request to redirect a QRCode + * @export + * @interface RedirectQRCodeRequest + */ +export interface RedirectQRCodeRequest { + /** + * + * @type {string} + * @memberof RedirectQRCodeRequest + */ + long_url: string; +} + +/** + * Check if a given object implements the RedirectQRCodeRequest interface. + */ +export function instanceOfRedirectQRCodeRequest(value: object): value is RedirectQRCodeRequest { + if (!('long_url' in value) || value['long_url'] === undefined) return false; + return true; +} + +export function RedirectQRCodeRequestFromJSON(json: any): RedirectQRCodeRequest { + return RedirectQRCodeRequestFromJSONTyped(json, false); +} + +export function RedirectQRCodeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectQRCodeRequest { + if (json == null) { + return json; + } + return { + + 'long_url': json['long_url'], + }; +} + +export function RedirectQRCodeRequestToJSON(json: any): RedirectQRCodeRequest { + return RedirectQRCodeRequestToJSONTyped(json, false); +} + +export function RedirectQRCodeRequestToJSONTyped(value?: RedirectQRCodeRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'long_url': value['long_url'], + }; +} + diff --git a/src/models/SiteBannerType.ts b/src/models/SiteBannerType.ts new file mode 100644 index 0000000..5e89add --- /dev/null +++ b/src/models/SiteBannerType.ts @@ -0,0 +1,56 @@ +/* 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. + */ + +/** + * Enum of banner type options on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteBannerType { + none = 'none', + hero = 'hero', + rounded_up = 'rounded_up', + gradient = 'gradient', + square = 'square', + frame = 'frame' +} + + +export function instanceOfSiteBannerType(value: any): boolean { + for (const key in SiteBannerType) { + if (Object.prototype.hasOwnProperty.call(SiteBannerType, key)) { + if (SiteBannerType[key as keyof typeof SiteBannerType] === value) { + return true; + } + } + } + return false; +} + +export function SiteBannerTypeFromJSON(json: any): SiteBannerType { + return SiteBannerTypeFromJSONTyped(json, false); +} + +export function SiteBannerTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBannerType { + return json as SiteBannerType; +} + +export function SiteBannerTypeToJSON(value?: SiteBannerType | null): any { + return value as any; +} + +export function SiteBannerTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteBannerType { + return value as SiteBannerType; +} + diff --git a/src/models/SiteBlock.ts b/src/models/SiteBlock.ts new file mode 100644 index 0000000..750000f --- /dev/null +++ b/src/models/SiteBlock.ts @@ -0,0 +1,171 @@ +/* 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 { SiteBlockTypeEnum } from './SiteBlockTypeEnum'; +import { + SiteBlockTypeEnumFromJSON, + SiteBlockTypeEnumFromJSONTyped, + SiteBlockTypeEnumToJSON, + SiteBlockTypeEnumToJSONTyped, +} from './SiteBlockTypeEnum'; + +/** + * + * @export + * @interface SiteBlock + */ +export interface SiteBlock { + /** + * + * @type {string} + * @memberof SiteBlock + */ + site_id?: string; + /** + * + * @type {string} + * @memberof SiteBlock + */ + block_id?: string; + /** + * + * @type {number} + * @memberof SiteBlock + */ + sort_order?: number; + /** + * + * @type {string} + * @memberof SiteBlock + */ + schedule_start?: string; + /** + * + * @type {string} + * @memberof SiteBlock + */ + schedule_end?: string; + /** + * + * @type {boolean} + * @memberof SiteBlock + */ + is_active?: boolean; + /** + * + * @type {boolean} + * @memberof SiteBlock + */ + is_pinned?: boolean; + /** + * + * @type {boolean} + * @memberof SiteBlock + */ + is_sample?: boolean; + /** + * + * @type {SiteBlockTypeEnum} + * @memberof SiteBlock + */ + type?: SiteBlockTypeEnum; + /** + * + * @type {string} + * @memberof SiteBlock + */ + container_id?: string; + /** + * + * @type {string} + * @memberof SiteBlock + */ + scheme?: string; + /** + * + * @type {any} + * @memberof SiteBlock + */ + content?: any | null; + /** + * + * @type {any} + * @memberof SiteBlock + */ + appearance?: any | null; +} + + + +/** + * Check if a given object implements the SiteBlock interface. + */ +export function instanceOfSiteBlock(value: object): value is SiteBlock { + return true; +} + +export function SiteBlockFromJSON(json: any): SiteBlock { + return SiteBlockFromJSONTyped(json, false); +} + +export function SiteBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlock { + if (json == null) { + return json; + } + return { + + 'site_id': json['site_id'] == null ? undefined : json['site_id'], + 'block_id': json['block_id'] == null ? undefined : json['block_id'], + 'sort_order': json['sort_order'] == null ? undefined : json['sort_order'], + 'schedule_start': json['schedule_start'] == null ? undefined : json['schedule_start'], + 'schedule_end': json['schedule_end'] == null ? undefined : json['schedule_end'], + 'is_active': json['is_active'] == null ? undefined : json['is_active'], + 'is_pinned': json['is_pinned'] == null ? undefined : json['is_pinned'], + 'is_sample': json['is_sample'] == null ? undefined : json['is_sample'], + 'type': json['type'] == null ? undefined : SiteBlockTypeEnumFromJSON(json['type']), + 'container_id': json['container_id'] == null ? undefined : json['container_id'], + 'scheme': json['scheme'] == null ? undefined : json['scheme'], + 'content': json['content'] == null ? undefined : json['content'], + 'appearance': json['appearance'] == null ? undefined : json['appearance'], + }; +} + +export function SiteBlockToJSON(json: any): SiteBlock { + return SiteBlockToJSONTyped(json, false); +} + +export function SiteBlockToJSONTyped(value?: SiteBlock | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'site_id': value['site_id'], + 'block_id': value['block_id'], + 'sort_order': value['sort_order'], + 'schedule_start': value['schedule_start'], + 'schedule_end': value['schedule_end'], + 'is_active': value['is_active'], + 'is_pinned': value['is_pinned'], + 'is_sample': value['is_sample'], + 'type': SiteBlockTypeEnumToJSON(value['type']), + 'container_id': value['container_id'], + 'scheme': value['scheme'], + 'content': value['content'], + 'appearance': value['appearance'], + }; +} + diff --git a/src/models/SiteBlockCommon.ts b/src/models/SiteBlockCommon.ts new file mode 100644 index 0000000..5e4bf93 --- /dev/null +++ b/src/models/SiteBlockCommon.ts @@ -0,0 +1,139 @@ +/* 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 { SiteBlockTypeEnum } from './SiteBlockTypeEnum'; +import { + SiteBlockTypeEnumFromJSON, + SiteBlockTypeEnumFromJSONTyped, + SiteBlockTypeEnumToJSON, + SiteBlockTypeEnumToJSONTyped, +} from './SiteBlockTypeEnum'; + +/** + * + * @export + * @interface SiteBlockCommon + */ +export interface SiteBlockCommon { + /** + * + * @type {string} + * @memberof SiteBlockCommon + */ + site_id?: string; + /** + * + * @type {string} + * @memberof SiteBlockCommon + */ + block_id?: string; + /** + * + * @type {number} + * @memberof SiteBlockCommon + */ + sort_order?: number; + /** + * + * @type {string} + * @memberof SiteBlockCommon + */ + schedule_start?: string; + /** + * + * @type {string} + * @memberof SiteBlockCommon + */ + schedule_end?: string; + /** + * + * @type {boolean} + * @memberof SiteBlockCommon + */ + is_active?: boolean; + /** + * + * @type {boolean} + * @memberof SiteBlockCommon + */ + is_pinned?: boolean; + /** + * + * @type {boolean} + * @memberof SiteBlockCommon + */ + is_sample?: boolean; + /** + * + * @type {SiteBlockTypeEnum} + * @memberof SiteBlockCommon + */ + type?: SiteBlockTypeEnum; +} + + + +/** + * Check if a given object implements the SiteBlockCommon interface. + */ +export function instanceOfSiteBlockCommon(value: object): value is SiteBlockCommon { + return true; +} + +export function SiteBlockCommonFromJSON(json: any): SiteBlockCommon { + return SiteBlockCommonFromJSONTyped(json, false); +} + +export function SiteBlockCommonFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockCommon { + if (json == null) { + return json; + } + return { + + 'site_id': json['site_id'] == null ? undefined : json['site_id'], + 'block_id': json['block_id'] == null ? undefined : json['block_id'], + 'sort_order': json['sort_order'] == null ? undefined : json['sort_order'], + 'schedule_start': json['schedule_start'] == null ? undefined : json['schedule_start'], + 'schedule_end': json['schedule_end'] == null ? undefined : json['schedule_end'], + 'is_active': json['is_active'] == null ? undefined : json['is_active'], + 'is_pinned': json['is_pinned'] == null ? undefined : json['is_pinned'], + 'is_sample': json['is_sample'] == null ? undefined : json['is_sample'], + 'type': json['type'] == null ? undefined : SiteBlockTypeEnumFromJSON(json['type']), + }; +} + +export function SiteBlockCommonToJSON(json: any): SiteBlockCommon { + return SiteBlockCommonToJSONTyped(json, false); +} + +export function SiteBlockCommonToJSONTyped(value?: SiteBlockCommon | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'site_id': value['site_id'], + 'block_id': value['block_id'], + 'sort_order': value['sort_order'], + 'schedule_start': value['schedule_start'], + 'schedule_end': value['schedule_end'], + 'is_active': value['is_active'], + 'is_pinned': value['is_pinned'], + 'is_sample': value['is_sample'], + 'type': SiteBlockTypeEnumToJSON(value['type']), + }; +} + diff --git a/src/models/SiteBlockContainerRequest.ts b/src/models/SiteBlockContainerRequest.ts new file mode 100644 index 0000000..c2d80f5 --- /dev/null +++ b/src/models/SiteBlockContainerRequest.ts @@ -0,0 +1,75 @@ +/* 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 { SiteContainerTypeEnum } from './SiteContainerTypeEnum'; +import { + SiteContainerTypeEnumFromJSON, + SiteContainerTypeEnumFromJSONTyped, + SiteContainerTypeEnumToJSON, + SiteContainerTypeEnumToJSONTyped, +} from './SiteContainerTypeEnum'; + +/** + * + * @export + * @interface SiteBlockContainerRequest + */ +export interface SiteBlockContainerRequest { + /** + * + * @type {SiteContainerTypeEnum} + * @memberof SiteBlockContainerRequest + */ + type?: SiteContainerTypeEnum; +} + + + +/** + * Check if a given object implements the SiteBlockContainerRequest interface. + */ +export function instanceOfSiteBlockContainerRequest(value: object): value is SiteBlockContainerRequest { + return true; +} + +export function SiteBlockContainerRequestFromJSON(json: any): SiteBlockContainerRequest { + return SiteBlockContainerRequestFromJSONTyped(json, false); +} + +export function SiteBlockContainerRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockContainerRequest { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : SiteContainerTypeEnumFromJSON(json['type']), + }; +} + +export function SiteBlockContainerRequestToJSON(json: any): SiteBlockContainerRequest { + return SiteBlockContainerRequestToJSONTyped(json, false); +} + +export function SiteBlockContainerRequestToJSONTyped(value?: SiteBlockContainerRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': SiteContainerTypeEnumToJSON(value['type']), + }; +} + diff --git a/src/models/SiteBlockContent.ts b/src/models/SiteBlockContent.ts new file mode 100644 index 0000000..3ab4aa8 --- /dev/null +++ b/src/models/SiteBlockContent.ts @@ -0,0 +1,241 @@ +/* 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 { DigitalBusinessCardLayout } from './DigitalBusinessCardLayout'; +import { + DigitalBusinessCardLayoutFromJSON, + DigitalBusinessCardLayoutFromJSONTyped, + DigitalBusinessCardLayoutToJSON, + DigitalBusinessCardLayoutToJSONTyped, +} from './DigitalBusinessCardLayout'; +import type { DigitalBusinessCardContact } from './DigitalBusinessCardContact'; +import { + DigitalBusinessCardContactFromJSON, + DigitalBusinessCardContactFromJSONTyped, + DigitalBusinessCardContactToJSON, + DigitalBusinessCardContactToJSONTyped, +} from './DigitalBusinessCardContact'; +import type { PageLinkInfo } from './PageLinkInfo'; +import { + PageLinkInfoFromJSON, + PageLinkInfoFromJSONTyped, + PageLinkInfoToJSON, + PageLinkInfoToJSONTyped, +} from './PageLinkInfo'; + +/** + * + * @export + * @interface SiteBlockContent + */ +export interface SiteBlockContent { + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + thumbnail_url?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + channel?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + channel_url?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + digital_business_card_id?: string; + /** + * + * @type {DigitalBusinessCardLayout} + * @memberof SiteBlockContent + */ + layout?: DigitalBusinessCardLayout; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + first_name?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + last_name?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + job_title?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + company?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + pronouns?: string; + /** + * + * @type {Array} + * @memberof SiteBlockContent + */ + contacts?: Array; + /** + * + * @type {boolean} + * @memberof SiteBlockContent + */ + download_enabled?: boolean; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + link_title?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + description?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + bitlink_id?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + image_guid?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + image_url?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + crop?: string; + /** + * + * @type {string} + * @memberof SiteBlockContent + */ + aspect_ratio?: string; + /** + * + * @type {PageLinkInfo} + * @memberof SiteBlockContent + */ + link_info?: PageLinkInfo; +} + + + +/** + * Check if a given object implements the SiteBlockContent interface. + */ +export function instanceOfSiteBlockContent(value: object): value is SiteBlockContent { + return true; +} + +export function SiteBlockContentFromJSON(json: any): SiteBlockContent { + return SiteBlockContentFromJSONTyped(json, false); +} + +export function SiteBlockContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockContent { + if (json == null) { + return json; + } + return { + + 'thumbnail_url': json['thumbnail_url'] == null ? undefined : json['thumbnail_url'], + 'channel': json['channel'] == null ? undefined : json['channel'], + 'channel_url': json['channel_url'] == null ? undefined : json['channel_url'], + 'digital_business_card_id': json['digital_business_card_id'] == null ? undefined : json['digital_business_card_id'], + 'layout': json['layout'] == null ? undefined : DigitalBusinessCardLayoutFromJSON(json['layout']), + 'first_name': json['first_name'] == null ? undefined : json['first_name'], + 'last_name': json['last_name'] == null ? undefined : json['last_name'], + 'job_title': json['job_title'] == null ? undefined : json['job_title'], + 'company': json['company'] == null ? undefined : json['company'], + 'pronouns': json['pronouns'] == null ? undefined : json['pronouns'], + 'contacts': json['contacts'] == null ? undefined : ((json['contacts'] as Array).map(DigitalBusinessCardContactFromJSON)), + 'download_enabled': json['download_enabled'] == null ? undefined : json['download_enabled'], + 'link_title': json['link_title'] == null ? undefined : json['link_title'], + 'description': json['description'] == null ? undefined : json['description'], + 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + 'image_url': json['image_url'] == null ? undefined : json['image_url'], + 'crop': json['crop'] == null ? undefined : json['crop'], + 'aspect_ratio': json['aspect_ratio'] == null ? undefined : json['aspect_ratio'], + 'link_info': json['link_info'] == null ? undefined : PageLinkInfoFromJSON(json['link_info']), + }; +} + +export function SiteBlockContentToJSON(json: any): SiteBlockContent { + return SiteBlockContentToJSONTyped(json, false); +} + +export function SiteBlockContentToJSONTyped(value?: SiteBlockContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'thumbnail_url': value['thumbnail_url'], + 'channel': value['channel'], + 'channel_url': value['channel_url'], + 'digital_business_card_id': value['digital_business_card_id'], + 'layout': DigitalBusinessCardLayoutToJSON(value['layout']), + 'first_name': value['first_name'], + 'last_name': value['last_name'], + 'job_title': value['job_title'], + 'company': value['company'], + 'pronouns': value['pronouns'], + 'contacts': value['contacts'] == null ? undefined : ((value['contacts'] as Array).map(DigitalBusinessCardContactToJSON)), + 'download_enabled': value['download_enabled'], + 'link_title': value['link_title'], + 'description': value['description'], + 'bitlink_id': value['bitlink_id'], + 'image_guid': value['image_guid'], + 'image_url': value['image_url'], + 'crop': value['crop'], + 'aspect_ratio': value['aspect_ratio'], + 'link_info': PageLinkInfoToJSON(value['link_info']), + }; +} + diff --git a/src/models/SiteBlockCreateRequest.ts b/src/models/SiteBlockCreateRequest.ts new file mode 100644 index 0000000..0510362 --- /dev/null +++ b/src/models/SiteBlockCreateRequest.ts @@ -0,0 +1,147 @@ +/* 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 { TextBlockAppearanceRequest } from './TextBlockAppearanceRequest'; +import { + TextBlockAppearanceRequestFromJSON, + TextBlockAppearanceRequestFromJSONTyped, + TextBlockAppearanceRequestToJSON, + TextBlockAppearanceRequestToJSONTyped, +} from './TextBlockAppearanceRequest'; +import type { SiteContentUnion } from './SiteContentUnion'; +import { + SiteContentUnionFromJSON, + SiteContentUnionFromJSONTyped, + SiteContentUnionToJSON, + SiteContentUnionToJSONTyped, +} from './SiteContentUnion'; +import type { SiteBlockCreateTypeEnum } from './SiteBlockCreateTypeEnum'; +import { + SiteBlockCreateTypeEnumFromJSON, + SiteBlockCreateTypeEnumFromJSONTyped, + SiteBlockCreateTypeEnumToJSON, + SiteBlockCreateTypeEnumToJSONTyped, +} from './SiteBlockCreateTypeEnum'; + +/** + * + * @export + * @interface SiteBlockCreateRequest + */ +export interface SiteBlockCreateRequest { + /** + * + * @type {SiteContentUnion} + * @memberof SiteBlockCreateRequest + */ + content: SiteContentUnion; + /** + * + * @type {TextBlockAppearanceRequest} + * @memberof SiteBlockCreateRequest + */ + appearance?: TextBlockAppearanceRequest; + /** + * + * @type {string} + * @memberof SiteBlockCreateRequest + */ + schedule_start?: string; + /** + * + * @type {string} + * @memberof SiteBlockCreateRequest + */ + schedule_end?: string; + /** + * + * @type {boolean} + * @memberof SiteBlockCreateRequest + */ + is_active?: boolean; + /** + * + * @type {boolean} + * @memberof SiteBlockCreateRequest + */ + is_pinned?: boolean; + /** + * + * @type {string} + * @memberof SiteBlockCreateRequest + */ + parent?: string; + /** + * + * @type {SiteBlockCreateTypeEnum} + * @memberof SiteBlockCreateRequest + */ + type: SiteBlockCreateTypeEnum; +} + + + +/** + * Check if a given object implements the SiteBlockCreateRequest interface. + */ +export function instanceOfSiteBlockCreateRequest(value: object): value is SiteBlockCreateRequest { + if (!('content' in value) || value['content'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function SiteBlockCreateRequestFromJSON(json: any): SiteBlockCreateRequest { + return SiteBlockCreateRequestFromJSONTyped(json, false); +} + +export function SiteBlockCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockCreateRequest { + if (json == null) { + return json; + } + return { + + 'content': SiteContentUnionFromJSON(json['content']), + 'appearance': json['appearance'] == null ? undefined : TextBlockAppearanceRequestFromJSON(json['appearance']), + 'schedule_start': json['schedule_start'] == null ? undefined : json['schedule_start'], + 'schedule_end': json['schedule_end'] == null ? undefined : json['schedule_end'], + 'is_active': json['is_active'] == null ? undefined : json['is_active'], + 'is_pinned': json['is_pinned'] == null ? undefined : json['is_pinned'], + 'parent': json['parent'] == null ? undefined : json['parent'], + 'type': SiteBlockCreateTypeEnumFromJSON(json['type']), + }; +} + +export function SiteBlockCreateRequestToJSON(json: any): SiteBlockCreateRequest { + return SiteBlockCreateRequestToJSONTyped(json, false); +} + +export function SiteBlockCreateRequestToJSONTyped(value?: SiteBlockCreateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content': SiteContentUnionToJSON(value['content']), + 'appearance': TextBlockAppearanceRequestToJSON(value['appearance']), + 'schedule_start': value['schedule_start'], + 'schedule_end': value['schedule_end'], + 'is_active': value['is_active'], + 'is_pinned': value['is_pinned'], + 'parent': value['parent'], + 'type': SiteBlockCreateTypeEnumToJSON(value['type']), + }; +} + diff --git a/src/models/SiteBlockCreateTypeEnum.ts b/src/models/SiteBlockCreateTypeEnum.ts new file mode 100644 index 0000000..2837888 --- /dev/null +++ b/src/models/SiteBlockCreateTypeEnum.ts @@ -0,0 +1,56 @@ +/* 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. + */ + +/** + * Block types that can be created directly (grid and carousel are created as containers) + * @export + * @enum {string} + */ +export enum SiteBlockCreateTypeEnum { + bitlink = 'bitlink', + social = 'social', + youtube_video = 'youtubeVideo', + image = 'image', + digital_business_card = 'digital_business_card', + text_block = 'text_block' +} + + +export function instanceOfSiteBlockCreateTypeEnum(value: any): boolean { + for (const key in SiteBlockCreateTypeEnum) { + if (Object.prototype.hasOwnProperty.call(SiteBlockCreateTypeEnum, key)) { + if (SiteBlockCreateTypeEnum[key as keyof typeof SiteBlockCreateTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteBlockCreateTypeEnumFromJSON(json: any): SiteBlockCreateTypeEnum { + return SiteBlockCreateTypeEnumFromJSONTyped(json, false); +} + +export function SiteBlockCreateTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockCreateTypeEnum { + return json as SiteBlockCreateTypeEnum; +} + +export function SiteBlockCreateTypeEnumToJSON(value?: SiteBlockCreateTypeEnum | null): any { + return value as any; +} + +export function SiteBlockCreateTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteBlockCreateTypeEnum { + return value as SiteBlockCreateTypeEnum; +} + diff --git a/src/models/SiteBlockRequest.ts b/src/models/SiteBlockRequest.ts new file mode 100644 index 0000000..c63ac2c --- /dev/null +++ b/src/models/SiteBlockRequest.ts @@ -0,0 +1,128 @@ +/* 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 { TextBlockAppearanceRequest } from './TextBlockAppearanceRequest'; +import { + TextBlockAppearanceRequestFromJSON, + TextBlockAppearanceRequestFromJSONTyped, + TextBlockAppearanceRequestToJSON, + TextBlockAppearanceRequestToJSONTyped, +} from './TextBlockAppearanceRequest'; +import type { SiteContentUnion } from './SiteContentUnion'; +import { + SiteContentUnionFromJSON, + SiteContentUnionFromJSONTyped, + SiteContentUnionToJSON, + SiteContentUnionToJSONTyped, +} from './SiteContentUnion'; + +/** + * + * @export + * @interface SiteBlockRequest + */ +export interface SiteBlockRequest { + /** + * + * @type {SiteContentUnion} + * @memberof SiteBlockRequest + */ + content?: SiteContentUnion; + /** + * + * @type {TextBlockAppearanceRequest} + * @memberof SiteBlockRequest + */ + appearance?: TextBlockAppearanceRequest; + /** + * + * @type {string} + * @memberof SiteBlockRequest + */ + schedule_start?: string; + /** + * + * @type {string} + * @memberof SiteBlockRequest + */ + schedule_end?: string; + /** + * + * @type {boolean} + * @memberof SiteBlockRequest + */ + is_active?: boolean; + /** + * + * @type {boolean} + * @memberof SiteBlockRequest + */ + is_pinned?: boolean; + /** + * + * @type {string} + * @memberof SiteBlockRequest + */ + parent?: string; +} + +/** + * Check if a given object implements the SiteBlockRequest interface. + */ +export function instanceOfSiteBlockRequest(value: object): value is SiteBlockRequest { + return true; +} + +export function SiteBlockRequestFromJSON(json: any): SiteBlockRequest { + return SiteBlockRequestFromJSONTyped(json, false); +} + +export function SiteBlockRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockRequest { + if (json == null) { + return json; + } + return { + + 'content': json['content'] == null ? undefined : SiteContentUnionFromJSON(json['content']), + 'appearance': json['appearance'] == null ? undefined : TextBlockAppearanceRequestFromJSON(json['appearance']), + 'schedule_start': json['schedule_start'] == null ? undefined : json['schedule_start'], + 'schedule_end': json['schedule_end'] == null ? undefined : json['schedule_end'], + 'is_active': json['is_active'] == null ? undefined : json['is_active'], + 'is_pinned': json['is_pinned'] == null ? undefined : json['is_pinned'], + 'parent': json['parent'] == null ? undefined : json['parent'], + }; +} + +export function SiteBlockRequestToJSON(json: any): SiteBlockRequest { + return SiteBlockRequestToJSONTyped(json, false); +} + +export function SiteBlockRequestToJSONTyped(value?: SiteBlockRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content': SiteContentUnionToJSON(value['content']), + 'appearance': TextBlockAppearanceRequestToJSON(value['appearance']), + 'schedule_start': value['schedule_start'], + 'schedule_end': value['schedule_end'], + 'is_active': value['is_active'], + 'is_pinned': value['is_pinned'], + 'parent': value['parent'], + }; +} + diff --git a/src/models/SiteBlockTypeEnum.ts b/src/models/SiteBlockTypeEnum.ts new file mode 100644 index 0000000..3655c28 --- /dev/null +++ b/src/models/SiteBlockTypeEnum.ts @@ -0,0 +1,58 @@ +/* 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. + */ + +/** + * Available block types for Site blocks + * @export + * @enum {string} + */ +export enum SiteBlockTypeEnum { + bitlink = 'bitlink', + youtube_video = 'youtubeVideo', + image = 'image', + carousel = 'carousel', + grid = 'grid', + social = 'social', + digital_business_card = 'digital_business_card', + text_block = 'text_block' +} + + +export function instanceOfSiteBlockTypeEnum(value: any): boolean { + for (const key in SiteBlockTypeEnum) { + if (Object.prototype.hasOwnProperty.call(SiteBlockTypeEnum, key)) { + if (SiteBlockTypeEnum[key as keyof typeof SiteBlockTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteBlockTypeEnumFromJSON(json: any): SiteBlockTypeEnum { + return SiteBlockTypeEnumFromJSONTyped(json, false); +} + +export function SiteBlockTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteBlockTypeEnum { + return json as SiteBlockTypeEnum; +} + +export function SiteBlockTypeEnumToJSON(value?: SiteBlockTypeEnum | null): any { + return value as any; +} + +export function SiteBlockTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteBlockTypeEnum { + return value as SiteBlockTypeEnum; +} + diff --git a/src/models/SiteButtonTypeEnum.ts b/src/models/SiteButtonTypeEnum.ts new file mode 100644 index 0000000..203e78b --- /dev/null +++ b/src/models/SiteButtonTypeEnum.ts @@ -0,0 +1,56 @@ +/* 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. + */ + +/** + * Available button types for Site content + * @export + * @enum {string} + */ +export enum SiteButtonTypeEnum { + bitlink = 'bitlink', + youtube_video = 'youtubeVideo', + image = 'image', + carousel = 'carousel', + grid = 'grid', + digital_business_card = 'digital_business_card' +} + + +export function instanceOfSiteButtonTypeEnum(value: any): boolean { + for (const key in SiteButtonTypeEnum) { + if (Object.prototype.hasOwnProperty.call(SiteButtonTypeEnum, key)) { + if (SiteButtonTypeEnum[key as keyof typeof SiteButtonTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteButtonTypeEnumFromJSON(json: any): SiteButtonTypeEnum { + return SiteButtonTypeEnumFromJSONTyped(json, false); +} + +export function SiteButtonTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteButtonTypeEnum { + return json as SiteButtonTypeEnum; +} + +export function SiteButtonTypeEnumToJSON(value?: SiteButtonTypeEnum | null): any { + return value as any; +} + +export function SiteButtonTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteButtonTypeEnum { + return value as SiteButtonTypeEnum; +} + diff --git a/src/models/SiteCityViewMetrics.ts b/src/models/SiteCityViewMetrics.ts new file mode 100644 index 0000000..9820551 --- /dev/null +++ b/src/models/SiteCityViewMetrics.ts @@ -0,0 +1,137 @@ +/* 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 { ViewMetric } from './ViewMetric'; +import { + ViewMetricFromJSON, + ViewMetricFromJSONTyped, + ViewMetricToJSON, + ViewMetricToJSONTyped, +} from './ViewMetric'; +import type { OtherViewMetrics } from './OtherViewMetrics'; +import { + OtherViewMetricsFromJSON, + OtherViewMetricsFromJSONTyped, + OtherViewMetricsToJSON, + OtherViewMetricsToJSONTyped, +} from './OtherViewMetrics'; + +/** + * + * @export + * @interface SiteCityViewMetrics + */ +export interface SiteCityViewMetrics { + /** + * + * @type {string} + * @memberof SiteCityViewMetrics + */ + unit?: string; + /** + * + * @type {number} + * @memberof SiteCityViewMetrics + */ + units?: number; + /** + * + * @type {SiteCityViewMetricsFacetEnum} + * @memberof SiteCityViewMetrics + */ + facet?: SiteCityViewMetricsFacetEnum; + /** + * + * @type {string} + * @memberof SiteCityViewMetrics + */ + unit_reference?: string; + /** + * + * @type {Array} + * @memberof SiteCityViewMetrics + */ + site_views?: Array; + /** + * + * @type {OtherViewMetrics} + * @memberof SiteCityViewMetrics + */ + other_metrics?: OtherViewMetrics; +} + +/** +* @export +* @enum {string} +*/ +export enum SiteCityViewMetricsFacetEnum { + countries = 'countries', + cities = 'cities', + devices = 'devices', + referrers = 'referrers', + referrers_by_domain = 'referrers_by_domain', + referring_domains = 'referring_domains', + referring_networks = 'referring_networks', + shorten_counts = 'shorten_counts', + destinations = 'destinations' +} + + +/** + * Check if a given object implements the SiteCityViewMetrics interface. + */ +export function instanceOfSiteCityViewMetrics(value: object): value is SiteCityViewMetrics { + return true; +} + +export function SiteCityViewMetricsFromJSON(json: any): SiteCityViewMetrics { + return SiteCityViewMetricsFromJSONTyped(json, false); +} + +export function SiteCityViewMetricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteCityViewMetrics { + if (json == null) { + return json; + } + return { + + 'unit': json['unit'] == null ? undefined : json['unit'], + 'units': json['units'] == null ? undefined : json['units'], + 'facet': json['facet'] == null ? undefined : json['facet'], + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'site_views': json['site_views'] == null ? undefined : ((json['site_views'] as Array).map(ViewMetricFromJSON)), + 'other_metrics': json['other_metrics'] == null ? undefined : OtherViewMetricsFromJSON(json['other_metrics']), + }; +} + +export function SiteCityViewMetricsToJSON(json: any): SiteCityViewMetrics { + return SiteCityViewMetricsToJSONTyped(json, false); +} + +export function SiteCityViewMetricsToJSONTyped(value?: SiteCityViewMetrics | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'unit': value['unit'], + 'units': value['units'], + 'facet': value['facet'], + 'unit_reference': value['unit_reference'], + 'site_views': value['site_views'] == null ? undefined : ((value['site_views'] as Array).map(ViewMetricToJSON)), + 'other_metrics': OtherViewMetricsToJSON(value['other_metrics']), + }; +} + diff --git a/src/models/SiteClicks.ts b/src/models/SiteClicks.ts new file mode 100644 index 0000000..e7db495 --- /dev/null +++ b/src/models/SiteClicks.ts @@ -0,0 +1,131 @@ +/* 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 { SiteButtonTypeEnum } from './SiteButtonTypeEnum'; +import { + SiteButtonTypeEnumFromJSON, + SiteButtonTypeEnumFromJSONTyped, + SiteButtonTypeEnumToJSON, + SiteButtonTypeEnumToJSONTyped, +} from './SiteButtonTypeEnum'; + +/** + * + * @export + * @interface SiteClicks + */ +export interface SiteClicks { + /** + * + * @type {number} + * @memberof SiteClicks + */ + clicks?: number; + /** + * + * @type {string} + * @memberof SiteClicks + */ + title?: string; + /** + * + * @type {boolean} + * @memberof SiteClicks + */ + is_active?: boolean; + /** + * + * @type {string} + * @memberof SiteClicks + */ + long_url?: string; + /** + * + * @type {SiteButtonTypeEnum} + * @memberof SiteClicks + */ + type?: SiteButtonTypeEnum; + /** + * + * @type {string} + * @memberof SiteClicks + */ + bitlink_id?: string; + /** + * + * @type {string} + * @memberof SiteClicks + */ + domain?: string; + /** + * + * @type {string} + * @memberof SiteClicks + */ + keyword?: string; +} + + + +/** + * Check if a given object implements the SiteClicks interface. + */ +export function instanceOfSiteClicks(value: object): value is SiteClicks { + return true; +} + +export function SiteClicksFromJSON(json: any): SiteClicks { + return SiteClicksFromJSONTyped(json, false); +} + +export function SiteClicksFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteClicks { + if (json == null) { + return json; + } + return { + + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + 'title': json['title'] == null ? undefined : json['title'], + 'is_active': json['is_active'] == null ? undefined : json['is_active'], + 'long_url': json['long_url'] == null ? undefined : json['long_url'], + 'type': json['type'] == null ? undefined : SiteButtonTypeEnumFromJSON(json['type']), + 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + 'domain': json['domain'] == null ? undefined : json['domain'], + 'keyword': json['keyword'] == null ? undefined : json['keyword'], + }; +} + +export function SiteClicksToJSON(json: any): SiteClicks { + return SiteClicksToJSONTyped(json, false); +} + +export function SiteClicksToJSONTyped(value?: SiteClicks | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'clicks': value['clicks'], + 'title': value['title'], + 'is_active': value['is_active'], + 'long_url': value['long_url'], + 'type': SiteButtonTypeEnumToJSON(value['type']), + 'bitlink_id': value['bitlink_id'], + 'domain': value['domain'], + 'keyword': value['keyword'], + }; +} + diff --git a/src/models/SiteCloneRequest.ts b/src/models/SiteCloneRequest.ts new file mode 100644 index 0000000..4ef941c --- /dev/null +++ b/src/models/SiteCloneRequest.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'; +/** + * + * @export + * @interface SiteCloneRequest + */ +export interface SiteCloneRequest { + /** + * + * @type {string} + * @memberof SiteCloneRequest + */ + uri?: string; +} + +/** + * Check if a given object implements the SiteCloneRequest interface. + */ +export function instanceOfSiteCloneRequest(value: object): value is SiteCloneRequest { + return true; +} + +export function SiteCloneRequestFromJSON(json: any): SiteCloneRequest { + return SiteCloneRequestFromJSONTyped(json, false); +} + +export function SiteCloneRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteCloneRequest { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + }; +} + +export function SiteCloneRequestToJSON(json: any): SiteCloneRequest { + return SiteCloneRequestToJSONTyped(json, false); +} + +export function SiteCloneRequestToJSONTyped(value?: SiteCloneRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + }; +} + diff --git a/src/models/SiteContainerTypeEnum.ts b/src/models/SiteContainerTypeEnum.ts new file mode 100644 index 0000000..5b6df80 --- /dev/null +++ b/src/models/SiteContainerTypeEnum.ts @@ -0,0 +1,52 @@ +/* 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. + */ + +/** + * Available container types + * @export + * @enum {string} + */ +export enum SiteContainerTypeEnum { + carousel = 'carousel', + grid = 'grid' +} + + +export function instanceOfSiteContainerTypeEnum(value: any): boolean { + for (const key in SiteContainerTypeEnum) { + if (Object.prototype.hasOwnProperty.call(SiteContainerTypeEnum, key)) { + if (SiteContainerTypeEnum[key as keyof typeof SiteContainerTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteContainerTypeEnumFromJSON(json: any): SiteContainerTypeEnum { + return SiteContainerTypeEnumFromJSONTyped(json, false); +} + +export function SiteContainerTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteContainerTypeEnum { + return json as SiteContainerTypeEnum; +} + +export function SiteContainerTypeEnumToJSON(value?: SiteContainerTypeEnum | null): any { + return value as any; +} + +export function SiteContainerTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteContainerTypeEnum { + return value as SiteContainerTypeEnum; +} + diff --git a/src/models/SiteContentUnion.ts b/src/models/SiteContentUnion.ts new file mode 100644 index 0000000..f17c582 --- /dev/null +++ b/src/models/SiteContentUnion.ts @@ -0,0 +1,315 @@ +/* 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 { DigitalBusinessCardContent } from './DigitalBusinessCardContent'; +import { + DigitalBusinessCardContentFromJSON, + DigitalBusinessCardContentFromJSONTyped, + DigitalBusinessCardContentToJSON, + DigitalBusinessCardContentToJSONTyped, +} from './DigitalBusinessCardContent'; +import type { DigitalBusinessCardLayout } from './DigitalBusinessCardLayout'; +import { + DigitalBusinessCardLayoutFromJSON, + DigitalBusinessCardLayoutFromJSONTyped, + DigitalBusinessCardLayoutToJSON, + DigitalBusinessCardLayoutToJSONTyped, +} from './DigitalBusinessCardLayout'; +import type { SocialContent } from './SocialContent'; +import { + SocialContentFromJSON, + SocialContentFromJSONTyped, + SocialContentToJSON, + SocialContentToJSONTyped, +} from './SocialContent'; +import type { DigitalBusinessCardContentFile } from './DigitalBusinessCardContentFile'; +import { + DigitalBusinessCardContentFileFromJSON, + DigitalBusinessCardContentFileFromJSONTyped, + DigitalBusinessCardContentFileToJSON, + DigitalBusinessCardContentFileToJSONTyped, +} from './DigitalBusinessCardContentFile'; +import type { ImageContent } from './ImageContent'; +import { + ImageContentFromJSON, + ImageContentFromJSONTyped, + ImageContentToJSON, + ImageContentToJSONTyped, +} from './ImageContent'; +import type { BitlinkContent } from './BitlinkContent'; +import { + BitlinkContentFromJSON, + BitlinkContentFromJSONTyped, + BitlinkContentToJSON, + BitlinkContentToJSONTyped, +} from './BitlinkContent'; +import type { DigitalBusinessCardContact } from './DigitalBusinessCardContact'; +import { + DigitalBusinessCardContactFromJSON, + DigitalBusinessCardContactFromJSONTyped, + DigitalBusinessCardContactToJSON, + DigitalBusinessCardContactToJSONTyped, +} from './DigitalBusinessCardContact'; +import type { YoutubeVideoRequest } from './YoutubeVideoRequest'; +import { + YoutubeVideoRequestFromJSON, + YoutubeVideoRequestFromJSONTyped, + YoutubeVideoRequestToJSON, + YoutubeVideoRequestToJSONTyped, +} from './YoutubeVideoRequest'; +import type { TextBlockContent } from './TextBlockContent'; +import { + TextBlockContentFromJSON, + TextBlockContentFromJSONTyped, + TextBlockContentToJSON, + TextBlockContentToJSONTyped, +} from './TextBlockContent'; + +/** + * + * @export + * @interface SiteContentUnion + */ +export interface SiteContentUnion { + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + bitlink_id?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + link_title?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + description?: string; + /** + * Whether this bitlink block is pinned to the top of the site + * @type {boolean} + * @memberof SiteContentUnion + */ + is_pinned?: boolean; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + image_url?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + image_guid?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + crop?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + video_url?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + thumbnail_url?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + domain?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + url?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + channel?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + aspect_ratio?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + digital_business_card_id?: string; + /** + * + * @type {DigitalBusinessCardLayout} + * @memberof SiteContentUnion + */ + layout?: DigitalBusinessCardLayout; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + first_name?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + last_name?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + pronouns?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + company?: string; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + job_title?: string; + /** + * + * @type {Array} + * @memberof SiteContentUnion + */ + contacts?: Array; + /** + * + * @type {boolean} + * @memberof SiteContentUnion + */ + download_enabled?: boolean; + /** + * + * @type {DigitalBusinessCardContentFile} + * @memberof SiteContentUnion + */ + file?: DigitalBusinessCardContentFile; + /** + * + * @type {string} + * @memberof SiteContentUnion + */ + text?: string; +} + + + +/** + * Check if a given object implements the SiteContentUnion interface. + */ +export function instanceOfSiteContentUnion(value: object): value is SiteContentUnion { + return true; +} + +export function SiteContentUnionFromJSON(json: any): SiteContentUnion { + return SiteContentUnionFromJSONTyped(json, false); +} + +export function SiteContentUnionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteContentUnion { + if (json == null) { + return json; + } + return { + + 'bitlink_id': json['bitlink_id'] == null ? undefined : json['bitlink_id'], + 'link_title': json['link_title'] == null ? undefined : json['link_title'], + 'description': json['description'] == null ? undefined : json['description'], + 'is_pinned': json['is_pinned'] == null ? undefined : json['is_pinned'], + 'image_url': json['image_url'] == null ? undefined : json['image_url'], + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + 'crop': json['crop'] == null ? undefined : json['crop'], + 'video_url': json['video_url'] == null ? undefined : json['video_url'], + 'thumbnail_url': json['thumbnail_url'] == null ? undefined : json['thumbnail_url'], + 'domain': json['domain'] == null ? undefined : json['domain'], + 'url': json['url'] == null ? undefined : json['url'], + 'channel': json['channel'] == null ? undefined : json['channel'], + 'aspect_ratio': json['aspect_ratio'] == null ? undefined : json['aspect_ratio'], + 'digital_business_card_id': json['digital_business_card_id'] == null ? undefined : json['digital_business_card_id'], + 'layout': json['layout'] == null ? undefined : DigitalBusinessCardLayoutFromJSON(json['layout']), + 'first_name': json['first_name'] == null ? undefined : json['first_name'], + 'last_name': json['last_name'] == null ? undefined : json['last_name'], + 'pronouns': json['pronouns'] == null ? undefined : json['pronouns'], + 'company': json['company'] == null ? undefined : json['company'], + 'job_title': json['job_title'] == null ? undefined : json['job_title'], + 'contacts': json['contacts'] == null ? undefined : ((json['contacts'] as Array).map(DigitalBusinessCardContactFromJSON)), + 'download_enabled': json['download_enabled'] == null ? undefined : json['download_enabled'], + 'file': json['file'] == null ? undefined : DigitalBusinessCardContentFileFromJSON(json['file']), + 'text': json['text'] == null ? undefined : json['text'], + }; +} + +export function SiteContentUnionToJSON(json: any): SiteContentUnion { + return SiteContentUnionToJSONTyped(json, false); +} + +export function SiteContentUnionToJSONTyped(value?: SiteContentUnion | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'bitlink_id': value['bitlink_id'], + 'link_title': value['link_title'], + 'description': value['description'], + 'is_pinned': value['is_pinned'], + 'image_url': value['image_url'], + 'image_guid': value['image_guid'], + 'crop': value['crop'], + 'video_url': value['video_url'], + 'thumbnail_url': value['thumbnail_url'], + 'domain': value['domain'], + 'url': value['url'], + 'channel': value['channel'], + 'aspect_ratio': value['aspect_ratio'], + 'digital_business_card_id': value['digital_business_card_id'], + 'layout': DigitalBusinessCardLayoutToJSON(value['layout']), + 'first_name': value['first_name'], + 'last_name': value['last_name'], + 'pronouns': value['pronouns'], + 'company': value['company'], + 'job_title': value['job_title'], + 'contacts': value['contacts'] == null ? undefined : ((value['contacts'] as Array).map(DigitalBusinessCardContactToJSON)), + 'download_enabled': value['download_enabled'], + 'file': DigitalBusinessCardContentFileToJSON(value['file']), + 'text': value['text'], + }; +} + diff --git a/src/models/SiteImageAlignment.ts b/src/models/SiteImageAlignment.ts new file mode 100644 index 0000000..9a5132f --- /dev/null +++ b/src/models/SiteImageAlignment.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Available image alignment types for Site background images + * @export + * @enum {string} + */ +export enum SiteImageAlignment { + stretch = 'stretch', + fit = 'fit', + repeat = 'repeat' +} + + +export function instanceOfSiteImageAlignment(value: any): boolean { + for (const key in SiteImageAlignment) { + if (Object.prototype.hasOwnProperty.call(SiteImageAlignment, key)) { + if (SiteImageAlignment[key as keyof typeof SiteImageAlignment] === value) { + return true; + } + } + } + return false; +} + +export function SiteImageAlignmentFromJSON(json: any): SiteImageAlignment { + return SiteImageAlignmentFromJSONTyped(json, false); +} + +export function SiteImageAlignmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteImageAlignment { + return json as SiteImageAlignment; +} + +export function SiteImageAlignmentToJSON(value?: SiteImageAlignment | null): any { + return value as any; +} + +export function SiteImageAlignmentToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteImageAlignment { + return value as SiteImageAlignment; +} + diff --git a/src/models/SiteImageUpload.ts b/src/models/SiteImageUpload.ts new file mode 100644 index 0000000..42a8f33 --- /dev/null +++ b/src/models/SiteImageUpload.ts @@ -0,0 +1,103 @@ +/* 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 SiteImageUpload + */ +export interface SiteImageUpload { + /** + * + * @type {string} + * @memberof SiteImageUpload + */ + image_guid?: string; + /** + * + * @type {string} + * @memberof SiteImageUpload + */ + url?: string; + /** + * + * @type {SiteImageUploadImageUseEnum} + * @memberof SiteImageUpload + */ + image_use?: SiteImageUploadImageUseEnum; + /** + * + * @type {string} + * @memberof SiteImageUpload + */ + crop?: string; +} + +/** +* @export +* @enum {string} +*/ +export enum SiteImageUploadImageUseEnum { + profile = 'profile', + background = 'background', + banner = 'banner', + profile_life = 'profile_life', + background_live = 'background_live', + banner_live = 'banner_live' +} + + +/** + * Check if a given object implements the SiteImageUpload interface. + */ +export function instanceOfSiteImageUpload(value: object): value is SiteImageUpload { + return true; +} + +export function SiteImageUploadFromJSON(json: any): SiteImageUpload { + return SiteImageUploadFromJSONTyped(json, false); +} + +export function SiteImageUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteImageUpload { + if (json == null) { + return json; + } + return { + + 'image_guid': json['image_guid'] == null ? undefined : json['image_guid'], + 'url': json['url'] == null ? undefined : json['url'], + 'image_use': json['image_use'] == null ? undefined : json['image_use'], + 'crop': json['crop'] == null ? undefined : json['crop'], + }; +} + +export function SiteImageUploadToJSON(json: any): SiteImageUpload { + return SiteImageUploadToJSONTyped(json, false); +} + +export function SiteImageUploadToJSONTyped(value?: SiteImageUpload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'image_guid': value['image_guid'], + 'url': value['url'], + 'image_use': value['image_use'], + 'crop': value['crop'], + }; +} + diff --git a/src/models/SiteLinkPerformance.ts b/src/models/SiteLinkPerformance.ts new file mode 100644 index 0000000..ab81c0f --- /dev/null +++ b/src/models/SiteLinkPerformance.ts @@ -0,0 +1,149 @@ +/* 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 { SitesPagination } from './SitesPagination'; +import { + SitesPaginationFromJSON, + SitesPaginationFromJSONTyped, + SitesPaginationToJSON, + SitesPaginationToJSONTyped, +} from './SitesPagination'; +import type { SiteClicks } from './SiteClicks'; +import { + SiteClicksFromJSON, + SiteClicksFromJSONTyped, + SiteClicksToJSON, + SiteClicksToJSONTyped, +} from './SiteClicks'; + +/** + * + * @export + * @interface SiteLinkPerformance + */ +export interface SiteLinkPerformance { + /** + * + * @type {number} + * @memberof SiteLinkPerformance + */ + total?: number; + /** + * + * @type {Array} + * @memberof SiteLinkPerformance + */ + link_clicks?: Array; + /** + * + * @type {string} + * @memberof SiteLinkPerformance + */ + performance_start?: string; + /** + * + * @type {string} + * @memberof SiteLinkPerformance + */ + performance_end?: string; + /** + * + * @type {number} + * @memberof SiteLinkPerformance + */ + units?: number; + /** + * + * @type {SiteLinkPerformanceUnitEnum} + * @memberof SiteLinkPerformance + */ + unit?: SiteLinkPerformanceUnitEnum; + /** + * + * @type {string} + * @memberof SiteLinkPerformance + */ + unit_reference?: string; + /** + * + * @type {SitesPagination} + * @memberof SiteLinkPerformance + */ + page?: SitesPagination; +} + +/** +* @export +* @enum {string} +*/ +export enum SiteLinkPerformanceUnitEnum { + minute = 'minute', + hour = 'hour', + day = 'day', + week = 'week', + month = 'month' +} + + +/** + * Check if a given object implements the SiteLinkPerformance interface. + */ +export function instanceOfSiteLinkPerformance(value: object): value is SiteLinkPerformance { + return true; +} + +export function SiteLinkPerformanceFromJSON(json: any): SiteLinkPerformance { + return SiteLinkPerformanceFromJSONTyped(json, false); +} + +export function SiteLinkPerformanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteLinkPerformance { + if (json == null) { + return json; + } + return { + + 'total': json['total'] == null ? undefined : json['total'], + 'link_clicks': json['link_clicks'] == null ? undefined : ((json['link_clicks'] as Array).map(SiteClicksFromJSON)), + 'performance_start': json['performance_start'] == null ? undefined : json['performance_start'], + 'performance_end': json['performance_end'] == null ? undefined : json['performance_end'], + 'units': json['units'] == null ? undefined : json['units'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'page': json['page'] == null ? undefined : SitesPaginationFromJSON(json['page']), + }; +} + +export function SiteLinkPerformanceToJSON(json: any): SiteLinkPerformance { + return SiteLinkPerformanceToJSONTyped(json, false); +} + +export function SiteLinkPerformanceToJSONTyped(value?: SiteLinkPerformance | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'total': value['total'], + 'link_clicks': value['link_clicks'] == null ? undefined : ((value['link_clicks'] as Array).map(SiteClicksToJSON)), + 'performance_start': value['performance_start'], + 'performance_end': value['performance_end'], + 'units': value['units'], + 'unit': value['unit'], + 'unit_reference': value['unit_reference'], + 'page': SitesPaginationToJSON(value['page']), + }; +} + diff --git a/src/models/SiteProfileImageBorderSize.ts b/src/models/SiteProfileImageBorderSize.ts new file mode 100644 index 0000000..a83bd06 --- /dev/null +++ b/src/models/SiteProfileImageBorderSize.ts @@ -0,0 +1,55 @@ +/* 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. + */ + +/** + * Enum of profile image border sizes on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteProfileImageBorderSize { + none = 'none', + xs = 'xs', + sm = 'sm', + med = 'med', + lg = 'lg' +} + + +export function instanceOfSiteProfileImageBorderSize(value: any): boolean { + for (const key in SiteProfileImageBorderSize) { + if (Object.prototype.hasOwnProperty.call(SiteProfileImageBorderSize, key)) { + if (SiteProfileImageBorderSize[key as keyof typeof SiteProfileImageBorderSize] === value) { + return true; + } + } + } + return false; +} + +export function SiteProfileImageBorderSizeFromJSON(json: any): SiteProfileImageBorderSize { + return SiteProfileImageBorderSizeFromJSONTyped(json, false); +} + +export function SiteProfileImageBorderSizeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteProfileImageBorderSize { + return json as SiteProfileImageBorderSize; +} + +export function SiteProfileImageBorderSizeToJSON(value?: SiteProfileImageBorderSize | null): any { + return value as any; +} + +export function SiteProfileImageBorderSizeToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteProfileImageBorderSize { + return value as SiteProfileImageBorderSize; +} + diff --git a/src/models/SiteProfileImageLocation.ts b/src/models/SiteProfileImageLocation.ts new file mode 100644 index 0000000..49e10b0 --- /dev/null +++ b/src/models/SiteProfileImageLocation.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Enum of the profile image locations available on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteProfileImageLocation { + left = 'left', + center = 'center', + right = 'right' +} + + +export function instanceOfSiteProfileImageLocation(value: any): boolean { + for (const key in SiteProfileImageLocation) { + if (Object.prototype.hasOwnProperty.call(SiteProfileImageLocation, key)) { + if (SiteProfileImageLocation[key as keyof typeof SiteProfileImageLocation] === value) { + return true; + } + } + } + return false; +} + +export function SiteProfileImageLocationFromJSON(json: any): SiteProfileImageLocation { + return SiteProfileImageLocationFromJSONTyped(json, false); +} + +export function SiteProfileImageLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteProfileImageLocation { + return json as SiteProfileImageLocation; +} + +export function SiteProfileImageLocationToJSON(value?: SiteProfileImageLocation | null): any { + return value as any; +} + +export function SiteProfileImageLocationToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteProfileImageLocation { + return value as SiteProfileImageLocation; +} + diff --git a/src/models/SiteProfileImageShape.ts b/src/models/SiteProfileImageShape.ts new file mode 100644 index 0000000..d0e52f8 --- /dev/null +++ b/src/models/SiteProfileImageShape.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Enum of profile image shapes on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteProfileImageShape { + round = 'round', + rounded_square = 'rounded_square', + square = 'square' +} + + +export function instanceOfSiteProfileImageShape(value: any): boolean { + for (const key in SiteProfileImageShape) { + if (Object.prototype.hasOwnProperty.call(SiteProfileImageShape, key)) { + if (SiteProfileImageShape[key as keyof typeof SiteProfileImageShape] === value) { + return true; + } + } + } + return false; +} + +export function SiteProfileImageShapeFromJSON(json: any): SiteProfileImageShape { + return SiteProfileImageShapeFromJSONTyped(json, false); +} + +export function SiteProfileImageShapeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteProfileImageShape { + return json as SiteProfileImageShape; +} + +export function SiteProfileImageShapeToJSON(value?: SiteProfileImageShape | null): any { + return value as any; +} + +export function SiteProfileImageShapeToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteProfileImageShape { + return value as SiteProfileImageShape; +} + diff --git a/src/models/SiteProfileImageSize.ts b/src/models/SiteProfileImageSize.ts new file mode 100644 index 0000000..6e23547 --- /dev/null +++ b/src/models/SiteProfileImageSize.ts @@ -0,0 +1,55 @@ +/* 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. + */ + +/** + * Enum of profile image sizes on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteProfileImageSize { + xs = 'xs', + sm = 'sm', + med = 'med', + lg = 'lg', + xl = 'xl' +} + + +export function instanceOfSiteProfileImageSize(value: any): boolean { + for (const key in SiteProfileImageSize) { + if (Object.prototype.hasOwnProperty.call(SiteProfileImageSize, key)) { + if (SiteProfileImageSize[key as keyof typeof SiteProfileImageSize] === value) { + return true; + } + } + } + return false; +} + +export function SiteProfileImageSizeFromJSON(json: any): SiteProfileImageSize { + return SiteProfileImageSizeFromJSONTyped(json, false); +} + +export function SiteProfileImageSizeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteProfileImageSize { + return json as SiteProfileImageSize; +} + +export function SiteProfileImageSizeToJSON(value?: SiteProfileImageSize | null): any { + return value as any; +} + +export function SiteProfileImageSizeToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteProfileImageSize { + return value as SiteProfileImageSize; +} + diff --git a/src/models/SiteProfileImageType.ts b/src/models/SiteProfileImageType.ts new file mode 100644 index 0000000..839759d --- /dev/null +++ b/src/models/SiteProfileImageType.ts @@ -0,0 +1,52 @@ +/* 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. + */ + +/** + * Enum of the profile image type options on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteProfileImageType { + single = 'single', + repeating = 'repeating' +} + + +export function instanceOfSiteProfileImageType(value: any): boolean { + for (const key in SiteProfileImageType) { + if (Object.prototype.hasOwnProperty.call(SiteProfileImageType, key)) { + if (SiteProfileImageType[key as keyof typeof SiteProfileImageType] === value) { + return true; + } + } + } + return false; +} + +export function SiteProfileImageTypeFromJSON(json: any): SiteProfileImageType { + return SiteProfileImageTypeFromJSONTyped(json, false); +} + +export function SiteProfileImageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteProfileImageType { + return json as SiteProfileImageType; +} + +export function SiteProfileImageTypeToJSON(value?: SiteProfileImageType | null): any { + return value as any; +} + +export function SiteProfileImageTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteProfileImageType { + return value as SiteProfileImageType; +} + diff --git a/src/models/SiteRedirects.ts b/src/models/SiteRedirects.ts new file mode 100644 index 0000000..1b0bc16 --- /dev/null +++ b/src/models/SiteRedirects.ts @@ -0,0 +1,145 @@ +/* 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 SiteRedirects + */ +export interface SiteRedirects { + /** + * + * @type {string} + * @memberof SiteRedirects + */ + redirect_guid?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + microsite_guid?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + uri?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + domain?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + keyword?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + redirect_uri?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + redirect_domain?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + redirect_keyword?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + status?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + created?: string; + /** + * + * @type {string} + * @memberof SiteRedirects + */ + modified?: string; +} + +/** + * Check if a given object implements the SiteRedirects interface. + */ +export function instanceOfSiteRedirects(value: object): value is SiteRedirects { + return true; +} + +export function SiteRedirectsFromJSON(json: any): SiteRedirects { + return SiteRedirectsFromJSONTyped(json, false); +} + +export function SiteRedirectsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteRedirects { + if (json == null) { + return json; + } + return { + + 'redirect_guid': json['redirect_guid'] == null ? undefined : json['redirect_guid'], + 'microsite_guid': json['microsite_guid'] == null ? undefined : json['microsite_guid'], + 'uri': json['uri'] == null ? undefined : json['uri'], + 'domain': json['domain'] == null ? undefined : json['domain'], + 'keyword': json['keyword'] == null ? undefined : json['keyword'], + 'redirect_uri': json['redirect_uri'] == null ? undefined : json['redirect_uri'], + 'redirect_domain': json['redirect_domain'] == null ? undefined : json['redirect_domain'], + 'redirect_keyword': json['redirect_keyword'] == null ? undefined : json['redirect_keyword'], + 'status': json['status'] == null ? undefined : json['status'], + 'created': json['created'] == null ? undefined : json['created'], + 'modified': json['modified'] == null ? undefined : json['modified'], + }; +} + +export function SiteRedirectsToJSON(json: any): SiteRedirects { + return SiteRedirectsToJSONTyped(json, false); +} + +export function SiteRedirectsToJSONTyped(value?: SiteRedirects | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'redirect_guid': value['redirect_guid'], + 'microsite_guid': value['microsite_guid'], + 'uri': value['uri'], + 'domain': value['domain'], + 'keyword': value['keyword'], + 'redirect_uri': value['redirect_uri'], + 'redirect_domain': value['redirect_domain'], + 'redirect_keyword': value['redirect_keyword'], + 'status': value['status'], + 'created': value['created'], + 'modified': value['modified'], + }; +} + diff --git a/src/models/SiteStylePreference.ts b/src/models/SiteStylePreference.ts new file mode 100644 index 0000000..ed6ab0c --- /dev/null +++ b/src/models/SiteStylePreference.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Enum of style preference values on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteStylePreference { + custom = 'custom', + theme = 'theme', + image = 'image' +} + + +export function instanceOfSiteStylePreference(value: any): boolean { + for (const key in SiteStylePreference) { + if (Object.prototype.hasOwnProperty.call(SiteStylePreference, key)) { + if (SiteStylePreference[key as keyof typeof SiteStylePreference] === value) { + return true; + } + } + } + return false; +} + +export function SiteStylePreferenceFromJSON(json: any): SiteStylePreference { + return SiteStylePreferenceFromJSONTyped(json, false); +} + +export function SiteStylePreferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteStylePreference { + return json as SiteStylePreference; +} + +export function SiteStylePreferenceToJSON(value?: SiteStylePreference | null): any { + return value as any; +} + +export function SiteStylePreferenceToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteStylePreference { + return value as SiteStylePreference; +} + diff --git a/src/models/SiteTextAlignmentEnum.ts b/src/models/SiteTextAlignmentEnum.ts new file mode 100644 index 0000000..c866571 --- /dev/null +++ b/src/models/SiteTextAlignmentEnum.ts @@ -0,0 +1,52 @@ +/* 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. + */ + +/** + * Enum of text alignment values on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteTextAlignmentEnum { + start = 'start', + center = 'center' +} + + +export function instanceOfSiteTextAlignmentEnum(value: any): boolean { + for (const key in SiteTextAlignmentEnum) { + if (Object.prototype.hasOwnProperty.call(SiteTextAlignmentEnum, key)) { + if (SiteTextAlignmentEnum[key as keyof typeof SiteTextAlignmentEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteTextAlignmentEnumFromJSON(json: any): SiteTextAlignmentEnum { + return SiteTextAlignmentEnumFromJSONTyped(json, false); +} + +export function SiteTextAlignmentEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteTextAlignmentEnum { + return json as SiteTextAlignmentEnum; +} + +export function SiteTextAlignmentEnumToJSON(value?: SiteTextAlignmentEnum | null): any { + return value as any; +} + +export function SiteTextAlignmentEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteTextAlignmentEnum { + return value as SiteTextAlignmentEnum; +} + diff --git a/src/models/SiteTextBorderTypeEnum.ts b/src/models/SiteTextBorderTypeEnum.ts new file mode 100644 index 0000000..007dde9 --- /dev/null +++ b/src/models/SiteTextBorderTypeEnum.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Enum of border type values on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteTextBorderTypeEnum { + none = 'none', + below = 'below', + above_and_below = 'above_and_below' +} + + +export function instanceOfSiteTextBorderTypeEnum(value: any): boolean { + for (const key in SiteTextBorderTypeEnum) { + if (Object.prototype.hasOwnProperty.call(SiteTextBorderTypeEnum, key)) { + if (SiteTextBorderTypeEnum[key as keyof typeof SiteTextBorderTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteTextBorderTypeEnumFromJSON(json: any): SiteTextBorderTypeEnum { + return SiteTextBorderTypeEnumFromJSONTyped(json, false); +} + +export function SiteTextBorderTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteTextBorderTypeEnum { + return json as SiteTextBorderTypeEnum; +} + +export function SiteTextBorderTypeEnumToJSON(value?: SiteTextBorderTypeEnum | null): any { + return value as any; +} + +export function SiteTextBorderTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteTextBorderTypeEnum { + return value as SiteTextBorderTypeEnum; +} + diff --git a/src/models/SiteTextLocation.ts b/src/models/SiteTextLocation.ts new file mode 100644 index 0000000..d7df715 --- /dev/null +++ b/src/models/SiteTextLocation.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Enum of the available text locations on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteTextLocation { + top = 'top', + contain = 'contain', + bottom = 'bottom' +} + + +export function instanceOfSiteTextLocation(value: any): boolean { + for (const key in SiteTextLocation) { + if (Object.prototype.hasOwnProperty.call(SiteTextLocation, key)) { + if (SiteTextLocation[key as keyof typeof SiteTextLocation] === value) { + return true; + } + } + } + return false; +} + +export function SiteTextLocationFromJSON(json: any): SiteTextLocation { + return SiteTextLocationFromJSONTyped(json, false); +} + +export function SiteTextLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteTextLocation { + return json as SiteTextLocation; +} + +export function SiteTextLocationToJSON(value?: SiteTextLocation | null): any { + return value as any; +} + +export function SiteTextLocationToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteTextLocation { + return value as SiteTextLocation; +} + diff --git a/src/models/SiteTextSizeEnum.ts b/src/models/SiteTextSizeEnum.ts new file mode 100644 index 0000000..0b5acee --- /dev/null +++ b/src/models/SiteTextSizeEnum.ts @@ -0,0 +1,54 @@ +/* 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. + */ + +/** + * Enum of text sizes on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteTextSizeEnum { + xs = 'xs', + sm = 'sm', + med = 'med', + lg = 'lg' +} + + +export function instanceOfSiteTextSizeEnum(value: any): boolean { + for (const key in SiteTextSizeEnum) { + if (Object.prototype.hasOwnProperty.call(SiteTextSizeEnum, key)) { + if (SiteTextSizeEnum[key as keyof typeof SiteTextSizeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteTextSizeEnumFromJSON(json: any): SiteTextSizeEnum { + return SiteTextSizeEnumFromJSONTyped(json, false); +} + +export function SiteTextSizeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteTextSizeEnum { + return json as SiteTextSizeEnum; +} + +export function SiteTextSizeEnumToJSON(value?: SiteTextSizeEnum | null): any { + return value as any; +} + +export function SiteTextSizeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteTextSizeEnum { + return value as SiteTextSizeEnum; +} + diff --git a/src/models/SiteTextWeightEnum.ts b/src/models/SiteTextWeightEnum.ts new file mode 100644 index 0000000..de31dc1 --- /dev/null +++ b/src/models/SiteTextWeightEnum.ts @@ -0,0 +1,53 @@ +/* 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. + */ + +/** + * Enum of text sizes on a Bitly Site + * @export + * @enum {string} + */ +export enum SiteTextWeightEnum { + regular = 'regular', + bold = 'bold', + semi_bold = 'semi_bold' +} + + +export function instanceOfSiteTextWeightEnum(value: any): boolean { + for (const key in SiteTextWeightEnum) { + if (Object.prototype.hasOwnProperty.call(SiteTextWeightEnum, key)) { + if (SiteTextWeightEnum[key as keyof typeof SiteTextWeightEnum] === value) { + return true; + } + } + } + return false; +} + +export function SiteTextWeightEnumFromJSON(json: any): SiteTextWeightEnum { + return SiteTextWeightEnumFromJSONTyped(json, false); +} + +export function SiteTextWeightEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteTextWeightEnum { + return json as SiteTextWeightEnum; +} + +export function SiteTextWeightEnumToJSON(value?: SiteTextWeightEnum | null): any { + return value as any; +} + +export function SiteTextWeightEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SiteTextWeightEnum { + return value as SiteTextWeightEnum; +} + diff --git a/src/models/SiteViewMetrics.ts b/src/models/SiteViewMetrics.ts new file mode 100644 index 0000000..a73a2e4 --- /dev/null +++ b/src/models/SiteViewMetrics.ts @@ -0,0 +1,128 @@ +/* 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 { ViewMetric } from './ViewMetric'; +import { + ViewMetricFromJSON, + ViewMetricFromJSONTyped, + ViewMetricToJSON, + ViewMetricToJSONTyped, +} from './ViewMetric'; + +/** + * + * @export + * @interface SiteViewMetrics + */ +export interface SiteViewMetrics { + /** + * + * @type {Array} + * @memberof SiteViewMetrics + */ + site_views?: Array; + /** + * + * @type {number} + * @memberof SiteViewMetrics + */ + units?: number; + /** + * + * @type {SiteViewMetricsUnitEnum} + * @memberof SiteViewMetrics + */ + unit?: SiteViewMetricsUnitEnum; + /** + * + * @type {string} + * @memberof SiteViewMetrics + */ + unit_reference?: string; + /** + * + * @type {SiteViewMetricsFacetEnum} + * @memberof SiteViewMetrics + */ + facet?: SiteViewMetricsFacetEnum; +} + +/** +* @export +* @enum {string} +*/ +export enum SiteViewMetricsUnitEnum { + minute = 'minute', + hour = 'hour', + day = 'day', + week = 'week', + month = 'month' +} +/** +* @export +* @enum {string} +*/ +export enum SiteViewMetricsFacetEnum { + views = 'views', + countries = 'countries', + referrers = 'referrers', + devices = 'devices' +} + + +/** + * Check if a given object implements the SiteViewMetrics interface. + */ +export function instanceOfSiteViewMetrics(value: object): value is SiteViewMetrics { + return true; +} + +export function SiteViewMetricsFromJSON(json: any): SiteViewMetrics { + return SiteViewMetricsFromJSONTyped(json, false); +} + +export function SiteViewMetricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteViewMetrics { + if (json == null) { + return json; + } + return { + + 'site_views': json['site_views'] == null ? undefined : ((json['site_views'] as Array).map(ViewMetricFromJSON)), + 'units': json['units'] == null ? undefined : json['units'], + 'unit': json['unit'] == null ? undefined : json['unit'], + 'unit_reference': json['unit_reference'] == null ? undefined : json['unit_reference'], + 'facet': json['facet'] == null ? undefined : json['facet'], + }; +} + +export function SiteViewMetricsToJSON(json: any): SiteViewMetrics { + return SiteViewMetricsToJSONTyped(json, false); +} + +export function SiteViewMetricsToJSONTyped(value?: SiteViewMetrics | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'site_views': value['site_views'] == null ? undefined : ((value['site_views'] as Array).map(ViewMetricToJSON)), + 'units': value['units'], + 'unit': value['unit'], + 'unit_reference': value['unit_reference'], + 'facet': value['facet'], + }; +} + diff --git a/src/models/SiteViewsSummary.ts b/src/models/SiteViewsSummary.ts new file mode 100644 index 0000000..a50478b --- /dev/null +++ b/src/models/SiteViewsSummary.ts @@ -0,0 +1,102 @@ +/* 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 SiteViewsSummary + */ +export interface SiteViewsSummary { + /** + * + * @type {number} + * @memberof SiteViewsSummary + */ + total_views?: number; + /** + * + * @type {number} + * @memberof SiteViewsSummary + */ + units?: number; + /** + * + * @type {SiteViewsSummaryUnitEnum} + * @memberof SiteViewsSummary + */ + unit?: SiteViewsSummaryUnitEnum; + /** + * + * @type {string} + * @memberof SiteViewsSummary + */ + unit_reference?: string; +} + +/** +* @export +* @enum {string} +*/ +export enum SiteViewsSummaryUnitEnum { + minute = 'minute', + hour = 'hour', + day = 'day', + week = 'week', + month = 'month' +} + + +/** + * Check if a given object implements the SiteViewsSummary interface. + */ +export function instanceOfSiteViewsSummary(value: object): value is SiteViewsSummary { + return true; +} + +export function SiteViewsSummaryFromJSON(json: any): SiteViewsSummary { + return SiteViewsSummaryFromJSONTyped(json, false); +} + +export function SiteViewsSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteViewsSummary { + if (json == null) { + return json; + } + return { + + 'total_views': json['total_views'] == null ? undefined : json['total_views'], + '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 SiteViewsSummaryToJSON(json: any): SiteViewsSummary { + return SiteViewsSummaryToJSONTyped(json, false); +} + +export function SiteViewsSummaryToJSONTyped(value?: SiteViewsSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'total_views': value['total_views'], + 'units': value['units'], + 'unit': value['unit'], + 'unit_reference': value['unit_reference'], + }; +} + diff --git a/src/models/SitesPagination.ts b/src/models/SitesPagination.ts new file mode 100644 index 0000000..5a82152 --- /dev/null +++ b/src/models/SitesPagination.ts @@ -0,0 +1,97 @@ +/* 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 SitesPagination + */ +export interface SitesPagination { + /** + * + * @type {string} + * @memberof SitesPagination + */ + prev?: string; + /** + * + * @type {string} + * @memberof SitesPagination + */ + next?: string; + /** + * + * @type {number} + * @memberof SitesPagination + */ + page?: number; + /** + * + * @type {number} + * @memberof SitesPagination + */ + total?: number; + /** + * + * @type {number} + * @memberof SitesPagination + */ + size?: number; +} + +/** + * Check if a given object implements the SitesPagination interface. + */ +export function instanceOfSitesPagination(value: object): value is SitesPagination { + return true; +} + +export function SitesPaginationFromJSON(json: any): SitesPagination { + return SitesPaginationFromJSONTyped(json, false); +} + +export function SitesPaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SitesPagination { + if (json == null) { + return json; + } + return { + + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'page': json['page'] == null ? undefined : json['page'], + 'total': json['total'] == null ? undefined : json['total'], + 'size': json['size'] == null ? undefined : json['size'], + }; +} + +export function SitesPaginationToJSON(json: any): SitesPagination { + return SitesPaginationToJSONTyped(json, false); +} + +export function SitesPaginationToJSONTyped(value?: SitesPagination | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'prev': value['prev'], + 'next': value['next'], + 'page': value['page'], + 'total': value['total'], + 'size': value['size'], + }; +} + diff --git a/src/models/SocialContent.ts b/src/models/SocialContent.ts new file mode 100644 index 0000000..83e0f64 --- /dev/null +++ b/src/models/SocialContent.ts @@ -0,0 +1,73 @@ +/* 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 SocialContent + */ +export interface SocialContent { + /** + * + * @type {string} + * @memberof SocialContent + */ + url?: string; + /** + * + * @type {string} + * @memberof SocialContent + */ + channel?: string; +} + +/** + * Check if a given object implements the SocialContent interface. + */ +export function instanceOfSocialContent(value: object): value is SocialContent { + return true; +} + +export function SocialContentFromJSON(json: any): SocialContent { + return SocialContentFromJSONTyped(json, false); +} + +export function SocialContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SocialContent { + if (json == null) { + return json; + } + return { + + 'url': json['url'] == null ? undefined : json['url'], + 'channel': json['channel'] == null ? undefined : json['channel'], + }; +} + +export function SocialContentToJSON(json: any): SocialContent { + return SocialContentToJSONTyped(json, false); +} + +export function SocialContentToJSONTyped(value?: SocialContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'url': value['url'], + 'channel': value['channel'], + }; +} + diff --git a/src/models/SortedButtons.ts b/src/models/SortedButtons.ts new file mode 100644 index 0000000..fdd3371 --- /dev/null +++ b/src/models/SortedButtons.ts @@ -0,0 +1,111 @@ +/* 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 { SortedButtonsPageViewsInner } from './SortedButtonsPageViewsInner'; +import { + SortedButtonsPageViewsInnerFromJSON, + SortedButtonsPageViewsInnerFromJSONTyped, + SortedButtonsPageViewsInnerToJSON, + SortedButtonsPageViewsInnerToJSONTyped, +} from './SortedButtonsPageViewsInner'; +import type { SortedButtonsButtonsInner } from './SortedButtonsButtonsInner'; +import { + SortedButtonsButtonsInnerFromJSON, + SortedButtonsButtonsInnerFromJSONTyped, + SortedButtonsButtonsInnerToJSON, + SortedButtonsButtonsInnerToJSONTyped, +} from './SortedButtonsButtonsInner'; +import type { ClickLink } from './ClickLink'; +import { + ClickLinkFromJSON, + ClickLinkFromJSONTyped, + ClickLinkToJSON, + ClickLinkToJSONTyped, +} from './ClickLink'; + +/** + * + * @export + * @interface SortedButtons + */ +export interface SortedButtons { + /** + * + * @type {string} + * @memberof SortedButtons + */ + info?: string; + /** + * + * @type {Array} + * @memberof SortedButtons + */ + sorted_buttons?: Array; + /** + * + * @type {Array} + * @memberof SortedButtons + */ + buttons?: Array; + /** + * + * @type {Array} + * @memberof SortedButtons + */ + page_views?: Array; +} + +/** + * Check if a given object implements the SortedButtons interface. + */ +export function instanceOfSortedButtons(value: object): value is SortedButtons { + return true; +} + +export function SortedButtonsFromJSON(json: any): SortedButtons { + return SortedButtonsFromJSONTyped(json, false); +} + +export function SortedButtonsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SortedButtons { + if (json == null) { + return json; + } + return { + + 'info': json['info'] == null ? undefined : json['info'], + 'sorted_buttons': json['sorted_buttons'] == null ? undefined : ((json['sorted_buttons'] as Array).map(ClickLinkFromJSON)), + 'buttons': json['buttons'] == null ? undefined : ((json['buttons'] as Array).map(SortedButtonsButtonsInnerFromJSON)), + 'page_views': json['page_views'] == null ? undefined : ((json['page_views'] as Array).map(SortedButtonsPageViewsInnerFromJSON)), + }; +} + +export function SortedButtonsToJSON(json: any): SortedButtons { + return SortedButtonsToJSONTyped(json, false); +} + +export function SortedButtonsToJSONTyped(value?: SortedButtons | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'info': value['info'], + 'sorted_buttons': value['sorted_buttons'] == null ? undefined : ((value['sorted_buttons'] as Array).map(ClickLinkToJSON)), + 'buttons': value['buttons'] == null ? undefined : ((value['buttons'] as Array).map(SortedButtonsButtonsInnerToJSON)), + 'page_views': value['page_views'] == null ? undefined : ((value['page_views'] as Array).map(SortedButtonsPageViewsInnerToJSON)), + }; +} + diff --git a/src/models/SortedButtonsButtonsInner.ts b/src/models/SortedButtonsButtonsInner.ts new file mode 100644 index 0000000..3658002 --- /dev/null +++ b/src/models/SortedButtonsButtonsInner.ts @@ -0,0 +1,99 @@ +/* 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 { LaunchpadButtonTypeEnum } from './LaunchpadButtonTypeEnum'; +import { + LaunchpadButtonTypeEnumFromJSON, + LaunchpadButtonTypeEnumFromJSONTyped, + LaunchpadButtonTypeEnumToJSON, + LaunchpadButtonTypeEnumToJSONTyped, +} from './LaunchpadButtonTypeEnum'; + +/** + * + * @export + * @interface SortedButtonsButtonsInner + */ +export interface SortedButtonsButtonsInner { + /** + * + * @type {string} + * @memberof SortedButtonsButtonsInner + */ + id?: string; + /** + * + * @type {LaunchpadButtonTypeEnum} + * @memberof SortedButtonsButtonsInner + */ + button_type?: LaunchpadButtonTypeEnum; + /** + * + * @type {string} + * @memberof SortedButtonsButtonsInner + */ + title?: string; + /** + * + * @type {string} + * @memberof SortedButtonsButtonsInner + */ + microsite_guid?: string; +} + + + +/** + * Check if a given object implements the SortedButtonsButtonsInner interface. + */ +export function instanceOfSortedButtonsButtonsInner(value: object): value is SortedButtonsButtonsInner { + return true; +} + +export function SortedButtonsButtonsInnerFromJSON(json: any): SortedButtonsButtonsInner { + return SortedButtonsButtonsInnerFromJSONTyped(json, false); +} + +export function SortedButtonsButtonsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SortedButtonsButtonsInner { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'button_type': json['button_type'] == null ? undefined : LaunchpadButtonTypeEnumFromJSON(json['button_type']), + 'title': json['title'] == null ? undefined : json['title'], + 'microsite_guid': json['microsite_guid'] == null ? undefined : json['microsite_guid'], + }; +} + +export function SortedButtonsButtonsInnerToJSON(json: any): SortedButtonsButtonsInner { + return SortedButtonsButtonsInnerToJSONTyped(json, false); +} + +export function SortedButtonsButtonsInnerToJSONTyped(value?: SortedButtonsButtonsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'button_type': LaunchpadButtonTypeEnumToJSON(value['button_type']), + 'title': value['title'], + 'microsite_guid': value['microsite_guid'], + }; +} + diff --git a/src/models/SortedButtonsPageViewsInner.ts b/src/models/SortedButtonsPageViewsInner.ts new file mode 100644 index 0000000..0e3fab4 --- /dev/null +++ b/src/models/SortedButtonsPageViewsInner.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 SortedButtonsPageViewsInner + */ +export interface SortedButtonsPageViewsInner { + /** + * + * @type {string} + * @memberof SortedButtonsPageViewsInner + */ + microsite_guid?: string; + /** + * + * @type {string} + * @memberof SortedButtonsPageViewsInner + */ + uri?: string; + /** + * + * @type {number} + * @memberof SortedButtonsPageViewsInner + */ + views?: number; +} + +/** + * Check if a given object implements the SortedButtonsPageViewsInner interface. + */ +export function instanceOfSortedButtonsPageViewsInner(value: object): value is SortedButtonsPageViewsInner { + return true; +} + +export function SortedButtonsPageViewsInnerFromJSON(json: any): SortedButtonsPageViewsInner { + return SortedButtonsPageViewsInnerFromJSONTyped(json, false); +} + +export function SortedButtonsPageViewsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SortedButtonsPageViewsInner { + if (json == null) { + return json; + } + return { + + 'microsite_guid': json['microsite_guid'] == null ? undefined : json['microsite_guid'], + 'uri': json['uri'] == null ? undefined : json['uri'], + 'views': json['views'] == null ? undefined : json['views'], + }; +} + +export function SortedButtonsPageViewsInnerToJSON(json: any): SortedButtonsPageViewsInner { + return SortedButtonsPageViewsInnerToJSONTyped(json, false); +} + +export function SortedButtonsPageViewsInnerToJSONTyped(value?: SortedButtonsPageViewsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'microsite_guid': value['microsite_guid'], + 'uri': value['uri'], + 'views': value['views'], + }; +} + diff --git a/src/models/Template.ts b/src/models/Template.ts new file mode 100644 index 0000000..a6ff4d8 --- /dev/null +++ b/src/models/Template.ts @@ -0,0 +1,159 @@ +/* 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 { BitlySiteAppearance } from './BitlySiteAppearance'; +import { + BitlySiteAppearanceFromJSON, + BitlySiteAppearanceFromJSONTyped, + BitlySiteAppearanceToJSON, + BitlySiteAppearanceToJSONTyped, +} from './BitlySiteAppearance'; +import type { SiteBlock } from './SiteBlock'; +import { + SiteBlockFromJSON, + SiteBlockFromJSONTyped, + SiteBlockToJSON, + SiteBlockToJSONTyped, +} from './SiteBlock'; +import type { BitlySiteContent } from './BitlySiteContent'; +import { + BitlySiteContentFromJSON, + BitlySiteContentFromJSONTyped, + BitlySiteContentToJSON, + BitlySiteContentToJSONTyped, +} from './BitlySiteContent'; + +/** + * + * @export + * @interface Template + */ +export interface Template { + /** + * + * @type {string} + * @memberof Template + */ + template_guid?: string; + /** + * + * @type {BitlySiteContent} + * @memberof Template + */ + content?: BitlySiteContent; + /** + * + * @type {BitlySiteAppearance} + * @memberof Template + */ + appearance?: BitlySiteAppearance; + /** + * + * @type {Array} + * @memberof Template + */ + blocks?: Array; + /** + * + * @type {string} + * @memberof Template + */ + status?: string; + /** + * + * @type {Array} + * @memberof Template + */ + categories?: Array; + /** + * + * @type {string} + * @memberof Template + */ + created?: string; + /** + * + * @type {string} + * @memberof Template + */ + modified?: string; + /** + * + * @type {boolean} + * @memberof Template + */ + is_active?: boolean; + /** + * + * @type {boolean} + * @memberof Template + */ + is_paid?: boolean; +} + +/** + * Check if a given object implements the Template interface. + */ +export function instanceOfTemplate(value: object): value is Template { + return true; +} + +export function TemplateFromJSON(json: any): Template { + return TemplateFromJSONTyped(json, false); +} + +export function TemplateFromJSONTyped(json: any, ignoreDiscriminator: boolean): Template { + if (json == null) { + return json; + } + return { + + 'template_guid': json['template_guid'] == null ? undefined : json['template_guid'], + 'content': json['content'] == null ? undefined : BitlySiteContentFromJSON(json['content']), + 'appearance': json['appearance'] == null ? undefined : BitlySiteAppearanceFromJSON(json['appearance']), + 'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array).map(SiteBlockFromJSON)), + 'status': json['status'] == null ? undefined : json['status'], + 'categories': json['categories'] == null ? undefined : json['categories'], + 'created': json['created'] == null ? undefined : json['created'], + 'modified': json['modified'] == null ? undefined : json['modified'], + 'is_active': json['is_active'] == null ? undefined : json['is_active'], + 'is_paid': json['is_paid'] == null ? undefined : json['is_paid'], + }; +} + +export function TemplateToJSON(json: any): Template { + return TemplateToJSONTyped(json, false); +} + +export function TemplateToJSONTyped(value?: Template | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'template_guid': value['template_guid'], + 'content': BitlySiteContentToJSON(value['content']), + 'appearance': BitlySiteAppearanceToJSON(value['appearance']), + 'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array).map(SiteBlockToJSON)), + 'status': value['status'], + 'categories': value['categories'], + 'created': value['created'], + 'modified': value['modified'], + 'is_active': value['is_active'], + 'is_paid': value['is_paid'], + }; +} + diff --git a/src/models/TextBlockAppearance.ts b/src/models/TextBlockAppearance.ts new file mode 100644 index 0000000..b8dd75c --- /dev/null +++ b/src/models/TextBlockAppearance.ts @@ -0,0 +1,121 @@ +/* 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 { TextBlockStyle } from './TextBlockStyle'; +import { + TextBlockStyleFromJSON, + TextBlockStyleFromJSONTyped, + TextBlockStyleToJSON, + TextBlockStyleToJSONTyped, +} from './TextBlockStyle'; +import type { TextBlockAppearanceRequestAlignmentEnum } from './TextBlockAppearanceRequestAlignmentEnum'; +import { + TextBlockAppearanceRequestAlignmentEnumFromJSON, + TextBlockAppearanceRequestAlignmentEnumFromJSONTyped, + TextBlockAppearanceRequestAlignmentEnumToJSON, + TextBlockAppearanceRequestAlignmentEnumToJSONTyped, +} from './TextBlockAppearanceRequestAlignmentEnum'; +import type { TextBlockAppearanceRequestFontSizeEnum } from './TextBlockAppearanceRequestFontSizeEnum'; +import { + TextBlockAppearanceRequestFontSizeEnumFromJSON, + TextBlockAppearanceRequestFontSizeEnumFromJSONTyped, + TextBlockAppearanceRequestFontSizeEnumToJSON, + TextBlockAppearanceRequestFontSizeEnumToJSONTyped, +} from './TextBlockAppearanceRequestFontSizeEnum'; + +/** + * + * @export + * @interface TextBlockAppearance + */ +export interface TextBlockAppearance { + /** + * + * @type {string} + * @memberof TextBlockAppearance + */ + background_color?: string; + /** + * + * @type {string} + * @memberof TextBlockAppearance + */ + text_color?: string; + /** + * + * @type {TextBlockAppearanceRequestAlignmentEnum} + * @memberof TextBlockAppearance + */ + alignment?: TextBlockAppearanceRequestAlignmentEnum; + /** + * + * @type {TextBlockStyle} + * @memberof TextBlockAppearance + */ + text_block_style?: TextBlockStyle; + /** + * + * @type {TextBlockAppearanceRequestFontSizeEnum} + * @memberof TextBlockAppearance + */ + font_size?: TextBlockAppearanceRequestFontSizeEnum; +} + + + +/** + * Check if a given object implements the TextBlockAppearance interface. + */ +export function instanceOfTextBlockAppearance(value: object): value is TextBlockAppearance { + return true; +} + +export function TextBlockAppearanceFromJSON(json: any): TextBlockAppearance { + return TextBlockAppearanceFromJSONTyped(json, false); +} + +export function TextBlockAppearanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextBlockAppearance { + if (json == null) { + return json; + } + return { + + 'background_color': json['background_color'] == null ? undefined : json['background_color'], + 'text_color': json['text_color'] == null ? undefined : json['text_color'], + 'alignment': json['alignment'] == null ? undefined : TextBlockAppearanceRequestAlignmentEnumFromJSON(json['alignment']), + 'text_block_style': json['text_block_style'] == null ? undefined : TextBlockStyleFromJSON(json['text_block_style']), + 'font_size': json['font_size'] == null ? undefined : TextBlockAppearanceRequestFontSizeEnumFromJSON(json['font_size']), + }; +} + +export function TextBlockAppearanceToJSON(json: any): TextBlockAppearance { + return TextBlockAppearanceToJSONTyped(json, false); +} + +export function TextBlockAppearanceToJSONTyped(value?: TextBlockAppearance | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'background_color': value['background_color'], + 'text_color': value['text_color'], + 'alignment': TextBlockAppearanceRequestAlignmentEnumToJSON(value['alignment']), + 'text_block_style': TextBlockStyleToJSON(value['text_block_style']), + 'font_size': TextBlockAppearanceRequestFontSizeEnumToJSON(value['font_size']), + }; +} + diff --git a/src/models/TextBlockAppearanceRequest.ts b/src/models/TextBlockAppearanceRequest.ts new file mode 100644 index 0000000..362b06e --- /dev/null +++ b/src/models/TextBlockAppearanceRequest.ts @@ -0,0 +1,121 @@ +/* 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 { TextBlockStyle } from './TextBlockStyle'; +import { + TextBlockStyleFromJSON, + TextBlockStyleFromJSONTyped, + TextBlockStyleToJSON, + TextBlockStyleToJSONTyped, +} from './TextBlockStyle'; +import type { TextBlockAppearanceRequestAlignmentEnum } from './TextBlockAppearanceRequestAlignmentEnum'; +import { + TextBlockAppearanceRequestAlignmentEnumFromJSON, + TextBlockAppearanceRequestAlignmentEnumFromJSONTyped, + TextBlockAppearanceRequestAlignmentEnumToJSON, + TextBlockAppearanceRequestAlignmentEnumToJSONTyped, +} from './TextBlockAppearanceRequestAlignmentEnum'; +import type { TextBlockAppearanceRequestFontSizeEnum } from './TextBlockAppearanceRequestFontSizeEnum'; +import { + TextBlockAppearanceRequestFontSizeEnumFromJSON, + TextBlockAppearanceRequestFontSizeEnumFromJSONTyped, + TextBlockAppearanceRequestFontSizeEnumToJSON, + TextBlockAppearanceRequestFontSizeEnumToJSONTyped, +} from './TextBlockAppearanceRequestFontSizeEnum'; + +/** + * + * @export + * @interface TextBlockAppearanceRequest + */ +export interface TextBlockAppearanceRequest { + /** + * + * @type {string} + * @memberof TextBlockAppearanceRequest + */ + background_color?: string; + /** + * + * @type {string} + * @memberof TextBlockAppearanceRequest + */ + text_color?: string; + /** + * + * @type {TextBlockAppearanceRequestAlignmentEnum} + * @memberof TextBlockAppearanceRequest + */ + alignment?: TextBlockAppearanceRequestAlignmentEnum; + /** + * + * @type {TextBlockAppearanceRequestFontSizeEnum} + * @memberof TextBlockAppearanceRequest + */ + font_size?: TextBlockAppearanceRequestFontSizeEnum; + /** + * + * @type {TextBlockStyle} + * @memberof TextBlockAppearanceRequest + */ + text_block_style?: TextBlockStyle; +} + + + +/** + * Check if a given object implements the TextBlockAppearanceRequest interface. + */ +export function instanceOfTextBlockAppearanceRequest(value: object): value is TextBlockAppearanceRequest { + return true; +} + +export function TextBlockAppearanceRequestFromJSON(json: any): TextBlockAppearanceRequest { + return TextBlockAppearanceRequestFromJSONTyped(json, false); +} + +export function TextBlockAppearanceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextBlockAppearanceRequest { + if (json == null) { + return json; + } + return { + + 'background_color': json['background_color'] == null ? undefined : json['background_color'], + 'text_color': json['text_color'] == null ? undefined : json['text_color'], + 'alignment': json['alignment'] == null ? undefined : TextBlockAppearanceRequestAlignmentEnumFromJSON(json['alignment']), + 'font_size': json['font_size'] == null ? undefined : TextBlockAppearanceRequestFontSizeEnumFromJSON(json['font_size']), + 'text_block_style': json['text_block_style'] == null ? undefined : TextBlockStyleFromJSON(json['text_block_style']), + }; +} + +export function TextBlockAppearanceRequestToJSON(json: any): TextBlockAppearanceRequest { + return TextBlockAppearanceRequestToJSONTyped(json, false); +} + +export function TextBlockAppearanceRequestToJSONTyped(value?: TextBlockAppearanceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'background_color': value['background_color'], + 'text_color': value['text_color'], + 'alignment': TextBlockAppearanceRequestAlignmentEnumToJSON(value['alignment']), + 'font_size': TextBlockAppearanceRequestFontSizeEnumToJSON(value['font_size']), + 'text_block_style': TextBlockStyleToJSON(value['text_block_style']), + }; +} + diff --git a/src/models/TextBlockAppearanceRequestAlignmentEnum.ts b/src/models/TextBlockAppearanceRequestAlignmentEnum.ts new file mode 100644 index 0000000..4256050 --- /dev/null +++ b/src/models/TextBlockAppearanceRequestAlignmentEnum.ts @@ -0,0 +1,54 @@ +/* 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. + */ + +/** + * + * @export + * @enum {string} + */ +export enum TextBlockAppearanceRequestAlignmentEnum { + left = 'left', + center = 'center', + right = 'right', + justified = 'justified' +} + + +export function instanceOfTextBlockAppearanceRequestAlignmentEnum(value: any): boolean { + for (const key in TextBlockAppearanceRequestAlignmentEnum) { + if (Object.prototype.hasOwnProperty.call(TextBlockAppearanceRequestAlignmentEnum, key)) { + if (TextBlockAppearanceRequestAlignmentEnum[key as keyof typeof TextBlockAppearanceRequestAlignmentEnum] === value) { + return true; + } + } + } + return false; +} + +export function TextBlockAppearanceRequestAlignmentEnumFromJSON(json: any): TextBlockAppearanceRequestAlignmentEnum { + return TextBlockAppearanceRequestAlignmentEnumFromJSONTyped(json, false); +} + +export function TextBlockAppearanceRequestAlignmentEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextBlockAppearanceRequestAlignmentEnum { + return json as TextBlockAppearanceRequestAlignmentEnum; +} + +export function TextBlockAppearanceRequestAlignmentEnumToJSON(value?: TextBlockAppearanceRequestAlignmentEnum | null): any { + return value as any; +} + +export function TextBlockAppearanceRequestAlignmentEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TextBlockAppearanceRequestAlignmentEnum { + return value as TextBlockAppearanceRequestAlignmentEnum; +} + diff --git a/src/models/TextBlockAppearanceRequestFontSizeEnum.ts b/src/models/TextBlockAppearanceRequestFontSizeEnum.ts new file mode 100644 index 0000000..f7e3b8e --- /dev/null +++ b/src/models/TextBlockAppearanceRequestFontSizeEnum.ts @@ -0,0 +1,54 @@ +/* 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. + */ + +/** + * + * @export + * @enum {string} + */ +export enum TextBlockAppearanceRequestFontSizeEnum { + small = 'small', + medium = 'medium', + large = 'large', + extra_large = 'extra_large' +} + + +export function instanceOfTextBlockAppearanceRequestFontSizeEnum(value: any): boolean { + for (const key in TextBlockAppearanceRequestFontSizeEnum) { + if (Object.prototype.hasOwnProperty.call(TextBlockAppearanceRequestFontSizeEnum, key)) { + if (TextBlockAppearanceRequestFontSizeEnum[key as keyof typeof TextBlockAppearanceRequestFontSizeEnum] === value) { + return true; + } + } + } + return false; +} + +export function TextBlockAppearanceRequestFontSizeEnumFromJSON(json: any): TextBlockAppearanceRequestFontSizeEnum { + return TextBlockAppearanceRequestFontSizeEnumFromJSONTyped(json, false); +} + +export function TextBlockAppearanceRequestFontSizeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextBlockAppearanceRequestFontSizeEnum { + return json as TextBlockAppearanceRequestFontSizeEnum; +} + +export function TextBlockAppearanceRequestFontSizeEnumToJSON(value?: TextBlockAppearanceRequestFontSizeEnum | null): any { + return value as any; +} + +export function TextBlockAppearanceRequestFontSizeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TextBlockAppearanceRequestFontSizeEnum { + return value as TextBlockAppearanceRequestFontSizeEnum; +} + diff --git a/src/models/TextBlockContent.ts b/src/models/TextBlockContent.ts new file mode 100644 index 0000000..2cd4ff3 --- /dev/null +++ b/src/models/TextBlockContent.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'; +/** + * + * @export + * @interface TextBlockContent + */ +export interface TextBlockContent { + /** + * + * @type {string} + * @memberof TextBlockContent + */ + text?: string; +} + +/** + * Check if a given object implements the TextBlockContent interface. + */ +export function instanceOfTextBlockContent(value: object): value is TextBlockContent { + return true; +} + +export function TextBlockContentFromJSON(json: any): TextBlockContent { + return TextBlockContentFromJSONTyped(json, false); +} + +export function TextBlockContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextBlockContent { + if (json == null) { + return json; + } + return { + + 'text': json['text'] == null ? undefined : json['text'], + }; +} + +export function TextBlockContentToJSON(json: any): TextBlockContent { + return TextBlockContentToJSONTyped(json, false); +} + +export function TextBlockContentToJSONTyped(value?: TextBlockContent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'text': value['text'], + }; +} + diff --git a/src/models/TextBlockStyle.ts b/src/models/TextBlockStyle.ts new file mode 100644 index 0000000..b18babc --- /dev/null +++ b/src/models/TextBlockStyle.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 TextBlockStyle + */ +export interface TextBlockStyle { + /** + * + * @type {boolean} + * @memberof TextBlockStyle + */ + bold?: boolean; + /** + * + * @type {boolean} + * @memberof TextBlockStyle + */ + italic?: boolean; + /** + * + * @type {boolean} + * @memberof TextBlockStyle + */ + underline?: boolean; +} + +/** + * Check if a given object implements the TextBlockStyle interface. + */ +export function instanceOfTextBlockStyle(value: object): value is TextBlockStyle { + return true; +} + +export function TextBlockStyleFromJSON(json: any): TextBlockStyle { + return TextBlockStyleFromJSONTyped(json, false); +} + +export function TextBlockStyleFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextBlockStyle { + if (json == null) { + return json; + } + return { + + 'bold': json['bold'] == null ? undefined : json['bold'], + 'italic': json['italic'] == null ? undefined : json['italic'], + 'underline': json['underline'] == null ? undefined : json['underline'], + }; +} + +export function TextBlockStyleToJSON(json: any): TextBlockStyle { + return TextBlockStyleToJSONTyped(json, false); +} + +export function TextBlockStyleToJSONTyped(value?: TextBlockStyle | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'bold': value['bold'], + 'italic': value['italic'], + 'underline': value['underline'], + }; +} + diff --git a/src/models/UpdateSite.ts b/src/models/UpdateSite.ts new file mode 100644 index 0000000..a2f3482 --- /dev/null +++ b/src/models/UpdateSite.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'; +/** + * + * @export + * @interface UpdateSite + */ +export interface UpdateSite { + /** + * The domain and keyword the site is served from. Changing it creates a redirect from the previous URI. + * @type {string} + * @memberof UpdateSite + */ + uri?: string; + /** + * The name displayed on the site. An empty value clears the current one. + * @type {string} + * @memberof UpdateSite + */ + display_name?: string; + /** + * The description displayed on the site. An empty value clears the current one. + * @type {string} + * @memberof UpdateSite + */ + description?: string; + /** + * The ID of the QR code to attach to the site. Only allowed when the site does not already have a QR code attached. + * @type {string} + * @memberof UpdateSite + */ + qr_code_id?: string; +} + +/** + * Check if a given object implements the UpdateSite interface. + */ +export function instanceOfUpdateSite(value: object): value is UpdateSite { + return true; +} + +export function UpdateSiteFromJSON(json: any): UpdateSite { + return UpdateSiteFromJSONTyped(json, false); +} + +export function UpdateSiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSite { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'description': json['description'] == null ? undefined : json['description'], + 'qr_code_id': json['qr_code_id'] == null ? undefined : json['qr_code_id'], + }; +} + +export function UpdateSiteToJSON(json: any): UpdateSite { + return UpdateSiteToJSONTyped(json, false); +} + +export function UpdateSiteToJSONTyped(value?: UpdateSite | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'display_name': value['display_name'], + 'description': value['description'], + 'qr_code_id': value['qr_code_id'], + }; +} + diff --git a/src/models/ViewMetric.ts b/src/models/ViewMetric.ts new file mode 100644 index 0000000..99da9b1 --- /dev/null +++ b/src/models/ViewMetric.ts @@ -0,0 +1,73 @@ +/* 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 ViewMetric + */ +export interface ViewMetric { + /** + * + * @type {number} + * @memberof ViewMetric + */ + views?: number; + /** + * + * @type {string} + * @memberof ViewMetric + */ + value?: string; +} + +/** + * Check if a given object implements the ViewMetric interface. + */ +export function instanceOfViewMetric(value: object): value is ViewMetric { + return true; +} + +export function ViewMetricFromJSON(json: any): ViewMetric { + return ViewMetricFromJSONTyped(json, false); +} + +export function ViewMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): ViewMetric { + if (json == null) { + return json; + } + return { + + 'views': json['views'] == null ? undefined : json['views'], + 'value': json['value'] == null ? undefined : json['value'], + }; +} + +export function ViewMetricToJSON(json: any): ViewMetric { + return ViewMetricToJSONTyped(json, false); +} + +export function ViewMetricToJSONTyped(value?: ViewMetric | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'views': value['views'], + 'value': value['value'], + }; +} + diff --git a/src/models/YoutubeVideoRequest.ts b/src/models/YoutubeVideoRequest.ts new file mode 100644 index 0000000..3c1a518 --- /dev/null +++ b/src/models/YoutubeVideoRequest.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'; +/** + * + * @export + * @interface YoutubeVideoRequest + */ +export interface YoutubeVideoRequest { + /** + * + * @type {string} + * @memberof YoutubeVideoRequest + */ + video_url?: string; + /** + * + * @type {string} + * @memberof YoutubeVideoRequest + */ + thumbnail_url?: string; + /** + * + * @type {string} + * @memberof YoutubeVideoRequest + */ + link_title?: string; + /** + * + * @type {string} + * @memberof YoutubeVideoRequest + */ + domain?: string; +} + +/** + * Check if a given object implements the YoutubeVideoRequest interface. + */ +export function instanceOfYoutubeVideoRequest(value: object): value is YoutubeVideoRequest { + return true; +} + +export function YoutubeVideoRequestFromJSON(json: any): YoutubeVideoRequest { + return YoutubeVideoRequestFromJSONTyped(json, false); +} + +export function YoutubeVideoRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): YoutubeVideoRequest { + if (json == null) { + return json; + } + return { + + 'video_url': json['video_url'] == null ? undefined : json['video_url'], + 'thumbnail_url': json['thumbnail_url'] == null ? undefined : json['thumbnail_url'], + 'link_title': json['link_title'] == null ? undefined : json['link_title'], + 'domain': json['domain'] == null ? undefined : json['domain'], + }; +} + +export function YoutubeVideoRequestToJSON(json: any): YoutubeVideoRequest { + return YoutubeVideoRequestToJSONTyped(json, false); +} + +export function YoutubeVideoRequestToJSONTyped(value?: YoutubeVideoRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'video_url': value['video_url'], + 'thumbnail_url': value['thumbnail_url'], + 'link_title': value['link_title'], + 'domain': value['domain'], + }; +} + diff --git a/src/models/index.ts b/src/models/index.ts index e780d36..79e34b6 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,6 +1,10 @@ /* tslint:disable */ /* eslint-disable */ export * from './AddCustomBitlink'; +export * from './AggregateClicksForBitlinks'; +export * from './AggregateClicksForBitlinksByCitiesFacet'; +export * from './AggregateClicksForBitlinksByFacet'; +export * from './ApplyTemplateRequest'; export * from './BSDsResponse'; export * from './BadGateway'; export * from './BadRequest'; @@ -9,12 +13,21 @@ export * from './BaseChannelBitlink'; export * from './BaseMetrics'; export * from './BaseScanMetrics'; export * from './BitlinkBody'; +export * from './BitlinkContent'; export * from './BitlinkScans'; export * from './BitlinkScansSummary'; export * from './BitlinkUpdate'; export * from './BitlinkUpdateBody'; export * from './Bitlinks'; export * from './BitlinksPagination'; +export * from './BitlySite'; +export * from './BitlySiteAppearance'; +export * from './BitlySiteContent'; +export * from './BitlySiteHeaderAppearance'; +export * from './BitlySites'; +export * from './BlockContentDigitalBusinessCard'; +export * from './BlockContentSocial'; +export * from './BlockContentYoutube'; export * from './BulkUpdate'; export * from './BulkUpdateRequest'; export * from './Campaign'; @@ -31,9 +44,13 @@ export * from './ClickLink'; export * from './ClickMetric'; export * from './ClickMetrics'; export * from './Clicks'; +export * from './ClicksByCitiesFacet'; +export * from './ClicksByFacet'; +export * from './ClicksForAggregate'; export * from './ClicksSummary'; export * from './Conflict'; export * from './CountItem'; +export * from './CreateLaunchpad'; export * from './CustomBitlink'; export * from './CustomBitlinkHistory'; export * from './Deeplink'; @@ -42,6 +59,13 @@ export * from './DeletedLink'; export * from './DeletedQRCode'; export * from './DeviceMetric'; export * from './DeviceMetrics'; +export * from './DigitalBusinessCardContact'; +export * from './DigitalBusinessCardContent'; +export * from './DigitalBusinessCardContentFile'; +export * from './DigitalBusinessCardLayout'; +export * from './DynamicRoutingDeviceEnum'; +export * from './DynamicRoutingPlatformEnum'; +export * from './DynamicRoutingRule'; export * from './Email'; export * from './Engagement'; export * from './EngagementSubtotal'; @@ -54,12 +78,14 @@ export * from './Forbidden'; export * from './FullShorten'; export * from './GS1Metadata'; export * from './GS1Value'; +export * from './GetAggregateSitesOverview200Response'; export * from './GetGroupLinkClicksByDevice200Response'; export * from './GetGroupLinkClicksByDevice200ResponseMetricsInner'; export * from './GetGroupTopCodeScans200Response'; export * from './Gone'; export * from './GradientColor'; export * from './Group'; +export * from './GroupBitlinksCountRollup'; export * from './GroupClicks'; export * from './GroupConsumableFeatureUsage'; export * from './GroupExportFilter'; @@ -73,13 +99,18 @@ export * from './Groups'; export * from './HasReferences'; export * from './HistoricalFeatureUsage'; export * from './HistoricalUsage'; +export * from './ImageCommon'; +export * from './ImageContent'; +export * from './ImageUploadResponse'; export * from './InstallPreference'; export * from './InternalError'; +export * from './LaunchpadButtonTypeEnum'; export * from './LinkClicks'; export * from './LinkDeletionResponse'; export * from './MethodLimit'; export * from './Metric'; export * from './Metrics'; +export * from './MicrositePagination'; export * from './MobileOS'; export * from './ModelError'; export * from './MonthlyLimitExceeded'; @@ -89,16 +120,21 @@ export * from './Organization'; export * from './Organizations'; export * from './OtherMetrics'; export * from './OtherScanMetrics'; +export * from './OtherViewMetrics'; +export * from './PageLinkInfo'; export * from './PlanLimit'; export * from './PlanLimits'; export * from './PlatformLimit'; export * from './PlatformLimits'; +export * from './PrevalidateYouTubeVideoRequest'; export * from './PublicCreateQRCodeRequest'; export * from './PublicCreateStaticQRCodeRequest'; export * from './PublicDeleteQRCodeResponse'; export * from './PublicQRCodeImageResponse'; export * from './PublicStaticQRCodeResponse'; export * from './PublicUpdateQRCodeRequest'; +export * from './QRCBulkUpdate'; +export * from './QRCBulkUpdateRequest'; export * from './QRCodeBranding'; export * from './QRCodeCorner'; export * from './QRCodeCorners'; @@ -120,6 +156,7 @@ export * from './QRCodeTypeEnum'; export * from './QRCodesMinimal'; export * from './QRPagination'; export * from './QRScans'; +export * from './RedirectQRCodeRequest'; export * from './ReferrersByDomain'; export * from './ReferrersByDomains'; export * from './ScanMetric'; @@ -127,10 +164,54 @@ export * from './ScanMetrics'; export * from './Shorten'; export * from './ShortenBitlinkBody'; export * from './SimplifiedError'; +export * from './SiteBannerType'; +export * from './SiteBlock'; +export * from './SiteBlockCommon'; +export * from './SiteBlockContainerRequest'; +export * from './SiteBlockContent'; +export * from './SiteBlockCreateRequest'; +export * from './SiteBlockCreateTypeEnum'; +export * from './SiteBlockRequest'; +export * from './SiteBlockTypeEnum'; +export * from './SiteButtonTypeEnum'; +export * from './SiteCityViewMetrics'; +export * from './SiteClicks'; +export * from './SiteCloneRequest'; +export * from './SiteContainerTypeEnum'; +export * from './SiteContentUnion'; +export * from './SiteImageAlignment'; +export * from './SiteImageUpload'; +export * from './SiteLinkPerformance'; +export * from './SiteProfileImageBorderSize'; +export * from './SiteProfileImageLocation'; +export * from './SiteProfileImageShape'; +export * from './SiteProfileImageSize'; +export * from './SiteProfileImageType'; +export * from './SiteRedirects'; +export * from './SiteStylePreference'; +export * from './SiteTextAlignmentEnum'; +export * from './SiteTextBorderTypeEnum'; +export * from './SiteTextLocation'; +export * from './SiteTextSizeEnum'; +export * from './SiteTextWeightEnum'; +export * from './SiteViewMetrics'; +export * from './SiteViewsSummary'; +export * from './SitesPagination'; +export * from './SocialContent'; +export * from './SortedButtons'; +export * from './SortedButtonsButtonsInner'; +export * from './SortedButtonsPageViewsInner'; export * from './SortedLinks'; export * from './Tags'; +export * from './Template'; export * from './TemporarilyUnavailable'; export * from './Text'; +export * from './TextBlockAppearance'; +export * from './TextBlockAppearanceRequest'; +export * from './TextBlockAppearanceRequestAlignmentEnum'; +export * from './TextBlockAppearanceRequestFontSizeEnum'; +export * from './TextBlockContent'; +export * from './TextBlockStyle'; export * from './TimeUnit'; export * from './TimeUnitDWM'; export * from './TopLinksAndQRCodes'; @@ -138,10 +219,13 @@ export * from './TotalEngagements'; export * from './TotalEngagementsSummary'; export * from './UnprocessableEntity'; export * from './UpdateCustomBitlink'; +export * from './UpdateSite'; export * from './UpgradeRequired'; export * from './User'; export * from './UserUpdate'; +export * from './ViewMetric'; export * from './Webhook'; export * from './WebhookCreate'; export * from './WebhookUpdate'; export * from './Webhooks'; +export * from './YoutubeVideoRequest';