@marcoappio/marco-config 2.0.546 → 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.
@@ -610,6 +610,7 @@ export declare const marcoSchemas: {
610
610
  websocket: {
611
611
  pokeEvent: import("valibot").ObjectSchema<{
612
612
  readonly event: import("valibot").LiteralSchema<"poke", undefined>;
613
+ readonly ids: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
613
614
  readonly model: import("valibot").PicklistSchema<readonly ["user", "account", "contact", "draft", "thread"], undefined>;
614
615
  }, undefined>;
615
616
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AA+BA,YAAY,EACV,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,IAAI,EACJ,yBAAyB,EACzB,QAAQ,GACT,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA"}
@@ -1,11 +1,13 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const pokeEventSchema: v.ObjectSchema<{
3
3
  readonly event: v.LiteralSchema<"poke", undefined>;
4
+ readonly ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4
5
  readonly model: v.PicklistSchema<readonly ["user", "account", "contact", "draft", "thread"], undefined>;
5
6
  }, undefined>;
6
7
  export declare const websocket: {
7
8
  pokeEvent: v.ObjectSchema<{
8
9
  readonly event: v.LiteralSchema<"poke", undefined>;
10
+ readonly ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
9
11
  readonly model: v.PicklistSchema<readonly ["user", "account", "contact", "draft", "thread"], undefined>;
10
12
  }, undefined>;
11
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/schemas/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,eAAe;;;aAG1B,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;CAErB,CAAA"}
1
+ {"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/schemas/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,eAAe;;;;aAI1B,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;CAErB,CAAA"}
@@ -2,6 +2,7 @@ import * as v from 'valibot';
2
2
  import { POKE_MODELS } from '../types';
3
3
  export const pokeEventSchema = v.object({
4
4
  event: v.literal('poke'),
5
+ ids: v.optional(v.array(v.string())),
5
6
  model: v.picklist(POKE_MODELS),
6
7
  });
7
8
  export const websocket = {
@@ -1,15 +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<{
14
+ readonly ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
6
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>;
7
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>;
8
20
  readonly messageIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
9
21
  readonly participants: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
10
22
  readonly search: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
11
23
  readonly seen: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false"], undefined>, v.TransformAction<"true" | "false", boolean>, v.BooleanSchema<undefined>]>, undefined>;
12
- }, undefined>, v.UnionSchema<[v.ObjectSchema<{
24
+ }, undefined>], undefined>, v.UnionSchema<[v.ObjectSchema<{
13
25
  readonly data: v.ObjectSchema<{
14
26
  readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
15
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;AAuB5B,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,17 +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
- labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
11
10
  limit: v.optional(marcoSchemas.number.positiveIntegerFromString()),
12
11
  messageIds: v.optional(v.array(v.string())),
13
12
  participants: v.optional(v.array(v.string())),
14
13
  search: v.optional(v.string()),
15
14
  seen: v.optional(marcoSchemas.boolean.fromString()),
16
- });
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
+ ]);
17
28
  export const getThreadList = createEndpoint({
18
29
  method: 'GET',
19
30
  path: '/v1/pv/models/threads/list',
@@ -1,11 +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<{
10
+ readonly ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
5
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>;
6
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>;
7
15
  readonly participants: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
8
- }, undefined>, v.UnionSchema<[v.ObjectSchema<{
16
+ }, undefined>], undefined>, v.UnionSchema<[v.ObjectSchema<{
9
17
  readonly data: v.ObjectSchema<{
10
18
  readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
11
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;AAmB5B,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,13 +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
- labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
10
9
  limit: v.optional(marcoSchemas.number.positiveIntegerFromString()),
11
10
  participants: v.optional(v.array(v.string())),
12
- });
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
+ ]);
13
24
  export const getThreads = createEndpoint({
14
25
  method: 'GET',
15
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.546",
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",