@codeqr/ts 0.9.0 → 0.19.3

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.
Files changed (141) hide show
  1. package/CHANGELOG.md +231 -0
  2. package/LICENSE +1 -1
  3. package/README.md +12 -1
  4. package/client.d.mts +6 -5
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +6 -5
  7. package/client.d.ts.map +1 -1
  8. package/client.js +23 -9
  9. package/client.js.map +1 -1
  10. package/client.mjs +23 -9
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/internal/utils/query.d.mts +2 -0
  19. package/internal/utils/query.d.mts.map +1 -0
  20. package/internal/utils/query.d.ts +2 -0
  21. package/internal/utils/query.d.ts.map +1 -0
  22. package/internal/utils/query.js +10 -0
  23. package/internal/utils/query.js.map +1 -0
  24. package/internal/utils/query.mjs +6 -0
  25. package/internal/utils/query.mjs.map +1 -0
  26. package/internal/utils.d.mts +1 -0
  27. package/internal/utils.d.ts +1 -0
  28. package/internal/utils.js +1 -0
  29. package/internal/utils.js.map +1 -1
  30. package/internal/utils.mjs +1 -0
  31. package/package.json +12 -1
  32. package/resources/analytics.d.mts +1 -1
  33. package/resources/analytics.d.ts +1 -1
  34. package/resources/domains.d.mts +2 -2
  35. package/resources/domains.d.mts.map +1 -1
  36. package/resources/domains.d.ts +2 -2
  37. package/resources/domains.d.ts.map +1 -1
  38. package/resources/domains.js +2 -2
  39. package/resources/domains.js.map +1 -1
  40. package/resources/domains.mjs +2 -2
  41. package/resources/domains.mjs.map +1 -1
  42. package/resources/events.d.mts +8 -138
  43. package/resources/events.d.mts.map +1 -1
  44. package/resources/events.d.ts +8 -138
  45. package/resources/events.d.ts.map +1 -1
  46. package/resources/index.d.mts +2 -2
  47. package/resources/index.d.mts.map +1 -1
  48. package/resources/index.d.ts +2 -2
  49. package/resources/index.d.ts.map +1 -1
  50. package/resources/index.js.map +1 -1
  51. package/resources/index.mjs.map +1 -1
  52. package/resources/links/bulk.d.mts +6 -26
  53. package/resources/links/bulk.d.mts.map +1 -1
  54. package/resources/links/bulk.d.ts +6 -26
  55. package/resources/links/bulk.d.ts.map +1 -1
  56. package/resources/links/bulk.js +0 -14
  57. package/resources/links/bulk.js.map +1 -1
  58. package/resources/links/bulk.mjs +0 -14
  59. package/resources/links/bulk.mjs.map +1 -1
  60. package/resources/links/index.d.mts +2 -2
  61. package/resources/links/index.d.mts.map +1 -1
  62. package/resources/links/index.d.ts +2 -2
  63. package/resources/links/index.d.ts.map +1 -1
  64. package/resources/links/index.js.map +1 -1
  65. package/resources/links/index.mjs +1 -1
  66. package/resources/links/index.mjs.map +1 -1
  67. package/resources/links/links.d.mts +27 -839
  68. package/resources/links/links.d.mts.map +1 -1
  69. package/resources/links/links.d.ts +27 -839
  70. package/resources/links/links.d.ts.map +1 -1
  71. package/resources/links/links.js +0 -26
  72. package/resources/links/links.js.map +1 -1
  73. package/resources/links/links.mjs +0 -26
  74. package/resources/links/links.mjs.map +1 -1
  75. package/resources/projects.d.mts +0 -4
  76. package/resources/projects.d.mts.map +1 -1
  77. package/resources/projects.d.ts +0 -4
  78. package/resources/projects.d.ts.map +1 -1
  79. package/resources/projects.js +0 -7
  80. package/resources/projects.js.map +1 -1
  81. package/resources/projects.mjs +0 -7
  82. package/resources/projects.mjs.map +1 -1
  83. package/resources/qrcodes/bulk.d.mts +31 -34
  84. package/resources/qrcodes/bulk.d.mts.map +1 -1
  85. package/resources/qrcodes/bulk.d.ts +31 -34
  86. package/resources/qrcodes/bulk.d.ts.map +1 -1
  87. package/resources/qrcodes/bulk.js +0 -14
  88. package/resources/qrcodes/bulk.js.map +1 -1
  89. package/resources/qrcodes/bulk.mjs +0 -14
  90. package/resources/qrcodes/bulk.mjs.map +1 -1
  91. package/resources/qrcodes/index.d.mts +2 -2
  92. package/resources/qrcodes/index.d.mts.map +1 -1
  93. package/resources/qrcodes/index.d.ts +2 -2
  94. package/resources/qrcodes/index.d.ts.map +1 -1
  95. package/resources/qrcodes/index.js.map +1 -1
  96. package/resources/qrcodes/index.mjs +1 -1
  97. package/resources/qrcodes/index.mjs.map +1 -1
  98. package/resources/qrcodes/qrcodes.d.mts +67 -696
  99. package/resources/qrcodes/qrcodes.d.mts.map +1 -1
  100. package/resources/qrcodes/qrcodes.d.ts +67 -696
  101. package/resources/qrcodes/qrcodes.d.ts.map +1 -1
  102. package/resources/qrcodes/qrcodes.js +1 -31
  103. package/resources/qrcodes/qrcodes.js.map +1 -1
  104. package/resources/qrcodes/qrcodes.mjs +1 -31
  105. package/resources/qrcodes/qrcodes.mjs.map +1 -1
  106. package/resources/tags.d.mts +9 -5
  107. package/resources/tags.d.mts.map +1 -1
  108. package/resources/tags.d.ts +9 -5
  109. package/resources/tags.d.ts.map +1 -1
  110. package/resources/tags.js +1 -1
  111. package/resources/tags.js.map +1 -1
  112. package/resources/tags.mjs +1 -1
  113. package/resources/tags.mjs.map +1 -1
  114. package/resources/track.d.mts +2 -2
  115. package/resources/track.d.ts +2 -2
  116. package/src/client.ts +28 -24
  117. package/src/internal/parse.ts +6 -0
  118. package/src/internal/utils/query.ts +7 -0
  119. package/src/internal/utils.ts +1 -0
  120. package/src/resources/analytics.ts +1 -1
  121. package/src/resources/domains.ts +3 -3
  122. package/src/resources/events.ts +14 -144
  123. package/src/resources/index.ts +0 -6
  124. package/src/resources/links/bulk.ts +8 -37
  125. package/src/resources/links/index.ts +1 -10
  126. package/src/resources/links/links.ts +29 -1417
  127. package/src/resources/projects.ts +0 -8
  128. package/src/resources/qrcodes/bulk.ts +36 -46
  129. package/src/resources/qrcodes/index.ts +1 -10
  130. package/src/resources/qrcodes/qrcodes.ts +73 -1045
  131. package/src/resources/tags.ts +10 -5
  132. package/src/resources/track.ts +2 -2
  133. package/src/version.ts +1 -1
  134. package/version.d.mts +1 -1
  135. package/version.d.mts.map +1 -1
  136. package/version.d.ts +1 -1
  137. package/version.d.ts.map +1 -1
  138. package/version.js +1 -1
  139. package/version.js.map +1 -1
  140. package/version.mjs +1 -1
  141. package/version.mjs.map +1 -1
