@marcoappio/marco-config 2.0.167 → 2.0.169

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 (28) hide show
  1. package/dist/clients/draft.d.ts +2 -0
  2. package/dist/clients/draft.d.ts.map +1 -1
  3. package/dist/clients/draft.js +5 -0
  4. package/dist/clients/index.d.ts +2 -0
  5. package/dist/clients/index.d.ts.map +1 -1
  6. package/dist/sdk/endpoints/index.d.ts +2 -0
  7. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  8. package/dist/sdk/endpoints/private/index.d.ts +2 -0
  9. package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
  10. package/dist/sdk/endpoints/private/sync/index.d.ts +2 -0
  11. package/dist/sdk/endpoints/private/sync/index.d.ts.map +1 -1
  12. package/dist/sdk/endpoints/private/sync/pull/draft.d.ts +1 -0
  13. package/dist/sdk/endpoints/private/sync/pull/draft.d.ts.map +1 -1
  14. package/dist/sdk/endpoints/private/sync/pull/index.d.ts +1 -0
  15. package/dist/sdk/endpoints/private/sync/pull/index.d.ts.map +1 -1
  16. package/dist/sdk/endpoints/private/sync/push/draft.d.ts +1 -0
  17. package/dist/sdk/endpoints/private/sync/push/draft.d.ts.map +1 -1
  18. package/dist/sdk/endpoints/private/sync/push/index.d.ts +1 -0
  19. package/dist/sdk/endpoints/private/sync/push/index.d.ts.map +1 -1
  20. package/dist/sdk/index.d.ts +2 -0
  21. package/dist/sdk/index.d.ts.map +1 -1
  22. package/dist/utils/stringPatch/stringPatch.d.ts +12 -0
  23. package/dist/utils/stringPatch/stringPatch.d.ts.map +1 -0
  24. package/dist/utils/stringPatch/stringPatch.js +36 -0
  25. package/dist/utils/stringPatch/stringPatch.test.d.ts +2 -0
  26. package/dist/utils/stringPatch/stringPatch.test.d.ts.map +1 -0
  27. package/dist/utils/stringPatch/stringPatch.test.js +63 -0
  28. package/package.json +4 -1
@@ -11,6 +11,7 @@ export declare const draft: {
11
11
  readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
12
12
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
13
13
  readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
14
+ readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SENDING", undefined>, v.LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
14
15
  }, undefined>;
15
16
  mutators: {
16
17
  delete: {
@@ -30,6 +31,7 @@ export declare const draft: {
30
31
  readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
31
32
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
32
33
  readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
34
+ readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SENDING", undefined>, v.LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
33
35
  }, undefined>;
34
36
  };
35
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/clients/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAkB5B,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBK,CAAA"}
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/clients/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAuB5B,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBK,CAAA"}
@@ -11,6 +11,11 @@ const draftSchema = v.object({
11
11
  emailAccountId: marcoSchemas.string.uuid(),
12
12
  id: marcoSchemas.string.uuid(),
13
13
  referencedMessageId: marcoSchemas.string.nullable(),
14
+ status: v.union([
15
+ v.literal('DRAFT'),
16
+ v.literal('SENDING'),
17
+ v.literal('SENDING_FAILED'),
18
+ ]),
14
19
  });
15
20
  export const draft = {
16
21
  model: draftSchema,
@@ -123,6 +123,7 @@ export declare const marcoClients: {
123
123
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
124
124
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
125
125
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
126
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
126
127
  }, undefined>;
127
128
  mutators: {
128
129
  delete: {
@@ -142,6 +143,7 @@ export declare const marcoClients: {
142
143
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
143
144
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
144
145
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
146
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
145
147
  }, undefined>;
146
148
  };
147
149
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMc,CAAA"}
@@ -130,6 +130,7 @@ export declare const endpoints: {
130
130
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
131
131
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
132
132
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
133
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
133
134
  }, undefined>;
134
135
  }, undefined>], undefined>, undefined>;
135
136
  }, undefined>;
@@ -343,6 +344,7 @@ export declare const endpoints: {
343
344
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
344
345
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
345
346
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
347
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
346
348
  }, undefined>;
347
349
  readonly clientID: import("valibot").StringSchema<undefined>;
348
350
  readonly id: import("valibot").NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,OAAO,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AActE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,OAAO,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AActE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGM,CAAA"}
@@ -127,6 +127,7 @@ export declare const privateGroup: {
127
127
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
128
128
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
129
129
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
130
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
130
131
  }, undefined>;
131
132
  }, undefined>], undefined>, undefined>;
132
133
  }, undefined>;
