@marcoappio/marco-config 2.0.547 → 2.0.548

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.
@@ -1,16 +1,27 @@
1
1
  import * as v from 'valibot';
2
- export declare const getThreadList: import("../../../../..").EndpointConfig<"/v1/pv/models/threads/list", v.GenericSchema | undefined, v.ObjectSchema<{
2
+ export declare const getThreadList: import("../../../../..").EndpointConfig<"/v1/pv/models/threads/list", v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
3
+ readonly ids: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
4
+ readonly labelIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3
5
  readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4
6
  readonly flagged: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false"], undefined>, v.TransformAction<"true" | "false", boolean>, v.BooleanSchema<undefined>]>, undefined>;
5
7
  readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
8
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9
+ readonly messageIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
10
+ readonly participants: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
11
+ readonly search: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
12
+ readonly seen: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false"], undefined>, v.TransformAction<"true" | "false", boolean>, v.BooleanSchema<undefined>]>, undefined>;
13
+ }, undefined>, v.ObjectSchema<{
6
14
  readonly ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7
15
  readonly labelIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
16
+ readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
17
+ readonly flagged: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false"], undefined>, v.TransformAction<"true" | "false", boolean>, v.BooleanSchema<undefined>]>, undefined>;
18
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
8
19
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9
20
  readonly messageIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
10
21
  readonly participants: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
11
22
  readonly search: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
12
23
  readonly seen: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false"], undefined>, v.TransformAction<"true" | "false", boolean>, v.BooleanSchema<undefined>]>, undefined>;
13
- }, undefined>, v.UnionSchema<[v.ObjectSchema<{
24
+ }, undefined>], undefined>, v.UnionSchema<[v.ObjectSchema<{
14
25
  readonly data: v.ObjectSchema<{
15
26
  readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
16
27
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"getThreadList.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThreadList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwB5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAaxB,CAAA"}
1
+ {"version":3,"file":"getThreadList.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThreadList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAmC5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAaxB,CAAA"}
@@ -3,18 +3,28 @@ import { marcoSchemas } from '../../../../../schemas';
3
3
  import { paginatedResponseSchema } from '../../../../../schemas/paginatedResponse';
4
4
  import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
5
5
  import { authFailedErrorSchema, userNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../../sdk/validation/errors';
6
- const getThreadListQuerySchema = v.object({
6
+ const baseQuerySchema = {
7
7
  cursor: v.optional(v.string()),
8
8
  flagged: v.optional(marcoSchemas.boolean.fromString()),
9
9
  id: v.optional(v.string()),
10
- ids: v.optional(v.array(v.string())),
11
- labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
12
10
  limit: v.optional(marcoSchemas.number.positiveIntegerFromString()),
13
11
  messageIds: v.optional(v.array(v.string())),
14
12
  participants: v.optional(v.array(v.string())),
15
13
  search: v.optional(v.string()),
16
14
  seen: v.optional(marcoSchemas.boolean.fromString()),
17
- });
15
+ };
16
+ const getThreadListQuerySchema = v.union([
17
+ v.object({
18
+ ...baseQuerySchema,
19
+ ids: v.pipe(v.array(v.string()), v.minLength(1)),
20
+ labelIds: v.optional(v.array(v.string())),
21
+ }),
22
+ v.object({
23
+ ...baseQuerySchema,
24
+ ids: v.optional(v.array(v.string())),
25
+ labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
26
+ }),
27
+ ]);
18
28
  export const getThreadList = createEndpoint({
19
29
  method: 'GET',
20
30
  path: '/v1/pv/models/threads/list',
@@ -1,12 +1,19 @@
1
1
  import * as v from 'valibot';
2
- export declare const getThreads: import("../../../../..").EndpointConfig<"/v1/pv/models/threads/full", v.GenericSchema | undefined, v.ObjectSchema<{
2
+ export declare const getThreads: import("../../../../..").EndpointConfig<"/v1/pv/models/threads/full", v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
3
+ readonly ids: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
4
+ readonly labelIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3
5
  readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4
6
  readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
8
+ readonly participants: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
9
+ }, undefined>, v.ObjectSchema<{
5
10
  readonly ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
6
11
  readonly labelIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
12
+ readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
13
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7
14
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
8
15
  readonly participants: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
9
- }, undefined>, v.UnionSchema<[v.ObjectSchema<{
16
+ }, undefined>], undefined>, v.UnionSchema<[v.ObjectSchema<{
10
17
  readonly data: v.ObjectSchema<{
11
18
  readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
12
19
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"getThreads.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThreads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAoB5B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAarB,CAAA"}
1
+ {"version":3,"file":"getThreads.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThreads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA+B5B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAarB,CAAA"}
@@ -3,14 +3,24 @@ import { marcoSchemas } from '../../../../../schemas';
3
3
  import { paginatedResponseSchema } from '../../../../../schemas/paginatedResponse';
4
4
  import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
5
5
  import { authFailedErrorSchema, userNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../../sdk/validation/errors';
6
- const getThreadsQuerySchema = v.object({
6
+ const baseQuerySchema = {
7
7
  cursor: v.optional(v.string()),
8
8
  id: v.optional(v.string()),
9
- ids: v.optional(v.array(v.string())),
10
- labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
11
9
  limit: v.optional(marcoSchemas.number.positiveIntegerFromString()),
12
10
  participants: v.optional(v.array(v.string())),
13
- });
11
+ };
12
+ const getThreadsQuerySchema = v.union([
13
+ v.object({
14
+ ...baseQuerySchema,
15
+ ids: v.pipe(v.array(v.string()), v.minLength(1)),
16
+ labelIds: v.optional(v.array(v.string())),
17
+ }),
18
+ v.object({
19
+ ...baseQuerySchema,
20
+ ids: v.optional(v.array(v.string())),
21
+ labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
22
+ }),
23
+ ]);
14
24
  export const getThreads = createEndpoint({
15
25
  method: 'GET',
16
26
  path: '/v1/pv/models/threads/full',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.547",
3
+ "version": "2.0.548",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",