@@ -3,16 +3,8 @@
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
5
  import { RequestOptions } from '../internal/request-options';
6
- import { path } from '../internal/utils/path';
7
6
 
8
7
  export class Projects extends APIResource {
9
- /**
10
- * Retrieve a project for the authenticated user.
11
- */
12
- retrieve(projectSlug: string, options?: RequestOptions): APIPromise<Project> {
13
- return this._client.get(path`/projects/${projectSlug}`, options);
14
- }
15
-
16
8
  /**
17
9
  * Retrieve a list of projects for the authenticated user.
18
10
  */
@@ -21,21 +21,6 @@ export class Bulk extends APIResource {
21
21
  const { body } = params ?? {};
22
22
  return this._client.post('/qrcodes/bulk', { body: body, ...options });
23
23
  }
24
-
25
- /**
26
- * Bulk delete up to 100 QR Codes for the authenticated workspace.
27
- *
28
- * @example
29
- * ```ts
30
- * const bulk = await client.qrcodes.bulk.delete({
31
- * qrcodeIds: ['clux0rgak00011...', 'clux0rgak00022...'],
32
- * });
33
- * ```
34
- */
35
- delete(params: BulkDeleteParams, options?: RequestOptions): APIPromise<BulkDeleteResponse> {
36
- const { qrcodeIds } = params;
37
- return this._client.delete('/qrcodes/bulk', { query: { qrcodeIds }, ...options });
38
- }
39
24
  }
40
25
 
41
26
  export type BulkCreateResponse = Array<QrcodesAPI.QrCode | BulkCreateResponse.QrCodeErrorSchema>;
@@ -56,7 +41,8 @@ export namespace BulkCreateResponse {
56
41
  | 'invite_pending'
57
42
  | 'exceeded_limit'
58
43
  | 'conflict'
59
- | 'unprocessable_entity';
44
+ | 'unprocessable_entity'
45
+ | 'service_unavailable';
60
46
 
61
47
  /**
62
48
  * The error message.
@@ -70,24 +56,12 @@ export namespace BulkCreateResponse {
70
56
  }
71
57
  }
72
58
 
73
- export interface BulkDeleteResponse {
74
- /**
75
- * The number of QR Codes deleted.
76
- */
77
- deletedCount: number;
78
- }
79
-
80
59
  export interface BulkCreateParams {
81
60
  body?: Array<BulkCreateParams.Body>;
82
61
  }
