diff --git a/.github/workflows/pull_requests.yaml b/.github/workflows/pull_requests.yaml index ec82568..8fe99aa 100644 --- a/.github/workflows/pull_requests.yaml +++ b/.github/workflows/pull_requests.yaml @@ -1,6 +1,10 @@ name: PR Build on: + workflow_dispatch: + push: + branches: + - main pull_request: jobs: diff --git a/src/apis/GroupsApi.ts b/src/apis/GroupsApi.ts index a531644..4720aee 100644 --- a/src/apis/GroupsApi.ts +++ b/src/apis/GroupsApi.ts @@ -20,6 +20,7 @@ import type { ClickMetrics, DeviceMetrics, Forbidden, + GetGroupLinkClicksByDevice200Response, Group, GroupClicks, GroupFeatureUsage, @@ -31,6 +32,7 @@ import type { Metrics, MonthlyLimitExceeded, NotFound, + SortedLinks, Tags, TemporarilyUnavailable, TimeUnit, @@ -49,6 +51,8 @@ import { DeviceMetricsToJSON, ForbiddenFromJSON, ForbiddenToJSON, + GetGroupLinkClicksByDevice200ResponseFromJSON, + GetGroupLinkClicksByDevice200ResponseToJSON, GroupFromJSON, GroupToJSON, GroupClicksFromJSON, @@ -71,6 +75,8 @@ import { MonthlyLimitExceededToJSON, NotFoundFromJSON, NotFoundToJSON, + SortedLinksFromJSON, + SortedLinksToJSON, TagsFromJSON, TagsToJSON, TemporarilyUnavailableFromJSON, @@ -96,6 +102,27 @@ export interface GetGroupClicksRequest { unit_reference?: string; } +export interface GetGroupCodeScansByCityRequest { + group_guid: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + +export interface GetGroupCodeScansByCountryRequest { + group_guid: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + +export interface GetGroupCodeScansOverTimeRequest { + group_guid: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + export interface GetGroupFeatureUsageRequest { group_guid: string; name?: Array; @@ -109,6 +136,45 @@ export interface GetGroupHistoricalUsageRequest { unit?: TimeUnitDWM; } +export interface GetGroupLinkClicksByCityRequest { + group_guid: string; + unit: TimeUnit; + units: number; + size?: number; + unit_reference?: string; +} + +export interface GetGroupLinkClicksByCountryRequest { + group_guid: string; + unit: TimeUnit; + units: number; + size?: number; + unit_reference?: string; +} + +export interface GetGroupLinkClicksByDeviceRequest { + group_guid: string; + unit: TimeUnit; + units: number; + size?: number; + unit_reference?: string; +} + +export interface GetGroupLinkClicksByReferrerRequest { + group_guid: string; + unit: TimeUnit; + units: number; + size?: number; + unit_reference?: string; +} + +export interface GetGroupLinkClicksOverTimeRequest { + group_guid: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + export interface GetGroupMetricsByCitiesRequest { group_guid: string; unit: TimeUnit; @@ -149,6 +215,13 @@ export interface GetGroupMetricsByReferringNetworksRequest { unit_reference?: string; } +export interface GetGroupMetricsOverTimeRequest { + group_guid: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + export interface GetGroupPreferencesRequest { group_guid: string; } @@ -164,6 +237,29 @@ export interface GetGroupTagsRequest { group_guid: string; } +export interface GetGroupTopCodeScansRequest { + group_guid: string; + unit: TimeUnit; + units: number; + unit_reference?: string; +} + +export interface GetGroupTopLinkClicksRequest { + group_guid: string; + unit: TimeUnit; + units: number; + size?: number; + unit_reference?: string; +} + +export interface GetGroupTopMetricsRequest { + group_guid: string; + unit: TimeUnit; + units: number; + size?: number; + unit_reference?: string; +} + export interface GetGroupsRequest { organization_guid?: string; } @@ -304,21 +400,43 @@ export class GroupsApi extends runtime.BaseAPI { } /** - * Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) - * Get limit usage for a group + * Get QR code scan metrics for a group broken down by city. + * Get Scan Metrics for a Group by City */ - async getGroupFeatureUsageRaw(requestParameters: GetGroupFeatureUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupCodeScansByCityRaw(requestParameters: GetGroupCodeScansByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', - 'Required parameter "group_guid" was null or undefined when calling getGroupFeatureUsage().' + 'Required parameter "group_guid" was null or undefined when calling getGroupCodeScansByCity().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupCodeScansByCity().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupCodeScansByCity().' ); } const queryParameters: any = {}; - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; } const headerParameters: runtime.HTTPHeaders = {}; @@ -332,7 +450,7 @@ export class GroupsApi extends runtime.BaseAPI { } } - let urlPath = `/groups/{group_guid}/feature_usage`; + let urlPath = `/groups/{group_guid}/codes/scans/cities`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); const response = await this.request({ @@ -342,48 +460,131 @@ export class GroupsApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GroupFeatureUsageFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => CityMetricsFromJSON(jsonValue)); } /** - * Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) - * Get limit usage for a group + * Get QR code scan metrics for a group broken down by city. + * Get Scan Metrics for a Group by City */ - async getGroupFeatureUsage(requestParameters: GetGroupFeatureUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getGroupFeatureUsageRaw(requestParameters, initOverrides); + async getGroupCodeScansByCity(requestParameters: GetGroupCodeScansByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupCodeScansByCityRaw(requestParameters, initOverrides); return await response.value(); } /** - * Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. - * Get historical usage for a group + * Get QR code scan metrics for a group broken down by country. + * Get Scan Metrics for a Group by Country */ - async getGroupHistoricalUsageRaw(requestParameters: GetGroupHistoricalUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupCodeScansByCountryRaw(requestParameters: GetGroupCodeScansByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['group_guid'] == null) { throw new runtime.RequiredError( 'group_guid', - 'Required parameter "group_guid" was null or undefined when calling getGroupHistoricalUsage().' + 'Required parameter "group_guid" was null or undefined when calling getGroupCodeScansByCountry().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupCodeScansByCountry().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupCodeScansByCountry().' ); } const queryParameters: any = {}; - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; } - if (requestParameters['start_date'] != null) { - queryParameters['start_date'] = requestParameters['start_date']; + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; } - if (requestParameters['end_date'] != null) { - queryParameters['end_date'] = requestParameters['end_date']; + 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 = `/groups/{group_guid}/codes/scans/countries`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); + } + + /** + * Get QR code scan metrics for a group broken down by country. + * Get Scan Metrics for a Group by Country + */ + async getGroupCodeScansByCountry(requestParameters: GetGroupCodeScansByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupCodeScansByCountryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get QR code scan metrics over time for a group. + * Get Scan Metrics for a Group Over Time + */ + async getGroupCodeScansOverTimeRaw(requestParameters: GetGroupCodeScansOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupCodeScansOverTime().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupCodeScansOverTime().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupCodeScansOverTime().' + ); } + const queryParameters: any = {}; + if (requestParameters['unit'] != null) { queryParameters['unit'] = requestParameters['unit']; } + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.accessToken) { @@ -395,7 +596,7 @@ export class GroupsApi extends runtime.BaseAPI { } } - let urlPath = `/groups/{group_guid}/historical_usage`; + let urlPath = `/groups/{group_guid}/codes/scans/over_time`; urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); const response = await this.request({ @@ -405,15 +606,510 @@ export class GroupsApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GroupHistoricalUsageFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); } /** - * Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. - * Get historical usage for a group + * Get QR code scan metrics over time for a group. + * Get Scan Metrics for a Group Over Time + */ + async getGroupCodeScansOverTime(requestParameters: GetGroupCodeScansOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupCodeScansOverTimeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) + * Get limit usage for a group + */ + async getGroupFeatureUsageRaw(requestParameters: GetGroupFeatureUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupFeatureUsage().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + 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}/feature_usage`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFeatureUsageFromJSON(jsonValue)); + } + + /** + * Get a group\'s current feature limit usage, optionally provide limit name(s) for usage on specific limit(s) + * Get limit usage for a group + */ + async getGroupFeatureUsage(requestParameters: GetGroupFeatureUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupFeatureUsageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. + * Get historical usage for a group + */ + async getGroupHistoricalUsageRaw(requestParameters: GetGroupHistoricalUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupHistoricalUsage().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['start_date'] != null) { + queryParameters['start_date'] = requestParameters['start_date']; + } + + if (requestParameters['end_date'] != null) { + queryParameters['end_date'] = requestParameters['end_date']; + } + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + 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}/historical_usage`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupHistoricalUsageFromJSON(jsonValue)); + } + + /** + * Get a group\'s historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names. + * Get historical usage for a group + */ + async getGroupHistoricalUsage(requestParameters: GetGroupHistoricalUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupHistoricalUsageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get link clicks by city for all links in a group. + * Get Group Link Clicks by City + */ + async getGroupLinkClicksByCityRaw(requestParameters: GetGroupLinkClicksByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupLinkClicksByCity().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupLinkClicksByCity().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupLinkClicksByCity().' + ); + } + + 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 = `/groups/{group_guid}/links/clicks/cities`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CityMetricsFromJSON(jsonValue)); + } + + /** + * Get link clicks by city for all links in a group. + * Get Group Link Clicks by City + */ + async getGroupLinkClicksByCity(requestParameters: GetGroupLinkClicksByCityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupLinkClicksByCityRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get link clicks by country for all links in a group. + * Get Group Link Clicks by Country + */ + async getGroupLinkClicksByCountryRaw(requestParameters: GetGroupLinkClicksByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupLinkClicksByCountry().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupLinkClicksByCountry().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupLinkClicksByCountry().' + ); + } + + 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 = `/groups/{group_guid}/links/clicks/countries`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); + } + + /** + * Get link clicks by country for all links in a group. + * Get Group Link Clicks by Country + */ + async getGroupLinkClicksByCountry(requestParameters: GetGroupLinkClicksByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupLinkClicksByCountryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get link clicks by device for all links in a group. + * Get Group Link Clicks by Device + */ + async getGroupLinkClicksByDeviceRaw(requestParameters: GetGroupLinkClicksByDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupLinkClicksByDevice().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupLinkClicksByDevice().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupLinkClicksByDevice().' + ); + } + + 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 = `/groups/{group_guid}/links/clicks/devices`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetGroupLinkClicksByDevice200ResponseFromJSON(jsonValue)); + } + + /** + * Get link clicks by device for all links in a group. + * Get Group Link Clicks by Device + */ + async getGroupLinkClicksByDevice(requestParameters: GetGroupLinkClicksByDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupLinkClicksByDeviceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get link clicks by referrer for all links in a group. + * Get Group Link Clicks by Referrer + */ + async getGroupLinkClicksByReferrerRaw(requestParameters: GetGroupLinkClicksByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupLinkClicksByReferrer().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupLinkClicksByReferrer().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupLinkClicksByReferrer().' + ); + } + + 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 = `/groups/{group_guid}/links/clicks/referrers`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClickMetricsFromJSON(jsonValue)); + } + + /** + * Get link clicks by referrer for all links in a group. + * Get Group Link Clicks by Referrer + */ + async getGroupLinkClicksByReferrer(requestParameters: GetGroupLinkClicksByReferrerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupLinkClicksByReferrerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get link clicks over time for all links in a group. + * Get Group Link Clicks Over Time + */ + async getGroupLinkClicksOverTimeRaw(requestParameters: GetGroupLinkClicksOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupLinkClicksOverTime().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupLinkClicksOverTime().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupLinkClicksOverTime().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/groups/{group_guid}/links/clicks/over_time`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); + } + + /** + * Get link clicks over time for all links in a group. + * Get Group Link Clicks Over Time */ - async getGroupHistoricalUsage(requestParameters: GetGroupHistoricalUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getGroupHistoricalUsageRaw(requestParameters, initOverrides); + async getGroupLinkClicksOverTime(requestParameters: GetGroupLinkClicksOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupLinkClicksOverTimeRaw(requestParameters, initOverrides); return await response.value(); } @@ -802,6 +1498,79 @@ export class GroupsApi extends runtime.BaseAPI { return await response.value(); } + /** + * Get group engagement metrics over time for all links in a group. + * Get Group Metrics Over Time + */ + async getGroupMetricsOverTimeRaw(requestParameters: GetGroupMetricsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupMetricsOverTime().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupMetricsOverTime().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupMetricsOverTime().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/groups/{group_guid}/engagements/over_time`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupClicksFromJSON(jsonValue)); + } + + /** + * Get group engagement metrics over time for all links in a group. + * Get Group Metrics Over Time + */ + async getGroupMetricsOverTime(requestParameters: GetGroupMetricsOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupMetricsOverTimeRaw(requestParameters, initOverrides); + return await response.value(); + } + /** * Returns preferences for the specified group. * Retrieve Group Preferences @@ -969,6 +1738,233 @@ export class GroupsApi extends runtime.BaseAPI { return await response.value(); } + /** + * Get top performing QR codes by scan count for all codes in a group. + * Get Top Performing QR Codes for a Group + */ + async getGroupTopCodeScansRaw(requestParameters: GetGroupTopCodeScansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupTopCodeScans().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupTopCodeScans().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupTopCodeScans().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['unit'] != null) { + queryParameters['unit'] = requestParameters['unit']; + } + + if (requestParameters['units'] != null) { + queryParameters['units'] = requestParameters['units']; + } + + if (requestParameters['unit_reference'] != null) { + queryParameters['unit_reference'] = requestParameters['unit_reference']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/groups/{group_guid}/codes/scans/top`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); + } + + /** + * Get top performing QR codes by scan count for all codes in a group. + * Get Top Performing QR Codes for a Group + */ + async getGroupTopCodeScans(requestParameters: GetGroupTopCodeScansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupTopCodeScansRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get top performing links by click for all links in a group. + * Get Group Top Performing Links by Click + */ + async getGroupTopLinkClicksRaw(requestParameters: GetGroupTopLinkClicksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupTopLinkClicks().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupTopLinkClicks().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupTopLinkClicks().' + ); + } + + 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 = `/groups/{group_guid}/links/clicks/top`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); + } + + /** + * Get top performing links by click for all links in a group. + * Get Group Top Performing Links by Click + */ + async getGroupTopLinkClicks(requestParameters: GetGroupTopLinkClicksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupTopLinkClicksRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get top performing links by engagement for all links in a group. + * Get Group Top Performing Links by Engagement + */ + async getGroupTopMetricsRaw(requestParameters: GetGroupTopMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['group_guid'] == null) { + throw new runtime.RequiredError( + 'group_guid', + 'Required parameter "group_guid" was null or undefined when calling getGroupTopMetrics().' + ); + } + + if (requestParameters['unit'] == null) { + throw new runtime.RequiredError( + 'unit', + 'Required parameter "unit" was null or undefined when calling getGroupTopMetrics().' + ); + } + + if (requestParameters['units'] == null) { + throw new runtime.RequiredError( + 'units', + 'Required parameter "units" was null or undefined when calling getGroupTopMetrics().' + ); + } + + 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 = `/groups/{group_guid}/engagements/top`; + urlPath = urlPath.replace(`{${"group_guid"}}`, encodeURIComponent(String(requestParameters['group_guid']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SortedLinksFromJSON(jsonValue)); + } + + /** + * Get top performing links by engagement for all links in a group. + * Get Group Top Performing Links by Engagement + */ + async getGroupTopMetrics(requestParameters: GetGroupTopMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupTopMetricsRaw(requestParameters, initOverrides); + return await response.value(); + } + /** * Returns a list of groups in the organization. * Retrieve Groups diff --git a/src/models/BitlinkBody.ts b/src/models/BitlinkBody.ts index 2b1c86c..8a976e6 100644 --- a/src/models/BitlinkBody.ts +++ b/src/models/BitlinkBody.ts @@ -123,6 +123,12 @@ export interface BitlinkBody { * @memberof BitlinkBody */ campaign_ids?: Array; + /** + * Coming soon + * @type {string} + * @memberof BitlinkBody + */ + expiration_at?: string; } /** @@ -158,6 +164,7 @@ export function BitlinkBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean 'deeplinks': json['deeplinks'] == null ? undefined : ((json['deeplinks'] as Array).map(DeeplinkRuleFromJSON)), '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'], }; } @@ -188,6 +195,7 @@ export function BitlinkBodyToJSONTyped(value?: BitlinkBody | null, ignoreDiscrim 'deeplinks': value['deeplinks'] == null ? undefined : ((value['deeplinks'] as Array).map(DeeplinkRuleToJSON)), 'is_deleted': value['is_deleted'], 'campaign_ids': value['campaign_ids'], + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/BitlinkUpdate.ts b/src/models/BitlinkUpdate.ts index 6ba7aa4..967f583 100644 --- a/src/models/BitlinkUpdate.ts +++ b/src/models/BitlinkUpdate.ts @@ -117,6 +117,12 @@ export interface BitlinkUpdate { * @memberof BitlinkUpdate */ campaign_ids?: Array; + /** + * Coming soon + * @type {string} + * @memberof BitlinkUpdate + */ + expiration_at?: string; } /** @@ -151,6 +157,7 @@ export function BitlinkUpdateFromJSONTyped(json: any, ignoreDiscriminator: boole 'deeplinks': json['deeplinks'] == null ? undefined : ((json['deeplinks'] as Array).map(DeeplinkRuleFromJSON)), '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'], }; } @@ -180,6 +187,7 @@ export function BitlinkUpdateToJSONTyped(value?: BitlinkUpdate | null, ignoreDis 'deeplinks': value['deeplinks'] == null ? undefined : ((value['deeplinks'] as Array).map(DeeplinkRuleToJSON)), 'is_deleted': value['is_deleted'], 'campaign_ids': value['campaign_ids'], + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/BitlinkUpdateBody.ts b/src/models/BitlinkUpdateBody.ts index e19bf5e..69f3f91 100644 --- a/src/models/BitlinkUpdateBody.ts +++ b/src/models/BitlinkUpdateBody.ts @@ -57,6 +57,12 @@ export interface BitlinkUpdateBody { * @memberof BitlinkUpdateBody */ long_url?: string; + /** + * Coming soon + * @type {string} + * @memberof BitlinkUpdateBody + */ + expiration_at?: string; } /** @@ -81,6 +87,7 @@ export function BitlinkUpdateBodyFromJSONTyped(json: any, ignoreDiscriminator: b 'tags': json['tags'] == null ? undefined : json['tags'], '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'], }; } @@ -100,6 +107,7 @@ export function BitlinkUpdateBodyToJSONTyped(value?: BitlinkUpdateBody | null, i 'tags': value['tags'], 'deeplinks': value['deeplinks'] == null ? undefined : ((value['deeplinks'] as Array).map(DeeplinkRuleToJSON)), 'long_url': value['long_url'], + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/FullShorten.ts b/src/models/FullShorten.ts index 1751e45..1ee713c 100644 --- a/src/models/FullShorten.ts +++ b/src/models/FullShorten.ts @@ -70,17 +70,23 @@ export interface FullShorten { */ force_new_link?: boolean; /** - * Custom keyword for creating keyword overrides. If provided, creates an override at domain/keyword. Cannot use bit.ly domain. + * Custom keyword for creating keyword overrides. If provided, creates an override at domain/keyword * @type {string} * @memberof FullShorten */ keyword?: string; /** - * Existing bitlink ID to add a keyword override to. Format: domain/hash. Cannot be used with long_url. Cannot use bit.ly domain. + * Existing bitlink ID to add a keyword override to. Format: domain/hash. Cannot be used with long_url * @type {string} * @memberof FullShorten */ bitlink_id?: string; + /** + * Coming soon + * @type {string} + * @memberof FullShorten + */ + expiration_at?: string; } /** @@ -109,6 +115,7 @@ export function FullShortenFromJSONTyped(json: any, ignoreDiscriminator: boolean 'force_new_link': json['force_new_link'] == null ? undefined : json['force_new_link'], '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'], }; } @@ -132,6 +139,7 @@ export function FullShortenToJSONTyped(value?: FullShorten | null, ignoreDiscrim 'force_new_link': value['force_new_link'], 'keyword': value['keyword'], 'bitlink_id': value['bitlink_id'], + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/GetGroupLinkClicksByDevice200Response.ts b/src/models/GetGroupLinkClicksByDevice200Response.ts new file mode 100644 index 0000000..3243ab3 --- /dev/null +++ b/src/models/GetGroupLinkClicksByDevice200Response.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 { GetGroupLinkClicksByDevice200ResponseMetricsInner } from './GetGroupLinkClicksByDevice200ResponseMetricsInner'; +import { + GetGroupLinkClicksByDevice200ResponseMetricsInnerFromJSON, + GetGroupLinkClicksByDevice200ResponseMetricsInnerFromJSONTyped, + GetGroupLinkClicksByDevice200ResponseMetricsInnerToJSON, + GetGroupLinkClicksByDevice200ResponseMetricsInnerToJSONTyped, +} from './GetGroupLinkClicksByDevice200ResponseMetricsInner'; + +/** + * + * @export + * @interface GetGroupLinkClicksByDevice200Response + */ +export interface GetGroupLinkClicksByDevice200Response { + /** + * + * @type {string} + * @memberof GetGroupLinkClicksByDevice200Response + */ + unit?: string; + /** + * + * @type {number} + * @memberof GetGroupLinkClicksByDevice200Response + */ + units?: number; + /** + * + * @type {string} + * @memberof GetGroupLinkClicksByDevice200Response + */ + facet?: GetGroupLinkClicksByDevice200ResponseFacetEnum; + /** + * + * @type {string} + * @memberof GetGroupLinkClicksByDevice200Response + */ + unit_reference?: string; + /** + * + * @type {Array} + * @memberof GetGroupLinkClicksByDevice200Response + */ + metrics?: Array; +} + +/** +* @export +* @enum {string} +*/ +export enum GetGroupLinkClicksByDevice200ResponseFacetEnum { + 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' +} + + +/** + * Check if a given object implements the GetGroupLinkClicksByDevice200Response interface. + */ +export function instanceOfGetGroupLinkClicksByDevice200Response(value: object): value is GetGroupLinkClicksByDevice200Response { + return true; +} + +export function GetGroupLinkClicksByDevice200ResponseFromJSON(json: any): GetGroupLinkClicksByDevice200Response { + return GetGroupLinkClicksByDevice200ResponseFromJSONTyped(json, false); +} + +export function GetGroupLinkClicksByDevice200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetGroupLinkClicksByDevice200Response { + 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'], + 'metrics': json['metrics'] == null ? undefined : ((json['metrics'] as Array).map(GetGroupLinkClicksByDevice200ResponseMetricsInnerFromJSON)), + }; +} + +export function GetGroupLinkClicksByDevice200ResponseToJSON(json: any): GetGroupLinkClicksByDevice200Response { + return GetGroupLinkClicksByDevice200ResponseToJSONTyped(json, false); +} + +export function GetGroupLinkClicksByDevice200ResponseToJSONTyped(value?: GetGroupLinkClicksByDevice200Response | 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'], + 'metrics': value['metrics'] == null ? undefined : ((value['metrics'] as Array).map(GetGroupLinkClicksByDevice200ResponseMetricsInnerToJSON)), + }; +} + diff --git a/src/models/GetGroupLinkClicksByDevice200ResponseMetricsInner.ts b/src/models/GetGroupLinkClicksByDevice200ResponseMetricsInner.ts new file mode 100644 index 0000000..2f8f098 --- /dev/null +++ b/src/models/GetGroupLinkClicksByDevice200ResponseMetricsInner.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 GetGroupLinkClicksByDevice200ResponseMetricsInner + */ +export interface GetGroupLinkClicksByDevice200ResponseMetricsInner { + /** + * + * @type {number} + * @memberof GetGroupLinkClicksByDevice200ResponseMetricsInner + */ + clicks?: number; + /** + * + * @type {string} + * @memberof GetGroupLinkClicksByDevice200ResponseMetricsInner + */ + value?: string; +} + +/** + * Check if a given object implements the GetGroupLinkClicksByDevice200ResponseMetricsInner interface. + */ +export function instanceOfGetGroupLinkClicksByDevice200ResponseMetricsInner(value: object): value is GetGroupLinkClicksByDevice200ResponseMetricsInner { + return true; +} + +export function GetGroupLinkClicksByDevice200ResponseMetricsInnerFromJSON(json: any): GetGroupLinkClicksByDevice200ResponseMetricsInner { + return GetGroupLinkClicksByDevice200ResponseMetricsInnerFromJSONTyped(json, false); +} + +export function GetGroupLinkClicksByDevice200ResponseMetricsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetGroupLinkClicksByDevice200ResponseMetricsInner { + if (json == null) { + return json; + } + return { + + 'clicks': json['clicks'] == null ? undefined : json['clicks'], + 'value': json['value'] == null ? undefined : json['value'], + }; +} + +export function GetGroupLinkClicksByDevice200ResponseMetricsInnerToJSON(json: any): GetGroupLinkClicksByDevice200ResponseMetricsInner { + return GetGroupLinkClicksByDevice200ResponseMetricsInnerToJSONTyped(json, false); +} + +export function GetGroupLinkClicksByDevice200ResponseMetricsInnerToJSONTyped(value?: GetGroupLinkClicksByDevice200ResponseMetricsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'clicks': value['clicks'], + 'value': value['value'], + }; +} + diff --git a/src/models/PublicCreateQRCodeRequest.ts b/src/models/PublicCreateQRCodeRequest.ts index 161a7e9..10d0961 100644 --- a/src/models/PublicCreateQRCodeRequest.ts +++ b/src/models/PublicCreateQRCodeRequest.ts @@ -77,6 +77,12 @@ export interface PublicCreateQRCodeRequest { * @memberof PublicCreateQRCodeRequest */ gs1?: GS1Metadata; + /** + * Coming soon + * @type {string} + * @memberof PublicCreateQRCodeRequest + */ + expiration_at?: string; } /** @@ -104,6 +110,7 @@ export function PublicCreateQRCodeRequestFromJSONTyped(json: any, ignoreDiscrimi 'archived': json['archived'] == null ? undefined : json['archived'], 'destination': QRCodeDestinationFromJSON(json['destination']), 'gs1': json['gs1'] == null ? undefined : GS1MetadataFromJSON(json['gs1']), + 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], }; } @@ -124,6 +131,7 @@ export function PublicCreateQRCodeRequestToJSONTyped(value?: PublicCreateQRCodeR 'archived': value['archived'], 'destination': QRCodeDestinationToJSON(value['destination']), 'gs1': GS1MetadataToJSON(value['gs1']), + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/PublicUpdateQRCodeRequest.ts b/src/models/PublicUpdateQRCodeRequest.ts index e7ee813..ae9580d 100644 --- a/src/models/PublicUpdateQRCodeRequest.ts +++ b/src/models/PublicUpdateQRCodeRequest.ts @@ -45,6 +45,12 @@ export interface PublicUpdateQRCodeRequest { * @memberof PublicUpdateQRCodeRequest */ archived?: boolean; + /** + * Coming soon + * @type {string} + * @memberof PublicUpdateQRCodeRequest + */ + expiration_at?: string; } /** @@ -67,6 +73,7 @@ export function PublicUpdateQRCodeRequestFromJSONTyped(json: any, ignoreDiscrimi 'title': json['title'] == null ? undefined : json['title'], 'render_customizations': json['render_customizations'] == null ? undefined : QRCodeCustomizationsPublicFromJSON(json['render_customizations']), 'archived': json['archived'] == null ? undefined : json['archived'], + 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], }; } @@ -84,6 +91,7 @@ export function PublicUpdateQRCodeRequestToJSONTyped(value?: PublicUpdateQRCodeR 'title': value['title'], 'render_customizations': QRCodeCustomizationsPublicToJSON(value['render_customizations']), 'archived': value['archived'], + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/QRCodeDetails.ts b/src/models/QRCodeDetails.ts index 008cd99..2520fc6 100644 --- a/src/models/QRCodeDetails.ts +++ b/src/models/QRCodeDetails.ts @@ -113,6 +113,12 @@ export interface QRCodeDetails { * @memberof QRCodeDetails */ modified?: string; + /** + * Coming soon + * @type {string} + * @memberof QRCodeDetails + */ + expiration_at?: string; } @@ -146,6 +152,7 @@ export function QRCodeDetailsFromJSONTyped(json: any, ignoreDiscriminator: boole 'archived': json['archived'] == null ? undefined : json['archived'], 'created': json['created'] == null ? undefined : json['created'], 'modified': json['modified'] == null ? undefined : json['modified'], + 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], }; } @@ -172,6 +179,7 @@ export function QRCodeDetailsToJSONTyped(value?: QRCodeDetails | null, ignoreDis 'archived': value['archived'], 'created': value['created'], 'modified': value['modified'], + 'expiration_at': value['expiration_at'], }; } diff --git a/src/models/QRCodeMinimal.ts b/src/models/QRCodeMinimal.ts index 979f597..6bd8ea5 100644 --- a/src/models/QRCodeMinimal.ts +++ b/src/models/QRCodeMinimal.ts @@ -93,6 +93,12 @@ export interface QRCodeMinimal { * @memberof QRCodeMinimal */ archived?: boolean; + /** + * Coming soon + * @type {string} + * @memberof QRCodeMinimal + */ + expiration_at?: string; /** * * @type {string} @@ -137,6 +143,7 @@ export function QRCodeMinimalFromJSONTyped(json: any, ignoreDiscriminator: boole 'is_gs1': json['is_gs1'] == null ? undefined : json['is_gs1'], 'created_by': json['created_by'] == null ? undefined : json['created_by'], 'archived': json['archived'] == null ? undefined : json['archived'], + 'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'], 'created': json['created'] == null ? undefined : json['created'], 'modified': json['modified'] == null ? undefined : json['modified'], }; @@ -164,6 +171,7 @@ export function QRCodeMinimalToJSONTyped(value?: QRCodeMinimal | null, ignoreDis 'is_gs1': value['is_gs1'], 'created_by': value['created_by'], 'archived': value['archived'], + 'expiration_at': value['expiration_at'], 'created': value['created'], 'modified': value['modified'], }; diff --git a/src/models/index.ts b/src/models/index.ts index 9b68db7..0551390 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -51,6 +51,8 @@ export * from './Forbidden'; export * from './FullShorten'; export * from './GS1Metadata'; export * from './GS1Value'; +export * from './GetGroupLinkClicksByDevice200Response'; +export * from './GetGroupLinkClicksByDevice200ResponseMetricsInner'; export * from './Gone'; export * from './GradientColor'; export * from './Group';