@codeqr/ts-mcp 0.19.3 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth.d.mts.map +1 -1
- package/auth.d.ts.map +1 -1
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +45 -3
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +12 -3
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +6 -57
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +7 -58
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +4 -2
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +4 -2
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +21 -31
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +20 -31
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +24 -1
- package/http.js.map +1 -1
- package/http.mjs +24 -1
- package/http.mjs.map +1 -1
- package/index.mjs.map +1 -1
- package/instructions.d.mts +4 -1
- package/instructions.d.mts.map +1 -1
- package/instructions.d.ts +4 -1
- package/instructions.d.ts.map +1 -1
- package/instructions.js +21 -18
- package/instructions.js.map +1 -1
- package/instructions.mjs +18 -18
- package/instructions.mjs.map +1 -1
- package/local-docs-search.d.mts +28 -0
- package/local-docs-search.d.mts.map +1 -0
- package/local-docs-search.d.ts +28 -0
- package/local-docs-search.d.ts.map +1 -0
- package/local-docs-search.js +1259 -0
- package/local-docs-search.js.map +1 -0
- package/local-docs-search.mjs +1219 -0
- package/local-docs-search.mjs.map +1 -0
- package/logger.d.mts.map +1 -1
- package/logger.d.ts.map +1 -1
- package/logger.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +30 -30
- package/methods.js.map +1 -1
- package/methods.mjs +30 -30
- package/methods.mjs.map +1 -1
- package/options.d.mts +4 -1
- package/options.d.mts.map +1 -1
- package/options.d.ts +4 -1
- package/options.d.ts.map +1 -1
- package/options.js +22 -3
- package/options.js.map +1 -1
- package/options.mjs +22 -3
- package/options.mjs.map +1 -1
- package/package.json +13 -2
- package/server.d.mts +9 -1
- package/server.d.mts.map +1 -1
- package/server.d.ts +9 -1
- package/server.d.ts.map +1 -1
- package/server.js +13 -4
- package/server.js.map +1 -1
- package/server.mjs +13 -4
- package/server.mjs.map +1 -1
- package/src/code-tool-worker.ts +12 -3
- package/src/code-tool.ts +11 -92
- package/src/docs-search-tool.ts +26 -47
- package/src/http.ts +27 -1
- package/src/instructions.ts +24 -27
- package/src/local-docs-search.ts +1368 -0
- package/src/methods.ts +30 -30
- package/src/options.ts +28 -4
- package/src/server.ts +22 -4
- package/src/stdio.ts +4 -1
- package/src/types.ts +2 -0
- package/src/util.ts +2 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.js +4 -1
- package/stdio.js.map +1 -1
- package/stdio.mjs +4 -1
- package/stdio.mjs.map +1 -1
- package/types.d.mts +5 -0
- package/types.d.mts.map +1 -1
- package/types.d.ts +5 -0
- package/types.d.ts.map +1 -1
- package/types.js.map +1 -1
- package/types.mjs.map +1 -1
- package/util.js +2 -2
- package/util.js.map +1 -1
- package/util.mjs +2 -2
- package/util.mjs.map +1 -1
|
@@ -0,0 +1,1219 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import MiniSearch from 'minisearch';
|
|
3
|
+
import * as fs from 'node:fs/promises';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { getLogger } from "./logger.mjs";
|
|
6
|
+
const EMBEDDED_METHODS = [
|
|
7
|
+
{
|
|
8
|
+
name: 'create',
|
|
9
|
+
endpoint: '/links',
|
|
10
|
+
httpMethod: 'post',
|
|
11
|
+
summary: 'Create a new link',
|
|
12
|
+
description: 'Create a new link for the authenticated workspace.',
|
|
13
|
+
stainlessPath: '(resource) links > (method) create',
|
|
14
|
+
qualified: 'client.links.create',
|
|
15
|
+
params: [
|
|
16
|
+
'url: string;',
|
|
17
|
+
'android?: string;',
|
|
18
|
+
'archived?: boolean;',
|
|
19
|
+
'comments?: string;',
|
|
20
|
+
'description?: string;',
|
|
21
|
+
'doIndex?: boolean;',
|
|
22
|
+
'domain?: string;',
|
|
23
|
+
'expiredUrl?: string;',
|
|
24
|
+
'expiresAt?: string;',
|
|
25
|
+
'externalId?: string;',
|
|
26
|
+
'flexible?: boolean;',
|
|
27
|
+
'folderId?: string;',
|
|
28
|
+
'geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; };',
|
|
29
|
+
'image?: string;',
|
|
30
|
+
'ios?: string;',
|
|
31
|
+
'isFormMandatory?: boolean;',
|
|
32
|
+
'key?: string;',
|
|
33
|
+
'pageId?: string;',
|
|
34
|
+
'pageUrl?: string;',
|
|
35
|
+
'password?: string;',
|
|
36
|
+
'prefix?: string;',
|
|
37
|
+
'preRedirection?: boolean;',
|
|
38
|
+
'proxy?: boolean;',
|
|
39
|
+
'publicStats?: boolean;',
|
|
40
|
+
'rewrite?: boolean;',
|
|
41
|
+
"rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[];",
|
|
42
|
+
'tagId?: string;',
|
|
43
|
+
'tagIds?: string | string[];',
|
|
44
|
+
'tagNames?: string | string[];',
|
|
45
|
+
'title?: string;',
|
|
46
|
+
'trackConversion?: boolean;',
|
|
47
|
+
'useAsTemplate?: boolean;',
|
|
48
|
+
'video?: string;',
|
|
49
|
+
'webhookIds?: string[];',
|
|
50
|
+
],
|
|
51
|
+
response: "{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }",
|
|
52
|
+
markdown: "## create\n\n`client.links.create(url: string, android?: string, archived?: boolean, comments?: string, description?: string, doIndex?: boolean, domain?: string, expiredUrl?: string, expiresAt?: string, externalId?: string, flexible?: boolean, folderId?: string, geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }, image?: string, ios?: string, isFormMandatory?: boolean, key?: string, pageId?: string, pageUrl?: string, password?: string, prefix?: string, preRedirection?: boolean, proxy?: boolean, publicStats?: boolean, rewrite?: boolean, rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[], tagId?: string, tagIds?: string | string[], tagNames?: string | string[], title?: string, trackConversion?: boolean, useAsTemplate?: boolean, video?: string, webhookIds?: string[]): { id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: object[]; saleAmount: number; sales: number; tagId: string; tags: tag[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }`\n\n**post** `/links`\n\nCreate a new link for the authenticated workspace.\n\n### Parameters\n\n- `url: string`\n The destination URL of the short link.\n\n- `android?: string`\n The Android destination URL for the short link for Android device targeting.\n\n- `archived?: boolean`\n Whether the short link is archived.\n\n- `comments?: string`\n The comments for the short link.\n\n- `description?: string`\n The description of the short link generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `doIndex?: boolean`\n Allow search engines to index your short link. Default is `false` if not provided. Learn more: https://codeqr.link/noindex\n\n- `domain?: string`\n The domain of the short link. If not provided, the main domain of the project will be used (or `codeqr.link` if the project has no domains).\n\n- `expiredUrl?: string`\n The URL to redirect to when the short link expires.\n\n- `expiresAt?: string`\n The date and time when the short link will expire in ISO-8601 format. Must be in the future.\n\n- `externalId?: string`\n This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter.\n\n- `flexible?: boolean`\n Whether the short link is flexible.\n\n- `folderId?: string`\n The unique ID existing folder to assign the short link to.\n\n- `geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }`\n Geographic targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.\n - `AD?: string`\n - `AE?: string`\n - `AF?: string`\n - `AG?: string`\n - `AI?: string`\n - `AL?: string`\n - `AM?: string`\n - `AO?: string`\n - `AQ?: string`\n - `AR?: string`\n - `AS?: string`\n - `AT?: string`\n - `AU?: string`\n - `AW?: string`\n - `AX?: string`\n - `AZ?: string`\n - `BA?: string`\n - `BB?: string`\n - `BD?: string`\n - `BE?: string`\n - `BF?: string`\n - `BG?: string`\n - `BH?: string`\n - `BI?: string`\n - `BJ?: string`\n - `BL?: string`\n - `BM?: string`\n - `BN?: string`\n - `BO?: string`\n - `BQ?: string`\n - `BR?: string`\n - `BS?: string`\n - `BT?: string`\n - `BV?: string`\n - `BW?: string`\n - `BY?: string`\n - `BZ?: string`\n - `CA?: string`\n - `CC?: string`\n - `CD?: string`\n - `CF?: string`\n - `CG?: string`\n - `CH?: string`\n - `CI?: string`\n - `CK?: string`\n - `CL?: string`\n - `CM?: string`\n - `CN?: string`\n - `CO?: string`\n - `CR?: string`\n - `CU?: string`\n - `CV?: string`\n - `CW?: string`\n - `CX?: string`\n - `CY?: string`\n - `CZ?: string`\n - `DE?: string`\n - `DJ?: string`\n - `DK?: string`\n - `DM?: string`\n - `DO?: string`\n - `DZ?: string`\n - `EC?: string`\n - `EE?: string`\n - `EG?: string`\n - `EH?: string`\n - `ER?: string`\n - `ES?: string`\n - `ET?: string`\n - `FI?: string`\n - `FJ?: string`\n - `FK?: string`\n - `FM?: string`\n - `FO?: string`\n - `FR?: string`\n - `GA?: string`\n - `GB?: string`\n - `GD?: string`\n - `GE?: string`\n - `GF?: string`\n - `GG?: string`\n - `GH?: string`\n - `GI?: string`\n - `GL?: string`\n - `GM?: string`\n - `GN?: string`\n - `GP?: string`\n - `GQ?: string`\n - `GR?: string`\n - `GS?: string`\n - `GT?: string`\n - `GU?: string`\n - `GW?: string`\n - `GY?: string`\n - `HK?: string`\n - `HM?: string`\n - `HN?: string`\n - `HR?: string`\n - `HT?: string`\n - `HU?: string`\n - `ID?: string`\n - `IE?: string`\n - `IL?: string`\n - `IM?: string`\n - `IN?: string`\n - `IO?: string`\n - `IQ?: string`\n - `IR?: string`\n - `IS?: string`\n - `IT?: string`\n - `JE?: string`\n - `JM?: string`\n - `JO?: string`\n - `JP?: string`\n - `KE?: string`\n - `KG?: string`\n - `KH?: string`\n - `KI?: string`\n - `KM?: string`\n - `KN?: string`\n - `KP?: string`\n - `KR?: string`\n - `KW?: string`\n - `KY?: string`\n - `KZ?: string`\n - `LA?: string`\n - `LB?: string`\n - `LC?: string`\n - `LI?: string`\n - `LK?: string`\n - `LR?: string`\n - `LS?: string`\n - `LT?: string`\n - `LU?: string`\n - `LV?: string`\n - `LY?: string`\n - `MA?: string`\n - `MC?: string`\n - `MD?: string`\n - `ME?: string`\n - `MF?: string`\n - `MG?: string`\n - `MH?: string`\n - `MK?: string`\n - `ML?: string`\n - `MM?: string`\n - `MN?: string`\n - `MO?: string`\n - `MP?: string`\n - `MQ?: string`\n - `MR?: string`\n - `MS?: string`\n - `MT?: string`\n - `MU?: string`\n - `MV?: string`\n - `MW?: string`\n - `MX?: string`\n - `MY?: string`\n - `MZ?: string`\n - `NA?: string`\n - `NC?: string`\n - `NE?: string`\n - `NF?: string`\n - `NG?: string`\n - `NI?: string`\n - `NL?: string`\n - `NO?: string`\n - `NP?: string`\n - `NR?: string`\n - `NU?: string`\n - `NZ?: string`\n - `OM?: string`\n - `PA?: string`\n - `PE?: string`\n - `PF?: string`\n - `PG?: string`\n - `PH?: string`\n - `PK?: string`\n - `PL?: string`\n - `PM?: string`\n - `PN?: string`\n - `PR?: string`\n - `PS?: string`\n - `PT?: string`\n - `PW?: string`\n - `PY?: string`\n - `QA?: string`\n - `RE?: string`\n - `RO?: string`\n - `RS?: string`\n - `RU?: string`\n - `RW?: string`\n - `SA?: string`\n - `SB?: string`\n - `SC?: string`\n - `SD?: string`\n - `SE?: string`\n - `SG?: string`\n - `SH?: string`\n - `SI?: string`\n - `SJ?: string`\n - `SK?: string`\n - `SL?: string`\n - `SM?: string`\n - `SN?: string`\n - `SO?: string`\n - `SR?: string`\n - `SS?: string`\n - `ST?: string`\n - `SV?: string`\n - `SX?: string`\n - `SY?: string`\n - `SZ?: string`\n - `TC?: string`\n - `TD?: string`\n - `TF?: string`\n - `TG?: string`\n - `TH?: string`\n - `TJ?: string`\n - `TK?: string`\n - `TL?: string`\n - `TM?: string`\n - `TN?: string`\n - `TO?: string`\n - `TR?: string`\n - `TT?: string`\n - `TV?: string`\n - `TW?: string`\n - `TZ?: string`\n - `UA?: string`\n - `UG?: string`\n - `UM?: string`\n - `US?: string`\n - `UY?: string`\n - `UZ?: string`\n - `VA?: string`\n - `VC?: string`\n - `VE?: string`\n - `VG?: string`\n - `VI?: string`\n - `VN?: string`\n - `VU?: string`\n - `WF?: string`\n - `WS?: string`\n - `XK?: string`\n - `YE?: string`\n - `YT?: string`\n - `ZA?: string`\n - `ZM?: string`\n - `ZW?: string`\n\n- `image?: string`\n The image of the short link generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `ios?: string`\n The iOS destination URL for the short link for iOS device targeting.\n\n- `isFormMandatory?: boolean`\n If the form is mandatory for the page.\n\n- `key?: string`\n The slug of the short link. If not provided, a random 7-character slug will be generated.\n\n- `pageId?: string`\n The ID of the page to redirect to before the link destination.\n\n- `pageUrl?: string`\n The URL of the page to redirect to before the link destination.\n\n- `password?: string`\n The password required to access the short link destination URL.\n\n- `prefix?: string`\n The prefix of the short link slug for randomly generated keys (for example, if the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will be ignored if `key` is provided.\n\n- `preRedirection?: boolean`\n Whether the short link has pre-redirection.\n\n- `proxy?: boolean`\n Whether the short link uses the custom link preview feature.\n\n- `publicStats?: boolean`\n Whether the short link statistics are publicly accessible.\n\n- `rewrite?: boolean`\n Whether the short link uses link cloaking.\n\n- `rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n Smart rules for conditional destination routing by request attribute.\n\n- `tagId?: string`\n The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead.\n\n- `tagIds?: string | string[]`\n The unique IDs of the tags assigned to the short link.\n\n- `tagNames?: string | string[]`\n The unique name of the tags assigned to the short link (case insensitive).\n\n- `title?: string`\n The title of the short link generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `trackConversion?: boolean`\n Whether to track conversions for the short link.\n\n- `useAsTemplate?: boolean`\n Whether this link should be used as a reusable template.\n\n- `video?: string`\n The video of the short link.\n\n- `webhookIds?: string[]`\n An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }`\n\n - `id: string`\n - `android: string`\n - `archived: boolean`\n - `clicks: number`\n - `comments: string`\n - `createdAt: string`\n - `description: string`\n - `doIndex: boolean`\n - `domain: string`\n - `expiredUrl: string`\n - `expiresAt: string`\n - `externalId: string`\n - `filled: boolean`\n - `flexible: boolean`\n - `folderId: string`\n - `geo: object`\n - `image: string`\n - `ios: string`\n - `isFormMandatory: boolean`\n - `key: string`\n - `lastClicked: string`\n - `leads: number`\n - `notificationToken: string`\n - `password: string`\n - `preRedirection: boolean`\n - `projectId: string`\n - `proxy: boolean`\n - `publicStats: boolean`\n - `rewrite: boolean`\n - `rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n - `saleAmount: number`\n - `sales: number`\n - `tagId: string`\n - `tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n - `title: string`\n - `trackConversion: boolean`\n - `updatedAt: string`\n - `url: string`\n - `useAsTemplate: boolean`\n - `userId: string`\n - `utm_campaign: string`\n - `utm_content: string`\n - `utm_medium: string`\n - `utm_source: string`\n - `utm_term: string`\n - `video: string`\n - `pageId?: string`\n - `pageUrl?: string`\n - `qrCode?: string`\n - `shortLink?: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst link = await client.links.create({ url: 'https://google.com' });\n\nconsole.log(link);\n```",
|
|
53
|
+
perLanguage: {
|
|
54
|
+
typescript: {
|
|
55
|
+
method: 'client.links.create',
|
|
56
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst link = await client.links.create({ url: 'https://google.com' });\n\nconsole.log(link.id);",
|
|
57
|
+
},
|
|
58
|
+
http: {
|
|
59
|
+
example: 'curl https://api.codeqr.io/links \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $CODEQR_API_KEY" \\\n -d \'{\n "url": "https://google.com",\n "externalId": "123456",\n "tagIds": [\n "clux0rgak00011..."\n ]\n }\'',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'list',
|
|
65
|
+
endpoint: '/links',
|
|
66
|
+
httpMethod: 'get',
|
|
67
|
+
summary: 'Retrieve a list of links',
|
|
68
|
+
description: 'Retrieve a paginated list of links for the authenticated workspace.',
|
|
69
|
+
stainlessPath: '(resource) links > (method) list',
|
|
70
|
+
qualified: 'client.links.list',
|
|
71
|
+
params: [
|
|
72
|
+
'android?: string;',
|
|
73
|
+
'clicksMax?: number;',
|
|
74
|
+
'clicksMin?: number;',
|
|
75
|
+
'comments?: string;',
|
|
76
|
+
'createdAfter?: string;',
|
|
77
|
+
'createdBefore?: string;',
|
|
78
|
+
'domain?: string;',
|
|
79
|
+
'expiresAfter?: string;',
|
|
80
|
+
'expiresAt?: string;',
|
|
81
|
+
'expiresBefore?: string;',
|
|
82
|
+
'folderId?: string;',
|
|
83
|
+
'geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; };',
|
|
84
|
+
'hasComments?: boolean;',
|
|
85
|
+
'hasCustomSocial?: boolean;',
|
|
86
|
+
'hasDevice?: boolean;',
|
|
87
|
+
'hasExpiration?: boolean;',
|
|
88
|
+
'hasGeo?: boolean;',
|
|
89
|
+
'hasPassword?: boolean;',
|
|
90
|
+
'hasTags?: boolean;',
|
|
91
|
+
'hasUTM?: boolean;',
|
|
92
|
+
'ios?: string;',
|
|
93
|
+
'linkIds?: string | string[];',
|
|
94
|
+
'page?: number;',
|
|
95
|
+
'pageSize?: number;',
|
|
96
|
+
'password?: string;',
|
|
97
|
+
'projectSlug?: string;',
|
|
98
|
+
'search?: string;',
|
|
99
|
+
'showArchived?: boolean;',
|
|
100
|
+
"sort?: 'createdAt' | 'clicks' | 'lastClicked';",
|
|
101
|
+
'tagId?: string;',
|
|
102
|
+
'tagIds?: string | string[];',
|
|
103
|
+
'tagNames?: string | string[];',
|
|
104
|
+
'trackConversion?: boolean;',
|
|
105
|
+
'useAsTemplate?: boolean;',
|
|
106
|
+
'userId?: string;',
|
|
107
|
+
'utm_campaign?: string;',
|
|
108
|
+
'utm_content?: string;',
|
|
109
|
+
'utm_medium?: string;',
|
|
110
|
+
'utm_source?: string;',
|
|
111
|
+
'utm_term?: string;',
|
|
112
|
+
'withTags?: boolean;',
|
|
113
|
+
],
|
|
114
|
+
response: "{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: object[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }[]",
|
|
115
|
+
markdown: "## list\n\n`client.links.list(android?: string, clicksMax?: number, clicksMin?: number, comments?: string, createdAfter?: string, createdBefore?: string, domain?: string, expiresAfter?: string, expiresAt?: string, expiresBefore?: string, folderId?: string, geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }, hasComments?: boolean, hasCustomSocial?: boolean, hasDevice?: boolean, hasExpiration?: boolean, hasGeo?: boolean, hasPassword?: boolean, hasTags?: boolean, hasUTM?: boolean, ios?: string, linkIds?: string | string[], page?: number, pageSize?: number, password?: string, projectSlug?: string, search?: string, showArchived?: boolean, sort?: 'createdAt' | 'clicks' | 'lastClicked', tagId?: string, tagIds?: string | string[], tagNames?: string | string[], trackConversion?: boolean, useAsTemplate?: boolean, userId?: string, utm_campaign?: string, utm_content?: string, utm_medium?: string, utm_source?: string, utm_term?: string, withTags?: boolean): object[]`\n\n**get** `/links`\n\nRetrieve a paginated list of links for the authenticated workspace.\n\n### Parameters\n\n- `android?: string`\n The Android device to filter by.\n\n- `clicksMax?: number`\n Maximum number of clicks\n\n- `clicksMin?: number`\n Minimum number of clicks\n\n- `comments?: string`\n The comments to filter by.\n\n- `createdAfter?: string`\n Created after date (ISO string)\n\n- `createdBefore?: string`\n Created before date (ISO string)\n\n- `domain?: string`\n The domain to filter the links. For example, `ac.me`. If not provided, all links of the project will be returned.\n\n- `expiresAfter?: string`\n Expires after date (ISO string)\n\n- `expiresAt?: string`\n The date and time the short link will expire in ISO-8601 format. Must be in the future.\n\n- `expiresBefore?: string`\n Expires before date (ISO string)\n\n- `folderId?: string`\n The folder ID to filter the links by.\n\n- `geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }`\n Geographic segmentation information for the short link in JSON format `{[COUNTRY]: https://example.com }`.\n - `AD?: string`\n - `AE?: string`\n - `AF?: string`\n - `AG?: string`\n - `AI?: string`\n - `AL?: string`\n - `AM?: string`\n - `AO?: string`\n - `AQ?: string`\n - `AR?: string`\n - `AS?: string`\n - `AT?: string`\n - `AU?: string`\n - `AW?: string`\n - `AX?: string`\n - `AZ?: string`\n - `BA?: string`\n - `BB?: string`\n - `BD?: string`\n - `BE?: string`\n - `BF?: string`\n - `BG?: string`\n - `BH?: string`\n - `BI?: string`\n - `BJ?: string`\n - `BL?: string`\n - `BM?: string`\n - `BN?: string`\n - `BO?: string`\n - `BQ?: string`\n - `BR?: string`\n - `BS?: string`\n - `BT?: string`\n - `BV?: string`\n - `BW?: string`\n - `BY?: string`\n - `BZ?: string`\n - `CA?: string`\n - `CC?: string`\n - `CD?: string`\n - `CF?: string`\n - `CG?: string`\n - `CH?: string`\n - `CI?: string`\n - `CK?: string`\n - `CL?: string`\n - `CM?: string`\n - `CN?: string`\n - `CO?: string`\n - `CR?: string`\n - `CU?: string`\n - `CV?: string`\n - `CW?: string`\n - `CX?: string`\n - `CY?: string`\n - `CZ?: string`\n - `DE?: string`\n - `DJ?: string`\n - `DK?: string`\n - `DM?: string`\n - `DO?: string`\n - `DZ?: string`\n - `EC?: string`\n - `EE?: string`\n - `EG?: string`\n - `EH?: string`\n - `ER?: string`\n - `ES?: string`\n - `ET?: string`\n - `FI?: string`\n - `FJ?: string`\n - `FK?: string`\n - `FM?: string`\n - `FO?: string`\n - `FR?: string`\n - `GA?: string`\n - `GB?: string`\n - `GD?: string`\n - `GE?: string`\n - `GF?: string`\n - `GG?: string`\n - `GH?: string`\n - `GI?: string`\n - `GL?: string`\n - `GM?: string`\n - `GN?: string`\n - `GP?: string`\n - `GQ?: string`\n - `GR?: string`\n - `GS?: string`\n - `GT?: string`\n - `GU?: string`\n - `GW?: string`\n - `GY?: string`\n - `HK?: string`\n - `HM?: string`\n - `HN?: string`\n - `HR?: string`\n - `HT?: string`\n - `HU?: string`\n - `ID?: string`\n - `IE?: string`\n - `IL?: string`\n - `IM?: string`\n - `IN?: string`\n - `IO?: string`\n - `IQ?: string`\n - `IR?: string`\n - `IS?: string`\n - `IT?: string`\n - `JE?: string`\n - `JM?: string`\n - `JO?: string`\n - `JP?: string`\n - `KE?: string`\n - `KG?: string`\n - `KH?: string`\n - `KI?: string`\n - `KM?: string`\n - `KN?: string`\n - `KP?: string`\n - `KR?: string`\n - `KW?: string`\n - `KY?: string`\n - `KZ?: string`\n - `LA?: string`\n - `LB?: string`\n - `LC?: string`\n - `LI?: string`\n - `LK?: string`\n - `LR?: string`\n - `LS?: string`\n - `LT?: string`\n - `LU?: string`\n - `LV?: string`\n - `LY?: string`\n - `MA?: string`\n - `MC?: string`\n - `MD?: string`\n - `ME?: string`\n - `MF?: string`\n - `MG?: string`\n - `MH?: string`\n - `MK?: string`\n - `ML?: string`\n - `MM?: string`\n - `MN?: string`\n - `MO?: string`\n - `MP?: string`\n - `MQ?: string`\n - `MR?: string`\n - `MS?: string`\n - `MT?: string`\n - `MU?: string`\n - `MV?: string`\n - `MW?: string`\n - `MX?: string`\n - `MY?: string`\n - `MZ?: string`\n - `NA?: string`\n - `NC?: string`\n - `NE?: string`\n - `NF?: string`\n - `NG?: string`\n - `NI?: string`\n - `NL?: string`\n - `NO?: string`\n - `NP?: string`\n - `NR?: string`\n - `NU?: string`\n - `NZ?: string`\n - `OM?: string`\n - `PA?: string`\n - `PE?: string`\n - `PF?: string`\n - `PG?: string`\n - `PH?: string`\n - `PK?: string`\n - `PL?: string`\n - `PM?: string`\n - `PN?: string`\n - `PR?: string`\n - `PS?: string`\n - `PT?: string`\n - `PW?: string`\n - `PY?: string`\n - `QA?: string`\n - `RE?: string`\n - `RO?: string`\n - `RS?: string`\n - `RU?: string`\n - `RW?: string`\n - `SA?: string`\n - `SB?: string`\n - `SC?: string`\n - `SD?: string`\n - `SE?: string`\n - `SG?: string`\n - `SH?: string`\n - `SI?: string`\n - `SJ?: string`\n - `SK?: string`\n - `SL?: string`\n - `SM?: string`\n - `SN?: string`\n - `SO?: string`\n - `SR?: string`\n - `SS?: string`\n - `ST?: string`\n - `SV?: string`\n - `SX?: string`\n - `SY?: string`\n - `SZ?: string`\n - `TC?: string`\n - `TD?: string`\n - `TF?: string`\n - `TG?: string`\n - `TH?: string`\n - `TJ?: string`\n - `TK?: string`\n - `TL?: string`\n - `TM?: string`\n - `TN?: string`\n - `TO?: string`\n - `TR?: string`\n - `TT?: string`\n - `TV?: string`\n - `TW?: string`\n - `TZ?: string`\n - `UA?: string`\n - `UG?: string`\n - `UM?: string`\n - `US?: string`\n - `UY?: string`\n - `UZ?: string`\n - `VA?: string`\n - `VC?: string`\n - `VE?: string`\n - `VG?: string`\n - `VI?: string`\n - `VN?: string`\n - `VU?: string`\n - `WF?: string`\n - `WS?: string`\n - `XK?: string`\n - `YE?: string`\n - `YT?: string`\n - `ZA?: string`\n - `ZM?: string`\n - `ZW?: string`\n\n- `hasComments?: boolean`\n Filter links that have comments (any comments)\n\n- `hasCustomSocial?: boolean`\n Filter links that have custom social media cards\n\n- `hasDevice?: boolean`\n Filter links that have device targeting\n\n- `hasExpiration?: boolean`\n Filter links that have expiration date (any expiration)\n\n- `hasGeo?: boolean`\n Filter links that have geo-targeting\n\n- `hasPassword?: boolean`\n Filter links that have password protection (any password)\n\n- `hasTags?: boolean`\n Filter links that have tags (any tags)\n\n- `hasUTM?: boolean`\n Filter links that have UTM parameters\n\n- `ios?: string`\n The iOS device to filter by.\n\n- `linkIds?: string | string[]`\n Link IDs to filter by.\n\n- `page?: number`\n The page number for pagination.\n\n- `pageSize?: number`\n The number of items per page.\n\n- `password?: string`\n The password to filter by.\n\n- `projectSlug?: string`\n The slug of the project to which the link belongs. For example, for `app.codeqr.io/acme`, the projectSlug is `acme`.\n\n- `search?: string`\n The search term to filter the links. The search term will be matched against the short link slug and the destination URL.\n\n- `showArchived?: boolean`\n If should include archived links in the response. The default is `false` if not provided.\n\n- `sort?: 'createdAt' | 'clicks' | 'lastClicked'`\n The field to sort the links by. The default is `createdAt`, and sort order is always descending.\n\n- `tagId?: string`\n [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag assigned to the short link.\n\n- `tagIds?: string | string[]`\n The IDs of the tags to filter the links.\n\n- `tagNames?: string | string[]`\n The unique name of the tags assigned to the short link (case insensitive).\n\n- `trackConversion?: boolean`\n If should include links with conversion tracking enabled. The default is `false` if not provided.\n\n- `useAsTemplate?: boolean`\n Filter links marked as templates.\n\n- `userId?: string`\n The ID of the user to filter by.\n\n- `utm_campaign?: string`\n Filter by UTM campaign value\n\n- `utm_content?: string`\n Filter by UTM content value\n\n- `utm_medium?: string`\n Filter by UTM medium value\n\n- `utm_source?: string`\n Filter by UTM source value\n\n- `utm_term?: string`\n Filter by UTM term value\n\n- `withTags?: boolean`\n If should include tags in the response. The default is `false` if not provided.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: object[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst links = await client.links.list();\n\nconsole.log(links);\n```",
|
|
116
|
+
perLanguage: {
|
|
117
|
+
typescript: {
|
|
118
|
+
method: 'client.links.list',
|
|
119
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst links = await client.links.list();\n\nconsole.log(links);",
|
|
120
|
+
},
|
|
121
|
+
http: {
|
|
122
|
+
example: 'curl https://api.codeqr.io/links \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'retrieve_info',
|
|
128
|
+
endpoint: '/links/info',
|
|
129
|
+
httpMethod: 'get',
|
|
130
|
+
summary: 'Retrieve a link',
|
|
131
|
+
description: 'Retrieve the info for a link.',
|
|
132
|
+
stainlessPath: '(resource) links > (method) retrieve_info',
|
|
133
|
+
qualified: 'client.links.retrieveInfo',
|
|
134
|
+
params: [
|
|
135
|
+
'domain: string;',
|
|
136
|
+
'key: string;',
|
|
137
|
+
'projectSlug: string;',
|
|
138
|
+
'externalId?: string;',
|
|
139
|
+
'linkId?: string;',
|
|
140
|
+
],
|
|
141
|
+
response: "{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }",
|
|
142
|
+
markdown: "## retrieve_info\n\n`client.links.retrieveInfo(domain: string, key: string, projectSlug: string, externalId?: string, linkId?: string): { id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: object[]; saleAmount: number; sales: number; tagId: string; tags: tag[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }`\n\n**get** `/links/info`\n\nRetrieve the info for a link.\n\n### Parameters\n\n- `domain: string`\n The domain of the link to be retrieved. For example, for `codeqr.link/github`, the domain is `codeqr.link`.\n\n- `key: string`\n The key of the link to be retrieved. For example, for `codeqr.link/github`, the key is `github`.\n\n- `projectSlug: string`\n The slug of the project to which the link belongs. For example, for `app.codeqr.io/acme`, the projectSlug is `acme`.\n\n- `externalId?: string`\n This is the ID of the link in your database. Must be prefixed with `ext_` when passed as a query parameter.\n\n- `linkId?: string`\n The unique ID of the short link.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }`\n\n - `id: string`\n - `android: string`\n - `archived: boolean`\n - `clicks: number`\n - `comments: string`\n - `createdAt: string`\n - `description: string`\n - `doIndex: boolean`\n - `domain: string`\n - `expiredUrl: string`\n - `expiresAt: string`\n - `externalId: string`\n - `filled: boolean`\n - `flexible: boolean`\n - `folderId: string`\n - `geo: object`\n - `image: string`\n - `ios: string`\n - `isFormMandatory: boolean`\n - `key: string`\n - `lastClicked: string`\n - `leads: number`\n - `notificationToken: string`\n - `password: string`\n - `preRedirection: boolean`\n - `projectId: string`\n - `proxy: boolean`\n - `publicStats: boolean`\n - `rewrite: boolean`\n - `rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n - `saleAmount: number`\n - `sales: number`\n - `tagId: string`\n - `tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n - `title: string`\n - `trackConversion: boolean`\n - `updatedAt: string`\n - `url: string`\n - `useAsTemplate: boolean`\n - `userId: string`\n - `utm_campaign: string`\n - `utm_content: string`\n - `utm_medium: string`\n - `utm_source: string`\n - `utm_term: string`\n - `video: string`\n - `pageId?: string`\n - `pageUrl?: string`\n - `qrCode?: string`\n - `shortLink?: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst link = await client.links.retrieveInfo({\n domain: 'x',\n key: 'x',\n projectSlug: 'x',\n});\n\nconsole.log(link);\n```",
|
|
143
|
+
perLanguage: {
|
|
144
|
+
typescript: {
|
|
145
|
+
method: 'client.links.retrieveInfo',
|
|
146
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst link = await client.links.retrieveInfo({\n domain: 'x',\n key: 'x',\n projectSlug: 'x',\n});\n\nconsole.log(link.id);",
|
|
147
|
+
},
|
|
148
|
+
http: {
|
|
149
|
+
example: 'curl https://api.codeqr.io/links/info \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'update',
|
|
155
|
+
endpoint: '/links/{linkId}',
|
|
156
|
+
httpMethod: 'put',
|
|
157
|
+
summary: 'Update a link',
|
|
158
|
+
description: "Update a link for the authenticated workspace. If there's no change, returns it as it is.",
|
|
159
|
+
stainlessPath: '(resource) links > (method) update',
|
|
160
|
+
qualified: 'client.links.update',
|
|
161
|
+
params: [
|
|
162
|
+
'linkId: string;',
|
|
163
|
+
'android?: string;',
|
|
164
|
+
'archived?: boolean;',
|
|
165
|
+
'comments?: string;',
|
|
166
|
+
'description?: string;',
|
|
167
|
+
'doIndex?: boolean;',
|
|
168
|
+
'domain?: string;',
|
|
169
|
+
'expiredUrl?: string;',
|
|
170
|
+
'expiresAt?: string;',
|
|
171
|
+
'externalId?: string;',
|
|
172
|
+
'flexible?: boolean;',
|
|
173
|
+
'folderId?: string;',
|
|
174
|
+
'geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; };',
|
|
175
|
+
'image?: string;',
|
|
176
|
+
'ios?: string;',
|
|
177
|
+
'isFormMandatory?: boolean;',
|
|
178
|
+
'key?: string;',
|
|
179
|
+
'pageId?: string;',
|
|
180
|
+
'pageUrl?: string;',
|
|
181
|
+
'password?: string;',
|
|
182
|
+
'prefix?: string;',
|
|
183
|
+
'preRedirection?: boolean;',
|
|
184
|
+
'proxy?: boolean;',
|
|
185
|
+
'publicStats?: boolean;',
|
|
186
|
+
'rewrite?: boolean;',
|
|
187
|
+
"rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[];",
|
|
188
|
+
'tagId?: string;',
|
|
189
|
+
'tagIds?: string | string[];',
|
|
190
|
+
'tagNames?: string | string[];',
|
|
191
|
+
'title?: string;',
|
|
192
|
+
'trackConversion?: boolean;',
|
|
193
|
+
'url?: string;',
|
|
194
|
+
'useAsTemplate?: boolean;',
|
|
195
|
+
'video?: string;',
|
|
196
|
+
'webhookIds?: string[];',
|
|
197
|
+
],
|
|
198
|
+
response: "{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }",
|
|
199
|
+
markdown: "## update\n\n`client.links.update(linkId: string, android?: string, archived?: boolean, comments?: string, description?: string, doIndex?: boolean, domain?: string, expiredUrl?: string, expiresAt?: string, externalId?: string, flexible?: boolean, folderId?: string, geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }, image?: string, ios?: string, isFormMandatory?: boolean, key?: string, pageId?: string, pageUrl?: string, password?: string, prefix?: string, preRedirection?: boolean, proxy?: boolean, publicStats?: boolean, rewrite?: boolean, rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[], tagId?: string, tagIds?: string | string[], tagNames?: string | string[], title?: string, trackConversion?: boolean, url?: string, useAsTemplate?: boolean, video?: string, webhookIds?: string[]): { id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: object[]; saleAmount: number; sales: number; tagId: string; tags: tag[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }`\n\n**put** `/links/{linkId}`\n\nUpdate a link for the authenticated workspace. If there's no change, returns it as it is.\n\n### Parameters\n\n- `linkId: string`\n The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.\n\n- `android?: string`\n The Android destination URL for the short link for Android device targeting.\n\n- `archived?: boolean`\n Whether the short link is archived.\n\n- `comments?: string`\n The comments for the short link.\n\n- `description?: string`\n The description of the short link generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `doIndex?: boolean`\n Allow search engines to index your short link. Default is `false` if not provided. Learn more: https://codeqr.link/noindex\n\n- `domain?: string`\n The domain of the short link. If not provided, the main domain of the project will be used (or `codeqr.link` if the project has no domains).\n\n- `expiredUrl?: string`\n The URL to redirect to when the short link expires.\n\n- `expiresAt?: string`\n The date and time when the short link will expire in ISO-8601 format. Must be in the future.\n\n- `externalId?: string`\n This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter.\n\n- `flexible?: boolean`\n Whether the short link is flexible.\n\n- `folderId?: string`\n The unique ID existing folder to assign the short link to.\n\n- `geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }`\n Geographic targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.\n - `AD?: string`\n - `AE?: string`\n - `AF?: string`\n - `AG?: string`\n - `AI?: string`\n - `AL?: string`\n - `AM?: string`\n - `AO?: string`\n - `AQ?: string`\n - `AR?: string`\n - `AS?: string`\n - `AT?: string`\n - `AU?: string`\n - `AW?: string`\n - `AX?: string`\n - `AZ?: string`\n - `BA?: string`\n - `BB?: string`\n - `BD?: string`\n - `BE?: string`\n - `BF?: string`\n - `BG?: string`\n - `BH?: string`\n - `BI?: string`\n - `BJ?: string`\n - `BL?: string`\n - `BM?: string`\n - `BN?: string`\n - `BO?: string`\n - `BQ?: string`\n - `BR?: string`\n - `BS?: string`\n - `BT?: string`\n - `BV?: string`\n - `BW?: string`\n - `BY?: string`\n - `BZ?: string`\n - `CA?: string`\n - `CC?: string`\n - `CD?: string`\n - `CF?: string`\n - `CG?: string`\n - `CH?: string`\n - `CI?: string`\n - `CK?: string`\n - `CL?: string`\n - `CM?: string`\n - `CN?: string`\n - `CO?: string`\n - `CR?: string`\n - `CU?: string`\n - `CV?: string`\n - `CW?: string`\n - `CX?: string`\n - `CY?: string`\n - `CZ?: string`\n - `DE?: string`\n - `DJ?: string`\n - `DK?: string`\n - `DM?: string`\n - `DO?: string`\n - `DZ?: string`\n - `EC?: string`\n - `EE?: string`\n - `EG?: string`\n - `EH?: string`\n - `ER?: string`\n - `ES?: string`\n - `ET?: string`\n - `FI?: string`\n - `FJ?: string`\n - `FK?: string`\n - `FM?: string`\n - `FO?: string`\n - `FR?: string`\n - `GA?: string`\n - `GB?: string`\n - `GD?: string`\n - `GE?: string`\n - `GF?: string`\n - `GG?: string`\n - `GH?: string`\n - `GI?: string`\n - `GL?: string`\n - `GM?: string`\n - `GN?: string`\n - `GP?: string`\n - `GQ?: string`\n - `GR?: string`\n - `GS?: string`\n - `GT?: string`\n - `GU?: string`\n - `GW?: string`\n - `GY?: string`\n - `HK?: string`\n - `HM?: string`\n - `HN?: string`\n - `HR?: string`\n - `HT?: string`\n - `HU?: string`\n - `ID?: string`\n - `IE?: string`\n - `IL?: string`\n - `IM?: string`\n - `IN?: string`\n - `IO?: string`\n - `IQ?: string`\n - `IR?: string`\n - `IS?: string`\n - `IT?: string`\n - `JE?: string`\n - `JM?: string`\n - `JO?: string`\n - `JP?: string`\n - `KE?: string`\n - `KG?: string`\n - `KH?: string`\n - `KI?: string`\n - `KM?: string`\n - `KN?: string`\n - `KP?: string`\n - `KR?: string`\n - `KW?: string`\n - `KY?: string`\n - `KZ?: string`\n - `LA?: string`\n - `LB?: string`\n - `LC?: string`\n - `LI?: string`\n - `LK?: string`\n - `LR?: string`\n - `LS?: string`\n - `LT?: string`\n - `LU?: string`\n - `LV?: string`\n - `LY?: string`\n - `MA?: string`\n - `MC?: string`\n - `MD?: string`\n - `ME?: string`\n - `MF?: string`\n - `MG?: string`\n - `MH?: string`\n - `MK?: string`\n - `ML?: string`\n - `MM?: string`\n - `MN?: string`\n - `MO?: string`\n - `MP?: string`\n - `MQ?: string`\n - `MR?: string`\n - `MS?: string`\n - `MT?: string`\n - `MU?: string`\n - `MV?: string`\n - `MW?: string`\n - `MX?: string`\n - `MY?: string`\n - `MZ?: string`\n - `NA?: string`\n - `NC?: string`\n - `NE?: string`\n - `NF?: string`\n - `NG?: string`\n - `NI?: string`\n - `NL?: string`\n - `NO?: string`\n - `NP?: string`\n - `NR?: string`\n - `NU?: string`\n - `NZ?: string`\n - `OM?: string`\n - `PA?: string`\n - `PE?: string`\n - `PF?: string`\n - `PG?: string`\n - `PH?: string`\n - `PK?: string`\n - `PL?: string`\n - `PM?: string`\n - `PN?: string`\n - `PR?: string`\n - `PS?: string`\n - `PT?: string`\n - `PW?: string`\n - `PY?: string`\n - `QA?: string`\n - `RE?: string`\n - `RO?: string`\n - `RS?: string`\n - `RU?: string`\n - `RW?: string`\n - `SA?: string`\n - `SB?: string`\n - `SC?: string`\n - `SD?: string`\n - `SE?: string`\n - `SG?: string`\n - `SH?: string`\n - `SI?: string`\n - `SJ?: string`\n - `SK?: string`\n - `SL?: string`\n - `SM?: string`\n - `SN?: string`\n - `SO?: string`\n - `SR?: string`\n - `SS?: string`\n - `ST?: string`\n - `SV?: string`\n - `SX?: string`\n - `SY?: string`\n - `SZ?: string`\n - `TC?: string`\n - `TD?: string`\n - `TF?: string`\n - `TG?: string`\n - `TH?: string`\n - `TJ?: string`\n - `TK?: string`\n - `TL?: string`\n - `TM?: string`\n - `TN?: string`\n - `TO?: string`\n - `TR?: string`\n - `TT?: string`\n - `TV?: string`\n - `TW?: string`\n - `TZ?: string`\n - `UA?: string`\n - `UG?: string`\n - `UM?: string`\n - `US?: string`\n - `UY?: string`\n - `UZ?: string`\n - `VA?: string`\n - `VC?: string`\n - `VE?: string`\n - `VG?: string`\n - `VI?: string`\n - `VN?: string`\n - `VU?: string`\n - `WF?: string`\n - `WS?: string`\n - `XK?: string`\n - `YE?: string`\n - `YT?: string`\n - `ZA?: string`\n - `ZM?: string`\n - `ZW?: string`\n\n- `image?: string`\n The image of the short link generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `ios?: string`\n The iOS destination URL for the short link for iOS device targeting.\n\n- `isFormMandatory?: boolean`\n If the form is mandatory for the page.\n\n- `key?: string`\n The slug of the short link. If not provided, a random 7-character slug will be generated.\n\n- `pageId?: string`\n The ID of the page to redirect to before the link destination.\n\n- `pageUrl?: string`\n The URL of the page to redirect to before the link destination.\n\n- `password?: string`\n The password required to access the short link destination URL.\n\n- `prefix?: string`\n The prefix of the short link slug for randomly generated keys (for example, if the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will be ignored if `key` is provided.\n\n- `preRedirection?: boolean`\n Whether the short link has pre-redirection.\n\n- `proxy?: boolean`\n Whether the short link uses the custom link preview feature.\n\n- `publicStats?: boolean`\n Whether the short link statistics are publicly accessible.\n\n- `rewrite?: boolean`\n Whether the short link uses link cloaking.\n\n- `rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n Smart rules for conditional destination routing by request attribute.\n\n- `tagId?: string`\n The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead.\n\n- `tagIds?: string | string[]`\n The unique IDs of the tags assigned to the short link.\n\n- `tagNames?: string | string[]`\n The unique name of the tags assigned to the short link (case insensitive).\n\n- `title?: string`\n The title of the short link generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `trackConversion?: boolean`\n Whether to track conversions for the short link.\n\n- `url?: string`\n The destination URL of the short link.\n\n- `useAsTemplate?: boolean`\n Whether this link should be used as a reusable template.\n\n- `video?: string`\n The video of the short link.\n\n- `webhookIds?: string[]`\n An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; }`\n\n - `id: string`\n - `android: string`\n - `archived: boolean`\n - `clicks: number`\n - `comments: string`\n - `createdAt: string`\n - `description: string`\n - `doIndex: boolean`\n - `domain: string`\n - `expiredUrl: string`\n - `expiresAt: string`\n - `externalId: string`\n - `filled: boolean`\n - `flexible: boolean`\n - `folderId: string`\n - `geo: object`\n - `image: string`\n - `ios: string`\n - `isFormMandatory: boolean`\n - `key: string`\n - `lastClicked: string`\n - `leads: number`\n - `notificationToken: string`\n - `password: string`\n - `preRedirection: boolean`\n - `projectId: string`\n - `proxy: boolean`\n - `publicStats: boolean`\n - `rewrite: boolean`\n - `rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n - `saleAmount: number`\n - `sales: number`\n - `tagId: string`\n - `tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n - `title: string`\n - `trackConversion: boolean`\n - `updatedAt: string`\n - `url: string`\n - `useAsTemplate: boolean`\n - `userId: string`\n - `utm_campaign: string`\n - `utm_content: string`\n - `utm_medium: string`\n - `utm_source: string`\n - `utm_term: string`\n - `video: string`\n - `pageId?: string`\n - `pageUrl?: string`\n - `qrCode?: string`\n - `shortLink?: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst link = await client.links.update('linkId');\n\nconsole.log(link);\n```",
|
|
200
|
+
perLanguage: {
|
|
201
|
+
typescript: {
|
|
202
|
+
method: 'client.links.update',
|
|
203
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst link = await client.links.update('linkId');\n\nconsole.log(link.id);",
|
|
204
|
+
},
|
|
205
|
+
http: {
|
|
206
|
+
example: 'curl https://api.codeqr.io/links/$LINK_ID \\\n -X PUT \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: 'delete',
|
|
212
|
+
endpoint: '/links/{linkId}',
|
|
213
|
+
httpMethod: 'delete',
|
|
214
|
+
summary: 'Delete a link',
|
|
215
|
+
description: 'Delete a link for the authenticated workspace.',
|
|
216
|
+
stainlessPath: '(resource) links > (method) delete',
|
|
217
|
+
qualified: 'client.links.delete',
|
|
218
|
+
params: ['linkId: string;'],
|
|
219
|
+
response: '{ id: string; }',
|
|
220
|
+
markdown: "## delete\n\n`client.links.delete(linkId: string): { id: string; }`\n\n**delete** `/links/{linkId}`\n\nDelete a link for the authenticated workspace.\n\n### Parameters\n\n- `linkId: string`\n The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.\n\n### Returns\n\n- `{ id: string; }`\n\n - `id: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst link = await client.links.delete('linkId');\n\nconsole.log(link);\n```",
|
|
221
|
+
perLanguage: {
|
|
222
|
+
typescript: {
|
|
223
|
+
method: 'client.links.delete',
|
|
224
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst link = await client.links.delete('linkId');\n\nconsole.log(link.id);",
|
|
225
|
+
},
|
|
226
|
+
http: {
|
|
227
|
+
example: 'curl https://api.codeqr.io/links/$LINK_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'create',
|
|
233
|
+
endpoint: '/links/bulk',
|
|
234
|
+
httpMethod: 'post',
|
|
235
|
+
summary: 'Bulk create links',
|
|
236
|
+
description: 'Bulk create up to 100 links for the authenticated workspace.',
|
|
237
|
+
stainlessPath: '(resource) links.bulk > (method) create',
|
|
238
|
+
qualified: 'client.links.bulk.create',
|
|
239
|
+
params: [
|
|
240
|
+
"body?: { url: string; android?: string; archived?: boolean; comments?: string; description?: string; doIndex?: boolean; domain?: string; expiredUrl?: string; expiresAt?: string; externalId?: string; flexible?: boolean; folderId?: string; geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }; image?: string; ios?: string; isFormMandatory?: boolean; key?: string; pageId?: string; pageUrl?: string; password?: string; prefix?: string; preRedirection?: boolean; proxy?: boolean; publicStats?: boolean; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; tagId?: string; tagIds?: string | string[]; tagNames?: string | string[]; title?: string; trackConversion?: boolean; useAsTemplate?: boolean; video?: string; webhookIds?: string[]; }[];",
|
|
241
|
+
],
|
|
242
|
+
response: "{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: object[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; } | { code: string; error: string; link?: object; }[]",
|
|
243
|
+
markdown: "## create\n\n`client.links.bulk.create(body?: { url: string; android?: string; archived?: boolean; comments?: string; description?: string; doIndex?: boolean; domain?: string; expiredUrl?: string; expiresAt?: string; externalId?: string; flexible?: boolean; folderId?: string; geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }; image?: string; ios?: string; isFormMandatory?: boolean; key?: string; pageId?: string; pageUrl?: string; password?: string; prefix?: string; preRedirection?: boolean; proxy?: boolean; publicStats?: boolean; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; tagId?: string; tagIds?: string | string[]; tagNames?: string | string[]; title?: string; trackConversion?: boolean; useAsTemplate?: boolean; video?: string; webhookIds?: string[]; }[]): object | { code: string; error: string; link?: object; }[]`\n\n**post** `/links/bulk`\n\nBulk create up to 100 links for the authenticated workspace.\n\n### Parameters\n\n- `body?: { url: string; android?: string; archived?: boolean; comments?: string; description?: string; doIndex?: boolean; domain?: string; expiredUrl?: string; expiresAt?: string; externalId?: string; flexible?: boolean; folderId?: string; geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }; image?: string; ios?: string; isFormMandatory?: boolean; key?: string; pageId?: string; pageUrl?: string; password?: string; prefix?: string; preRedirection?: boolean; proxy?: boolean; publicStats?: boolean; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; tagId?: string; tagIds?: string | string[]; tagNames?: string | string[]; title?: string; trackConversion?: boolean; useAsTemplate?: boolean; video?: string; webhookIds?: string[]; }[]`\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; clicks: number; comments: string; createdAt: string; description: string; doIndex: boolean; domain: string; expiredUrl: string; expiresAt: string; externalId: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; tagId: string; tags: object[]; title: string; trackConversion: boolean; updatedAt: string; url: string; useAsTemplate: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; pageId?: string; pageUrl?: string; qrCode?: string; shortLink?: string; } | { code: string; error: string; link?: object; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst bulks = await client.links.bulk.create();\n\nconsole.log(bulks);\n```",
|
|
244
|
+
perLanguage: {
|
|
245
|
+
typescript: {
|
|
246
|
+
method: 'client.links.bulk.create',
|
|
247
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst bulks = await client.links.bulk.create();\n\nconsole.log(bulks);",
|
|
248
|
+
},
|
|
249
|
+
http: {
|
|
250
|
+
example: 'curl https://api.codeqr.io/links/bulk \\\n -X POST \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'create',
|
|
256
|
+
endpoint: '/qrcodes',
|
|
257
|
+
httpMethod: 'post',
|
|
258
|
+
summary: 'Create a new QR Code',
|
|
259
|
+
description: 'Create a new QR Code for the authenticated workspace.',
|
|
260
|
+
stainlessPath: '(resource) qrcodes > (method) create',
|
|
261
|
+
qualified: 'client.qrcodes.create',
|
|
262
|
+
params: [
|
|
263
|
+
'type: string;',
|
|
264
|
+
'android?: string;',
|
|
265
|
+
'archived?: boolean;',
|
|
266
|
+
'bgColor?: string;',
|
|
267
|
+
'comments?: string;',
|
|
268
|
+
'contentStatic?: string;',
|
|
269
|
+
'crypto?: object;',
|
|
270
|
+
'description?: string;',
|
|
271
|
+
'doIndex?: boolean;',
|
|
272
|
+
'domain?: string;',
|
|
273
|
+
'email?: object;',
|
|
274
|
+
'excavate?: boolean;',
|
|
275
|
+
'expiredUrl?: string;',
|
|
276
|
+
'expiresAt?: string;',
|
|
277
|
+
'externalId?: string;',
|
|
278
|
+
'facetime?: object;',
|
|
279
|
+
'fgColor?: string;',
|
|
280
|
+
'filled?: boolean;',
|
|
281
|
+
'flexible?: boolean;',
|
|
282
|
+
'folderId?: string;',
|
|
283
|
+
'frame?: string;',
|
|
284
|
+
'frameColor?: string;',
|
|
285
|
+
'frameText?: string;',
|
|
286
|
+
'frameTextColor?: string;',
|
|
287
|
+
"frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; };",
|
|
288
|
+
'geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; };',
|
|
289
|
+
'height?: number;',
|
|
290
|
+
'image?: string;',
|
|
291
|
+
'ios?: string;',
|
|
292
|
+
'isFormMandatory?: boolean;',
|
|
293
|
+
'key?: string;',
|
|
294
|
+
'latlog?: object;',
|
|
295
|
+
'level?: string;',
|
|
296
|
+
'logo?: string;',
|
|
297
|
+
'pageId?: string;',
|
|
298
|
+
'pageUrl?: string;',
|
|
299
|
+
'password?: string;',
|
|
300
|
+
'pattern?: string;',
|
|
301
|
+
'phone?: string;',
|
|
302
|
+
'prefix?: string;',
|
|
303
|
+
'preRedirection?: boolean;',
|
|
304
|
+
'proxy?: boolean;',
|
|
305
|
+
'publicStats?: boolean;',
|
|
306
|
+
'rewrite?: boolean;',
|
|
307
|
+
"rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[];",
|
|
308
|
+
'shape?: string;',
|
|
309
|
+
'showLogo?: boolean;',
|
|
310
|
+
'size?: number;',
|
|
311
|
+
'sms?: object;',
|
|
312
|
+
'src?: string;',
|
|
313
|
+
'static?: boolean;',
|
|
314
|
+
'tagId?: string;',
|
|
315
|
+
'tagIds?: string | string[];',
|
|
316
|
+
'tagNames?: string | string[];',
|
|
317
|
+
'templateId?: string;',
|
|
318
|
+
'text?: string;',
|
|
319
|
+
'title?: string;',
|
|
320
|
+
'trackConversion?: boolean;',
|
|
321
|
+
'url?: string;',
|
|
322
|
+
'useAsTemplate?: boolean;',
|
|
323
|
+
'useDisplayPage?: boolean;',
|
|
324
|
+
'vcard?: object;',
|
|
325
|
+
'webhookIds?: string[];',
|
|
326
|
+
'whatsapp?: { number: string; message?: string; };',
|
|
327
|
+
'width?: number;',
|
|
328
|
+
'wifi?: object;',
|
|
329
|
+
],
|
|
330
|
+
response: 'object',
|
|
331
|
+
markdown: "## create\n\n`client.qrcodes.create(type: string, android?: string, archived?: boolean, bgColor?: string, comments?: string, contentStatic?: string, crypto?: object, description?: string, doIndex?: boolean, domain?: string, email?: object, excavate?: boolean, expiredUrl?: string, expiresAt?: string, externalId?: string, facetime?: object, fgColor?: string, filled?: boolean, flexible?: boolean, folderId?: string, frame?: string, frameColor?: string, frameText?: string, frameTextColor?: string, frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }, geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }, height?: number, image?: string, ios?: string, isFormMandatory?: boolean, key?: string, latlog?: object, level?: string, logo?: string, pageId?: string, pageUrl?: string, password?: string, pattern?: string, phone?: string, prefix?: string, preRedirection?: boolean, proxy?: boolean, publicStats?: boolean, rewrite?: boolean, rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[], shape?: string, showLogo?: boolean, size?: number, sms?: object, src?: string, static?: boolean, tagId?: string, tagIds?: string | string[], tagNames?: string | string[], templateId?: string, text?: string, title?: string, trackConversion?: boolean, url?: string, useAsTemplate?: boolean, useDisplayPage?: boolean, vcard?: object, webhookIds?: string[], whatsapp?: { number: string; message?: string; }, width?: number, wifi?: object): { id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: object[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: tag[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: object; width: number; wifi: object; frameTextStyles?: object; pageId?: string; pageUrl?: string; }`\n\n**post** `/qrcodes`\n\nCreate a new QR Code for the authenticated workspace.\n\n### Parameters\n\n- `type: string`\n The type of content of the QR code.\n\n- `android?: string`\n The destination URL for Android for the QR code for device targeting Android.\n\n- `archived?: boolean`\n If the QR code is archived.\n\n- `bgColor?: string`\n The background color of the QR code (hex or CSS keyword). Invalid values are coerced to default.\n\n- `comments?: string`\n The comments for the QR code.\n\n- `contentStatic?: string`\n The static content of the QR code.\n\n- `crypto?: object`\n The cryptocurrency information of the QR code.\n\n- `description?: string`\n The description of the QR code generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `doIndex?: boolean`\n Allow search engines to index your QR code. The default is `false` if not provided. Learn more: https://codeqr.link/noindex\n\n- `domain?: string`\n The domain of the QR code. If not provided, the main domain of the project will be used (or `codeqr.link` if the project does not have domains).\n\n- `email?: object`\n The email information of the QR code.\n\n- `excavate?: boolean`\n If the QR code should have excavated areas.\n\n- `expiredUrl?: string`\n The URL to redirect when the QR code expires.\n\n- `expiresAt?: string`\n The date and time the QR code will expire in ISO-8601 format. Must be in the future.\n\n- `externalId?: string`\n This is the ID of the QR code in your database. If defined, it can be used to identify the QR code in the future. It must be prefixed with `ext_` when passed as a query parameter.\n\n- `facetime?: object`\n The FaceTime information of the QR code.\n\n- `fgColor?: string`\n The foreground color of the QR code (hex or CSS keyword). Invalid values are coerced to default.\n\n- `filled?: boolean`\n If the QR code is filled.\n\n- `flexible?: boolean`\n If the QR code is flexible.\n\n- `folderId?: string`\n The unique ID of the folder assigned to the QR code. Omit or set to null for no folder.\n\n- `frame?: string`\n The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5, frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at render.\n\n- `frameColor?: string`\n The color of the frame (hex or CSS keyword). Invalid values are coerced to default.\n\n- `frameText?: string`\n Label text rendered inside the frame (e.g. \"SCAN ME\", a product SKU). Maximum 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar grows vertically to fit.\n\n- `frameTextColor?: string`\n Color of the frame label text (hex `#RRGGBB`, `#RGB`, `#RRGGBBAA`, or a CSS keyword from the allowlist). When omitted, a contrasting color is derived automatically from `frameColor`.\n\n- `frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }`\n Typographic styles applied to the frame label text. Every key is enum-gated — unknown keys or out-of-enum values are rejected to prevent SVG attribute injection. All fields are optional; omitted keys fall back to the default (normal weight, normal style, sans family, medium size).\n - `family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'`\n Font family used for the frame label text. `sans` = Arial / Helvetica (default). `sans-condensed` = Arial Narrow. `serif` = Georgia / Times New Roman. `serif-elegant` = Palatino Linotype / Book Antiqua. `mono` = Courier New. Values resolve to safe system font stacks on the rendered SVG.\n - `size?: 's' | 'm' | 'l' | 'xl'`\n Font size preset for the frame label. `s` = 60 viewBox units, `m` = 89.1 (default), `l` = 120, `xl` = 150. Larger sizes grow the frame bar vertically to fit. Extremely long text auto-shrinks to keep within 4 lines (floor 48).\n - `style?: 'normal' | 'italic'`\n Font style of the frame label text. `italic` applies `font-style=\"italic\"`.\n - `weight?: 'normal' | 'bold'`\n Font weight of the frame label text. `bold` renders at SVG `font-weight=\"700\"`, `normal` at `400`.\n\n- `geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }`\n Geographic segmentation information for the QR code in the JSON format `{[COUNTRY]: https://example.com }`.\n - `AD?: string`\n - `AE?: string`\n - `AF?: string`\n - `AG?: string`\n - `AI?: string`\n - `AL?: string`\n - `AM?: string`\n - `AO?: string`\n - `AQ?: string`\n - `AR?: string`\n - `AS?: string`\n - `AT?: string`\n - `AU?: string`\n - `AW?: string`\n - `AX?: string`\n - `AZ?: string`\n - `BA?: string`\n - `BB?: string`\n - `BD?: string`\n - `BE?: string`\n - `BF?: string`\n - `BG?: string`\n - `BH?: string`\n - `BI?: string`\n - `BJ?: string`\n - `BL?: string`\n - `BM?: string`\n - `BN?: string`\n - `BO?: string`\n - `BQ?: string`\n - `BR?: string`\n - `BS?: string`\n - `BT?: string`\n - `BV?: string`\n - `BW?: string`\n - `BY?: string`\n - `BZ?: string`\n - `CA?: string`\n - `CC?: string`\n - `CD?: string`\n - `CF?: string`\n - `CG?: string`\n - `CH?: string`\n - `CI?: string`\n - `CK?: string`\n - `CL?: string`\n - `CM?: string`\n - `CN?: string`\n - `CO?: string`\n - `CR?: string`\n - `CU?: string`\n - `CV?: string`\n - `CW?: string`\n - `CX?: string`\n - `CY?: string`\n - `CZ?: string`\n - `DE?: string`\n - `DJ?: string`\n - `DK?: string`\n - `DM?: string`\n - `DO?: string`\n - `DZ?: string`\n - `EC?: string`\n - `EE?: string`\n - `EG?: string`\n - `EH?: string`\n - `ER?: string`\n - `ES?: string`\n - `ET?: string`\n - `FI?: string`\n - `FJ?: string`\n - `FK?: string`\n - `FM?: string`\n - `FO?: string`\n - `FR?: string`\n - `GA?: string`\n - `GB?: string`\n - `GD?: string`\n - `GE?: string`\n - `GF?: string`\n - `GG?: string`\n - `GH?: string`\n - `GI?: string`\n - `GL?: string`\n - `GM?: string`\n - `GN?: string`\n - `GP?: string`\n - `GQ?: string`\n - `GR?: string`\n - `GS?: string`\n - `GT?: string`\n - `GU?: string`\n - `GW?: string`\n - `GY?: string`\n - `HK?: string`\n - `HM?: string`\n - `HN?: string`\n - `HR?: string`\n - `HT?: string`\n - `HU?: string`\n - `ID?: string`\n - `IE?: string`\n - `IL?: string`\n - `IM?: string`\n - `IN?: string`\n - `IO?: string`\n - `IQ?: string`\n - `IR?: string`\n - `IS?: string`\n - `IT?: string`\n - `JE?: string`\n - `JM?: string`\n - `JO?: string`\n - `JP?: string`\n - `KE?: string`\n - `KG?: string`\n - `KH?: string`\n - `KI?: string`\n - `KM?: string`\n - `KN?: string`\n - `KP?: string`\n - `KR?: string`\n - `KW?: string`\n - `KY?: string`\n - `KZ?: string`\n - `LA?: string`\n - `LB?: string`\n - `LC?: string`\n - `LI?: string`\n - `LK?: string`\n - `LR?: string`\n - `LS?: string`\n - `LT?: string`\n - `LU?: string`\n - `LV?: string`\n - `LY?: string`\n - `MA?: string`\n - `MC?: string`\n - `MD?: string`\n - `ME?: string`\n - `MF?: string`\n - `MG?: string`\n - `MH?: string`\n - `MK?: string`\n - `ML?: string`\n - `MM?: string`\n - `MN?: string`\n - `MO?: string`\n - `MP?: string`\n - `MQ?: string`\n - `MR?: string`\n - `MS?: string`\n - `MT?: string`\n - `MU?: string`\n - `MV?: string`\n - `MW?: string`\n - `MX?: string`\n - `MY?: string`\n - `MZ?: string`\n - `NA?: string`\n - `NC?: string`\n - `NE?: string`\n - `NF?: string`\n - `NG?: string`\n - `NI?: string`\n - `NL?: string`\n - `NO?: string`\n - `NP?: string`\n - `NR?: string`\n - `NU?: string`\n - `NZ?: string`\n - `OM?: string`\n - `PA?: string`\n - `PE?: string`\n - `PF?: string`\n - `PG?: string`\n - `PH?: string`\n - `PK?: string`\n - `PL?: string`\n - `PM?: string`\n - `PN?: string`\n - `PR?: string`\n - `PS?: string`\n - `PT?: string`\n - `PW?: string`\n - `PY?: string`\n - `QA?: string`\n - `RE?: string`\n - `RO?: string`\n - `RS?: string`\n - `RU?: string`\n - `RW?: string`\n - `SA?: string`\n - `SB?: string`\n - `SC?: string`\n - `SD?: string`\n - `SE?: string`\n - `SG?: string`\n - `SH?: string`\n - `SI?: string`\n - `SJ?: string`\n - `SK?: string`\n - `SL?: string`\n - `SM?: string`\n - `SN?: string`\n - `SO?: string`\n - `SR?: string`\n - `SS?: string`\n - `ST?: string`\n - `SV?: string`\n - `SX?: string`\n - `SY?: string`\n - `SZ?: string`\n - `TC?: string`\n - `TD?: string`\n - `TF?: string`\n - `TG?: string`\n - `TH?: string`\n - `TJ?: string`\n - `TK?: string`\n - `TL?: string`\n - `TM?: string`\n - `TN?: string`\n - `TO?: string`\n - `TR?: string`\n - `TT?: string`\n - `TV?: string`\n - `TW?: string`\n - `TZ?: string`\n - `UA?: string`\n - `UG?: string`\n - `UM?: string`\n - `US?: string`\n - `UY?: string`\n - `UZ?: string`\n - `VA?: string`\n - `VC?: string`\n - `VE?: string`\n - `VG?: string`\n - `VI?: string`\n - `VN?: string`\n - `VU?: string`\n - `WF?: string`\n - `WS?: string`\n - `XK?: string`\n - `YE?: string`\n - `YT?: string`\n - `ZA?: string`\n - `ZM?: string`\n - `ZW?: string`\n\n- `height?: number`\n Logo height in pixels. When omitted, a proportional size is used based on the QR code size (about 10–20% depending on size).\n\n- `image?: string`\n The image of the QR code generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `ios?: string`\n The destination URL for iOS for the QR code for device targeting iOS.\n\n- `isFormMandatory?: boolean`\n If the form is mandatory for the page.\n\n- `key?: string`\n The slug of the QR code. If not provided, a random slug of 7 characters will be generated.\n\n- `latlog?: object`\n The latitude and longitude information of the QR code.\n\n- `level?: string`\n The level of error correction of the QR code.\n\n- `logo?: string`\n The logo of the QR code.\n\n- `pageId?: string`\n The ID of the page to redirect to before the QR code destination.\n\n- `pageUrl?: string`\n The URL of the page to redirect to before the QR code destination.\n\n- `password?: string`\n The password required to access the destination URL of the QR code.\n\n- `pattern?: string`\n The pattern of the modules of the QR code.\n\n- `phone?: string`\n The phone number of the QR code.\n\n- `prefix?: string`\n The prefix for the randomly generated key. If provided, the key will be prefixed with this value.\n\n- `preRedirection?: boolean`\n If the QR code has pre-redirection.\n\n- `proxy?: boolean`\n If the QR code uses the custom link preview feature.\n\n- `publicStats?: boolean`\n If the statistics of the QR code are publicly accessible.\n\n- `rewrite?: boolean`\n If the QR code uses link cloaking.\n\n- `rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n Smart rules for conditional destination routing by request attribute.\n\n- `shape?: string`\n The shape of the design around the QR code (none, square, circle).\n\n- `showLogo?: boolean`\n If the logo should be displayed in the QR code.\n\n- `size?: number`\n The size of the QR code.\n\n- `sms?: object`\n The SMS information of the QR code.\n\n- `src?: string`\n The image URL of the QR code.\n\n- `static?: boolean`\n If the QR code is static.\n\n- `tagId?: string`\n The unique ID of the tag assigned to the QR code. This field is deprecated – use `tagIds` instead.\n\n- `tagIds?: string | string[]`\n The unique IDs of the tags assigned to the QR code.\n\n- `tagNames?: string | string[]`\n The unique name of the tags assigned to the QR code (case insensitive).\n\n- `templateId?: string`\n ID of a QR code (in the same project) marked as a template. Its customization fields (colors, logo, pattern, shape, frame) will be applied to the new QR code unless explicitly overridden.\n\n- `text?: string`\n The text of the QR code.\n\n- `title?: string`\n The title of the QR code generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `trackConversion?: boolean`\n If should track conversions for the QR code.\n\n- `url?: string`\n The destination URL of the QR code.\n\n- `useAsTemplate?: boolean`\n Whether this QR code should be used as a reusable template.\n\n- `useDisplayPage?: boolean`\n For dynamic QR codes with phone, email, or sms types: if true (default), shows an action page with buttons. If false, redirects directly to tel:/mailto:/sms: URI.\n\n- `vcard?: object`\n The vCard information of the QR code.\n\n- `webhookIds?: string[]`\n An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.\n\n- `whatsapp?: { number: string; message?: string; }`\n The WhatsApp click-to-chat info: E.164 number (digits only) and optional prefilled message.\n - `number: string`\n - `message?: string`\n\n- `width?: number`\n Logo width in pixels. When omitted, a proportional size is used based on the QR code size (about 10–20% depending on size).\n\n- `wifi?: object`\n The WiFi information of the QR code.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: { number: string; message?: string; }; width: number; wifi: object; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; pageId?: string; pageUrl?: string; }`\n\n - `id: string`\n - `android: string`\n - `archived: boolean`\n - `bgColor: string`\n - `comments: string`\n - `contentStatic: string`\n - `createdAt: string`\n - `crypto: object`\n - `description: string`\n - `doIndex: boolean`\n - `domain: string`\n - `email: object`\n - `excavate: boolean`\n - `expiredUrl: string`\n - `expiresAt: string`\n - `externalId: string`\n - `facetime: object`\n - `fgColor: string`\n - `filled: boolean`\n - `flexible: boolean`\n - `folderId: string`\n - `geo: object`\n - `height: number`\n - `image: string`\n - `ios: string`\n - `isFormMandatory: boolean`\n - `key: string`\n - `lastClicked: string`\n - `latlog: object`\n - `leads: number`\n - `level: string`\n - `logo: string`\n - `notificationToken: string`\n - `password: string`\n - `phone: string`\n - `preRedirection: boolean`\n - `projectId: string`\n - `proxy: boolean`\n - `publicStats: boolean`\n - `rewrite: boolean`\n - `rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n - `saleAmount: number`\n - `sales: number`\n - `scans: number`\n - `showLogo: boolean`\n - `size: number`\n - `sms: object`\n - `src: string`\n - `static: boolean`\n - `tagId: string`\n - `tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n - `text: string`\n - `title: string`\n - `trackConversion: boolean`\n - `type: string`\n - `updatedAt: string`\n - `url: string`\n - `useDisplayPage: boolean`\n - `userId: string`\n - `utm_campaign: string`\n - `utm_content: string`\n - `utm_medium: string`\n - `utm_source: string`\n - `utm_term: string`\n - `vcard: object`\n - `whatsapp: { number: string; message?: string; }`\n - `width: number`\n - `wifi: object`\n - `frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }`\n - `pageId?: string`\n - `pageUrl?: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst qrCode = await client.qrcodes.create({ type: 'url' });\n\nconsole.log(qrCode);\n```",
|
|
332
|
+
perLanguage: {
|
|
333
|
+
typescript: {
|
|
334
|
+
method: 'client.qrcodes.create',
|
|
335
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst qrCode = await client.qrcodes.create({ type: 'url' });\n\nconsole.log(qrCode.id);",
|
|
336
|
+
},
|
|
337
|
+
http: {
|
|
338
|
+
example: 'curl https://api.codeqr.io/qrcodes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $CODEQR_API_KEY" \\\n -d \'{\n "type": "url",\n "externalId": "123456",\n "frameText": "SKU-LH905461",\n "frameTextColor": "#ffffff",\n "frameTextStyles": {\n "family": "sans",\n "size": "xl",\n "weight": "bold"\n },\n "tagIds": [\n "clux0rgak00011..."\n ]\n }\'',
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: 'list',
|
|
344
|
+
endpoint: '/qrcodes',
|
|
345
|
+
httpMethod: 'get',
|
|
346
|
+
summary: 'Retrieve a list of QR Codes',
|
|
347
|
+
description: 'Retrieve a paginated list of QR Codes for the authenticated workspace.',
|
|
348
|
+
stainlessPath: '(resource) qrcodes > (method) list',
|
|
349
|
+
qualified: 'client.qrcodes.list',
|
|
350
|
+
params: [
|
|
351
|
+
'comments?: string;',
|
|
352
|
+
'createdAfter?: string;',
|
|
353
|
+
'createdBefore?: string;',
|
|
354
|
+
'domain?: string;',
|
|
355
|
+
'expiresAfter?: string;',
|
|
356
|
+
'expiresAt?: string;',
|
|
357
|
+
'expiresBefore?: string;',
|
|
358
|
+
'folderId?: string;',
|
|
359
|
+
"format?: 'static' | 'dynamic';",
|
|
360
|
+
'hasComments?: boolean;',
|
|
361
|
+
'hasCustomSocial?: boolean;',
|
|
362
|
+
'hasDevice?: boolean;',
|
|
363
|
+
'hasExpiration?: boolean;',
|
|
364
|
+
'hasGeo?: boolean;',
|
|
365
|
+
'hasPassword?: boolean;',
|
|
366
|
+
'hasTags?: boolean;',
|
|
367
|
+
'hasUTM?: boolean;',
|
|
368
|
+
'page?: number;',
|
|
369
|
+
'pageSize?: number;',
|
|
370
|
+
'password?: string;',
|
|
371
|
+
'projectSlug?: string;',
|
|
372
|
+
'scansMax?: number;',
|
|
373
|
+
'scansMin?: number;',
|
|
374
|
+
'search?: string;',
|
|
375
|
+
'showArchived?: boolean;',
|
|
376
|
+
"sort?: 'createdAt' | 'scans' | 'lastClicked';",
|
|
377
|
+
'tagId?: string;',
|
|
378
|
+
'tagIds?: string | string[];',
|
|
379
|
+
'tagNames?: string | string[];',
|
|
380
|
+
'trackConversion?: boolean;',
|
|
381
|
+
'type?: string;',
|
|
382
|
+
'useAsTemplate?: boolean;',
|
|
383
|
+
'userId?: string;',
|
|
384
|
+
'utm_campaign?: string;',
|
|
385
|
+
'utm_content?: string;',
|
|
386
|
+
'utm_medium?: string;',
|
|
387
|
+
'utm_source?: string;',
|
|
388
|
+
'utm_term?: string;',
|
|
389
|
+
'withTags?: boolean;',
|
|
390
|
+
],
|
|
391
|
+
response: 'object[]',
|
|
392
|
+
markdown: "## list\n\n`client.qrcodes.list(comments?: string, createdAfter?: string, createdBefore?: string, domain?: string, expiresAfter?: string, expiresAt?: string, expiresBefore?: string, folderId?: string, format?: 'static' | 'dynamic', hasComments?: boolean, hasCustomSocial?: boolean, hasDevice?: boolean, hasExpiration?: boolean, hasGeo?: boolean, hasPassword?: boolean, hasTags?: boolean, hasUTM?: boolean, page?: number, pageSize?: number, password?: string, projectSlug?: string, scansMax?: number, scansMin?: number, search?: string, showArchived?: boolean, sort?: 'createdAt' | 'scans' | 'lastClicked', tagId?: string, tagIds?: string | string[], tagNames?: string | string[], trackConversion?: boolean, type?: string, useAsTemplate?: boolean, userId?: string, utm_campaign?: string, utm_content?: string, utm_medium?: string, utm_source?: string, utm_term?: string, withTags?: boolean): object[]`\n\n**get** `/qrcodes`\n\nRetrieve a paginated list of QR Codes for the authenticated workspace.\n\n### Parameters\n\n- `comments?: string`\n The comments to filter by.\n\n- `createdAfter?: string`\n Filter QR codes created after this date\n\n- `createdBefore?: string`\n Filter QR codes created before this date\n\n- `domain?: string`\n The domain to filter the QR codes. For example, `ac.me`. If not provided, all QR codes of the project will be returned.\n\n- `expiresAfter?: string`\n Filter QR codes expiring after this date\n\n- `expiresAt?: string`\n The date and time the QR code will expire in ISO-8601 format. Must be in the future.\n\n- `expiresBefore?: string`\n Filter QR codes expiring before this date\n\n- `folderId?: string`\n The folder ID to filter the QR codes by.\n\n- `format?: 'static' | 'dynamic'`\n Filter by QR code format - static or dynamic\n\n- `hasComments?: boolean`\n Filter QR codes with/without comments\n\n- `hasCustomSocial?: boolean`\n Filter QR codes with/without custom social media cards\n\n- `hasDevice?: boolean`\n Filter QR codes with/without device targeting\n\n- `hasExpiration?: boolean`\n Filter QR codes with/without expiration date\n\n- `hasGeo?: boolean`\n Filter QR codes with/without geo-targeting\n\n- `hasPassword?: boolean`\n Filter QR codes with/without password protection\n\n- `hasTags?: boolean`\n Filter QR codes with/without tags\n\n- `hasUTM?: boolean`\n Filter QR codes with/without UTM parameters\n\n- `page?: number`\n The page number for pagination.\n\n- `pageSize?: number`\n The number of items per page.\n\n- `password?: string`\n The password to filter by.\n\n- `projectSlug?: string`\n The slug of the project to which the QR code belongs. For example, for `app.codeqr.io/acme`, the projectSlug is `acme`.\n\n- `scansMax?: number`\n Maximum number of scans\n\n- `scansMin?: number`\n Minimum number of scans\n\n- `search?: string`\n The search term to filter the QR codes. The search term will be matched against the QR code slug, title, and the destination URL.\n\n- `showArchived?: boolean`\n If should include archived QR codes in the response. The default is `false` if not provided.\n\n- `sort?: 'createdAt' | 'scans' | 'lastClicked'`\n The field to order the QR codes. The default is `createdAt`, and the order of sorting is always descending.\n\n- `tagId?: string`\n [DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned to the QR code.\n\n- `tagIds?: string | string[]`\n The IDs of the tags to filter the QR codes.\n\n- `tagNames?: string | string[]`\n The unique name of the tags assigned to the QR code (case insensitive).\n\n- `trackConversion?: boolean`\n If should include QR codes with conversion tracking enabled. The default is `false` if not provided.\n\n- `type?: string`\n Filter by QR code type\n\n- `useAsTemplate?: boolean`\n Filter QR codes marked as templates.\n\n- `userId?: string`\n The ID of the user to filter by.\n\n- `utm_campaign?: string`\n Filter by UTM campaign value\n\n- `utm_content?: string`\n Filter by UTM content value\n\n- `utm_medium?: string`\n Filter by UTM medium value\n\n- `utm_source?: string`\n Filter by UTM source value\n\n- `utm_term?: string`\n Filter by UTM term value\n\n- `withTags?: boolean`\n If should include tags in the response. The default is `false` if not provided.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: object[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: { number: string; message?: string; }; width: number; wifi: object; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; pageId?: string; pageUrl?: string; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst qrCodes = await client.qrcodes.list();\n\nconsole.log(qrCodes);\n```",
|
|
393
|
+
perLanguage: {
|
|
394
|
+
typescript: {
|
|
395
|
+
method: 'client.qrcodes.list',
|
|
396
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst qrCodes = await client.qrcodes.list();\n\nconsole.log(qrCodes);",
|
|
397
|
+
},
|
|
398
|
+
http: {
|
|
399
|
+
example: 'curl https://api.codeqr.io/qrcodes \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: 'retrieve',
|
|
405
|
+
endpoint: '/qrcodes/info',
|
|
406
|
+
httpMethod: 'get',
|
|
407
|
+
summary: 'Retrieve a QR Code',
|
|
408
|
+
description: 'Retrieve the info for a QR Code.',
|
|
409
|
+
stainlessPath: '(resource) qrcodes > (method) retrieve',
|
|
410
|
+
qualified: 'client.qrcodes.retrieve',
|
|
411
|
+
params: [
|
|
412
|
+
'domain: string;',
|
|
413
|
+
'key: string;',
|
|
414
|
+
'projectSlug: string;',
|
|
415
|
+
'externalId?: string;',
|
|
416
|
+
'qrCodeId?: string;',
|
|
417
|
+
],
|
|
418
|
+
response: 'object',
|
|
419
|
+
markdown: "## retrieve\n\n`client.qrcodes.retrieve(domain: string, key: string, projectSlug: string, externalId?: string, qrCodeId?: string): { id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: object[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: tag[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: object; width: number; wifi: object; frameTextStyles?: object; pageId?: string; pageUrl?: string; }`\n\n**get** `/qrcodes/info`\n\nRetrieve the info for a QR Code.\n\n### Parameters\n\n- `domain: string`\n The domain of the QR code to be retrieved. For example, for `codeqr.link/github`, the domain is `codeqr.link`.\n\n- `key: string`\n The key of the QR code to be retrieved. For example, for `codeqr.link/github`, the key is `github`.\n\n- `projectSlug: string`\n The slug of the project to which the QR code belongs. For example, for `app.codeqr.io/acme`, the projectSlug is `acme`.\n\n- `externalId?: string`\n This is the ID of the QR code in your database. It must be prefixed with `ext_` when passed as a query parameter.\n\n- `qrCodeId?: string`\n The unique ID of the QR code.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: { number: string; message?: string; }; width: number; wifi: object; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; pageId?: string; pageUrl?: string; }`\n\n - `id: string`\n - `android: string`\n - `archived: boolean`\n - `bgColor: string`\n - `comments: string`\n - `contentStatic: string`\n - `createdAt: string`\n - `crypto: object`\n - `description: string`\n - `doIndex: boolean`\n - `domain: string`\n - `email: object`\n - `excavate: boolean`\n - `expiredUrl: string`\n - `expiresAt: string`\n - `externalId: string`\n - `facetime: object`\n - `fgColor: string`\n - `filled: boolean`\n - `flexible: boolean`\n - `folderId: string`\n - `geo: object`\n - `height: number`\n - `image: string`\n - `ios: string`\n - `isFormMandatory: boolean`\n - `key: string`\n - `lastClicked: string`\n - `latlog: object`\n - `leads: number`\n - `level: string`\n - `logo: string`\n - `notificationToken: string`\n - `password: string`\n - `phone: string`\n - `preRedirection: boolean`\n - `projectId: string`\n - `proxy: boolean`\n - `publicStats: boolean`\n - `rewrite: boolean`\n - `rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n - `saleAmount: number`\n - `sales: number`\n - `scans: number`\n - `showLogo: boolean`\n - `size: number`\n - `sms: object`\n - `src: string`\n - `static: boolean`\n - `tagId: string`\n - `tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n - `text: string`\n - `title: string`\n - `trackConversion: boolean`\n - `type: string`\n - `updatedAt: string`\n - `url: string`\n - `useDisplayPage: boolean`\n - `userId: string`\n - `utm_campaign: string`\n - `utm_content: string`\n - `utm_medium: string`\n - `utm_source: string`\n - `utm_term: string`\n - `vcard: object`\n - `whatsapp: { number: string; message?: string; }`\n - `width: number`\n - `wifi: object`\n - `frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }`\n - `pageId?: string`\n - `pageUrl?: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst qrCode = await client.qrcodes.retrieve({\n domain: 'x',\n key: 'x',\n projectSlug: 'x',\n});\n\nconsole.log(qrCode);\n```",
|
|
420
|
+
perLanguage: {
|
|
421
|
+
typescript: {
|
|
422
|
+
method: 'client.qrcodes.retrieve',
|
|
423
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst qrCode = await client.qrcodes.retrieve({\n domain: 'x',\n key: 'x',\n projectSlug: 'x',\n});\n\nconsole.log(qrCode.id);",
|
|
424
|
+
},
|
|
425
|
+
http: {
|
|
426
|
+
example: 'curl https://api.codeqr.io/qrcodes/info \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
name: 'update',
|
|
432
|
+
endpoint: '/qrcodes/{qrcodeId}',
|
|
433
|
+
httpMethod: 'put',
|
|
434
|
+
summary: 'Update a QR Code',
|
|
435
|
+
description: "Update a QR Code for the authenticated workspace. If there's no change, returns it as it is.",
|
|
436
|
+
stainlessPath: '(resource) qrcodes > (method) update',
|
|
437
|
+
qualified: 'client.qrcodes.update',
|
|
438
|
+
params: [
|
|
439
|
+
'qrcodeId: string;',
|
|
440
|
+
'android?: string;',
|
|
441
|
+
'archived?: boolean;',
|
|
442
|
+
'bgColor?: string;',
|
|
443
|
+
'comments?: string;',
|
|
444
|
+
'contentStatic?: string;',
|
|
445
|
+
'crypto?: object;',
|
|
446
|
+
'description?: string;',
|
|
447
|
+
'doIndex?: boolean;',
|
|
448
|
+
'domain?: string;',
|
|
449
|
+
'email?: object;',
|
|
450
|
+
'excavate?: boolean;',
|
|
451
|
+
'expiredUrl?: string;',
|
|
452
|
+
'expiresAt?: string;',
|
|
453
|
+
'externalId?: string;',
|
|
454
|
+
'facetime?: object;',
|
|
455
|
+
'fgColor?: string;',
|
|
456
|
+
'filled?: boolean;',
|
|
457
|
+
'flexible?: boolean;',
|
|
458
|
+
'folderId?: string;',
|
|
459
|
+
'frame?: string;',
|
|
460
|
+
'frameColor?: string;',
|
|
461
|
+
'frameText?: string;',
|
|
462
|
+
'frameTextColor?: string;',
|
|
463
|
+
"frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; };",
|
|
464
|
+
'geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; };',
|
|
465
|
+
'height?: number;',
|
|
466
|
+
'image?: string;',
|
|
467
|
+
'ios?: string;',
|
|
468
|
+
'isFormMandatory?: boolean;',
|
|
469
|
+
'key?: string;',
|
|
470
|
+
'latlog?: object;',
|
|
471
|
+
'level?: string;',
|
|
472
|
+
'logo?: string;',
|
|
473
|
+
'pageId?: string;',
|
|
474
|
+
'pageUrl?: string;',
|
|
475
|
+
'password?: string;',
|
|
476
|
+
'pattern?: string;',
|
|
477
|
+
'phone?: string;',
|
|
478
|
+
'prefix?: string;',
|
|
479
|
+
'preRedirection?: boolean;',
|
|
480
|
+
'proxy?: boolean;',
|
|
481
|
+
'publicStats?: boolean;',
|
|
482
|
+
'rewrite?: boolean;',
|
|
483
|
+
"rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[];",
|
|
484
|
+
'shape?: string;',
|
|
485
|
+
'showLogo?: boolean;',
|
|
486
|
+
'size?: number;',
|
|
487
|
+
'sms?: object;',
|
|
488
|
+
'src?: string;',
|
|
489
|
+
'static?: boolean;',
|
|
490
|
+
'tagId?: string;',
|
|
491
|
+
'tagIds?: string | string[];',
|
|
492
|
+
'tagNames?: string | string[];',
|
|
493
|
+
'templateId?: string;',
|
|
494
|
+
'text?: string;',
|
|
495
|
+
'title?: string;',
|
|
496
|
+
'trackConversion?: boolean;',
|
|
497
|
+
'type?: string;',
|
|
498
|
+
'url?: string;',
|
|
499
|
+
'useAsTemplate?: boolean;',
|
|
500
|
+
'useDisplayPage?: boolean;',
|
|
501
|
+
'vcard?: object;',
|
|
502
|
+
'webhookIds?: string[];',
|
|
503
|
+
'whatsapp?: { number: string; message?: string; };',
|
|
504
|
+
'width?: number;',
|
|
505
|
+
'wifi?: object;',
|
|
506
|
+
],
|
|
507
|
+
response: 'object',
|
|
508
|
+
markdown: "## update\n\n`client.qrcodes.update(qrcodeId: string, android?: string, archived?: boolean, bgColor?: string, comments?: string, contentStatic?: string, crypto?: object, description?: string, doIndex?: boolean, domain?: string, email?: object, excavate?: boolean, expiredUrl?: string, expiresAt?: string, externalId?: string, facetime?: object, fgColor?: string, filled?: boolean, flexible?: boolean, folderId?: string, frame?: string, frameColor?: string, frameText?: string, frameTextColor?: string, frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }, geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }, height?: number, image?: string, ios?: string, isFormMandatory?: boolean, key?: string, latlog?: object, level?: string, logo?: string, pageId?: string, pageUrl?: string, password?: string, pattern?: string, phone?: string, prefix?: string, preRedirection?: boolean, proxy?: boolean, publicStats?: boolean, rewrite?: boolean, rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[], shape?: string, showLogo?: boolean, size?: number, sms?: object, src?: string, static?: boolean, tagId?: string, tagIds?: string | string[], tagNames?: string | string[], templateId?: string, text?: string, title?: string, trackConversion?: boolean, type?: string, url?: string, useAsTemplate?: boolean, useDisplayPage?: boolean, vcard?: object, webhookIds?: string[], whatsapp?: { number: string; message?: string; }, width?: number, wifi?: object): { id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: object[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: tag[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: object; width: number; wifi: object; frameTextStyles?: object; pageId?: string; pageUrl?: string; }`\n\n**put** `/qrcodes/{qrcodeId}`\n\nUpdate a QR Code for the authenticated workspace. If there's no change, returns it as it is.\n\n### Parameters\n\n- `qrcodeId: string`\n The id of the QR Code to update. You may use either `qrcodeId` (obtained via `/qrcodes/info` endpoint) or `externalId` prefixed with `ext_`.\n\n- `android?: string`\n The destination URL for Android for the QR code for device targeting Android.\n\n- `archived?: boolean`\n If the QR code is archived.\n\n- `bgColor?: string`\n The background color of the QR code (hex or CSS keyword). Invalid values are coerced to default.\n\n- `comments?: string`\n The comments for the QR code.\n\n- `contentStatic?: string`\n The static content of the QR code.\n\n- `crypto?: object`\n The cryptocurrency information of the QR code.\n\n- `description?: string`\n The description of the QR code generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `doIndex?: boolean`\n Allow search engines to index your QR code. The default is `false` if not provided. Learn more: https://codeqr.link/noindex\n\n- `domain?: string`\n The domain of the QR code. If not provided, the main domain of the project will be used (or `codeqr.link` if the project does not have domains).\n\n- `email?: object`\n The email information of the QR code.\n\n- `excavate?: boolean`\n If the QR code should have excavated areas.\n\n- `expiredUrl?: string`\n The URL to redirect when the QR code expires.\n\n- `expiresAt?: string`\n The date and time the QR code will expire in ISO-8601 format. Must be in the future.\n\n- `externalId?: string`\n This is the ID of the QR code in your database. If defined, it can be used to identify the QR code in the future. It must be prefixed with `ext_` when passed as a query parameter.\n\n- `facetime?: object`\n The FaceTime information of the QR code.\n\n- `fgColor?: string`\n The foreground color of the QR code (hex or CSS keyword). Invalid values are coerced to default.\n\n- `filled?: boolean`\n If the QR code is filled.\n\n- `flexible?: boolean`\n If the QR code is flexible.\n\n- `folderId?: string`\n The unique ID of the folder assigned to the QR code. Omit or set to null for no folder.\n\n- `frame?: string`\n The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5, frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at render.\n\n- `frameColor?: string`\n The color of the frame (hex or CSS keyword). Invalid values are coerced to default.\n\n- `frameText?: string`\n Label text rendered inside the frame (e.g. \"SCAN ME\", a product SKU). Maximum 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar grows vertically to fit.\n\n- `frameTextColor?: string`\n Color of the frame label text (hex `#RRGGBB`, `#RGB`, `#RRGGBBAA`, or a CSS keyword from the allowlist). When omitted, a contrasting color is derived automatically from `frameColor`.\n\n- `frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }`\n Typographic styles applied to the frame label text. Every key is enum-gated — unknown keys or out-of-enum values are rejected to prevent SVG attribute injection. All fields are optional; omitted keys fall back to the default (normal weight, normal style, sans family, medium size).\n - `family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'`\n Font family used for the frame label text. `sans` = Arial / Helvetica (default). `sans-condensed` = Arial Narrow. `serif` = Georgia / Times New Roman. `serif-elegant` = Palatino Linotype / Book Antiqua. `mono` = Courier New. Values resolve to safe system font stacks on the rendered SVG.\n - `size?: 's' | 'm' | 'l' | 'xl'`\n Font size preset for the frame label. `s` = 60 viewBox units, `m` = 89.1 (default), `l` = 120, `xl` = 150. Larger sizes grow the frame bar vertically to fit. Extremely long text auto-shrinks to keep within 4 lines (floor 48).\n - `style?: 'normal' | 'italic'`\n Font style of the frame label text. `italic` applies `font-style=\"italic\"`.\n - `weight?: 'normal' | 'bold'`\n Font weight of the frame label text. `bold` renders at SVG `font-weight=\"700\"`, `normal` at `400`.\n\n- `geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }`\n Geographic segmentation information for the QR code in the JSON format `{[COUNTRY]: https://example.com }`.\n - `AD?: string`\n - `AE?: string`\n - `AF?: string`\n - `AG?: string`\n - `AI?: string`\n - `AL?: string`\n - `AM?: string`\n - `AO?: string`\n - `AQ?: string`\n - `AR?: string`\n - `AS?: string`\n - `AT?: string`\n - `AU?: string`\n - `AW?: string`\n - `AX?: string`\n - `AZ?: string`\n - `BA?: string`\n - `BB?: string`\n - `BD?: string`\n - `BE?: string`\n - `BF?: string`\n - `BG?: string`\n - `BH?: string`\n - `BI?: string`\n - `BJ?: string`\n - `BL?: string`\n - `BM?: string`\n - `BN?: string`\n - `BO?: string`\n - `BQ?: string`\n - `BR?: string`\n - `BS?: string`\n - `BT?: string`\n - `BV?: string`\n - `BW?: string`\n - `BY?: string`\n - `BZ?: string`\n - `CA?: string`\n - `CC?: string`\n - `CD?: string`\n - `CF?: string`\n - `CG?: string`\n - `CH?: string`\n - `CI?: string`\n - `CK?: string`\n - `CL?: string`\n - `CM?: string`\n - `CN?: string`\n - `CO?: string`\n - `CR?: string`\n - `CU?: string`\n - `CV?: string`\n - `CW?: string`\n - `CX?: string`\n - `CY?: string`\n - `CZ?: string`\n - `DE?: string`\n - `DJ?: string`\n - `DK?: string`\n - `DM?: string`\n - `DO?: string`\n - `DZ?: string`\n - `EC?: string`\n - `EE?: string`\n - `EG?: string`\n - `EH?: string`\n - `ER?: string`\n - `ES?: string`\n - `ET?: string`\n - `FI?: string`\n - `FJ?: string`\n - `FK?: string`\n - `FM?: string`\n - `FO?: string`\n - `FR?: string`\n - `GA?: string`\n - `GB?: string`\n - `GD?: string`\n - `GE?: string`\n - `GF?: string`\n - `GG?: string`\n - `GH?: string`\n - `GI?: string`\n - `GL?: string`\n - `GM?: string`\n - `GN?: string`\n - `GP?: string`\n - `GQ?: string`\n - `GR?: string`\n - `GS?: string`\n - `GT?: string`\n - `GU?: string`\n - `GW?: string`\n - `GY?: string`\n - `HK?: string`\n - `HM?: string`\n - `HN?: string`\n - `HR?: string`\n - `HT?: string`\n - `HU?: string`\n - `ID?: string`\n - `IE?: string`\n - `IL?: string`\n - `IM?: string`\n - `IN?: string`\n - `IO?: string`\n - `IQ?: string`\n - `IR?: string`\n - `IS?: string`\n - `IT?: string`\n - `JE?: string`\n - `JM?: string`\n - `JO?: string`\n - `JP?: string`\n - `KE?: string`\n - `KG?: string`\n - `KH?: string`\n - `KI?: string`\n - `KM?: string`\n - `KN?: string`\n - `KP?: string`\n - `KR?: string`\n - `KW?: string`\n - `KY?: string`\n - `KZ?: string`\n - `LA?: string`\n - `LB?: string`\n - `LC?: string`\n - `LI?: string`\n - `LK?: string`\n - `LR?: string`\n - `LS?: string`\n - `LT?: string`\n - `LU?: string`\n - `LV?: string`\n - `LY?: string`\n - `MA?: string`\n - `MC?: string`\n - `MD?: string`\n - `ME?: string`\n - `MF?: string`\n - `MG?: string`\n - `MH?: string`\n - `MK?: string`\n - `ML?: string`\n - `MM?: string`\n - `MN?: string`\n - `MO?: string`\n - `MP?: string`\n - `MQ?: string`\n - `MR?: string`\n - `MS?: string`\n - `MT?: string`\n - `MU?: string`\n - `MV?: string`\n - `MW?: string`\n - `MX?: string`\n - `MY?: string`\n - `MZ?: string`\n - `NA?: string`\n - `NC?: string`\n - `NE?: string`\n - `NF?: string`\n - `NG?: string`\n - `NI?: string`\n - `NL?: string`\n - `NO?: string`\n - `NP?: string`\n - `NR?: string`\n - `NU?: string`\n - `NZ?: string`\n - `OM?: string`\n - `PA?: string`\n - `PE?: string`\n - `PF?: string`\n - `PG?: string`\n - `PH?: string`\n - `PK?: string`\n - `PL?: string`\n - `PM?: string`\n - `PN?: string`\n - `PR?: string`\n - `PS?: string`\n - `PT?: string`\n - `PW?: string`\n - `PY?: string`\n - `QA?: string`\n - `RE?: string`\n - `RO?: string`\n - `RS?: string`\n - `RU?: string`\n - `RW?: string`\n - `SA?: string`\n - `SB?: string`\n - `SC?: string`\n - `SD?: string`\n - `SE?: string`\n - `SG?: string`\n - `SH?: string`\n - `SI?: string`\n - `SJ?: string`\n - `SK?: string`\n - `SL?: string`\n - `SM?: string`\n - `SN?: string`\n - `SO?: string`\n - `SR?: string`\n - `SS?: string`\n - `ST?: string`\n - `SV?: string`\n - `SX?: string`\n - `SY?: string`\n - `SZ?: string`\n - `TC?: string`\n - `TD?: string`\n - `TF?: string`\n - `TG?: string`\n - `TH?: string`\n - `TJ?: string`\n - `TK?: string`\n - `TL?: string`\n - `TM?: string`\n - `TN?: string`\n - `TO?: string`\n - `TR?: string`\n - `TT?: string`\n - `TV?: string`\n - `TW?: string`\n - `TZ?: string`\n - `UA?: string`\n - `UG?: string`\n - `UM?: string`\n - `US?: string`\n - `UY?: string`\n - `UZ?: string`\n - `VA?: string`\n - `VC?: string`\n - `VE?: string`\n - `VG?: string`\n - `VI?: string`\n - `VN?: string`\n - `VU?: string`\n - `WF?: string`\n - `WS?: string`\n - `XK?: string`\n - `YE?: string`\n - `YT?: string`\n - `ZA?: string`\n - `ZM?: string`\n - `ZW?: string`\n\n- `height?: number`\n Logo height in pixels. When omitted, a proportional size is used based on the QR code size (about 10–20% depending on size).\n\n- `image?: string`\n The image of the QR code generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `ios?: string`\n The destination URL for iOS for the QR code for device targeting iOS.\n\n- `isFormMandatory?: boolean`\n If the form is mandatory for the page.\n\n- `key?: string`\n The slug of the QR code. If not provided, a random slug of 7 characters will be generated.\n\n- `latlog?: object`\n The latitude and longitude information of the QR code.\n\n- `level?: string`\n The level of error correction of the QR code.\n\n- `logo?: string`\n The logo of the QR code.\n\n- `pageId?: string`\n The ID of the page to redirect to before the QR code destination.\n\n- `pageUrl?: string`\n The URL of the page to redirect to before the QR code destination.\n\n- `password?: string`\n The password required to access the destination URL of the QR code.\n\n- `pattern?: string`\n The pattern of the modules of the QR code.\n\n- `phone?: string`\n The phone number of the QR code.\n\n- `prefix?: string`\n The prefix for the randomly generated key. If provided, the key will be prefixed with this value.\n\n- `preRedirection?: boolean`\n If the QR code has pre-redirection.\n\n- `proxy?: boolean`\n If the QR code uses the custom link preview feature.\n\n- `publicStats?: boolean`\n If the statistics of the QR code are publicly accessible.\n\n- `rewrite?: boolean`\n If the QR code uses link cloaking.\n\n- `rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n Smart rules for conditional destination routing by request attribute.\n\n- `shape?: string`\n The shape of the design around the QR code (none, square, circle).\n\n- `showLogo?: boolean`\n If the logo should be displayed in the QR code.\n\n- `size?: number`\n The size of the QR code.\n\n- `sms?: object`\n The SMS information of the QR code.\n\n- `src?: string`\n The image URL of the QR code.\n\n- `static?: boolean`\n If the QR code is static.\n\n- `tagId?: string`\n The unique ID of the tag assigned to the QR code. This field is deprecated – use `tagIds` instead.\n\n- `tagIds?: string | string[]`\n The unique IDs of the tags assigned to the QR code.\n\n- `tagNames?: string | string[]`\n The unique name of the tags assigned to the QR code (case insensitive).\n\n- `templateId?: string`\n ID of a QR code (in the same project) marked as a template. Its customization fields (colors, logo, pattern, shape, frame) will be applied to the new QR code unless explicitly overridden.\n\n- `text?: string`\n The text of the QR code.\n\n- `title?: string`\n The title of the QR code generated via `api.codeqr.io/metatags`. Will be used for custom link preview if `proxy` is true.\n\n- `trackConversion?: boolean`\n If should track conversions for the QR code.\n\n- `type?: string`\n The type of content of the QR code.\n\n- `url?: string`\n The destination URL of the QR code.\n\n- `useAsTemplate?: boolean`\n Whether this QR code should be used as a reusable template.\n\n- `useDisplayPage?: boolean`\n For dynamic QR codes with phone, email, or sms types: if true (default), shows an action page with buttons. If false, redirects directly to tel:/mailto:/sms: URI.\n\n- `vcard?: object`\n The vCard information of the QR code.\n\n- `webhookIds?: string[]`\n An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.\n\n- `whatsapp?: { number: string; message?: string; }`\n The WhatsApp click-to-chat info: E.164 number (digits only) and optional prefilled message.\n - `number: string`\n - `message?: string`\n\n- `width?: number`\n Logo width in pixels. When omitted, a proportional size is used based on the QR code size (about 10–20% depending on size).\n\n- `wifi?: object`\n The WiFi information of the QR code.\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: { number: string; message?: string; }; width: number; wifi: object; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; pageId?: string; pageUrl?: string; }`\n\n - `id: string`\n - `android: string`\n - `archived: boolean`\n - `bgColor: string`\n - `comments: string`\n - `contentStatic: string`\n - `createdAt: string`\n - `crypto: object`\n - `description: string`\n - `doIndex: boolean`\n - `domain: string`\n - `email: object`\n - `excavate: boolean`\n - `expiredUrl: string`\n - `expiresAt: string`\n - `externalId: string`\n - `facetime: object`\n - `fgColor: string`\n - `filled: boolean`\n - `flexible: boolean`\n - `folderId: string`\n - `geo: object`\n - `height: number`\n - `image: string`\n - `ios: string`\n - `isFormMandatory: boolean`\n - `key: string`\n - `lastClicked: string`\n - `latlog: object`\n - `leads: number`\n - `level: string`\n - `logo: string`\n - `notificationToken: string`\n - `password: string`\n - `phone: string`\n - `preRedirection: boolean`\n - `projectId: string`\n - `proxy: boolean`\n - `publicStats: boolean`\n - `rewrite: boolean`\n - `rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]`\n - `saleAmount: number`\n - `sales: number`\n - `scans: number`\n - `showLogo: boolean`\n - `size: number`\n - `sms: object`\n - `src: string`\n - `static: boolean`\n - `tagId: string`\n - `tags: { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n - `text: string`\n - `title: string`\n - `trackConversion: boolean`\n - `type: string`\n - `updatedAt: string`\n - `url: string`\n - `useDisplayPage: boolean`\n - `userId: string`\n - `utm_campaign: string`\n - `utm_content: string`\n - `utm_medium: string`\n - `utm_source: string`\n - `utm_term: string`\n - `vcard: object`\n - `whatsapp: { number: string; message?: string; }`\n - `width: number`\n - `wifi: object`\n - `frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }`\n - `pageId?: string`\n - `pageUrl?: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst qrCode = await client.qrcodes.update('qrcodeId');\n\nconsole.log(qrCode);\n```",
|
|
509
|
+
perLanguage: {
|
|
510
|
+
typescript: {
|
|
511
|
+
method: 'client.qrcodes.update',
|
|
512
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst qrCode = await client.qrcodes.update('qrcodeId');\n\nconsole.log(qrCode.id);",
|
|
513
|
+
},
|
|
514
|
+
http: {
|
|
515
|
+
example: 'curl https://api.codeqr.io/qrcodes/$QRCODE_ID \\\n -X PUT \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: 'delete',
|
|
521
|
+
endpoint: '/qrcodes/{qrcodeId}',
|
|
522
|
+
httpMethod: 'delete',
|
|
523
|
+
summary: 'Delete a QR Code',
|
|
524
|
+
description: 'Delete a QR Code for the authenticated workspace.',
|
|
525
|
+
stainlessPath: '(resource) qrcodes > (method) delete',
|
|
526
|
+
qualified: 'client.qrcodes.delete',
|
|
527
|
+
params: ['qrcodeId: string;'],
|
|
528
|
+
response: '{ id: string; }',
|
|
529
|
+
markdown: "## delete\n\n`client.qrcodes.delete(qrcodeId: string): { id: string; }`\n\n**delete** `/qrcodes/{qrcodeId}`\n\nDelete a QR Code for the authenticated workspace.\n\n### Parameters\n\n- `qrcodeId: string`\n The id of the QR Code to delete. You may use either `qrcodeId` (obtained via `/qrcodes/info` endpoint) or `externalId` prefixed with `ext_`.\n\n### Returns\n\n- `{ id: string; }`\n\n - `id: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst qrcode = await client.qrcodes.delete('qrcodeId');\n\nconsole.log(qrcode);\n```",
|
|
530
|
+
perLanguage: {
|
|
531
|
+
typescript: {
|
|
532
|
+
method: 'client.qrcodes.delete',
|
|
533
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst qrcode = await client.qrcodes.delete('qrcodeId');\n\nconsole.log(qrcode.id);",
|
|
534
|
+
},
|
|
535
|
+
http: {
|
|
536
|
+
example: 'curl https://api.codeqr.io/qrcodes/$QRCODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: 'create',
|
|
542
|
+
endpoint: '/qrcodes/bulk',
|
|
543
|
+
httpMethod: 'post',
|
|
544
|
+
summary: 'Bulk create QR Codes',
|
|
545
|
+
description: 'Bulk create up to 100 QR Codes for the authenticated workspace.',
|
|
546
|
+
stainlessPath: '(resource) qrcodes.bulk > (method) create',
|
|
547
|
+
qualified: 'client.qrcodes.bulk.create',
|
|
548
|
+
params: [
|
|
549
|
+
"body?: { type: string; android?: string; archived?: boolean; bgColor?: string; comments?: string; contentStatic?: string; crypto?: object; description?: string; doIndex?: boolean; domain?: string; email?: object; excavate?: boolean; expiredUrl?: string; expiresAt?: string; externalId?: string; facetime?: object; fgColor?: string; filled?: boolean; flexible?: boolean; folderId?: string; frame?: string; frameColor?: string; frameText?: string; frameTextColor?: string; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }; height?: number; image?: string; ios?: string; isFormMandatory?: boolean; key?: string; latlog?: object; level?: string; logo?: string; pageId?: string; pageUrl?: string; password?: string; pattern?: string; phone?: string; prefix?: string; preRedirection?: boolean; proxy?: boolean; publicStats?: boolean; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; shape?: string; showLogo?: boolean; size?: number; sms?: object; src?: string; static?: boolean; tagId?: string; tagIds?: string | string[]; tagNames?: string | string[]; templateId?: string; text?: string; title?: string; trackConversion?: boolean; url?: string; useAsTemplate?: boolean; useDisplayPage?: boolean; vcard?: object; webhookIds?: string[]; whatsapp?: { number: string; message?: string; }; width?: number; wifi?: object; }[];",
|
|
550
|
+
],
|
|
551
|
+
response: 'object | { code: string; error: string; qrcode?: object; }[]',
|
|
552
|
+
markdown: "## create\n\n`client.qrcodes.bulk.create(body?: { type: string; android?: string; archived?: boolean; bgColor?: string; comments?: string; contentStatic?: string; crypto?: object; description?: string; doIndex?: boolean; domain?: string; email?: object; excavate?: boolean; expiredUrl?: string; expiresAt?: string; externalId?: string; facetime?: object; fgColor?: string; filled?: boolean; flexible?: boolean; folderId?: string; frame?: string; frameColor?: string; frameText?: string; frameTextColor?: string; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }; height?: number; image?: string; ios?: string; isFormMandatory?: boolean; key?: string; latlog?: object; level?: string; logo?: string; pageId?: string; pageUrl?: string; password?: string; pattern?: string; phone?: string; prefix?: string; preRedirection?: boolean; proxy?: boolean; publicStats?: boolean; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; shape?: string; showLogo?: boolean; size?: number; sms?: object; src?: string; static?: boolean; tagId?: string; tagIds?: string | string[]; tagNames?: string | string[]; templateId?: string; text?: string; title?: string; trackConversion?: boolean; url?: string; useAsTemplate?: boolean; useDisplayPage?: boolean; vcard?: object; webhookIds?: string[]; whatsapp?: { number: string; message?: string; }; width?: number; wifi?: object; }[]): object | { code: string; error: string; qrcode?: object; }[]`\n\n**post** `/qrcodes/bulk`\n\nBulk create up to 100 QR Codes for the authenticated workspace.\n\n### Parameters\n\n- `body?: { type: string; android?: string; archived?: boolean; bgColor?: string; comments?: string; contentStatic?: string; crypto?: object; description?: string; doIndex?: boolean; domain?: string; email?: object; excavate?: boolean; expiredUrl?: string; expiresAt?: string; externalId?: string; facetime?: object; fgColor?: string; filled?: boolean; flexible?: boolean; folderId?: string; frame?: string; frameColor?: string; frameText?: string; frameTextColor?: string; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; geo?: { AD?: string; AE?: string; AF?: string; AG?: string; AI?: string; AL?: string; AM?: string; AO?: string; AQ?: string; AR?: string; AS?: string; AT?: string; AU?: string; AW?: string; AX?: string; AZ?: string; BA?: string; BB?: string; BD?: string; BE?: string; BF?: string; BG?: string; BH?: string; BI?: string; BJ?: string; BL?: string; BM?: string; BN?: string; BO?: string; BQ?: string; BR?: string; BS?: string; BT?: string; BV?: string; BW?: string; BY?: string; BZ?: string; CA?: string; CC?: string; CD?: string; CF?: string; CG?: string; CH?: string; CI?: string; CK?: string; CL?: string; CM?: string; CN?: string; CO?: string; CR?: string; CU?: string; CV?: string; CW?: string; CX?: string; CY?: string; CZ?: string; DE?: string; DJ?: string; DK?: string; DM?: string; DO?: string; DZ?: string; EC?: string; EE?: string; EG?: string; EH?: string; ER?: string; ES?: string; ET?: string; FI?: string; FJ?: string; FK?: string; FM?: string; FO?: string; FR?: string; GA?: string; GB?: string; GD?: string; GE?: string; GF?: string; GG?: string; GH?: string; GI?: string; GL?: string; GM?: string; GN?: string; GP?: string; GQ?: string; GR?: string; GS?: string; GT?: string; GU?: string; GW?: string; GY?: string; HK?: string; HM?: string; HN?: string; HR?: string; HT?: string; HU?: string; ID?: string; IE?: string; IL?: string; IM?: string; IN?: string; IO?: string; IQ?: string; IR?: string; IS?: string; IT?: string; JE?: string; JM?: string; JO?: string; JP?: string; KE?: string; KG?: string; KH?: string; KI?: string; KM?: string; KN?: string; KP?: string; KR?: string; KW?: string; KY?: string; KZ?: string; LA?: string; LB?: string; LC?: string; LI?: string; LK?: string; LR?: string; LS?: string; LT?: string; LU?: string; LV?: string; LY?: string; MA?: string; MC?: string; MD?: string; ME?: string; MF?: string; MG?: string; MH?: string; MK?: string; ML?: string; MM?: string; MN?: string; MO?: string; MP?: string; MQ?: string; MR?: string; MS?: string; MT?: string; MU?: string; MV?: string; MW?: string; MX?: string; MY?: string; MZ?: string; NA?: string; NC?: string; NE?: string; NF?: string; NG?: string; NI?: string; NL?: string; NO?: string; NP?: string; NR?: string; NU?: string; NZ?: string; OM?: string; PA?: string; PE?: string; PF?: string; PG?: string; PH?: string; PK?: string; PL?: string; PM?: string; PN?: string; PR?: string; PS?: string; PT?: string; PW?: string; PY?: string; QA?: string; RE?: string; RO?: string; RS?: string; RU?: string; RW?: string; SA?: string; SB?: string; SC?: string; SD?: string; SE?: string; SG?: string; SH?: string; SI?: string; SJ?: string; SK?: string; SL?: string; SM?: string; SN?: string; SO?: string; SR?: string; SS?: string; ST?: string; SV?: string; SX?: string; SY?: string; SZ?: string; TC?: string; TD?: string; TF?: string; TG?: string; TH?: string; TJ?: string; TK?: string; TL?: string; TM?: string; TN?: string; TO?: string; TR?: string; TT?: string; TV?: string; TW?: string; TZ?: string; UA?: string; UG?: string; UM?: string; US?: string; UY?: string; UZ?: string; VA?: string; VC?: string; VE?: string; VG?: string; VI?: string; VN?: string; VU?: string; WF?: string; WS?: string; XK?: string; YE?: string; YT?: string; ZA?: string; ZM?: string; ZW?: string; }; height?: number; image?: string; ios?: string; isFormMandatory?: boolean; key?: string; latlog?: object; level?: string; logo?: string; pageId?: string; pageUrl?: string; password?: string; pattern?: string; phone?: string; prefix?: string; preRedirection?: boolean; proxy?: boolean; publicStats?: boolean; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; shape?: string; showLogo?: boolean; size?: number; sms?: object; src?: string; static?: boolean; tagId?: string; tagIds?: string | string[]; tagNames?: string | string[]; templateId?: string; text?: string; title?: string; trackConversion?: boolean; url?: string; useAsTemplate?: boolean; useDisplayPage?: boolean; vcard?: object; webhookIds?: string[]; whatsapp?: { number: string; message?: string; }; width?: number; wifi?: object; }[]`\n\n### Returns\n\n- `{ id: string; android: string; archived: boolean; bgColor: string; comments: string; contentStatic: string; createdAt: string; crypto: object; description: string; doIndex: boolean; domain: string; email: object; excavate: boolean; expiredUrl: string; expiresAt: string; externalId: string; facetime: object; fgColor: string; filled: boolean; flexible: boolean; folderId: string; geo: object; height: number; image: string; ios: string; isFormMandatory: boolean; key: string; lastClicked: string; latlog: object; leads: number; level: string; logo: string; notificationToken: string; password: string; phone: string; preRedirection: boolean; projectId: string; proxy: boolean; publicStats: boolean; rewrite: boolean; rules: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; saleAmount: number; sales: number; scans: number; showLogo: boolean; size: number; sms: object; src: string; static: boolean; tagId: string; tags: object[]; text: string; title: string; trackConversion: boolean; type: string; updatedAt: string; url: string; useDisplayPage: boolean; userId: string; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; vcard: object; whatsapp: { number: string; message?: string; }; width: number; wifi: object; frameTextStyles?: { family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono'; size?: 's' | 'm' | 'l' | 'xl'; style?: 'normal' | 'italic'; weight?: 'normal' | 'bold'; }; pageId?: string; pageUrl?: string; } | { code: string; error: string; qrcode?: object; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst bulks = await client.qrcodes.bulk.create();\n\nconsole.log(bulks);\n```",
|
|
553
|
+
perLanguage: {
|
|
554
|
+
typescript: {
|
|
555
|
+
method: 'client.qrcodes.bulk.create',
|
|
556
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst bulks = await client.qrcodes.bulk.create();\n\nconsole.log(bulks);",
|
|
557
|
+
},
|
|
558
|
+
http: {
|
|
559
|
+
example: 'curl https://api.codeqr.io/qrcodes/bulk \\\n -X POST \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
name: 'retrieve',
|
|
565
|
+
endpoint: '/analytics',
|
|
566
|
+
httpMethod: 'get',
|
|
567
|
+
summary: 'Retrieve analytics for a link, a domain, or the authenticated workspace.',
|
|
568
|
+
description: 'Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.',
|
|
569
|
+
stainlessPath: '(resource) analytics > (method) retrieve',
|
|
570
|
+
qualified: 'client.analytics.retrieve',
|
|
571
|
+
params: [
|
|
572
|
+
'browser?: string;',
|
|
573
|
+
'city?: string;',
|
|
574
|
+
"continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';",
|
|
575
|
+
'country?: string;',
|
|
576
|
+
'device?: string;',
|
|
577
|
+
'domain?: string;',
|
|
578
|
+
'end?: string;',
|
|
579
|
+
"event?: 'clicks' | 'leads' | 'sales' | 'scans' | 'views' | 'composite';",
|
|
580
|
+
'excludeRoot?: boolean;',
|
|
581
|
+
'externalId?: string;',
|
|
582
|
+
'groupBy?: string;',
|
|
583
|
+
"interval?: '1h' | '24h' | '7d' | '30d' | '90d' | 'ytd' | '1y' | 'all' | 'all_unfiltered';",
|
|
584
|
+
'key?: string;',
|
|
585
|
+
'linkId?: string;',
|
|
586
|
+
'os?: string;',
|
|
587
|
+
'pageId?: string;',
|
|
588
|
+
'qrcodeId?: string;',
|
|
589
|
+
'referer?: string;',
|
|
590
|
+
'root?: boolean;',
|
|
591
|
+
'start?: string;',
|
|
592
|
+
'tagId?: string;',
|
|
593
|
+
'timezone?: string;',
|
|
594
|
+
'type?: string;',
|
|
595
|
+
'types?: string;',
|
|
596
|
+
'url?: string;',
|
|
597
|
+
'utm_campaign?: string;',
|
|
598
|
+
'utm_content?: string;',
|
|
599
|
+
'utm_medium?: string;',
|
|
600
|
+
'utm_source?: string;',
|
|
601
|
+
'utm_term?: string;',
|
|
602
|
+
],
|
|
603
|
+
response: 'object | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[]',
|
|
604
|
+
markdown: "## retrieve\n\n`client.analytics.retrieve(browser?: string, city?: string, continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA', country?: string, device?: string, domain?: string, end?: string, event?: 'clicks' | 'leads' | 'sales' | 'scans' | 'views' | 'composite', excludeRoot?: boolean, externalId?: string, groupBy?: string, interval?: '1h' | '24h' | '7d' | '30d' | '90d' | 'ytd' | '1y' | 'all' | 'all_unfiltered', key?: string, linkId?: string, os?: string, pageId?: string, qrcodeId?: string, referer?: string, root?: boolean, start?: string, tagId?: string, timezone?: string, type?: string, types?: string, url?: string, utm_campaign?: string, utm_content?: string, utm_medium?: string, utm_source?: string, utm_term?: string): { clicks: number; leads: number; saleAmount: number; sales: number; scans: number; views: number; } | { clicks: number; leads: number; saleAmount: number; sales: number; scans: number; start: string; views: number; }[] | { clicks: number; leads: number; saleAmount: number; sales: number; continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA'; }[] | { city: '*'; clicks: number; country: string; leads: number; saleAmount: number; sales: number; }[] | { city: '*'; clicks: number; country: string; leads: number; region: string; saleAmount: number; sales: number; }[] | { city: string; clicks: number; country: string; leads: number; saleAmount: number; sales: number; }[] | { clicks: number; device: string; leads: number; saleAmount: number; sales: number; }[] | { browser: string; clicks: number; leads: number; saleAmount: number; sales: number; }[] | { clicks: number; leads: number; os: string; saleAmount: number; sales: number; }[] | { clicks: number; leads: number; referer: string; saleAmount: number; sales: number; }[] | { clicks: number; leads: number; refererUrl: string; saleAmount: number; sales: number; }[] | { id: string; clicks: number; createdAt: string; domain: string; key: string; leads: number; link: string; shortLink: string; url: string; }[] | { clicks: number; leads: number; saleAmount: number; sales: number; url: string; }[]`\n\n**get** `/analytics`\n\nRetrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.\n\n### Parameters\n\n- `browser?: string`\n The browser to retrieve analytics for.\n\n- `city?: string`\n The city to retrieve analytics for.\n\n- `continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA'`\n The continent to retrieve analytics for.\n\n- `country?: string`\n The country to retrieve analytics for.\n\n- `device?: string`\n The device to retrieve analytics for.\n\n- `domain?: string`\n The domain of the short link.\n\n- `end?: string`\n The end date and time when to retrieve analytics from. If not provided, defaults to the current date.\n\n- `event?: 'clicks' | 'leads' | 'sales' | 'scans' | 'views' | 'composite'`\n The type of event to retrieve analytics for. Defaults to 'analytics'.\n\n- `excludeRoot?: boolean`\n Whether to exclude the root link from the response.\n\n- `externalId?: string`\n This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.\n\n- `groupBy?: string`\n The parameter to group the analytics data points by. Defaults to 'count' if undefined.\n\n- `interval?: '1h' | '24h' | '7d' | '30d' | '90d' | 'ytd' | '1y' | 'all' | 'all_unfiltered'`\n The interval to retrieve analytics for. Takes precedence over start and end.\n\n- `key?: string`\n The short link slug.\n\n- `linkId?: string`\n The unique ID of the short link on CodeQR.\n\n- `os?: string`\n The OS to retrieve analytics for.\n\n- `pageId?: string`\n The unique ID of the page on CodeQR.\n\n- `qrcodeId?: string`\n The unique ID of the QR code on CodeQR.\n\n- `referer?: string`\n The referer to retrieve analytics for.\n\n- `root?: boolean`\n Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.\n\n- `start?: string`\n The start date and time when to retrieve analytics from.\n\n- `tagId?: string`\n The tag ID to retrieve analytics for.\n\n- `timezone?: string`\n The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.\n\n- `type?: string`\n The type of analytics to retrieve.\n\n- `types?: string`\n The types of analytics to retrieve.\n\n- `url?: string`\n The URL to retrieve analytics for.\n\n- `utm_campaign?: string`\n UTM campaign to filter analytics by.\n\n- `utm_content?: string`\n UTM content to filter analytics by.\n\n- `utm_medium?: string`\n UTM medium to filter analytics by.\n\n- `utm_source?: string`\n UTM source to filter analytics by.\n\n- `utm_term?: string`\n UTM term to filter analytics by.\n\n### Returns\n\n- `{ clicks: number; leads: number; saleAmount: number; sales: number; scans: number; views: number; } | { clicks: number; leads: number; saleAmount: number; sales: number; scans: number; start: string; views: number; }[] | { clicks: number; leads: number; saleAmount: number; sales: number; continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA'; }[] | { city: '*'; clicks: number; country: string; leads: number; saleAmount: number; sales: number; }[] | { city: '*'; clicks: number; country: string; leads: number; region: string; saleAmount: number; sales: number; }[] | { city: string; clicks: number; country: string; leads: number; saleAmount: number; sales: number; }[] | { clicks: number; device: string; leads: number; saleAmount: number; sales: number; }[] | { browser: string; clicks: number; leads: number; saleAmount: number; sales: number; }[] | { clicks: number; leads: number; os: string; saleAmount: number; sales: number; }[] | { clicks: number; leads: number; referer: string; saleAmount: number; sales: number; }[] | { clicks: number; leads: number; refererUrl: string; saleAmount: number; sales: number; }[] | { id: string; clicks: number; createdAt: string; domain: string; key: string; leads: number; link: string; shortLink: string; url: string; }[] | { clicks: number; leads: number; saleAmount: number; sales: number; url: string; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst analytics = await client.analytics.retrieve();\n\nconsole.log(analytics);\n```",
|
|
605
|
+
perLanguage: {
|
|
606
|
+
typescript: {
|
|
607
|
+
method: 'client.analytics.retrieve',
|
|
608
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst analytics = await client.analytics.retrieve();\n\nconsole.log(analytics);",
|
|
609
|
+
},
|
|
610
|
+
http: {
|
|
611
|
+
example: 'curl https://api.codeqr.io/analytics \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
name: 'list',
|
|
617
|
+
endpoint: '/events',
|
|
618
|
+
httpMethod: 'get',
|
|
619
|
+
summary: 'Retrieve a list of events',
|
|
620
|
+
description: 'Retrieve a paginated list of events for the authenticated workspace.',
|
|
621
|
+
stainlessPath: '(resource) events > (method) list',
|
|
622
|
+
qualified: 'client.events.list',
|
|
623
|
+
params: [
|
|
624
|
+
'browser?: string;',
|
|
625
|
+
'city?: string;',
|
|
626
|
+
"continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';",
|
|
627
|
+
'country?: string;',
|
|
628
|
+
'device?: string;',
|
|
629
|
+
'domain?: string;',
|
|
630
|
+
'end?: string;',
|
|
631
|
+
"event?: 'clicks' | 'leads' | 'sales' | 'scans' | 'views';",
|
|
632
|
+
'excludeRoot?: boolean;',
|
|
633
|
+
'externalId?: string;',
|
|
634
|
+
"interval?: '24h' | '7d' | '30d' | '90d' | 'ytd' | '1y' | 'all';",
|
|
635
|
+
'key?: string;',
|
|
636
|
+
'limit?: number;',
|
|
637
|
+
'linkId?: string;',
|
|
638
|
+
"order?: 'asc' | 'desc';",
|
|
639
|
+
'os?: string;',
|
|
640
|
+
'page?: number;',
|
|
641
|
+
'pageId?: string;',
|
|
642
|
+
'qrcodeId?: string;',
|
|
643
|
+
'referer?: string;',
|
|
644
|
+
'root?: boolean;',
|
|
645
|
+
"sortBy?: 'timestamp';",
|
|
646
|
+
'start?: string;',
|
|
647
|
+
'tagId?: string;',
|
|
648
|
+
'timezone?: string;',
|
|
649
|
+
'type?: string;',
|
|
650
|
+
'types?: string;',
|
|
651
|
+
'url?: string;',
|
|
652
|
+
'utm_campaign?: string;',
|
|
653
|
+
'utm_content?: string;',
|
|
654
|
+
'utm_medium?: string;',
|
|
655
|
+
'utm_source?: string;',
|
|
656
|
+
'utm_term?: string;',
|
|
657
|
+
],
|
|
658
|
+
response: "{ browser: string; city: string; click: object; click_id: string; continent: string; country: string; device: string; domain: string; event: 'click'; ip: string; key: string; link: object; link_id: string; os: string; type: string; url: string; timestamp?: string; } | { browser: string; city: string; click: object; click_id: string; continent: string; country: string; customer: object; device: string; domain: string; event: 'lead'; eventId: string; eventName: string; ip: string; key: string; link_id: string; os: string; type: string; url: string; link?: object; timestamp?: string; } | { browser: string; city: string; click: object; click_id: string; continent: string; country: string; customer: object; device: string; domain: string; event: 'sale'; eventId: string; eventName: string; invoice_id: string; ip: string; key: string; link: object; link_id: string; metadata: string; os: string; payment_processor: string; sale: object; saleAmount: number; type: string; url: string; timestamp?: string; }[]",
|
|
659
|
+
markdown: "## list\n\n`client.events.list(browser?: string, city?: string, continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA', country?: string, device?: string, domain?: string, end?: string, event?: 'clicks' | 'leads' | 'sales' | 'scans' | 'views', excludeRoot?: boolean, externalId?: string, interval?: '24h' | '7d' | '30d' | '90d' | 'ytd' | '1y' | 'all', key?: string, limit?: number, linkId?: string, order?: 'asc' | 'desc', os?: string, page?: number, pageId?: string, qrcodeId?: string, referer?: string, root?: boolean, sortBy?: 'timestamp', start?: string, tagId?: string, timezone?: string, type?: string, types?: string, url?: string, utm_campaign?: string, utm_content?: string, utm_medium?: string, utm_source?: string, utm_term?: string): { browser: string; city: string; click: object; click_id: string; continent: string; country: string; device: string; domain: string; event: 'click'; ip: string; key: string; link: object; link_id: string; os: string; type: string; url: string; timestamp?: string; } | { browser: string; city: string; click: object; click_id: string; continent: string; country: string; customer: object; device: string; domain: string; event: 'lead'; eventId: string; eventName: string; ip: string; key: string; link_id: string; os: string; type: string; url: string; link?: object; timestamp?: string; } | { browser: string; city: string; click: object; click_id: string; continent: string; country: string; customer: object; device: string; domain: string; event: 'sale'; eventId: string; eventName: string; invoice_id: string; ip: string; key: string; link: object; link_id: string; metadata: string; os: string; payment_processor: string; sale: object; saleAmount: number; type: string; url: string; timestamp?: string; }[]`\n\n**get** `/events`\n\nRetrieve a paginated list of events for the authenticated workspace.\n\n### Parameters\n\n- `browser?: string`\n The browser to retrieve analytics for.\n\n- `city?: string`\n The city to retrieve analytics for.\n\n- `continent?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA'`\n The continent to retrieve analytics for.\n\n- `country?: string`\n The country to retrieve analytics for.\n\n- `device?: string`\n The device to retrieve analytics for.\n\n- `domain?: string`\n The domain of the short link.\n\n- `end?: string`\n The end date and time when to retrieve analytics from. If not provided, defaults to the current date.\n\n- `event?: 'clicks' | 'leads' | 'sales' | 'scans' | 'views'`\n The type of event to retrieve analytics for. Defaults to 'clicks'.\n\n- `excludeRoot?: boolean`\n Whether to exclude the root link from the response.\n\n- `externalId?: string`\n This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.\n\n- `interval?: '24h' | '7d' | '30d' | '90d' | 'ytd' | '1y' | 'all'`\n The interval to retrieve events for. Takes precedence over start and end. If undefined, defaults to 24h.\n\n- `key?: string`\n The short link slug.\n\n- `limit?: number`\n\n- `linkId?: string`\n The unique ID of the short link on CodeQR.\n\n- `order?: 'asc' | 'desc'`\n\n- `os?: string`\n The OS to retrieve analytics for.\n\n- `page?: number`\n\n- `pageId?: string`\n The unique ID of the page on CodeQR.\n\n- `qrcodeId?: string`\n The unique ID of the QR code on CodeQR.\n\n- `referer?: string`\n The referer to retrieve analytics for.\n\n- `root?: boolean`\n Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.\n\n- `sortBy?: 'timestamp'`\n\n- `start?: string`\n The start date and time when to retrieve analytics from.\n\n- `tagId?: string`\n The tag ID to retrieve analytics for.\n\n- `timezone?: string`\n The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.\n\n- `type?: string`\n The type of analytics to retrieve.\n\n- `types?: string`\n The types of analytics to retrieve.\n\n- `url?: string`\n The URL to retrieve analytics for.\n\n- `utm_campaign?: string`\n UTM campaign to filter analytics by.\n\n- `utm_content?: string`\n UTM content to filter analytics by.\n\n- `utm_medium?: string`\n UTM medium to filter analytics by.\n\n- `utm_source?: string`\n UTM source to filter analytics by.\n\n- `utm_term?: string`\n UTM term to filter analytics by.\n\n### Returns\n\n- `{ browser: string; city: string; click: { id: string; browser: string; city: string; continent: string; country: string; device: string; ip: string; os: string; referer: string; refererUrl: string; type: string; url: string; }; click_id: string; continent: string; country: string; device: string; domain: string; event: 'click'; ip: string; key: string; link: { id: string; android: string; clicks: number; comments: string; createdAt: string; description: string; domain: string; expiredUrl: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; saleAmount: number; sales: number; tagId: string; tags: object[]; title: string; updatedAt: string; useAsTemplate: boolean; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; archived?: boolean; doIndex?: boolean; expiresAt?: string; externalId?: string; lastClicked?: string; pageId?: string; pageUrl?: string; proxy?: boolean; publicStats?: boolean; qrCode?: string; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; shortLink?: string; trackConversion?: boolean; url?: string; userId?: string; }; link_id: string; os: string; type: string; url: string; timestamp?: string; } | { browser: string; city: string; click: { id: string; browser: string; city: string; continent: string; country: string; device: string; ip: string; os: string; referer: string; refererUrl: string; type: string; url: string; }; click_id: string; continent: string; country: string; customer: { id: string; avatar: string; email: string; name: string; }; device: string; domain: string; event: 'lead'; eventId: string; eventName: string; ip: string; key: string; link_id: string; os: string; type: string; url: string; link?: object; timestamp?: string; } | { browser: string; city: string; click: { id: string; browser: string; city: string; continent: string; country: string; device: string; ip: string; os: string; referer: string; refererUrl: string; type: string; url: string; }; click_id: string; continent: string; country: string; customer: { id: string; createdAt: string; externalId: string; name: string; avatar?: string; country?: string; customFields?: object; email?: string; link?: { id: string; domain: string; key: string; shortLink?: string; }; }; device: string; domain: string; event: 'sale'; eventId: string; eventName: string; invoice_id: string; ip: string; key: string; link: { id: string; android: string; clicks: number; comments: string; createdAt: string; description: string; domain: string; expiredUrl: string; filled: boolean; flexible: boolean; folderId: string; geo: object; image: string; ios: string; isFormMandatory: boolean; key: string; leads: number; notificationToken: string; password: string; preRedirection: boolean; projectId: string; saleAmount: number; sales: number; tagId: string; tags: object[]; title: string; updatedAt: string; useAsTemplate: boolean; utm_campaign: string; utm_content: string; utm_medium: string; utm_source: string; utm_term: string; video: string; archived?: boolean; doIndex?: boolean; expiresAt?: string; externalId?: string; lastClicked?: string; pageId?: string; pageUrl?: string; proxy?: boolean; publicStats?: boolean; qrCode?: string; rewrite?: boolean; rules?: { attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language'; operator: 'equals' | 'not_equals'; url: string; value: string; }[]; shortLink?: string; trackConversion?: boolean; url?: string; userId?: string; }; link_id: string; metadata: string; os: string; payment_processor: string; sale: { amount: number; invoiceId: string; paymentProcessor: 'stripe' | 'shopify' | 'polar' | 'paddle' | 'revenuecat' | 'custom' | 'manual'; }; saleAmount: number; type: string; url: string; timestamp?: string; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst events = await client.events.list();\n\nconsole.log(events);\n```",
|
|
660
|
+
perLanguage: {
|
|
661
|
+
typescript: {
|
|
662
|
+
method: 'client.events.list',
|
|
663
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst events = await client.events.list();\n\nconsole.log(events);",
|
|
664
|
+
},
|
|
665
|
+
http: {
|
|
666
|
+
example: 'curl https://api.codeqr.io/events \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
667
|
+
},
|
|
668
|
+
},
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
name: 'create',
|
|
672
|
+
endpoint: '/tags',
|
|
673
|
+
httpMethod: 'post',
|
|
674
|
+
summary: 'Create a new tag',
|
|
675
|
+
description: 'Create a new tag for the authenticated project.',
|
|
676
|
+
stainlessPath: '(resource) tags > (method) create',
|
|
677
|
+
qualified: 'client.tags.create',
|
|
678
|
+
params: [
|
|
679
|
+
"color?: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown';",
|
|
680
|
+
'name?: string;',
|
|
681
|
+
'tag?: string;',
|
|
682
|
+
],
|
|
683
|
+
response: "{ id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }",
|
|
684
|
+
markdown: "## create\n\n`client.tags.create(color?: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown', name?: string, tag?: string): { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }`\n\n**post** `/tags`\n\nCreate a new tag for the authenticated project.\n\n### Parameters\n\n- `color?: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'`\n The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.\n\n- `name?: string`\n The name of the tag to create.\n\n- `tag?: string`\n The name of the tag to create.\n\n### Returns\n\n- `{ id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }`\n\n - `id: string`\n - `color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'`\n - `name: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst tag = await client.tags.create();\n\nconsole.log(tag);\n```",
|
|
685
|
+
perLanguage: {
|
|
686
|
+
typescript: {
|
|
687
|
+
method: 'client.tags.create',
|
|
688
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst tag = await client.tags.create();\n\nconsole.log(tag.id);",
|
|
689
|
+
},
|
|
690
|
+
http: {
|
|
691
|
+
example: 'curl https://api.codeqr.io/tags \\\n -X POST \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
692
|
+
},
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
name: 'list',
|
|
697
|
+
endpoint: '/tags',
|
|
698
|
+
httpMethod: 'get',
|
|
699
|
+
summary: 'Retrieve a list of tags',
|
|
700
|
+
description: 'Retrieve a list of tags for the authenticated workspace.',
|
|
701
|
+
stainlessPath: '(resource) tags > (method) list',
|
|
702
|
+
qualified: 'client.tags.list',
|
|
703
|
+
params: [
|
|
704
|
+
'ids?: string | string[];',
|
|
705
|
+
'page?: number;',
|
|
706
|
+
'pageSize?: number;',
|
|
707
|
+
'search?: string;',
|
|
708
|
+
"sortBy?: 'name' | 'createdAt';",
|
|
709
|
+
"sortOrder?: 'asc' | 'desc';",
|
|
710
|
+
],
|
|
711
|
+
response: "{ id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]",
|
|
712
|
+
markdown: "## list\n\n`client.tags.list(ids?: string | string[], page?: number, pageSize?: number, search?: string, sortBy?: 'name' | 'createdAt', sortOrder?: 'asc' | 'desc'): object[]`\n\n**get** `/tags`\n\nRetrieve a list of tags for the authenticated workspace.\n\n### Parameters\n\n- `ids?: string | string[]`\n IDs of tags to filter by.\n\n- `page?: number`\n The page number for pagination.\n\n- `pageSize?: number`\n The number of items per page.\n\n- `search?: string`\n The search term to filter the tags by.\n\n- `sortBy?: 'name' | 'createdAt'`\n The field to sort the tags by.\n\n- `sortOrder?: 'asc' | 'desc'`\n The order to sort the tags by.\n\n### Returns\n\n- `{ id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst tags = await client.tags.list();\n\nconsole.log(tags);\n```",
|
|
713
|
+
perLanguage: {
|
|
714
|
+
typescript: {
|
|
715
|
+
method: 'client.tags.list',
|
|
716
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst tags = await client.tags.list();\n\nconsole.log(tags);",
|
|
717
|
+
},
|
|
718
|
+
http: {
|
|
719
|
+
example: 'curl https://api.codeqr.io/tags \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: 'update',
|
|
725
|
+
endpoint: '/tags/{id}',
|
|
726
|
+
httpMethod: 'put',
|
|
727
|
+
summary: 'Update a tag',
|
|
728
|
+
description: 'Update a tag in the workspace.',
|
|
729
|
+
stainlessPath: '(resource) tags > (method) update',
|
|
730
|
+
qualified: 'client.tags.update',
|
|
731
|
+
params: [
|
|
732
|
+
'id: string;',
|
|
733
|
+
'name: string;',
|
|
734
|
+
"color?: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown';",
|
|
735
|
+
],
|
|
736
|
+
response: "{ id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }",
|
|
737
|
+
markdown: "## update\n\n`client.tags.update(id: string, name: string, color?: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'): { id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }`\n\n**put** `/tags/{id}`\n\nUpdate a tag in the workspace.\n\n### Parameters\n\n- `id: string`\n The ID of the tag to update.\n\n- `name: string`\n\n- `color?: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'`\n The color of the tag\n\n### Returns\n\n- `{ id: string; color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'; name: string; }`\n\n - `id: string`\n - `color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown'`\n - `name: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst tag = await client.tags.update('id', { name: 'x' });\n\nconsole.log(tag);\n```",
|
|
738
|
+
perLanguage: {
|
|
739
|
+
typescript: {
|
|
740
|
+
method: 'client.tags.update',
|
|
741
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst tag = await client.tags.update('id', { name: 'x' });\n\nconsole.log(tag.id);",
|
|
742
|
+
},
|
|
743
|
+
http: {
|
|
744
|
+
example: 'curl https://api.codeqr.io/tags/$ID \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $CODEQR_API_KEY" \\\n -d \'{\n "name": "x"\n }\'',
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'delete',
|
|
750
|
+
endpoint: '/tags/{id}',
|
|
751
|
+
httpMethod: 'delete',
|
|
752
|
+
summary: 'Delete a tag',
|
|
753
|
+
description: 'Delete a tag from the workspace. All existing links will still work, but they will no longer be associated with this tag.',
|
|
754
|
+
stainlessPath: '(resource) tags > (method) delete',
|
|
755
|
+
qualified: 'client.tags.delete',
|
|
756
|
+
params: ['id: string;'],
|
|
757
|
+
response: '{ id: string; }',
|
|
758
|
+
markdown: "## delete\n\n`client.tags.delete(id: string): { id: string; }`\n\n**delete** `/tags/{id}`\n\nDelete a tag from the workspace. All existing links will still work, but they will no longer be associated with this tag.\n\n### Parameters\n\n- `id: string`\n The ID of the tag to delete.\n\n### Returns\n\n- `{ id: string; }`\n\n - `id: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst tag = await client.tags.delete('id');\n\nconsole.log(tag);\n```",
|
|
759
|
+
perLanguage: {
|
|
760
|
+
typescript: {
|
|
761
|
+
method: 'client.tags.delete',
|
|
762
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst tag = await client.tags.delete('id');\n\nconsole.log(tag.id);",
|
|
763
|
+
},
|
|
764
|
+
http: {
|
|
765
|
+
example: 'curl https://api.codeqr.io/tags/$ID \\\n -X DELETE \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
766
|
+
},
|
|
767
|
+
},
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: 'create',
|
|
771
|
+
endpoint: '/domains',
|
|
772
|
+
httpMethod: 'post',
|
|
773
|
+
summary: 'Create a domain',
|
|
774
|
+
description: 'Create a domain for the authenticated workspace.',
|
|
775
|
+
stainlessPath: '(resource) domains > (method) create',
|
|
776
|
+
qualified: 'client.domains.create',
|
|
777
|
+
params: [
|
|
778
|
+
'slug: string;',
|
|
779
|
+
'archived?: boolean;',
|
|
780
|
+
'expiredUrl?: string;',
|
|
781
|
+
'placeholder?: string;',
|
|
782
|
+
'target?: string;',
|
|
783
|
+
"type?: 'redirect' | 'rewrite';",
|
|
784
|
+
],
|
|
785
|
+
response: "{ id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }",
|
|
786
|
+
markdown: "## create\n\n`client.domains.create(slug: string, archived?: boolean, expiredUrl?: string, placeholder?: string, target?: string, type?: 'redirect' | 'rewrite'): { id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }`\n\n**post** `/domains`\n\nCreate a domain for the authenticated workspace.\n\n### Parameters\n\n- `slug: string`\n Name of the domain.\n\n- `archived?: boolean`\n Whether to archive this domain. `false` will unarchive a previously archived domain.\n\n- `expiredUrl?: string`\n Redirect users to a specific URL when any link under this domain has expired.\n\n- `placeholder?: string`\n Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.\n\n- `target?: string`\n The target URL to redirect to when accessing the domain root.\n\n- `type?: 'redirect' | 'rewrite'`\n The behavior type for the domain root redirect.\n\n### Returns\n\n- `{ id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }`\n\n - `id: string`\n - `archived: boolean`\n - `createdAt: string`\n - `expiredUrl: string`\n - `placeholder: string`\n - `primary: boolean`\n - `slug: string`\n - `target: string`\n - `type: 'redirect' | 'rewrite'`\n - `updatedAt: string`\n - `verified: boolean`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst domain = await client.domains.create({ slug: 'acme.com' });\n\nconsole.log(domain);\n```",
|
|
787
|
+
perLanguage: {
|
|
788
|
+
typescript: {
|
|
789
|
+
method: 'client.domains.create',
|
|
790
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst domain = await client.domains.create({ slug: 'acme.com' });\n\nconsole.log(domain.id);",
|
|
791
|
+
},
|
|
792
|
+
http: {
|
|
793
|
+
example: 'curl https://api.codeqr.io/domains \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $CODEQR_API_KEY" \\\n -d \'{\n "slug": "acme.com",\n "archived": false,\n "expiredUrl": "https://acme.com/expired",\n "placeholder": "https://codeqr.io/help/article/what-is-codeqr",\n "target": "https://acme.com"\n }\'',
|
|
794
|
+
},
|
|
795
|
+
},
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
name: 'list',
|
|
799
|
+
endpoint: '/domains',
|
|
800
|
+
httpMethod: 'get',
|
|
801
|
+
summary: 'Retrieve a list of domains',
|
|
802
|
+
description: 'Retrieve a list of domains associated with the authenticated workspace.',
|
|
803
|
+
stainlessPath: '(resource) domains > (method) list',
|
|
804
|
+
qualified: 'client.domains.list',
|
|
805
|
+
params: ['archived?: boolean;', 'page?: number;', 'pageSize?: number;', 'search?: string;'],
|
|
806
|
+
response: "{ id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }[]",
|
|
807
|
+
markdown: "## list\n\n`client.domains.list(archived?: boolean, page?: number, pageSize?: number, search?: string): object[]`\n\n**get** `/domains`\n\nRetrieve a list of domains associated with the authenticated workspace.\n\n### Parameters\n\n- `archived?: boolean`\n Whether to include archived domains in the response. Defaults to `false` if not provided.\n\n- `page?: number`\n The page number for pagination.\n\n- `pageSize?: number`\n The number of items per page.\n\n- `search?: string`\n The search term to filter the domains by.\n\n### Returns\n\n- `{ id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst domains = await client.domains.list();\n\nconsole.log(domains);\n```",
|
|
808
|
+
perLanguage: {
|
|
809
|
+
typescript: {
|
|
810
|
+
method: 'client.domains.list',
|
|
811
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst domains = await client.domains.list();\n\nconsole.log(domains);",
|
|
812
|
+
},
|
|
813
|
+
http: {
|
|
814
|
+
example: 'curl https://api.codeqr.io/domains \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
815
|
+
},
|
|
816
|
+
},
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
name: 'update',
|
|
820
|
+
endpoint: '/domains/{slug}',
|
|
821
|
+
httpMethod: 'patch',
|
|
822
|
+
summary: 'Update a domain',
|
|
823
|
+
description: 'Update a domain for the authenticated workspace.',
|
|
824
|
+
stainlessPath: '(resource) domains > (method) update',
|
|
825
|
+
qualified: 'client.domains.update',
|
|
826
|
+
params: [
|
|
827
|
+
'slug: string;',
|
|
828
|
+
'archived?: boolean;',
|
|
829
|
+
'expiredUrl?: string;',
|
|
830
|
+
'placeholder?: string;',
|
|
831
|
+
'slug?: string;',
|
|
832
|
+
'target?: string;',
|
|
833
|
+
"type?: 'redirect' | 'rewrite';",
|
|
834
|
+
],
|
|
835
|
+
response: "{ id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }",
|
|
836
|
+
markdown: "## update\n\n`client.domains.update(slug: string, archived?: boolean, expiredUrl?: string, placeholder?: string, slug?: string, target?: string, type?: 'redirect' | 'rewrite'): { id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }`\n\n**patch** `/domains/{slug}`\n\nUpdate a domain for the authenticated workspace.\n\n### Parameters\n\n- `slug: string`\n The domain name.\n\n- `archived?: boolean`\n Whether to archive this domain. `false` will unarchive a previously archived domain.\n\n- `expiredUrl?: string`\n Redirect users to a specific URL when any link under this domain has expired.\n\n- `placeholder?: string`\n Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.\n\n- `slug?: string`\n Name of the domain.\n\n- `target?: string`\n The target URL to redirect to when accessing the domain root.\n\n- `type?: 'redirect' | 'rewrite'`\n The behavior type for the domain root redirect.\n\n### Returns\n\n- `{ id: string; archived: boolean; createdAt: string; expiredUrl: string; placeholder: string; primary: boolean; slug: string; target: string; type: 'redirect' | 'rewrite'; updatedAt: string; verified: boolean; }`\n\n - `id: string`\n - `archived: boolean`\n - `createdAt: string`\n - `expiredUrl: string`\n - `placeholder: string`\n - `primary: boolean`\n - `slug: string`\n - `target: string`\n - `type: 'redirect' | 'rewrite'`\n - `updatedAt: string`\n - `verified: boolean`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst domain = await client.domains.update('acme.com');\n\nconsole.log(domain);\n```",
|
|
837
|
+
perLanguage: {
|
|
838
|
+
typescript: {
|
|
839
|
+
method: 'client.domains.update',
|
|
840
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst domain = await client.domains.update('acme.com');\n\nconsole.log(domain.id);",
|
|
841
|
+
},
|
|
842
|
+
http: {
|
|
843
|
+
example: 'curl https://api.codeqr.io/domains/$SLUG \\\n -X PATCH \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
844
|
+
},
|
|
845
|
+
},
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
name: 'delete',
|
|
849
|
+
endpoint: '/domains/{slug}',
|
|
850
|
+
httpMethod: 'delete',
|
|
851
|
+
summary: 'Delete a domain',
|
|
852
|
+
description: 'Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.',
|
|
853
|
+
stainlessPath: '(resource) domains > (method) delete',
|
|
854
|
+
qualified: 'client.domains.delete',
|
|
855
|
+
params: ['slug: string;'],
|
|
856
|
+
response: '{ slug: string; }',
|
|
857
|
+
markdown: "## delete\n\n`client.domains.delete(slug: string): { slug: string; }`\n\n**delete** `/domains/{slug}`\n\nDelete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.\n\n### Parameters\n\n- `slug: string`\n The domain name.\n\n### Returns\n\n- `{ slug: string; }`\n\n - `slug: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst domain = await client.domains.delete('acme.com');\n\nconsole.log(domain);\n```",
|
|
858
|
+
perLanguage: {
|
|
859
|
+
typescript: {
|
|
860
|
+
method: 'client.domains.delete',
|
|
861
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst domain = await client.domains.delete('acme.com');\n\nconsole.log(domain.slug);",
|
|
862
|
+
},
|
|
863
|
+
http: {
|
|
864
|
+
example: 'curl https://api.codeqr.io/domains/$SLUG \\\n -X DELETE \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
865
|
+
},
|
|
866
|
+
},
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
name: 'track_lead',
|
|
870
|
+
endpoint: '/track/lead',
|
|
871
|
+
httpMethod: 'post',
|
|
872
|
+
summary: 'Track a lead',
|
|
873
|
+
description: 'Track a lead for a short link.',
|
|
874
|
+
stainlessPath: '(resource) track > (method) track_lead',
|
|
875
|
+
qualified: 'client.track.trackLead',
|
|
876
|
+
params: [
|
|
877
|
+
'clickId: string;',
|
|
878
|
+
'customerExternalId: string;',
|
|
879
|
+
'eventName: string;',
|
|
880
|
+
'customerAvatar?: string;',
|
|
881
|
+
'customerEmail?: string;',
|
|
882
|
+
'customerName?: string;',
|
|
883
|
+
'eventQuantity?: number;',
|
|
884
|
+
'metadata?: object;',
|
|
885
|
+
"mode?: 'async' | 'wait' | 'deferred';",
|
|
886
|
+
],
|
|
887
|
+
response: '{ click: { id: string; }; customer: { id: string; avatar?: string; email?: string; name?: string; }; }',
|
|
888
|
+
markdown: "## track_lead\n\n`client.track.trackLead(clickId: string, customerExternalId: string, eventName: string, customerAvatar?: string, customerEmail?: string, customerName?: string, eventQuantity?: number, metadata?: object, mode?: 'async' | 'wait' | 'deferred'): { click: object; customer: object; }`\n\n**post** `/track/lead`\n\nTrack a lead for a short link.\n\n### Parameters\n\n- `clickId: string`\n The unique ID of the click that the lead conversion event is attributed to. You can read this value from `cq_id` cookie. If an empty string is provided, CodeQR will try to find an existing customer with the provided `customerExternalId` and use the `clickId` from the customer if found.\n\n- `customerExternalId: string`\n The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer.\n\n- `eventName: string`\n The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`).\n\n- `customerAvatar?: string`\n The avatar URL of the customer.\n\n- `customerEmail?: string`\n The email address of the customer.\n\n- `customerName?: string`\n The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).\n\n- `eventQuantity?: number`\n The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times.\n\n- `metadata?: object`\n Additional metadata to be stored with the lead event. Max 10,000 characters.\n\n- `mode?: 'async' | 'wait' | 'deferred'`\n The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in CodeQR; `deferred` will defer the lead event creation to a subsequent request.\n\n### Returns\n\n- `{ click: { id: string; }; customer: { id: string; avatar?: string; email?: string; name?: string; }; }`\n\n - `click: { id: string; }`\n - `customer: { id: string; avatar?: string; email?: string; name?: string; }`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst response = await client.track.trackLead({\n clickId: 'clickId',\n customerExternalId: 'x',\n eventName: 'Sign up',\n});\n\nconsole.log(response);\n```",
|
|
889
|
+
perLanguage: {
|
|
890
|
+
typescript: {
|
|
891
|
+
method: 'client.track.trackLead',
|
|
892
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.track.trackLead({\n clickId: 'clickId',\n customerExternalId: 'x',\n eventName: 'Sign up',\n});\n\nconsole.log(response.click);",
|
|
893
|
+
},
|
|
894
|
+
http: {
|
|
895
|
+
example: 'curl https://api.codeqr.io/track/lead \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $CODEQR_API_KEY" \\\n -d \'{\n "clickId": "clickId",\n "customerExternalId": "x",\n "eventName": "Sign up"\n }\'',
|
|
896
|
+
},
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
name: 'track_sale',
|
|
901
|
+
endpoint: '/track/sale',
|
|
902
|
+
httpMethod: 'post',
|
|
903
|
+
summary: 'Track a sale',
|
|
904
|
+
description: 'Track a sale for a short link.',
|
|
905
|
+
stainlessPath: '(resource) track > (method) track_sale',
|
|
906
|
+
qualified: 'client.track.trackSale',
|
|
907
|
+
params: [
|
|
908
|
+
'amount: number;',
|
|
909
|
+
'customerExternalId: string;',
|
|
910
|
+
'clickId?: string;',
|
|
911
|
+
'currency?: string;',
|
|
912
|
+
'customerAvatar?: string;',
|
|
913
|
+
'customerEmail?: string;',
|
|
914
|
+
'customerName?: string;',
|
|
915
|
+
'eventName?: string;',
|
|
916
|
+
'invoiceId?: string;',
|
|
917
|
+
'leadEventName?: string;',
|
|
918
|
+
'metadata?: object;',
|
|
919
|
+
"paymentProcessor?: 'stripe' | 'shopify' | 'polar' | 'paddle' | 'revenuecat' | 'custom' | 'manual';",
|
|
920
|
+
],
|
|
921
|
+
response: '{ amount: number; currency: string; customerId: string; eventName: string; invoiceId: string; metadata: object; paymentProcessor: string; }',
|
|
922
|
+
markdown: "## track_sale\n\n`client.track.trackSale(amount: number, customerExternalId: string, clickId?: string, currency?: string, customerAvatar?: string, customerEmail?: string, customerName?: string, eventName?: string, invoiceId?: string, leadEventName?: string, metadata?: object, paymentProcessor?: 'stripe' | 'shopify' | 'polar' | 'paddle' | 'revenuecat' | 'custom' | 'manual'): { amount: number; currency: string; customerId: string; eventName: string; invoiceId: string; metadata: object; paymentProcessor: string; }`\n\n**post** `/track/sale`\n\nTrack a sale for a short link.\n\n### Parameters\n\n- `amount: number`\n The amount of the sale in the smallest unit of `currency` — cents for two-decimal currencies, the full integer for zero-decimal ones (e.g. `1437` JPY), thousandths for three-decimal ones (e.g. `1437` KWD fils).\n\n- `customerExternalId: string`\n The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer.\n\n- `clickId?: string`\n [For direct sale tracking]: The unique ID of the click that the sale conversion event is attributed to. You can read this value from `cq_id` cookie.\n\n- `currency?: string`\n The currency of the sale, as an ISO 4217 code. Reporting is always in USD: non-USD sales are converted at the exchange rate of the day the sale is recorded, and the original amount and currency are kept on the event. The rate is not re-applied later, so reported totals do not move with the exchange rate.\n\n- `customerAvatar?: string`\n [For direct sale tracking]: The avatar URL of the customer.\n\n- `customerEmail?: string`\n [For direct sale tracking]: The email address of the customer.\n\n- `customerName?: string`\n [For direct sale tracking]: The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).\n\n- `eventName?: string`\n The name of the sale event. Recommended format: `Invoice paid` or `Subscription created`.\n\n- `invoiceId?: string`\n The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID.\n\n- `leadEventName?: string`\n The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior). For direct sale tracking, this field can also be used to specify the lead event name.\n\n- `metadata?: object`\n Additional metadata to be stored with the sale event. Max 10,000 characters when stringified.\n\n- `paymentProcessor?: 'stripe' | 'shopify' | 'polar' | 'paddle' | 'revenuecat' | 'custom' | 'manual'`\n The payment processor via which the sale was made.\n\n### Returns\n\n- `{ amount: number; currency: string; customerId: string; eventName: string; invoiceId: string; metadata: object; paymentProcessor: string; }`\n\n - `amount: number`\n - `currency: string`\n - `customerId: string`\n - `eventName: string`\n - `invoiceId: string`\n - `metadata: object`\n - `paymentProcessor: string`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst response = await client.track.trackSale({ amount: 0, customerExternalId: 'x' });\n\nconsole.log(response);\n```",
|
|
923
|
+
perLanguage: {
|
|
924
|
+
typescript: {
|
|
925
|
+
method: 'client.track.trackSale',
|
|
926
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.track.trackSale({ amount: 0, customerExternalId: 'x' });\n\nconsole.log(response.amount);",
|
|
927
|
+
},
|
|
928
|
+
http: {
|
|
929
|
+
example: 'curl https://api.codeqr.io/track/sale \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $CODEQR_API_KEY" \\\n -d \'{\n "amount": 0,\n "customerExternalId": "x",\n "eventName": "Invoice paid",\n "leadEventName": "Cloned template 1481267"\n }\'',
|
|
930
|
+
},
|
|
931
|
+
},
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
name: 'list',
|
|
935
|
+
endpoint: '/projects',
|
|
936
|
+
httpMethod: 'get',
|
|
937
|
+
summary: 'Retrieve a list of projects',
|
|
938
|
+
description: 'Retrieve a list of projects for the authenticated user.',
|
|
939
|
+
stainlessPath: '(resource) projects > (method) list',
|
|
940
|
+
qualified: 'client.projects.list',
|
|
941
|
+
response: "{ id: string; billingCycleStart: number; createdAt: string; domains: { slug: string; }[]; domainsLimit: number; linksLimit: number; linksUsage: number; logo: string; metadata: { defaultDomains: string[]; }; name: string; plan: 'free' | 'starter' | 'pro' | 'business' | 'scale' | 'enterprise'; slug: string; stripeConnectId: string; stripeId: string; tagsLimit: number; usage: number; usageLimit: number; users: { role: 'owner' | 'member'; }[]; usersLimit: number; }[]",
|
|
942
|
+
markdown: "## list\n\n`client.projects.list(): object[]`\n\n**get** `/projects`\n\nRetrieve a list of projects for the authenticated user.\n\n### Returns\n\n- `{ id: string; billingCycleStart: number; createdAt: string; domains: { slug: string; }[]; domainsLimit: number; linksLimit: number; linksUsage: number; logo: string; metadata: { defaultDomains: string[]; }; name: string; plan: 'free' | 'starter' | 'pro' | 'business' | 'scale' | 'enterprise'; slug: string; stripeConnectId: string; stripeId: string; tagsLimit: number; usage: number; usageLimit: number; users: { role: 'owner' | 'member'; }[]; usersLimit: number; }[]`\n\n### Example\n\n```typescript\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr();\n\nconst projects = await client.projects.list();\n\nconsole.log(projects);\n```",
|
|
943
|
+
perLanguage: {
|
|
944
|
+
typescript: {
|
|
945
|
+
method: 'client.projects.list',
|
|
946
|
+
example: "import Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst projects = await client.projects.list();\n\nconsole.log(projects);",
|
|
947
|
+
},
|
|
948
|
+
http: {
|
|
949
|
+
example: 'curl https://api.codeqr.io/projects \\\n -H "Authorization: Bearer $CODEQR_API_KEY"',
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
];
|
|
954
|
+
const EMBEDDED_READMES = [
|
|
955
|
+
{
|
|
956
|
+
language: 'typescript',
|
|
957
|
+
content: "# Codeqr TypeScript API Library\n\n[)](https://npmjs.org/package/@codeqr/ts) \n\nThis library provides convenient access to the Codeqr REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [codeqr.io](https://codeqr.io/api). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Codeqr MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40codeqr%2Fts-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjb2RlcXIvdHMtbWNwIl0sImVudiI6eyJDT0RFUVJfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40codeqr%2Fts-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40codeqr%2Fts-mcp%22%5D%2C%22env%22%3A%7B%22CODEQR_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @codeqr/ts\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst link = await client.links.create({ url: 'REPLACE_ME' });\n\nconsole.log(link.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: Codeqr.LinkCreateParams = { url: 'REPLACE_ME' };\nconst link: Codeqr.Link = await client.links.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst link = await client.links.create({ url: 'REPLACE_ME' }).catch(async (err) => {\n if (err instanceof Codeqr.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Codeqr({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.links.create({ url: 'REPLACE_ME' }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Codeqr({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.links.create({ url: 'REPLACE_ME' }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Codeqr();\n\nconst response = await client.links.create({ url: 'REPLACE_ME' }).asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: link, response: raw } = await client.links\n .create({ url: 'REPLACE_ME' })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(link.id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `CODEQR_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Codeqr from '@codeqr/ts';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Codeqr({\n logger: logger.child({ name: 'Codeqr' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.links.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Codeqr from '@codeqr/ts';\nimport fetch from 'my-fetch';\n\nconst client = new Codeqr({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Codeqr from '@codeqr/ts';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Codeqr({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Codeqr from '@codeqr/ts';\n\nconst client = new Codeqr({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Codeqr from 'npm:@codeqr/ts';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Codeqr({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/codeqr-io/codeqr-ts/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
|
|
958
|
+
},
|
|
959
|
+
];
|
|
960
|
+
const INDEX_OPTIONS = {
|
|
961
|
+
fields: [
|
|
962
|
+
'name',
|
|
963
|
+
'endpoint',
|
|
964
|
+
'summary',
|
|
965
|
+
'description',
|
|
966
|
+
'qualified',
|
|
967
|
+
'stainlessPath',
|
|
968
|
+
'content',
|
|
969
|
+
'sectionContext',
|
|
970
|
+
],
|
|
971
|
+
storeFields: ['kind', '_original'],
|
|
972
|
+
searchOptions: {
|
|
973
|
+
prefix: true,
|
|
974
|
+
fuzzy: 0.1,
|
|
975
|
+
boost: {
|
|
976
|
+
name: 5,
|
|
977
|
+
stainlessPath: 3,
|
|
978
|
+
endpoint: 3,
|
|
979
|
+
qualified: 3,
|
|
980
|
+
summary: 2,
|
|
981
|
+
content: 1,
|
|
982
|
+
description: 1,
|
|
983
|
+
},
|
|
984
|
+
},
|
|
985
|
+
};
|
|
986
|
+
/**
|
|
987
|
+
* Self-contained local search engine backed by MiniSearch.
|
|
988
|
+
* Method data is embedded at SDK build time; prose documents
|
|
989
|
+
* can be loaded from an optional docs directory at runtime.
|
|
990
|
+
*/
|
|
991
|
+
export class LocalDocsSearch {
|
|
992
|
+
methodIndex;
|
|
993
|
+
proseIndex;
|
|
994
|
+
constructor() {
|
|
995
|
+
this.methodIndex = new MiniSearch(INDEX_OPTIONS);
|
|
996
|
+
this.proseIndex = new MiniSearch(INDEX_OPTIONS);
|
|
997
|
+
}
|
|
998
|
+
static async create(opts) {
|
|
999
|
+
const instance = new LocalDocsSearch();
|
|
1000
|
+
instance.indexMethods(EMBEDDED_METHODS);
|
|
1001
|
+
for (const readme of EMBEDDED_READMES) {
|
|
1002
|
+
instance.indexProse(readme.content, `readme:${readme.language}`);
|
|
1003
|
+
}
|
|
1004
|
+
if (opts?.docsDir) {
|
|
1005
|
+
await instance.loadDocsDirectory(opts.docsDir);
|
|
1006
|
+
}
|
|
1007
|
+
return instance;
|
|
1008
|
+
}
|
|
1009
|
+
search(props) {
|
|
1010
|
+
const { query, language = 'typescript', detail = 'default', maxResults = 5, maxLength = 100_000 } = props;
|
|
1011
|
+
const useMarkdown = detail === 'verbose' || detail === 'high';
|
|
1012
|
+
// Search both indices and merge results by score.
|
|
1013
|
+
// Filter prose hits so language-tagged content (READMEs and docs with
|
|
1014
|
+
// frontmatter) only matches the requested language.
|
|
1015
|
+
const methodHits = this.methodIndex
|
|
1016
|
+
.search(query)
|
|
1017
|
+
.map((hit) => ({ ...hit, _kind: 'http_method' }));
|
|
1018
|
+
const proseHits = this.proseIndex
|
|
1019
|
+
.search(query)
|
|
1020
|
+
.filter((hit) => {
|
|
1021
|
+
const source = hit['_original']?.source;
|
|
1022
|
+
if (!source)
|
|
1023
|
+
return true;
|
|
1024
|
+
// Check for language-tagged sources: "readme:<lang>" or "lang:<lang>:<filename>"
|
|
1025
|
+
let taggedLang;
|
|
1026
|
+
if (source.startsWith('readme:'))
|
|
1027
|
+
taggedLang = source.slice('readme:'.length);
|
|
1028
|
+
else if (source.startsWith('lang:'))
|
|
1029
|
+
taggedLang = source.split(':')[1];
|
|
1030
|
+
if (!taggedLang)
|
|
1031
|
+
return true;
|
|
1032
|
+
return taggedLang === language || (language === 'javascript' && taggedLang === 'typescript');
|
|
1033
|
+
})
|
|
1034
|
+
.map((hit) => ({ ...hit, _kind: 'prose' }));
|
|
1035
|
+
const merged = [...methodHits, ...proseHits].sort((a, b) => b.score - a.score);
|
|
1036
|
+
const top = merged.slice(0, maxResults);
|
|
1037
|
+
const fullResults = [];
|
|
1038
|
+
for (const hit of top) {
|
|
1039
|
+
const original = hit['_original'];
|
|
1040
|
+
if (hit._kind === 'http_method') {
|
|
1041
|
+
const m = original;
|
|
1042
|
+
if (useMarkdown && m.markdown) {
|
|
1043
|
+
fullResults.push(m.markdown);
|
|
1044
|
+
}
|
|
1045
|
+
else {
|
|
1046
|
+
// Use per-language data when available, falling back to the
|
|
1047
|
+
// top-level fields (which are TypeScript-specific in the
|
|
1048
|
+
// legacy codepath).
|
|
1049
|
+
const langData = m.perLanguage?.[language];
|
|
1050
|
+
fullResults.push({
|
|
1051
|
+
method: langData?.method ?? m.qualified,
|
|
1052
|
+
summary: m.summary,
|
|
1053
|
+
description: m.description,
|
|
1054
|
+
endpoint: `${m.httpMethod.toUpperCase()} ${m.endpoint}`,
|
|
1055
|
+
...(langData?.example ? { example: langData.example } : {}),
|
|
1056
|
+
...(m.params ? { params: m.params } : {}),
|
|
1057
|
+
...(m.response ? { response: m.response } : {}),
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
else {
|
|
1062
|
+
const c = original;
|
|
1063
|
+
fullResults.push({
|
|
1064
|
+
content: c.content,
|
|
1065
|
+
...(c.source ? { source: c.source } : {}),
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
let totalLength = 0;
|
|
1070
|
+
const results = [];
|
|
1071
|
+
for (const result of fullResults) {
|
|
1072
|
+
const len = typeof result === 'string' ? result.length : JSON.stringify(result).length;
|
|
1073
|
+
totalLength += len;
|
|
1074
|
+
if (totalLength > maxLength)
|
|
1075
|
+
break;
|
|
1076
|
+
results.push(result);
|
|
1077
|
+
}
|
|
1078
|
+
if (results.length < fullResults.length) {
|
|
1079
|
+
results.unshift(`Truncated; showing ${results.length} of ${fullResults.length} results.`);
|
|
1080
|
+
}
|
|
1081
|
+
return { results };
|
|
1082
|
+
}
|
|
1083
|
+
indexMethods(methods) {
|
|
1084
|
+
const docs = methods.map((m, i) => ({
|
|
1085
|
+
id: `method-${i}`,
|
|
1086
|
+
kind: 'http_method',
|
|
1087
|
+
name: m.name,
|
|
1088
|
+
endpoint: m.endpoint,
|
|
1089
|
+
summary: m.summary,
|
|
1090
|
+
description: m.description,
|
|
1091
|
+
qualified: m.qualified,
|
|
1092
|
+
stainlessPath: m.stainlessPath,
|
|
1093
|
+
_original: m,
|
|
1094
|
+
}));
|
|
1095
|
+
if (docs.length > 0) {
|
|
1096
|
+
this.methodIndex.addAll(docs);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
async loadDocsDirectory(docsDir) {
|
|
1100
|
+
let entries;
|
|
1101
|
+
try {
|
|
1102
|
+
entries = await fs.readdir(docsDir, { withFileTypes: true });
|
|
1103
|
+
}
|
|
1104
|
+
catch (err) {
|
|
1105
|
+
getLogger().warn({ err, docsDir }, 'Could not read docs directory');
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
const files = entries
|
|
1109
|
+
.filter((e) => e.isFile())
|
|
1110
|
+
.filter((e) => e.name.endsWith('.md') || e.name.endsWith('.markdown') || e.name.endsWith('.json'));
|
|
1111
|
+
for (const file of files) {
|
|
1112
|
+
try {
|
|
1113
|
+
const filePath = path.join(docsDir, file.name);
|
|
1114
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
1115
|
+
if (file.name.endsWith('.json')) {
|
|
1116
|
+
const texts = extractTexts(JSON.parse(content));
|
|
1117
|
+
if (texts.length > 0) {
|
|
1118
|
+
this.indexProse(texts.join('\n\n'), file.name);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
else {
|
|
1122
|
+
// Parse optional YAML frontmatter for language tagging.
|
|
1123
|
+
// Files with a "language" field in frontmatter will only
|
|
1124
|
+
// surface in searches for that language.
|
|
1125
|
+
//
|
|
1126
|
+
// Example:
|
|
1127
|
+
// ---
|
|
1128
|
+
// language: python
|
|
1129
|
+
// ---
|
|
1130
|
+
// # Error handling in Python
|
|
1131
|
+
// ...
|
|
1132
|
+
const frontmatter = parseFrontmatter(content);
|
|
1133
|
+
const source = frontmatter.language ? `lang:${frontmatter.language}:${file.name}` : file.name;
|
|
1134
|
+
this.indexProse(content, source);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
catch (err) {
|
|
1138
|
+
getLogger().warn({ err, file: file.name }, 'Failed to index docs file');
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
indexProse(markdown, source) {
|
|
1143
|
+
const chunks = chunkMarkdown(markdown);
|
|
1144
|
+
const baseId = this.proseIndex.documentCount;
|
|
1145
|
+
const docs = chunks.map((chunk, i) => ({
|
|
1146
|
+
id: `prose-${baseId + i}`,
|
|
1147
|
+
kind: 'prose',
|
|
1148
|
+
content: chunk.content,
|
|
1149
|
+
...(chunk.sectionContext != null ? { sectionContext: chunk.sectionContext } : {}),
|
|
1150
|
+
_original: { ...chunk, source },
|
|
1151
|
+
}));
|
|
1152
|
+
if (docs.length > 0) {
|
|
1153
|
+
this.proseIndex.addAll(docs);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
/** Lightweight markdown chunker — splits on headers, chunks by word count. */
|
|
1158
|
+
function chunkMarkdown(markdown) {
|
|
1159
|
+
// Strip YAML frontmatter
|
|
1160
|
+
const stripped = markdown.replace(/^---\n[\s\S]*?\n---\n?/, '');
|
|
1161
|
+
const lines = stripped.split('\n');
|
|
1162
|
+
const chunks = [];
|
|
1163
|
+
const headers = [];
|
|
1164
|
+
let current = [];
|
|
1165
|
+
const flush = () => {
|
|
1166
|
+
const text = current.join('\n').trim();
|
|
1167
|
+
if (!text)
|
|
1168
|
+
return;
|
|
1169
|
+
const sectionContext = headers.length > 0 ? headers.join(' > ') : undefined;
|
|
1170
|
+
// Split into ~200-word chunks
|
|
1171
|
+
const words = text.split(/\s+/);
|
|
1172
|
+
for (let i = 0; i < words.length; i += 200) {
|
|
1173
|
+
const slice = words.slice(i, i + 200).join(' ');
|
|
1174
|
+
if (slice) {
|
|
1175
|
+
chunks.push({ content: slice, tag: 'p', ...(sectionContext != null ? { sectionContext } : {}) });
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
current = [];
|
|
1179
|
+
};
|
|
1180
|
+
for (const line of lines) {
|
|
1181
|
+
const headerMatch = line.match(/^(#{1,6})\s+(.+)/);
|
|
1182
|
+
if (headerMatch) {
|
|
1183
|
+
flush();
|
|
1184
|
+
const level = headerMatch[1].length;
|
|
1185
|
+
const text = headerMatch[2].trim();
|
|
1186
|
+
while (headers.length >= level)
|
|
1187
|
+
headers.pop();
|
|
1188
|
+
headers.push(text);
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
current.push(line);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
flush();
|
|
1195
|
+
return chunks;
|
|
1196
|
+
}
|
|
1197
|
+
/** Recursively extracts string values from a JSON structure. */
|
|
1198
|
+
function extractTexts(data, depth = 0) {
|
|
1199
|
+
if (depth > 10)
|
|
1200
|
+
return [];
|
|
1201
|
+
if (typeof data === 'string')
|
|
1202
|
+
return data.trim() ? [data] : [];
|
|
1203
|
+
if (Array.isArray(data))
|
|
1204
|
+
return data.flatMap((item) => extractTexts(item, depth + 1));
|
|
1205
|
+
if (typeof data === 'object' && data !== null) {
|
|
1206
|
+
return Object.values(data).flatMap((v) => extractTexts(v, depth + 1));
|
|
1207
|
+
}
|
|
1208
|
+
return [];
|
|
1209
|
+
}
|
|
1210
|
+
/** Parses YAML frontmatter from a markdown string, extracting the language field if present. */
|
|
1211
|
+
function parseFrontmatter(markdown) {
|
|
1212
|
+
const match = markdown.match(/^---\n([\s\S]*?)\n---/);
|
|
1213
|
+
if (!match)
|
|
1214
|
+
return {};
|
|
1215
|
+
const body = match[1] ?? '';
|
|
1216
|
+
const langMatch = body.match(/^language:\s*(.+)$/m);
|
|
1217
|
+
return langMatch ? { language: langMatch[1].trim() } : {};
|
|
1218
|
+
}
|
|
1219
|
+
//# sourceMappingURL=local-docs-search.mjs.map
|