@@ -340,6 +341,7 @@ export declare const privateGroup: {
340
341
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
341
342
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
342
343
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
344
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
343
345
  }, undefined>;
344
346
  readonly clientID: import("valibot").StringSchema<undefined>;
345
347
  readonly id: import("valibot").NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAA"}
@@ -112,6 +112,7 @@ export declare const sync: {
112
112
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
113
113
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
114
114
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
115
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
115
116
  }, undefined>;
116
117
  }, undefined>], undefined>, undefined>;
117
118
  }, undefined>;
@@ -325,6 +326,7 @@ export declare const sync: {
325
326
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
326
327
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
327
328
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
329
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
328
330
  }, undefined>;
329
331
  readonly clientID: import("valibot").StringSchema<undefined>;
330
332
  readonly id: import("valibot").NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/sync/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/sync/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAA"}
@@ -31,6 +31,7 @@ export declare const syncPullDraft: import("../../../../..").EndpointConfig<"/v1
31
31
  readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
32
32
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
33
33
  readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
34
+ readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SENDING", undefined>, v.LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
34
35
  }, undefined>;
35
36
  }, undefined>], undefined>, undefined>;
36
37
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwBxB,CAAA"}
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwBxB,CAAA"}
@@ -111,6 +111,7 @@ export declare const pull: {
111
111
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
112
112
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
113
113
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
114
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
114
115
  }, undefined>;
115
116
  }, undefined>], undefined>, undefined>;
116
117
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4C,CAAA"}
@@ -20,6 +20,7 @@ export declare const syncPushDraft: import("../../../../..").EndpointConfig<"/v1
20
20
  readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
21
21
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.UuidAction<string, undefined>]>, undefined>;
22
22
  readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
23
+ readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SENDING", undefined>, v.LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
23
24
  }, undefined>;
24
25
  readonly clientID: v.StringSchema<undefined>;
25
26
  readonly id: v.NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/push/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyBxB,CAAA"}
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/push/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyBxB,CAAA"}
@@ -106,6 +106,7 @@ export declare const push: {
106
106
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
107
107
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
108
108
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
109
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
109
110
  }, undefined>;
110
111
  readonly clientID: import("valibot").StringSchema<undefined>;
111
112
  readonly id: import("valibot").NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/push/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/push/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAA"}
@@ -129,6 +129,7 @@ export declare const marcoSDK: {
129
129
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
130
130
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
131
131
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
132
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
132
133
  }, undefined>;
133
134
  }, undefined>], undefined>, undefined>;
134
135
  }, undefined>;
@@ -342,6 +343,7 @@ export declare const marcoSDK: {
342
343
  readonly emailAccountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
343
344
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").UuidAction<string, undefined>]>, undefined>;
344
345
  readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
346
+ readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"DRAFT", undefined>, import("valibot").LiteralSchema<"SENDING", undefined>, import("valibot").LiteralSchema<"SENDING_FAILED", undefined>], undefined>;
345
347
  }, undefined>;
346
348
  readonly clientID: import("valibot").StringSchema<undefined>;
347
349
  readonly id: import("valibot").NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
