PluginProbe
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager / 0.0.3
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager v0.0.3
0.0.11 0.0.10 0.0.9 0.0.8 0.0.7 0.0.6 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5
cookiez / modules / reviews / assets / js / api / index.ts

index.ts in Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager 0.0.3, at modules/reviews/assets/js/api/index.ts

23 lines 476 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { APIBase } from '@cookiez/globals';
2
3 import {
4 sendFeedbackPayloadSchema,
5 type SendFeedbackPayload,
6 } from './review-schema';
7
8 const v1Prefix = '/cookiez/v1';
9
10 class APIReview extends APIBase {
11 static async sendFeedback(data: SendFeedbackPayload): Promise<unknown> {
12 const payload = sendFeedbackPayloadSchema.parse(data);
13
14 return APIBase.request({
15 method: 'POST',
16 path: `${v1Prefix}/reviews/review`,
17 data: payload,
18 });
19 }
20 }
21
22 export default APIReview;
23