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/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/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/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/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/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/PublicCreateQRCodeRequest.md b/src/docs/PublicCreateQRCodeRequest.md index f739c07..fdc2959 100644 --- a/src/docs/PublicCreateQRCodeRequest.md +++ b/src/docs/PublicCreateQRCodeRequest.md @@ -15,6 +15,7 @@ Name | Type `gs1` | [GS1Metadata](GS1Metadata.md) `expiration_at` | string `tags` | Array<string> +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -31,6 +32,7 @@ const example = { "gs1": null, "expiration_at": null, "tags": null, + "dynamic_routing": 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..896709f 100644 --- a/src/docs/QRCodeDetails.md +++ b/src/docs/QRCodeDetails.md @@ -20,6 +20,7 @@ Name | Type `modified` | string `expiration_at` | string `tags` | Array<string> +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) ## Example @@ -42,6 +43,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..bef64eb 100644 --- a/src/docs/QRCodeMinimal.md +++ b/src/docs/QRCodeMinimal.md @@ -19,6 +19,7 @@ Name | Type `tags` | Array<string> `archived` | boolean `expiration_at` | string +`dynamic_routing` | [Array<DynamicRoutingRule>](DynamicRoutingRule.md) `created` | string `modified` | string @@ -42,6 +43,7 @@ const example = { "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/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/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/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/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/PublicCreateQRCodeRequest.ts b/src/models/PublicCreateQRCodeRequest.ts index 08b3018..fb9189d 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,12 @@ 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; } /** @@ -118,6 +131,7 @@ 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)), }; } @@ -140,6 +154,7 @@ 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)), }; } 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..06d171f 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'; /** * @@ -125,6 +132,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; } @@ -160,6 +173,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)), }; } @@ -188,6 +202,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..7f0b4e5 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'; /** * @@ -105,6 +112,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} @@ -151,6 +164,7 @@ export function QRCodeMinimalFromJSONTyped(json: any, ignoreDiscriminator: boole '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'], }; @@ -180,6 +194,7 @@ export function QRCodeMinimalToJSONTyped(value?: QRCodeMinimal | null, ignoreDis '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/index.ts b/src/models/index.ts index e780d36..26b6743 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -42,6 +42,9 @@ export * from './DeletedLink'; export * from './DeletedQRCode'; export * from './DeviceMetric'; export * from './DeviceMetrics'; +export * from './DynamicRoutingDeviceEnum'; +export * from './DynamicRoutingPlatformEnum'; +export * from './DynamicRoutingRule'; export * from './Email'; export * from './Engagement'; export * from './EngagementSubtotal'; @@ -99,6 +102,8 @@ 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 +125,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';