@@ -0,0 +1,12 @@
1
+ type Instruction = {
2
+ index: number;
3
+ type: 'INSERTION' | 'DELETION';
4
+ value: string;
5
+ };
6
+ type Patch = Instruction[];
7
+ export declare const stringPatch: {
8
+ apply: (text: string, patch: Patch) => string;
9
+ create: (startText: string, endText: string) => Patch;
10
+ };
11
+ export {};
12
+ //# sourceMappingURL=stringPatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringPatch.d.ts","sourceRoot":"","sources":["../../../src/utils/stringPatch/stringPatch.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,WAAW,GAAG,UAAU,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,KAAK,GAAG,WAAW,EAAE,CAAA;AAE1B,eAAO,MAAM,WAAW;kBAEd,MAAM,SACL,KAAK,KACX,MAAM;wBAiBI,MAAM,WACR,MAAM,KACd,KAAK;CAmBT,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { diffChars } from 'diff';
2
+ export const stringPatch = {
3
+ apply: (text, patch) => {
4
+ for (const instruction of patch) {
5
+ switch (instruction.type) {
6
+ case 'INSERTION': {
7
+ text = text.slice(0, instruction.index) + instruction.value + text.slice(instruction.index);
8
+ break;
9
+ }
10
+ case 'DELETION': {
11
+ text = text.slice(0, instruction.index) + text.slice(instruction.index + instruction.value.length);
12
+ break;
13
+ }
14
+ }
15
+ }
16
+ return text;
17
+ },
18
+ create: (startText, endText) => {
19
+ const charChanges = diffChars(startText, endText);
20
+ const patch = [];
21
+ let index = 0;
22
+ for (const change of charChanges) {
23
+ if (change.added) {
24
+ patch.push({ index, type: 'INSERTION', value: change.value });
25
+ index += change.value.length;
26
+ }
27
+ else if (change.removed) {
28
+ patch.push({ index, type: 'DELETION', value: change.value });
29
+ }
30
+ else {
31
+ index += change.value.length;
32
+ }
33
+ }
34
+ return patch;
35
+ },
36
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stringPatch.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringPatch.test.d.ts","sourceRoot":"","sources":["../../../src/utils/stringPatch/stringPatch.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+ import { stringPatch } from './stringPatch';
3
+ describe('stringPatch', () => {
4
+ const testCases = [
5
+ ['hello world', 'hello beautiful world'],
6
+ ['the quick brown fox', 'the slow brown fox'],
7
+ ['', 'new content'],
8
+ ['delete me', ''],
9
+ ['no changes', 'no changes'],
10
+ ['one two three', 'one three'],
11
+ ['start middle end', 'start new middle end'],
12
+ ['repeated repeated words', 'repeated words'],
13
+ ['missing punctuation', 'missing, punctuation!'],
14
+ ['old formatting', 'NEW FORMATTING'],
15
+ ['extra spaces', 'extra spaces'],
16
+ ['camelCase', 'snake_case'],
17
+ ['this is a test', 'this is only a test'],
18
+ ['remove last word test', 'remove last word'],
19
+ ['beginning test', 'new beginning test'],
20
+ ['[brackets]', '{curly brackets}'],
21
+ ['line\nbreak', 'line break'],
22
+ ['tab\tseparated', 'space separated'],
23
+ ['numbers 123', 'numbers 456'],
24
+ ['special chars !@#', 'different chars $%^'],
25
+ ['uppercase TEXT', 'lowercase text'],
26
+ ['trim this ', 'trim this'],
27
+ [' leading space', 'leading space'],
28
+ ['mixed CASE text', 'all lower case text'],
29
+ ['join these words', 'jointheseswords'],
30
+ ['split,words,here', 'split words here'],
31
+ ['version 1.0.0', 'version 2.0.0'],
32
+ ['prefix-', 'prefix-added'],
33
+ ['-suffix', 'added-suffix'],
34
+ ['multi\nline\ntext', 'single line text'],
35
+ ['short', 'much longer replacement'],
36
+ ['very long original text', 'short'],
37
+ ['kebab-case', 'camelCase'],
38
+ ['PascalCase', 'camelCase'],
39
+ ['duplicate duplicate', 'duplicate'],
40
+ [' multiple spaces ', 'single space'],
41
+ ['<html>tags</html>', 'plain text'],
42
+ ['quoted \'text\'', 'quoted "text"'],
43
+ ['email@test.com', 'newemail@test.com'],
44
+ ['http://old.url', 'http://new.url'],
45
+ ['date: 2023-01-01', 'date: 2024-01-01'],
46
+ ['rgb(255,0,0)', 'rgb(0,255,0)'],
47
+ ['function(){\n}', 'function() {\n}'],
48
+ ['snake_case_text', 'camelCaseText'],
49
+ ['trailing comma,', 'no trailing comma'],
50
+ ['...ellipsis', 'no ellipsis'],
51
+ ['**markdown**', '_different markdown_'],
52
+ ['(parentheses)', '[brackets]'],
53
+ ['TRUE', 'false'],
54
+ ['1234567890', '0987654321'],
55
+ ];
56
+ for (const [start, end] of testCases) {
57
+ it(`should create a patch for ${start} to ${end}`, () => {
58
+ const patch = stringPatch.create(start, end);
59
+ const patched = stringPatch.apply(start, patch);
60
+ expect(patched).toBe(end);
61
+ });
62
+ }
63
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.167",
3
+ "version": "2.0.169",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",
@@ -22,6 +22,7 @@
22
22
  "dependencies": {
23
23
  "@typescript-eslint/eslint-plugin": "5.62.0",
24
24
  "@typescript-eslint/parser": "6.21.0",
25
+ "diff": "7.0.0",
25
26
  "eslint": "8.41.0",
26
27
  "eslint-plugin-import": "2.29.1",
27
28
  "eslint-plugin-prefer-arrow": "1.2.3",
@@ -34,6 +35,8 @@
34
35
  },
35
36
  "devDependencies": {
36
37
  "@auto-it/npm": "11.2.0",
38
+ "@types/bun": "1.2.2",
39
+ "@types/diff": "7.0.1",
37
40
  "auto": "11.2.0",
38
41
  "tsc-alias": "1.8.10",
39
42
  "typescript": "5.5.4"