@marcoappio/marco-config 8.0.0 → 9.0.0

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.
Files changed (27) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/schemas/index.d.ts +46 -1
  4. package/dist/schemas/index.d.ts.map +1 -1
  5. package/dist/schemas/index.js +2 -1
  6. package/dist/schemas/models/index.d.ts +1 -1
  7. package/dist/schemas/models/index.d.ts.map +1 -1
  8. package/dist/schemas/models/index.js +1 -1
  9. package/dist/schemas/models/thread.d.ts +47 -0
  10. package/dist/schemas/models/thread.d.ts.map +1 -1
  11. package/dist/schemas/models/thread.js +21 -0
  12. package/dist/sdk/endpoints/private/models/thread/getThread.d.ts +15 -0
  13. package/dist/sdk/endpoints/private/models/thread/getThread.d.ts.map +1 -1
  14. package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.d.ts +15 -0
  15. package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.d.ts.map +1 -1
  16. package/dist/sdk/endpoints/private/models/thread/getThreadList.d.ts +15 -0
  17. package/dist/sdk/endpoints/private/models/thread/getThreadList.d.ts.map +1 -1
  18. package/dist/sdk/endpoints/private/mutations/thread/index.d.ts +1 -0
  19. package/dist/sdk/endpoints/private/mutations/thread/index.d.ts.map +1 -1
  20. package/dist/sdk/endpoints/private/mutations/thread/index.js +1 -0
  21. package/dist/sdk/endpoints/private/mutations/thread/retryLabelMove.d.ts +37 -0
  22. package/dist/sdk/endpoints/private/mutations/thread/retryLabelMove.d.ts.map +1 -0
  23. package/dist/sdk/endpoints/private/mutations/thread/retryLabelMove.js +17 -0
  24. package/dist/utils/threads/processSearchTerm/processSearchTerm.d.ts +1 -0
  25. package/dist/utils/threads/processSearchTerm/processSearchTerm.d.ts.map +1 -1
  26. package/dist/utils/threads/processSearchTerm/processSearchTerm.js +9 -8
  27. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { marcoConstants } from './constants';
2
2
  export { MARCO_ENV, type MarcoEnvironment, marcoPublicConfig } from './marcoPublicConfig';
3
- export { type Account, type AccountAlias, type AccountId, type AccountLabel, type AliasId, type AttachmentId, type Contact, type ContactId, type Draft, type DraftAttachment, type DraftBody, type DraftId, type LabelId, type MessageId, marcoSchemas, type PushNotificationTokenId, type RecipientId, type Thread, type ThreadId, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, type User, type UserId, type UserPushNotificationToken, type UserView, type ViewId, } from './schemas';
3
+ export { type Account, type AccountAlias, type AccountId, type AccountLabel, type AliasId, type AttachmentId, type Contact, type ContactId, type Draft, type DraftAttachment, type DraftBody, type DraftId, type LabelId, type LabelMove, type MessageId, marcoSchemas, type PushNotificationTokenId, type RecipientId, type Thread, type ThreadId, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, type User, type UserId, type UserPushNotificationToken, type UserView, type ViewId, } from './schemas';
4
4
  export { marcoSDK } from './sdk';
5
5
  export * from './types';
6
6
  export { accountUtils, labelUtils, threadsUtils } from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,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+1,5 @@
1
1
  export type { AccountId, AliasId, AttachmentId, ContactId, DraftId, LabelId, MessageId, PushNotificationTokenId, RecipientId, ThreadId, UserId, ViewId, } from './id';
2
- export type { Account, AccountAlias, AccountLabel, Contact, Draft, DraftAttachment, DraftBody, Thread, ThreadMessage, ThreadMessageAttachment, ThreadMessageRecipient, User, UserPushNotificationToken, UserView, } from './models';
2
+ export type { Account, AccountAlias, AccountLabel, Contact, Draft, DraftAttachment, DraftBody, LabelMove, Thread, ThreadMessage, ThreadMessageAttachment, ThreadMessageRecipient, User, UserPushNotificationToken, UserView, } from './models';
3
3
  export { mutatorSchemas } from './mutators';
