@purpleschool/gptbot 0.15.93 → 0.15.94-stage-2

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.
@@ -0,0 +1,4 @@
1
+ export declare const CONSENT_CONTROLLER: 'consent';
2
+ export declare const CONSENT_ROUTES: {
3
+ readonly ACKNOWLEDGE: '';
4
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONSENT_ROUTES = exports.CONSENT_CONTROLLER = void 0;
4
+ exports.CONSENT_CONTROLLER = 'consent';
5
+ exports.CONSENT_ROUTES = {
6
+ ACKNOWLEDGE: '',
7
+ };
@@ -70,6 +70,7 @@ export * from './b2b';
70
70
  export * from './b2b-usage-log';
71
71
  export * from './b2b-compatible';
72
72
  export * from './community';
73
+ export * from './consent';
73
74
  export * from './user-profile';
74
75
  export * from './image-generation';
75
76
  export * from './marketplace-card';
@@ -86,6 +86,7 @@ __exportStar(require("./b2b"), exports);
86
86
  __exportStar(require("./b2b-usage-log"), exports);
87
87
  __exportStar(require("./b2b-compatible"), exports);
88
88
  __exportStar(require("./community"), exports);
89
+ __exportStar(require("./consent"), exports);
89
90
  __exportStar(require("./user-profile"), exports);
90
91
  __exportStar(require("./image-generation"), exports);
91
92
  __exportStar(require("./marketplace-card"), exports);
@@ -940,6 +940,9 @@ export declare const REST_API: {
940
940
  readonly FORM_SUBMISSION_PRIVATE: {
941
941
  readonly CREATE: "/api/private/form-submission/";
942
942
  };
943
+ readonly CONSENT: {
944
+ readonly ACKNOWLEDGE: "/api/consent";
945
+ };
943
946
  readonly USER_TO_TASK_PUBLIC: {
944
947
  readonly REWARDS: "/api/user-to-task/public/rewards";
945
948
  };
@@ -978,6 +978,9 @@ exports.REST_API = {
978
978
  FORM_SUBMISSION_PRIVATE: {
979
979
  CREATE: `${exports.ROOT}/${CONTROLLERS.FORM_SUBMISSION_PRIVATE_CONTROLLER}/${CONTROLLERS.FORM_SUBMISSION_ROUTES.CREATE}`,
980
980
  },
981
+ CONSENT: {
982
+ ACKNOWLEDGE: `${exports.ROOT}/${CONTROLLERS.CONSENT_CONTROLLER}`,
983
+ },
981
984
  USER_TO_TASK_PUBLIC: {
982
985
  REWARDS: `${exports.ROOT}/${CONTROLLERS.USER_TO_TASK_PUBLIC_CONTROLLER}/${CONTROLLERS.USER_TO_TASK_PUBLIC_ROUTES.REWARDS}`,
983
986
  },
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare namespace AcknowledgeCookieConsentCommand {
3
+ const RequestSchema: z.ZodObject<{
4
+ id: z.ZodUUID;
5
+ policyVersion: z.ZodNumber;
6
+ action: z.ZodLiteral<"acknowledged">;
7
+ url: z.ZodString;
8
+ }, z.core.$strict>;
9
+ type Request = z.infer<typeof RequestSchema>;
10
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AcknowledgeCookieConsentCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const ConsentUrlSchema = zod_1.z
6
+ .string()
7
+ .max(2048)
8
+ .url()
9
+ .refine((value) => {
10
+ try {
11
+ return ['http:', 'https:'].includes(new URL(value).protocol);
12
+ }
13
+ catch (_a) {
14
+ return false;
15
+ }
16
+ }, { message: 'URL protocol must be http or https' });
17
+ var AcknowledgeCookieConsentCommand;
18
+ (function (AcknowledgeCookieConsentCommand) {
19
+ AcknowledgeCookieConsentCommand.RequestSchema = zod_1.z
20
+ .object({
21
+ id: zod_1.z.uuid(),
22
+ policyVersion: zod_1.z.number().int().positive(),
23
+ action: zod_1.z.literal('acknowledged'),
24
+ url: ConsentUrlSchema,
25
+ })
26
+ .strict();
27
+ })(AcknowledgeCookieConsentCommand || (exports.AcknowledgeCookieConsentCommand = AcknowledgeCookieConsentCommand = {}));
@@ -0,0 +1 @@
1
+ export * from './acknowledge-cookie-consent.command';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./acknowledge-cookie-consent.command"), exports);
@@ -55,6 +55,7 @@ export * from './b2b';
55
55
  export * from './b2b-usage-log';
56
56
  export * from './b2b-compatible';
57
57
  export * from './community';
58
+ export * from './cookie-consent';
58
59
  export * from './user-profile';
59
60
  export * from './team-account';
60
61
  export * from './team-to-subscription';
@@ -71,6 +71,7 @@ __exportStar(require("./b2b"), exports);
71
71
  __exportStar(require("./b2b-usage-log"), exports);
72
72
  __exportStar(require("./b2b-compatible"), exports);
73
73
  __exportStar(require("./community"), exports);
74
+ __exportStar(require("./cookie-consent"), exports);
74
75
  __exportStar(require("./user-profile"), exports);
75
76
  __exportStar(require("./team-account"), exports);
76
77
  __exportStar(require("./team-to-subscription"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.15.93",
3
+ "version": "0.15.94-stage-2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",