@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
@@ -29,11 +29,11 @@ export class Domains extends APIResource {
29
29
  * ```
30
30
  */
31
31
  update(
32
- pathSlug: string,
32
+ slug: string,
33
33
  body: DomainUpdateParams | null | undefined = {},
34
34
  options?: RequestOptions,
35
35
  ): APIPromise<Domain> {
36
- return this._client.patch(path`/domains/${pathSlug}`, { body, ...options });
36
+ return this._client.patch(path`/domains/${slug}`, { body, ...options });
37
37
  }
38
38
 
39
39
  /**
@@ -187,7 +187,7 @@ export interface DomainUpdateParams {
187
187
  /**
188
188
  * Name of the domain.
189
189
  */
190
- body_slug?: string;
190
+ slug?: string;
191
191
 
192
192
  /**
193
193
  * The target URL to redirect to when accessing the domain root.
@@ -131,9 +131,6 @@ export namespace EventListResponse {
131
131
  */
132
132
  id: string;
133
133
 
134
- /**
135
- * The Android destination URL for the short link for Android device targeting.
136
- */
137
134
  android: string | null;
138
135
 
139
136
  /**
@@ -141,17 +138,10 @@ export namespace EventListResponse {
141
138
  */
142
139
  clicks: number;
143
140
 
144
- /**
145
- * The comments for the short link.
146
- */
147
141
  comments: string | null;
148
142
 
149
143
  createdAt: string;
150
144
 
151
- /**
152
- * The description of the short link generated via `api.codeqr.io/metatags`. Will
153
- * be used for custom link preview if `proxy` is true.
154
- */
155
145
  description: string | null;
156
146
 
157
147
  /**
@@ -160,16 +150,8 @@ export namespace EventListResponse {
160
150
  */
161
151
  domain: string;
162
152
 
163
- /**
164
- * The URL to redirect to when the short link expires.
165
- */
166
153
  expiredUrl: string | null;
167
154
 
168
- /**
169
- * This is the ID of the link in your database.
170
- */
171
- externalId: string | null;
172
-
173
155
  /**
174
156
  * Whether the link is filled or not.
175
157
  */
@@ -180,26 +162,12 @@ export namespace EventListResponse {
180
162
  */
181
163
  flexible: boolean;
182
164
 
183
- /**
184
- * The unique ID of the folder assigned to the short link.
185
- */
186
165
  folderId: string | null;
187
166
 
188
- /**
189
- * Geographic targeting information for the short link in JSON format
190
- * `{[COUNTRY]: https://example.com }`. Learn more: https://codeqr.link/geo
191
- */
192
167
  geo: { [key: string]: string } | null;
193
168
 
194
- /**
195
- * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
196
- * for custom link preview if `proxy` is true.
197
- */
198
169
  image: string | null;
199
170
 
200
- /**
201
- * The iOS destination URL for the short link for iOS device targeting.
202
- */
203
171
  ios: string | null;
204
172
 
205
173
  /**
@@ -213,21 +181,13 @@ export namespace EventListResponse {
213
181
  */
214
182
  key: string;
215
183
 
216
- lastClicked: string;
217
-
218
184
  /**
219
185
  * The number of leads generated by the short link.
220
186
  */
221
187
  leads: number;
222
188
 
223
- /**
224
- * The notification token of the short link.
225
- */
226
189
  notificationToken: string | null;
227
190
 
228
- /**
229
- * The password required to access the short link destination URL.
230
- */
231
191
  password: string | null;
232
192
 
233
193
  /**
@@ -250,62 +210,35 @@ export namespace EventListResponse {
250
210
  */
251
211
  sales: number;
252
212
 
253
- /**
254
- * @deprecated [DEPRECATED (use `tags` instead)]: The unique ID of the tag assigned
255
- * to the short link.
256
- */
257
213
  tagId: string | null;
258
214
 
259
- /**
260
- * The tags assigned to the short link.
261
- */
262
215
  tags: Array<TagsAPI.Tag> | null;
263
216
 
264
- /**
265
- * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
266
- * for custom link preview if `proxy` is true.
267
- */
268
217
  title: string | null;
269
218
 
270
219
  updatedAt: string;
271
220
 
272
- userId: string | null;
273
-
274
- /**
275
- * The UTM campaign of the short link.
276
- */
277
221
  utm_campaign: string | null;
278
222
 
279
- /**
280
- * The UTM content of the short link.
281
- */
282
223
  utm_content: string | null;
283
224
 
284
- /**
285
- * The UTM medium of the short link.
286
- */
287
225
  utm_medium: string | null;
288
226
 
289
- /**
290
- * The UTM source of the short link.
291
- */
292
227
  utm_source: string | null;
293
228
 
294
- /**
295
- * The UTM term of the short link.
296
- */
297
229
  utm_term: string | null;
298
230
 
299
- /**
300
- * The video of the short link.
301
- */
302
231
  video: string | null;
303
232
 
304
233
  archived?: boolean;
305
234
 
306
235
  doIndex?: boolean;
307
236
 
308
- expiresAt?: string;
237
+ expiresAt?: string | null;
238
+
239
+ externalId?: string | null;
240
+
241
+ lastClicked?: string | null;
309
242
 
310
243
  /**
311
244
  * The ID of the page to redirect to before the link destination.
@@ -338,6 +271,8 @@ export namespace EventListResponse {
338
271
  trackConversion?: boolean;
339
272
 
340
273
  url?: string;
274
+
275
+ userId?: string | null;
341
276
  }
342
277
  }
343
278
 
@@ -666,9 +601,6 @@ export namespace EventListResponse {
666
601
  */
667
602
  id: string;
668
603
 
669
- /**
670
- * The Android destination URL for the short link for Android device targeting.
671
- */
672
604
  android: string | null;
673
605
 
674
606
  /**
@@ -676,17 +608,10 @@ export namespace EventListResponse {
676
608
  */
677
609
  clicks: number;
678
610
 
679
- /**
680
- * The comments for the short link.
681
- */
682
611
  comments: string | null;
683
612
 
684
613
  createdAt: string;
685
614
 
686
- /**
687
- * The description of the short link generated via `api.codeqr.io/metatags`. Will
688
- * be used for custom link preview if `proxy` is true.
689
- */
690
615
  description: string | null;
691
616
 
692
617
  /**
@@ -695,16 +620,8 @@ export namespace EventListResponse {
695
620
  */
696
621
  domain: string;
697
622
 
698
- /**
699
- * The URL to redirect to when the short link expires.
700
- */
701
623
  expiredUrl: string | null;
702
624
 
703
- /**
704
- * This is the ID of the link in your database.
705
- */
706
- externalId: string | null;
707
-
708
625
  /**
709
626
  * Whether the link is filled or not.
710
627
  */
@@ -715,26 +632,12 @@ export namespace EventListResponse {
715
632
  */
716
633
  flexible: boolean;
717
634
 
718
- /**
719
- * The unique ID of the folder assigned to the short link.
720
- */
721
635
  folderId: string | null;
722
636
 
723
- /**
724
- * Geographic targeting information for the short link in JSON format
725
- * `{[COUNTRY]: https://example.com }`. Learn more: https://codeqr.link/geo
726
- */
727
637
  geo: { [key: string]: string } | null;
728
638
 
729
- /**
730
- * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
731
- * for custom link preview if `proxy` is true.
732
- */
733
639
  image: string | null;
734
640
 
735
- /**
736
- * The iOS destination URL for the short link for iOS device targeting.
737
- */
738
641
  ios: string | null;
739
642
 
740
643
  /**
@@ -748,21 +651,13 @@ export namespace EventListResponse {
748
651
  */
749
652
  key: string;
750
653
 
751
- lastClicked: string;
752
-
753
654
  /**
754
655
  * The number of leads generated by the short link.
755
656
  */
756
657
  leads: number;
757
658
 
758
- /**
759
- * The notification token of the short link.
760
- */
761
659
  notificationToken: string | null;
762
660
 
763
- /**
764
- * The password required to access the short link destination URL.
765
- */
766
661
  password: string | null;
767
662
 
768
663
  /**
@@ -785,62 +680,35 @@ export namespace EventListResponse {
785
680
  */
786
681
  sales: number;
787
682
 
788
- /**
789
- * @deprecated [DEPRECATED (use `tags` instead)]: The unique ID of the tag assigned
790
- * to the short link.
791
- */
792
683
  tagId: string | null;
793
684
 
794
- /**
795
- * The tags assigned to the short link.
796
- */
797
685
  tags: Array<TagsAPI.Tag> | null;
798
686
 
799
- /**
800
- * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
801
- * for custom link preview if `proxy` is true.
802
- */
803
687
  title: string | null;
804
688
 
805
689
  updatedAt: string;
806
690
 
807
- userId: string | null;
808
-
809
- /**
810
- * The UTM campaign of the short link.
811
- */
812
691
  utm_campaign: string | null;
813
692
 
814
- /**
815
- * The UTM content of the short link.
816
- */
817
693
  utm_content: string | null;
818
694
 
819
- /**
820
- * The UTM medium of the short link.
821
- */
822
695
  utm_medium: string | null;
823
696
 
824
- /**
825
- * The UTM source of the short link.
826
- */
827
697
  utm_source: string | null;
828
698
 
829
- /**
830
- * The UTM term of the short link.
831
- */
832
699
  utm_term: string | null;
833
700
 
834
- /**
835
- * The video of the short link.
836
- */
837
701
  video: string | null;
838
702
 
839
703
  archived?: boolean;
840
704
 
841
705
  doIndex?: boolean;
842
706
 
843
- expiresAt?: string;
707
+ expiresAt?: string | null;
708
+
709
+ externalId?: string | null;
710
+
711
+ lastClicked?: string | null;
844
712
 
845
713
  /**
846
714
  * The ID of the page to redirect to before the link destination.
@@ -873,6 +741,8 @@ export namespace EventListResponse {
873
741
  trackConversion?: boolean;
874
742
 
875
743
  url?: string;
744
+
745
+ userId?: string | null;
876
746
  }
877
747
 
878
748
  export interface Sale {
@@ -22,13 +22,10 @@ export {
22
22
  type Link,
23
23
  type LinkListResponse,
24
24
  type LinkDeleteResponse,
25
- type LinkCountResponse,
26
25
  type LinkCreateParams,
27
26
  type LinkUpdateParams,
28
27
  type LinkListParams,
29
- type LinkCountParams,
30
28
  type LinkRetrieveInfoParams,
31
- type LinkUpsertParams,
32
29
  } from './links/links';
33
30
  export { Projects, type Project, type ProjectListResponse } from './projects';
34
31
  export {
@@ -36,13 +33,10 @@ export {
36
33
  type QrCode,
37
34
  type QrcodeListResponse,
38
35
  type QrcodeDeleteResponse,
39
- type QrcodeCountResponse,
40
36
  type QrcodeCreateParams,
41
37
  type QrcodeRetrieveParams,
42
38
  type QrcodeUpdateParams,
43
39
  type QrcodeListParams,
44
- type QrcodeCountParams,
45
- type QrcodeUpsertParams,
46
40
  } from './qrcodes/qrcodes';
47
41
  export {
48
42
  Tags,
@@ -21,21 +21,6 @@ export class Bulk extends APIResource {
21
21
  const { body } = params ?? {};
22
22
  return this._client.post('/links/bulk', { body: body, ...options });
23
23
  }
24
-
25
- /**
26
- * Bulk delete up to 100 links for the authenticated workspace.
27
- *
28
- * @example
29
- * ```ts
30
- * const bulk = await client.links.bulk.delete({
31
- * linkIds: ['clux0rgak00011...', 'clux0rgak00022...'],
32
- * });
33
- * ```
34
- */
35
- delete(params: BulkDeleteParams, options?: RequestOptions): APIPromise<BulkDeleteResponse> {
36
- const { linkIds } = params;
37
- return this._client.delete('/links/bulk', { query: { linkIds }, ...options });
38
- }
39
24
  }
40
25
 
41
26
  export type BulkCreateResponse = Array<LinksAPI.Link | BulkCreateResponse.LinkErrorSchema>;
@@ -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,13 +56,6 @@ export namespace BulkCreateResponse {
70
56
  }
71
57
  }
72
58
 
73
- export interface BulkDeleteResponse {
74
- /**
75
- * The number of links deleted.
76
- */
77
- deletedCount: number;
78
- }
79
-
80
59
  export interface BulkCreateParams {
81
60
  body?: Array<BulkCreateParams.Body>;
82
61
  }
@@ -246,6 +225,11 @@ export namespace BulkCreateParams {
246
225
  */
247
226
  trackConversion?: boolean;
248
227
 
228
+ /**
229
+ * Whether this link should be used as a reusable template.
230
+ */
231
+ useAsTemplate?: boolean;
232
+
249
233
  /**
250
234
  * The video of the short link.
251
235
  */
@@ -767,19 +751,6 @@ export namespace BulkCreateParams {
767
751
  }
768
752
  }
769
753
 
770
- export interface BulkDeleteParams {
771
- /**
772
- * Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs
773
- * will be ignored.
774
- */
775
- linkIds: Array<string>;
776
- }
777
-
778
754
  export declare namespace Bulk {
779
- export {
780
- type BulkCreateResponse as BulkCreateResponse,
781
- type BulkDeleteResponse as BulkDeleteResponse,
782
- type BulkCreateParams as BulkCreateParams,
783
- type BulkDeleteParams as BulkDeleteParams,
784
- };
755
+ export { type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams };
785
756
  }
@@ -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
  Links,
12
6
  type Link,
13
7
  type LinkListResponse,
14
8
  type LinkDeleteResponse,
15
- type LinkCountResponse,
16
9
  type LinkCreateParams,
17
10
  type LinkUpdateParams,
18
11
  type LinkListParams,
19
- type LinkCountParams,
20
12
  type LinkRetrieveInfoParams,
21
- type LinkUpsertParams,
22
13
  } from './links';