@marcoappio/marco-config 2.0.570 → 2.0.572
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/dist/marcoPublicConfig.js +6 -6
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/mutators/mutatorSchemas.d.ts +1 -1
- package/dist/schemas/mutators/mutatorSchemas.js +1 -1
- package/dist/schemas/mutators/mutatorSchemas.test.d.ts +2 -0
- package/dist/schemas/mutators/mutatorSchemas.test.d.ts.map +1 -0
- package/dist/schemas/mutators/mutatorSchemas.test.js +39 -0
- package/dist/sdk/endpoints/private/mutations/user/createFeedback.d.ts +1 -1
- package/package.json +1 -1
|
@@ -34,8 +34,8 @@ const configMap = {
|
|
|
34
34
|
tier1: {
|
|
35
35
|
id: 'prod_TJW6TuhbdtnvMq',
|
|
36
36
|
priceIds: {
|
|
37
|
-
monthly: '
|
|
38
|
-
yearly: '
|
|
37
|
+
monthly: 'price_1TKIAR1m1XCLGhl4l7B0ysTX',
|
|
38
|
+
yearly: 'price_1TKIAf1m1XCLGhl4EbLTu1OM',
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
},
|
|
@@ -76,8 +76,8 @@ const configMap = {
|
|
|
76
76
|
tier1: {
|
|
77
77
|
id: 'prod_TJW8qBSheqSNKz',
|
|
78
78
|
priceIds: {
|
|
79
|
-
monthly: '
|
|
80
|
-
yearly: '
|
|
79
|
+
monthly: 'price_1TKI80P4o4KWHCwtPukaZPzv',
|
|
80
|
+
yearly: 'price_1TKI8KP4o4KWHCwtUoEtvVho',
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
83
|
},
|
|
@@ -118,8 +118,8 @@ const configMap = {
|
|
|
118
118
|
tier1: {
|
|
119
119
|
id: 'prod_TJW6TuhbdtnvMq',
|
|
120
120
|
priceIds: {
|
|
121
|
-
monthly: '
|
|
122
|
-
yearly: '
|
|
121
|
+
monthly: 'price_1TKIAR1m1XCLGhl4l7B0ysTX',
|
|
122
|
+
yearly: 'price_1TKIAf1m1XCLGhl4EbLTu1OM',
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
},
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -689,7 +689,7 @@ export declare const marcoSchemas: {
|
|
|
689
689
|
};
|
|
690
690
|
user: {
|
|
691
691
|
createFeedback: import("valibot").ObjectSchema<{
|
|
692
|
-
readonly feedbackText: import("valibot").
|
|
692
|
+
readonly feedbackText: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
693
693
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "UserId">]>, undefined>;
|
|
694
694
|
readonly rating: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>, import("valibot").MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
695
695
|
}, undefined>;
|
|
@@ -264,7 +264,7 @@ export declare const mutatorSchemas: {
|
|
|
264
264
|
};
|
|
265
265
|
user: {
|
|
266
266
|
createFeedback: v.ObjectSchema<{
|
|
267
|
-
readonly feedbackText: v.
|
|
267
|
+
readonly feedbackText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
268
268
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
|
|
269
269
|
readonly rating: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
270
270
|
}, undefined>;
|
|
@@ -194,7 +194,7 @@ export const mutatorSchemas = {
|
|
|
194
194
|
},
|
|
195
195
|
user: {
|
|
196
196
|
createFeedback: v.object({
|
|
197
|
-
feedbackText:
|
|
197
|
+
feedbackText: v.optional(v.pipe(v.string(), v.nonEmpty(), v.maxLength(4000))),
|
|
198
198
|
id: id.userId.required(),
|
|
199
199
|
rating: v.nonOptional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(5))),
|
|
200
200
|
}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutatorSchemas.test.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { mutatorSchemas } from './mutatorSchemas';
|
|
4
|
+
describe('mutatorSchemas.user.createFeedback', () => {
|
|
5
|
+
const testCases = [
|
|
6
|
+
{
|
|
7
|
+
description: 'omitted feedbackText',
|
|
8
|
+
input: {
|
|
9
|
+
id: 'user_01K4FZ8D9QCA8ZA9DCE3W1SET3',
|
|
10
|
+
rating: 5,
|
|
11
|
+
},
|
|
12
|
+
success: true,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
description: 'non-empty feedbackText',
|
|
16
|
+
input: {
|
|
17
|
+
feedbackText: 'test-feedback-text',
|
|
18
|
+
id: 'user_01K4FZ8D9QCA8ZA9DCE3W1SET3',
|
|
19
|
+
rating: 5,
|
|
20
|
+
},
|
|
21
|
+
success: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
description: 'empty feedbackText',
|
|
25
|
+
input: {
|
|
26
|
+
feedbackText: '',
|
|
27
|
+
id: 'user_01K4FZ8D9QCA8ZA9DCE3W1SET3',
|
|
28
|
+
rating: 5,
|
|
29
|
+
},
|
|
30
|
+
success: false,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
for (const testCase of testCases) {
|
|
34
|
+
it(`handles ${testCase.description}`, () => {
|
|
35
|
+
const result = v.safeParse(mutatorSchemas.user.createFeedback, testCase.input);
|
|
36
|
+
expect(result.success).toBe(testCase.success);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const createFeedback: import("../../../../..").EndpointConfig<"/v1/pv/models/user/feedback/create", v.ObjectSchema<{
|
|
3
|
-
readonly feedbackText: v.
|
|
3
|
+
readonly feedbackText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
4
4
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
|
|
5
5
|
readonly rating: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
6
6
|
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
|