@capibox/bridge-nextjs-client 0.0.25 → 0.0.27

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/README.md CHANGED
@@ -1 +1,5 @@
1
- npx openapi-typescript http://localhost:4000/api-yaml -o ./src/lib/api.def.ts
1
+ ## DEV
2
+ npx openapi-typescript http://localhost:4000/api-yaml -o ./src/lib/api.def.ts
3
+
4
+ ## PROD
5
+ npx openapi-typescript https://api.capibox.com/api-yaml -o ./src/lib/api.def.ts
package/dist/index.d.mts CHANGED
@@ -59,6 +59,37 @@ interface components {
59
59
  */
60
60
  textPart?: string;
61
61
  };
62
+ TeamResponseDto: {
63
+ /**
64
+ * @description The unique identifier of the team
65
+ * @example 1
66
+ */
67
+ id: number;
68
+ /**
69
+ * @description The title of the team
70
+ * @example Development Team
71
+ */
72
+ title: string;
73
+ };
74
+ ProjectGroupResponseDto: {
75
+ /**
76
+ * @description The unique identifier of the project group
77
+ * @example 1
78
+ */
79
+ id: number;
80
+ /**
81
+ * @description The title of the project group
82
+ * @example Frontend Projects
83
+ */
84
+ title: string;
85
+ /**
86
+ * @description The ID of the team this project group belongs to
87
+ * @example 1
88
+ */
89
+ teamId: number;
90
+ /** @description The team this project group belongs to */
91
+ team: components["schemas"]["TeamResponseDto"];
92
+ };
62
93
  ProjectResponseDto: {
63
94
  /**
64
95
  * @description The unique identifier of the project
@@ -85,11 +116,20 @@ interface components {
85
116
  * @example support@example.com
86
117
  */
87
118
  support_email: string;
119
+ /**
120
+ * @description Project language
121
+ * @example en
122
+ */
123
+ language?: string;
88
124
  /**
89
125
  * @description The slug of the project
90
126
  * @example my-awesome-project
91
127
  */
92
128
  slug: string;
129
+ groupId?: number;
130
+ teamId?: number;
131
+ team?: components["schemas"]["TeamResponseDto"];
132
+ group?: components["schemas"]["ProjectGroupResponseDto"];
93
133
  };
94
134
  CreateProjectDto: {
95
135
  /**
@@ -111,12 +151,19 @@ interface components {
111
151
  * @description The support email address for the project
112
152
  * @example support@example.com
113
153
  */
114
- support_email: string;
154
+ support_email?: string;
155
+ /**
156
+ * @description Project language
157
+ * @example en
158
+ */
159
+ language?: string;
115
160
  /**
116
161
  * @description The slug of the project
117
162
  * @example my-awesome-project
118
163
  */
119
164
  slug: string;
165
+ groupId?: number;
166
+ teamId?: number;
120
167
  };
121
168
  UpdateProjectDto: {
122
169
  /**
@@ -139,11 +186,56 @@ interface components {
139
186
  * @example support@example.com
140
187
  */
141
188
  support_email?: string;
189
+ /**
190
+ * @description Project language
191
+ * @example en
192
+ */
193
+ language?: string;
142
194
  /**
143
195
  * @description The slug of the project
144
196
  * @example my-awesome-project
145
197
  */
146
198
  slug?: string;
199
+ groupId?: number;
200
+ teamId?: number;
201
+ };
202
+ CreateTeamDto: {
203
+ /**
204
+ * @description The title of the team
205
+ * @example Development Team
206
+ */
207
+ title: string;
208
+ };
209
+ UpdateTeamDto: {
210
+ /**
211
+ * @description The title of the team
212
+ * @example Development Team
213
+ */
214
+ title?: string;
215
+ };
216
+ CreateProjectGroupDto: {
217
+ /**
218
+ * @description The title of the project group
219
+ * @example Frontend Projects
220
+ */
221
+ title: string;
222
+ /**
223
+ * @description The ID of the team this project group belongs to
224
+ * @example 1
225
+ */
226
+ teamId: number;
227
+ };
228
+ UpdateProjectGroupDto: {
229
+ /**
230
+ * @description The title of the project group
231
+ * @example Frontend Projects
232
+ */
233
+ title?: string;
234
+ /**
235
+ * @description The ID of the team this project group belongs to
236
+ * @example 1
237
+ */
238
+ teamId?: number;
147
239
  };