4
4
  export declare const marcoSchemas: {
5
5
  app: {
@@ -191,12 +191,42 @@ export declare const marcoSchemas: {
191
191
  readonly updatedAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
192
192
  readonly userId: 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>;
193
193
  }, undefined>;
194
+ labelMoveSchema: import("valibot").VariantSchema<"status", [import("valibot").StrictObjectSchema<{
195
+ readonly canRetry: import("valibot").LiteralSchema<false, undefined>;
196
+ readonly failureCode: import("valibot").NullSchema<undefined>;
197
+ readonly status: import("valibot").LiteralSchema<"pending", undefined>;
198
+ readonly affectedThreadCount: import("valibot").SchemaWithPipe<readonly [import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
199
+ readonly mutationToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
200
+ readonly target: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
201
+ }, undefined>, import("valibot").StrictObjectSchema<{
202
+ readonly canRetry: import("valibot").BooleanSchema<undefined>;
203
+ readonly failureCode: import("valibot").PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
204
+ readonly status: import("valibot").LiteralSchema<"failed", undefined>;
205
+ readonly affectedThreadCount: import("valibot").SchemaWithPipe<readonly [import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
206
+ readonly mutationToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
207
+ readonly target: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
208
+ }, undefined>], undefined>;
194
209
  threadListSchema: import("valibot").StrictObjectSchema<{
195
210
  accountId: 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, "AccountId">]>, undefined>;
196
211
  flagged: import("valibot").BooleanSchema<undefined>;
197
212
  hasAttachments: import("valibot").BooleanSchema<undefined>;
198
213
  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, "ThreadId">]>, undefined>;
199
214
  labelIdList: import("valibot").StringSchema<undefined>;
215
+ labelMove: import("valibot").NullableSchema<import("valibot").VariantSchema<"status", [import("valibot").StrictObjectSchema<{
216
+ readonly canRetry: import("valibot").LiteralSchema<false, undefined>;
217
+ readonly failureCode: import("valibot").NullSchema<undefined>;
218
+ readonly status: import("valibot").LiteralSchema<"pending", undefined>;
219
+ readonly affectedThreadCount: import("valibot").SchemaWithPipe<readonly [import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
220
+ readonly mutationToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
221
+ readonly target: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
222
+ }, undefined>, import("valibot").StrictObjectSchema<{
223
+ readonly canRetry: import("valibot").BooleanSchema<undefined>;
224
+ readonly failureCode: import("valibot").PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
225
+ readonly status: import("valibot").LiteralSchema<"failed", undefined>;
226
+ readonly affectedThreadCount: import("valibot").SchemaWithPipe<readonly [import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
227
+ readonly mutationToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
228
+ readonly target: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
229
+ }, undefined>], undefined>, undefined>;
200
230
  latestMessageDate: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
201
231
  latestMessageId: 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, "MessageId">]>, undefined>;
202
232
  messageCount: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
@@ -240,6 +270,21 @@ export declare const marcoSchemas: {
240
270
  hasAttachments: import("valibot").BooleanSchema<undefined>;
241
271
  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, "ThreadId">]>, undefined>;
242
272
  labelIdList: import("valibot").StringSchema<undefined>;
273
+ labelMove: import("valibot").NullableSchema<import("valibot").VariantSchema<"status", [import("valibot").StrictObjectSchema<{
274
+ readonly canRetry: import("valibot").LiteralSchema<false, undefined>;
275
+ readonly failureCode: import("valibot").NullSchema<undefined>;
276
+ readonly status: import("valibot").LiteralSchema<"pending", undefined>;
277
+ readonly affectedThreadCount: import("valibot").SchemaWithPipe<readonly [import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
278
+ readonly mutationToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
279
+ readonly target: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
280
+ }, undefined>, import("valibot").StrictObjectSchema<{
281
+ readonly canRetry: import("valibot").BooleanSchema<undefined>;
282
+ readonly failureCode: import("valibot").PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
283
+ readonly status: import("valibot").LiteralSchema<"failed", undefined>;
284
+ readonly affectedThreadCount: import("valibot").SchemaWithPipe<readonly [import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
285
+ readonly mutationToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
286
+ readonly target: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
287
+ }, undefined>], undefined>, undefined>;
243
288
  latestMessageDate: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
244
289
  latestMessageId: 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, "MessageId">]>, undefined>;
245
290
  messageCount: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AA8BA,YAAY,EACV,SAAS,EACT,OAAO,EACP,YAAY,EACZ,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,uBAAuB,EACvB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,MAAM,CAAA;AACb,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"}
@@ -4,7 +4,7 @@ import { boolean } from './boolean';
4
4
  import { emailAccount } from './emailAccount';
5
5
  import { id } from './id';
6
6
  import { labels } from './labels';
7
- import { accountAliasSchema, accountLabelSchema, accountSchema, contactSchema, draftAttachmentSchema, draftBodySchema, draftSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, userPushNotificationTokenSchema, userSchema, userViewSchema, } from './models';
7
+ import { accountAliasSchema, accountLabelSchema, accountSchema, contactSchema, draftAttachmentSchema, draftBodySchema, draftSchema, labelMoveSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, userPushNotificationTokenSchema, userSchema, userViewSchema, } from './models';
8
8
  import { mutatorSchemas } from './mutators';
9
9
  import { number } from './number';
10
10
  import { oauth } from './oauth';
@@ -27,6 +27,7 @@ export const marcoSchemas = {
27
27
  draftAttachmentSchema,
28
28
  draftBodySchema,
29
29
  draftSchema,
30
+ labelMoveSchema,
30
31
  threadListSchema,
31
32
  threadMessageAttachmentSchema,
32
33
  threadMessageRecipientSchema,
@@ -1,6 +1,6 @@
1
1
  export { type Account, type AccountAlias, type AccountLabel, accountAliasSchema, accountLabelSchema, accountSchema, } from './account';
2
2
  export { type Contact, contactSchema } from './contact';
3
3
  export { type Draft, type DraftAttachment, type DraftBody, draftAttachmentSchema, draftBodySchema, draftSchema, } from './draft';
4
- export { type Thread, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
4
+ export { type LabelMove, labelMoveSchema, type Thread, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
5
5
  export { type User, type UserPushNotificationToken, type UserView, userPushNotificationTokenSchema, userSchema, userViewSchema, } from './user';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,KAAK,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,qBAAqB,EACrB,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,GACb,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,KAAK,IAAI,EACT,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,+BAA+B,EAC/B,UAAU,EACV,cAAc,GACf,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,KAAK,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,qBAAqB,EACrB,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,GACb,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,KAAK,IAAI,EACT,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,+BAA+B,EAC/B,UAAU,EACV,cAAc,GACf,MAAM,QAAQ,CAAA"}
@@ -1,5 +1,5 @@
1
1
  export { accountAliasSchema, accountLabelSchema, accountSchema, } from './account';
2
2
  export { contactSchema } from './contact';
3
3
  export { draftAttachmentSchema, draftBodySchema, draftSchema, } from './draft';
4
- export { threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
4
+ export { labelMoveSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
5
5
  export { userPushNotificationTokenSchema, userSchema, userViewSchema, } from './user';
@@ -24,12 +24,44 @@ export declare const threadMessageSchema: v.ObjectSchema<{
24
24
  readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
25
25
  readonly unsubscribeUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
26
26
  }, undefined>;
27
+ export declare const labelMoveMutationTokenSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
28
+ export declare const labelMoveSchema: v.VariantSchema<"status", [v.StrictObjectSchema<{
29
+ readonly canRetry: v.LiteralSchema<false, undefined>;
30
+ readonly failureCode: v.NullSchema<undefined>;
31
+ readonly status: v.LiteralSchema<"pending", undefined>;
32
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
33
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
34
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
35
+ }, undefined>, v.StrictObjectSchema<{
36
+ readonly canRetry: v.BooleanSchema<undefined>;
37
+ readonly failureCode: v.PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
38
+ readonly status: v.LiteralSchema<"failed", undefined>;
39
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
40
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
41
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
42
+ }, undefined>], undefined>;
43
+ export type LabelMove = v.InferOutput<typeof labelMoveSchema>;
27
44
  export declare const threadSchema: v.StrictObjectSchema<{
28
45
  accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
29
46
  flagged: v.BooleanSchema<undefined>;
30
47
  hasAttachments: v.BooleanSchema<undefined>;
31
48
  id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
32
49
  labelIdList: v.StringSchema<undefined>;
50
+ labelMove: v.NullableSchema<v.VariantSchema<"status", [v.StrictObjectSchema<{
51
+ readonly canRetry: v.LiteralSchema<false, undefined>;
52
+ readonly failureCode: v.NullSchema<undefined>;
53
+ readonly status: v.LiteralSchema<"pending", undefined>;
54
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
55
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
56
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
57
+ }, undefined>, v.StrictObjectSchema<{
58
+ readonly canRetry: v.BooleanSchema<undefined>;
59
+ readonly failureCode: v.PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
60
+ readonly status: v.LiteralSchema<"failed", undefined>;
61
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
62
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
63
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
64
+ }, undefined>], undefined>, undefined>;
33
65
  latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
34
66
  latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
35
67
  messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
@@ -48,6 +80,21 @@ export declare const threadListSchema: v.StrictObjectSchema<{
48
80
  hasAttachments: v.BooleanSchema<undefined>;
49
81
  id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
50
82
  labelIdList: v.StringSchema<undefined>;
83
+ labelMove: v.NullableSchema<v.VariantSchema<"status", [v.StrictObjectSchema<{
84
+ readonly canRetry: v.LiteralSchema<false, undefined>;
85
+ readonly failureCode: v.NullSchema<undefined>;
86
+ readonly status: v.LiteralSchema<"pending", undefined>;
87
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
88
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
89
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
90
+ }, undefined>, v.StrictObjectSchema<{
91
+ readonly canRetry: v.BooleanSchema<undefined>;
92
+ readonly failureCode: v.PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
93
+ readonly status: v.LiteralSchema<"failed", undefined>;
94
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
95
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
96
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
97
+ }, undefined>], undefined>, undefined>;
51
98
  latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
52
99
  latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
53
100
  messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,6BAA6B;;;;;;aAMxC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;aAMvC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;aAU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AAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACnE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACzF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
@@ -29,12 +29,33 @@ export const threadMessageSchema = v.object({
29
29
  threadId: id.threadId.required(),
30
30
  unsubscribeUrl: string.nullable(),
31
31
  });
32
+ export const labelMoveMutationTokenSchema = v.pipe(v.string(), v.uuid());
33
+ const labelMoveEntries = {
34
+ affectedThreadCount: v.pipe(number.positiveInteger(), v.minValue(1)),
35
+ mutationToken: labelMoveMutationTokenSchema,
36
+ target: string.required(),
37
+ };
38
+ export const labelMoveSchema = v.variant('status', [
39
+ v.strictObject({
40
+ ...labelMoveEntries,
41
+ canRetry: v.literal(false),
42
+ failureCode: v.null(),
43
+ status: v.literal('pending'),
44
+ }),
45
+ v.strictObject({
46
+ ...labelMoveEntries,
47
+ canRetry: v.boolean(),
48
+ failureCode: v.picklist(['MOVE_RECONCILIATION_FAILED', 'MOVE_RECOVERY_UNAVAILABLE']),
49
+ status: v.literal('failed'),
50
+ }),
51
+ ]);
32
52
  const threadBaseEntries = {
33
53
  accountId: id.accountId.required(),
34
54
  flagged: v.boolean(),
35
55
  hasAttachments: v.boolean(),
36
56
  id: id.threadId.required(),
37
57
  labelIdList: v.string(),
58
+ labelMove: v.nullable(labelMoveSchema),
38
59
  latestMessageDate: number.positiveInteger(),
39
60
  latestMessageId: id.messageId.required(),
40
61
  messageCount: number.positiveInteger(),
@@ -21,6 +21,21 @@ export declare const getThread: import("../../../../..").EndpointConfig<"/v1/pv/
21
21
  hasAttachments: v.BooleanSchema<undefined>;
22
22
  id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
23
23
  labelIdList: v.StringSchema<undefined>;
24
+ labelMove: v.NullableSchema<v.VariantSchema<"status", [v.StrictObjectSchema<{
25
+ readonly canRetry: v.LiteralSchema<false, undefined>;
26
+ readonly failureCode: v.NullSchema<undefined>;
27
+ readonly status: v.LiteralSchema<"pending", undefined>;
28
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
29
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
30
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
31
+ }, undefined>, v.StrictObjectSchema<{
32
+ readonly canRetry: v.BooleanSchema<undefined>;
33
+ readonly failureCode: v.PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
34
+ readonly status: v.LiteralSchema<"failed", undefined>;
35
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
36
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
37
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
38
+ }, undefined>], undefined>, undefined>;
24
39
  latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
25
40
  latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
26
41
  messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"getThread.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAYpB,CAAA"}
1
+ {"version":3,"file":"getThread.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAYpB,CAAA"}
@@ -21,6 +21,21 @@ export declare const getThreadByMessageId: import("../../../../..").EndpointConf
21
21
  hasAttachments: v.BooleanSchema<undefined>;
22
22
  id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
23
23
  labelIdList: v.StringSchema<undefined>;
24
+ labelMove: v.NullableSchema<v.VariantSchema<"status", [v.StrictObjectSchema<{
25
+ readonly canRetry: v.LiteralSchema<false, undefined>;
26
+ readonly failureCode: v.NullSchema<undefined>;
27
+ readonly status: v.LiteralSchema<"pending", undefined>;
28
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
29
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
30
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
31
+ }, undefined>, v.StrictObjectSchema<{
32
+ readonly canRetry: v.BooleanSchema<undefined>;
33
+ readonly failureCode: v.PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
34
+ readonly status: v.LiteralSchema<"failed", undefined>;
35
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
36
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
37
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
38
+ }, undefined>], undefined>, undefined>;
24
39
  latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
25
40
  latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
26
41
  messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"getThreadByMessageId.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThreadByMessageId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAY/B,CAAA"}
1
+ {"version":3,"file":"getThreadByMessageId.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/thread/getThreadByMessageId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAY/B,CAAA"}
@@ -60,6 +60,21 @@ export declare const getThreadList: import("../../../../..").EndpointConfig<"/v1
60
60
  hasAttachments: v.BooleanSchema<undefined>;
61
61
  id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
62
62
  labelIdList: v.StringSchema<undefined>;
63
+ labelMove: v.NullableSchema<v.VariantSchema<"status", [v.StrictObjectSchema<{
64
+ readonly canRetry: v.LiteralSchema<false, undefined>;
65
+ readonly failureCode: v.NullSchema<undefined>;
66
+ readonly status: v.LiteralSchema<"pending", undefined>;
67
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
68
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
69
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
70
+ }, undefined>, v.StrictObjectSchema<{
71
+ readonly canRetry: v.BooleanSchema<undefined>;
72
+ readonly failureCode: v.PicklistSchema<["MOVE_RECONCILIATION_FAILED", "MOVE_RECOVERY_UNAVAILABLE"], undefined>;
73
+ readonly status: v.LiteralSchema<"failed", undefined>;
74
+ readonly affectedThreadCount: v.SchemaWithPipe<readonly [v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.MinValueAction<number, 1, undefined>]>;
75
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
76
+ readonly target: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
77
+ }, undefined>], undefined>, undefined>;
63
78
  latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
64
79
  latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
65
80
  messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, 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;AA4C5B,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;AA4C5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAaxB,CAAA"}
@@ -1,6 +1,7 @@
1
1
  export { addLabel } from './addLabel';
2
2
  export { deleteThreads } from './deleteThreads';
3
3
  export { removeLabel } from './removeLabel';
4
+ export { retryLabelMove } from './retryLabelMove';
4
5
  export { setArchive } from './setArchive';
5
6
  export { setFlagged } from './setFlagged';
6
7
  export { setInbox } from './setInbox';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/thread/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/thread/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
@@ -1,6 +1,7 @@
1
1
  export { addLabel } from './addLabel';
2
2
  export { deleteThreads } from './deleteThreads';
3
3
  export { removeLabel } from './removeLabel';
4
+ export { retryLabelMove } from './retryLabelMove';
4
5
  export { setArchive } from './setArchive';
5
6
  export { setFlagged } from './setFlagged';
6
7
  export { setInbox } from './setInbox';
@@ -0,0 +1,37 @@
1
+ import * as v from 'valibot';
2
+ export declare const retryLabelMove: import("../../../../..").EndpointConfig<"/v1/pv/models/thread/:threadId/retry-label-move", v.StrictObjectSchema<{
3
+ readonly mutationToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4
+ }, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
5
+ readonly data: v.ObjectSchema<{
6
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
7
+ }, undefined>;
8
+ readonly status: v.LiteralSchema<401, undefined>;
9
+ }, undefined>, v.ObjectSchema<{
10
+ readonly data: v.ObjectSchema<{
11
+ readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
12
+ }, undefined>;
13
+ readonly status: v.LiteralSchema<404, undefined>;
14
+ }, undefined>, v.ObjectSchema<{
15
+ readonly data: v.ObjectSchema<{
16
+ readonly code: v.LiteralSchema<"THREAD_NOT_FOUND", undefined>;
17
+ }, undefined>;
18
+ readonly status: v.LiteralSchema<404, undefined>;
19
+ }, undefined>, v.ObjectSchema<{
20
+ readonly data: v.ObjectSchema<{
21
+ readonly code: v.LiteralSchema<"MUTATION_REJECTED", undefined>;
22
+ }, undefined>;
23
+ readonly status: v.LiteralSchema<409, undefined>;
24
+ }, undefined>, v.ObjectSchema<{
25
+ readonly data: v.ObjectSchema<{
26
+ readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
27
+ readonly issues: v.ObjectSchema<{
28
+ readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
29
+ readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
30
+ readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
31
+ }, undefined>;
32
+ }, undefined>;
33
+ readonly status: v.LiteralSchema<400, undefined>;
34
+ }, undefined>, v.ObjectSchema<{
35
+ readonly status: v.LiteralSchema<200, undefined>;
36
+ }, undefined>], undefined>>;
37
+ //# sourceMappingURL=retryLabelMove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retryLabelMove.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/thread/retryLabelMove.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAYzB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import * as v from 'valibot';
2
+ import { labelMoveMutationTokenSchema } from '../../../../../schemas/models/thread';
3
+ import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
4
+ import { errors } from '../../../../../sdk/validation/errors';
5
+ export const retryLabelMove = createEndpoint({
6
+ body: v.strictObject({ mutationToken: labelMoveMutationTokenSchema }),
7
+ method: 'POST',
8
+ path: '/v1/pv/models/thread/:threadId/retry-label-move',
9
+ response: v.union([
10
+ errors.authFailedErrorSchema,
11
+ errors.userNotFoundErrorSchema,
12
+ errors.threadNotFoundErrorSchema,
13
+ errors.mutationRejectedErrorSchema,
14
+ errors.validationFailedErrorSchema,
15
+ v.object({ status: v.literal(200) }),
16
+ ]),
17
+ });
@@ -1,2 +1,3 @@
1
+ /** An empty result means there are no searchable words, not an unfiltered search. */
1
2
  export declare const processSearchTerm: (term: string) => string[];
2
3
  //# sourceMappingURL=processSearchTerm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"processSearchTerm.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/processSearchTerm/processSearchTerm.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,MAAM,EAkBtD,CAAA"}
1
+ {"version":3,"file":"processSearchTerm.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/processSearchTerm/processSearchTerm.ts"],"names":[],"mappings":"AAOA,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,MAAM,EAetD,CAAA"}
@@ -1,17 +1,18 @@
1
1
  import { stemmer } from '@orama/stemmers/english';
2
2
  import { stopwords } from '@orama/stopwords/english';
3
3
  const STOP_WORDS_SET = new Set(stopwords);
4
+ const MIN_WORD_LENGTH = 3;
5
+ const MAX_WORD_LENGTH = 30;
6
+ /** An empty result means there are no searchable words, not an unfiltered search. */
4
7
  export const processSearchTerm = (term) => {
5
- const sanitizedTerm = term.trim().toLowerCase();
6
- const tokens = sanitizedTerm.split(/\s+/).filter(Boolean);
8
+ const tokens = term.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [];
7
9
  const wordSet = new Set();
8
10
  for (const token of tokens) {
9
- if (STOP_WORDS_SET.has(token)) {
10
- continue;
11
- }
12
- const stemmed = stemmer(token);
13
- if (stemmed.length > 0) {
14
- wordSet.add(stemmed);
11
+ if (token.length >= MIN_WORD_LENGTH && token.length < MAX_WORD_LENGTH && !STOP_WORDS_SET.has(token)) {
12
+ const stemmed = stemmer(token);
13
+ if (stemmed.length >= MIN_WORD_LENGTH && stemmed.length < MAX_WORD_LENGTH) {
14
+ wordSet.add(stemmed);
15
+ }
15
16
  }
16
17
  }
17
18
  return Array.from(wordSet);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "8.0.0",
3
+ "version": "9.0.0",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",