83
62
 
84
63
  export namespace BulkCreateParams {
85
64
  export interface Body {
86
- /**
87
- * The unique ID of the folder assigned to the QR code.
88
- */
89
- folderId: string | null;
90
-
91
65
  /**
92
66
  * The type of content of the QR code.
93
67
  */
@@ -190,12 +164,21 @@ export namespace BulkCreateParams {
190
164
  flexible?: boolean;
191
165
 
192
166
  /**
193
- * The type of frame of the QR code.
167
+ * The unique ID of the folder assigned to the QR code. Omit or set to null for no
168
+ * folder.
169
+ */
170
+ folderId?: string | null;
171
+
172
+ /**
173
+ * The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5,
174
+ * frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at
175
+ * render.
194
176
  */
195
177
  frame?: string;
196
178
 
197
179
  /**
198
- * The color of the frame of the QR code.
180
+ * The color of the frame (hex or CSS keyword). Invalid values are coerced to
181
+ * default.
199
182
  */
200
183
  frameColor?: string;
201
184
 
@@ -204,6 +187,12 @@ export namespace BulkCreateParams {
204
187
  */
205
188
  frameText?: string;
206
189
 
190
+ /**
191
+ * The color of the text inside the frame (hex or CSS keyword). When not set, a
192
+ * contrasting color is derived from the frame color.
193
+ */
194
+ frameTextColor?: string;
195
+
207
196
  /**
208
197
  * Geographic segmentation information for the QR code in the JSON format
209
198
  * `{[COUNTRY]: https://example.com }`.
@@ -211,7 +200,8 @@ export namespace BulkCreateParams {
211
200
  geo?: Body.Geo | null;
212
201
 
213
202
  /**
214
- * The height of the QR code.
203
+ * Logo height in pixels. When omitted, a proportional size is used based on the QR
204
+ * code size (about 10–20% depending on size).
215
205
  */
216
206
  height?: number;
217
207
 
@@ -364,6 +354,18 @@ export namespace BulkCreateParams {
364
354
  */
365
355
  url?: string | null;
366
356
 
357
+ /**
358
+ * Whether this QR code should be used as a reusable template.
359
+ */
360
+ useAsTemplate?: boolean;
361
+
362
+ /**
363
+ * For dynamic QR codes with phone, email, or sms types: if true (default), shows
364
+ * an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
365
+ * URI.
366
+ */
367
+ useDisplayPage?: boolean;
368
+
367
369
  /**
368
370
  * The vCard information of the QR code.
369
371
  */
@@ -376,7 +378,8 @@ export namespace BulkCreateParams {
376
378
  webhookIds?: Array<string> | null;
377
379
 
378
380
  /**
379
- * The width of the QR code.
381
+ * Logo width in pixels. When omitted, a proportional size is used based on the QR
382
+ * code size (about 10–20% depending on size).
380
383
  */
381
384
  width?: number;
382
385
 
@@ -895,19 +898,6 @@ export namespace BulkCreateParams {
895
898
  }
896
899
  }
897
900
 
898
- export interface BulkDeleteParams {
899
- /**
900
- * Comma-separated list of QR Code IDs to delete. Maximum of 100 IDs. Non-existing
901
- * IDs will be ignored.
902
- */
903
- qrcodeIds: Array<string>;
904
- }
905
-
906
901
  export declare namespace Bulk {
907
- export {
908
- type BulkCreateResponse as BulkCreateResponse,
909
- type BulkDeleteResponse as BulkDeleteResponse,
910
- type BulkCreateParams as BulkCreateParams,
911
- type BulkDeleteParams as BulkDeleteParams,
912
- };
902
+ export { type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams };
913
903
  }
@@ -1,22 +1,13 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- Bulk,
5
- type BulkCreateResponse,
6
- type BulkDeleteResponse,
7
- type BulkCreateParams,
8
- type BulkDeleteParams,
9
- } from './bulk';
3
+ export { Bulk, type BulkCreateResponse, type BulkCreateParams } from './bulk';
10
4
  export {
11
5
  Qrcodes,
12
6
  type QrCode,
13
7
  type QrcodeListResponse,
14
8
  type QrcodeDeleteResponse,
15
- type QrcodeCountResponse,
16
9
  type QrcodeCreateParams,
17
10
  type QrcodeRetrieveParams,
18
11
  type QrcodeUpdateParams,
19
12
  type QrcodeListParams,
20
- type QrcodeCountParams,
21
- type QrcodeUpsertParams,
22
13
  } from './qrcodes';