148
240
  IntegrationResponseDto: {
149
241
  /**
@@ -247,6 +339,55 @@ interface components {
247
339
  */
248
340
  options?: Record<string, never>;
249
341
  };
342
+ CreateSessionBridgeDto: {
343
+ extraData?: {
344
+ [key: string]: unknown;
345
+ };
346
+ quiz?: {
347
+ [key: string]: unknown;
348
+ };
349
+ cookies: string;
350
+ uuid?: string;
351
+ analyticsId?: string;
352
+ analyticsIdv3?: string;
353
+ origin?: string;
354
+ query: {
355
+ [key: string]: unknown;
356
+ };
357
+ referer?: string;
358
+ slug: string;
359
+ };
360
+ SessionResponseDto: {
361
+ id: string;
362
+ project: string;
363
+ cookies: {
364
+ [key: string]: unknown;
365
+ };
366
+ country: string;
367
+ createdAt: string;
368
+ ip: string;
369
+ isEu: boolean;
370
+ origin: string;
371
+ query: {
372
+ [key: string]: unknown;
373
+ };
374
+ referer: string;
375
+ slug: string;
376
+ updatedAt: string;
377
+ useragent: string;
378
+ extraData: {
379
+ [key: string]: unknown;
380
+ };
381
+ };
382
+ SessionResponseFullDto: {
383
+ success: number;
384
+ data: components["schemas"]["SessionResponseDto"];
385
+ };
386
+ AppendSessionDto: {
387
+ extraData?: {
388
+ [key: string]: unknown;
389
+ };
390
+ };
250
391
  CreateWebhookDto: {
251
392
  /** @description The title of the webhook */
252
393
  title?: string;
@@ -617,6 +758,30 @@ interface components {
617
758
  created_at: number;
618
759
  uuid: string;
619
760
  };
761
+ VerifyPhoneResponseDto: {
762
+ /** @description Valid number or not */
763
+ valid: boolean;
764
+ /** @description Validation error if exists */
765
+ error: string;
766
+ };
767
+ VerifyEmailResponseDto: {
768
+ /** @description Valid email or not */
769
+ valid: boolean;
770
+ /** @description Validation error if exists */
771
+ error?: string;
772
+ };
773
+ EarlyFraudWarningSearchDto: {
774
+ /**
775
+ * @description Start date in YYYY-MM-DD format.
776
+ * @example 2025-08-01
777
+ */
778
+ startDate?: string;
779
+ /**
780
+ * @description End date in YYYY-MM-DD format.
781
+ * @example 2025-08-10
782
+ */
783
+ endDate?: string;
784
+ };
620
785
  };
621
786
  responses: never;
622
787
  parameters: never;
@@ -631,8 +796,29 @@ declare const browser: {
631
796
  sendToSupport: (data: components["schemas"]["SendMailToSupportDto"]) => Promise<components["schemas"]["SendMailResponseDto"]>;
632
797
  };
633
798
  session: {
634
- append: () => Promise<void>;
635
- create: () => Promise<void>;
799
+ append: (uuid: string, body: components["schemas"]["AppendSessionDto"]) => Promise<components["schemas"]["SessionResponseDto"]>;
800
+ create: ({ language, email, currency, ...data }: {
801
+ language: string;
802
+ email?: string;
803
+ currency: string;
804
+ } & Omit<{
805
+ extraData?: {
806
+ [key: string]: unknown;
807
+ };
808
+ quiz?: {
809
+ [key: string]: unknown;
810
+ };
811
+ cookies: string;
812
+ uuid?: string;
813
+ analyticsId?: string;
814
+ analyticsIdv3?: string;
815
+ origin?: string;
816
+ query: {
817
+ [key: string]: unknown;
818
+ };
819
+ referer?: string;
820
+ slug: string;
821
+ }, "origin" | "referer" | "cookies" | "slug" | "query" | "ip" | "user-agent">) => Promise<components["schemas"]["SessionResponseDto"]>;
636
822
  };
637
823
  crmAuth: {
638
824
  signIn: (data: any) => Promise<any>;
@@ -680,6 +866,12 @@ declare const browser: {
680
866
  upsellOptions?: any;
681
867
  }[]>;
682
868
  };
869
+ verify: {
870
+ email: (email: string) => Promise<{
871
+ valid: boolean;
872
+ error?: string;
873
+ } | undefined>;
874
+ };
683
875
  };
684
876
  declare const server: {
685
877
  middleware: (req: next_server.NextRequest, options?: {
package/dist/index.d.ts CHANGED
@@ -59,6 +59,37 @@ interface components {
59
59
  */
60
60
  textPart?: string;
61
61
  };
62
+ TeamResponseDto: {
63
+ /**
64
+ * @description The unique identifier of the team
65
+ * @example 1
66
+ */
67
+ id: number;
68
+ /**
69
+ * @description The title of the team
70
+ * @example Development Team
71
+ */
72
+ title: string;
73
+ };
74
+ ProjectGroupResponseDto: {
75
+ /**
76
+ * @description The unique identifier of the project group
77
+ * @example 1
78
+ */
79
+ id: number;
80
+ /**
81
+ * @description The title of the project group
82
+ * @example Frontend Projects
83
+ */
84
+ title: string;
85
+ /**
86
+ * @description The ID of the team this project group belongs to
87
+ * @example 1
88
+ */
89
+ teamId: number;
90
+ /** @description The team this project group belongs to */
91
+ team: components["schemas"]["TeamResponseDto"];
92
+ };
62
93
  ProjectResponseDto: {
63
94
  /**
64
95
  * @description The unique identifier of the project
@@ -85,11 +116,20 @@ interface components {
85
116
  * @example support@example.com
86
117
  */
87
118
  support_email: string;
119
+ /**
120
+ * @description Project language
121
+ * @example en
122
+ */
123
+ language?: string;
88
124
  /**
89
125
  * @description The slug of the project
90
126
  * @example my-awesome-project
91
127
  */
92
128
  slug: string;
129
+ groupId?: number;
130
+ teamId?: number;
131
+ team?: components["schemas"]["TeamResponseDto"];
132
+ group?: components["schemas"]["ProjectGroupResponseDto"];
93
133
  };
94
134
  CreateProjectDto: {
95
135
  /**
@@ -111,12 +151,19 @@ interface components {
111
151
  * @description The support email address for the project
112
152
  * @example support@example.com
113
153
  */
114
- support_email: string;
154
+ support_email?: string;
155
+ /**
156
+ * @description Project language
157
+ * @example en
158
+ */
159
+ language?: string;
115
160
  /**
116
161
  * @description The slug of the project
117
162
  * @example my-awesome-project
118
163
  */
119
164
  slug: string;
165
+ groupId?: number;
166
+ teamId?: number;
120
167
  };
121
168
  UpdateProjectDto: {
122
169
  /**
@@ -139,11 +186,56 @@ interface components {
139
186
  * @example support@example.com
140
187
  */
141
188
  support_email?: string;
189
+ /**
190
+ * @description Project language
191
+ * @example en
192
+ */
193
+ language?: string;
142
194
  /**
143
195
  * @description The slug of the project
144
196
  * @example my-awesome-project
145
197
  */
146
198
  slug?: string;
199
+ groupId?: number;
200
+ teamId?: number;
201
+ };
202
+ CreateTeamDto: {
203
+ /**
204
+ * @description The title of the team
205
+ * @example Development Team
206
+ */
207
+ title: string;
208
+ };
209
+ UpdateTeamDto: {
210
+ /**
211
+ * @description The title of the team
212
+ * @example Development Team
213
+ */
214
+ title?: string;
215
+ };
216
+ CreateProjectGroupDto: {
217
+ /**
218
+ * @description The title of the project group
219
+ * @example Frontend Projects
220
+ */
221
+ title: string;
222
+ /**
223
+ * @description The ID of the team this project group belongs to
224
+ * @example 1
225
+ */
226
+ teamId: number;
227
+ };
228
+ UpdateProjectGroupDto: {
229
+ /**
230
+ * @description The title of the project group
231
+ * @example Frontend Projects
232
+ */
233
+ title?: string;
234
+ /**
235
+ * @description The ID of the team this project group belongs to
236
+ * @example 1
237
+ */
238
+ teamId?: number;
147
239
  };
148
240
  IntegrationResponseDto: {
149
241
  /**
@@ -247,6 +339,55 @@ interface components {
247
339
  */
248
340
  options?: Record<string, never>;
249
341
  };
342
+ CreateSessionBridgeDto: {
343
+ extraData?: {
344
+ [key: string]: unknown;
345
+ };
346
+ quiz?: {
347
+ [key: string]: unknown;
348
+ };
349
+ cookies: string;
350
+ uuid?: string;
351
+ analyticsId?: string;
352
+ analyticsIdv3?: string;
353
+ origin?: string;
354
+ query: {
355
+ [key: string]: unknown;
356
+ };
357
+ referer?: string;
358
+ slug: string;
359
+ };
360
+ SessionResponseDto: {
361
+ id: string;
362
+ project: string;
363
+ cookies: {
364
+ [key: string]: unknown;
365
+ };
366
+ country: string;
367
+ createdAt: string;
368
+ ip: string;
369
+ isEu: boolean;
370
+ origin: string;
371
+ query: {
372
+ [key: string]: unknown;
373
+ };
374
+ referer: string;
375
+ slug: string;
376
+ updatedAt: string;
377
+ useragent: string;
378
+ extraData: {
379
+ [key: string]: unknown;
380
+ };
381
+ };
382
+ SessionResponseFullDto: {
383
+ success: number;
384
+ data: components["schemas"]["SessionResponseDto"];
385
+ };
386
+ AppendSessionDto: {
387
+ extraData?: {
388
+ [key: string]: unknown;
389
+ };
390
+ };
250
391
  CreateWebhookDto: {
251
392
  /** @description The title of the webhook */
252
393
  title?: string;
@@ -617,6 +758,30 @@ interface components {
617
758
  created_at: number;
618
759
  uuid: string;
619
760
  };
761
+ VerifyPhoneResponseDto: {
762
+ /** @description Valid number or not */
763
+ valid: boolean;
764
+ /** @description Validation error if exists */
765
+ error: string;
766
+ };
767
+ VerifyEmailResponseDto: {
768
+ /** @description Valid email or not */
769
+ valid: boolean;
770
+ /** @description Validation error if exists */
771
+ error?: string;
772
+ };
773
+ EarlyFraudWarningSearchDto: {
774
+ /**
775
+ * @description Start date in YYYY-MM-DD format.
776
+ * @example 2025-08-01
777
+ */
778
+ startDate?: string;
779
+ /**
780
+ * @description End date in YYYY-MM-DD format.
781
+ * @example 2025-08-10
782
+ */
783
+ endDate?: string;
784
+ };
620
785
  };
621
786
  responses: never;
622
787
  parameters: never;
@@ -631,8 +796,29 @@ declare const browser: {
631
796
  sendToSupport: (data: components["schemas"]["SendMailToSupportDto"]) => Promise<components["schemas"]["SendMailResponseDto"]>;
632
797
  };
633
798
  session: {
634
- append: () => Promise<void>;
635
- create: () => Promise<void>;
799
+ append: (uuid: string, body: components["schemas"]["AppendSessionDto"]) => Promise<components["schemas"]["SessionResponseDto"]>;
800
+ create: ({ language, email, currency, ...data }: {
801
+ language: string;
802
+ email?: string;
803
+ currency: string;
804
+ } & Omit<{
805
+ extraData?: {
806
+ [key: string]: unknown;
807
+ };
808
+ quiz?: {
809
+ [key: string]: unknown;
810
+ };
811
+ cookies: string;
812
+ uuid?: string;
813
+ analyticsId?: string;
814
+ analyticsIdv3?: string;
815
+ origin?: string;
816
+ query: {
817
+ [key: string]: unknown;
818
+ };
819
+ referer?: string;
820
+ slug: string;
821
+ }, "origin" | "referer" | "cookies" | "slug" | "query" | "ip" | "user-agent">) => Promise<components["schemas"]["SessionResponseDto"]>;
636
822
  };
637
823
  crmAuth: {
638
824
  signIn: (data: any) => Promise<any>;
@@ -680,6 +866,12 @@ declare const browser: {
680
866
  upsellOptions?: any;
681
867
  }[]>;
682
868
  };
869
+ verify: {
870
+ email: (email: string) => Promise<{
871
+ valid: boolean;
872
+ error?: string;
873
+ } | undefined>;
874
+ };
683
875
  };
684
876
  declare const server: {
685
877
  middleware: (req: next_server.NextRequest, options?: {