@marcoappio/marco-config 2.0.157 → 2.0.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ export { accountUtils } from './utils';
1
2
  export { marcoClients, marcoClientsUtils } from './clients';
2
3
  export { marcoPublicConfig, MARCO_ENV, MarcoEnvironment } from './marcoPublicConfig';
3
- export { marcoSDK } from './sdk';
4
- export { MarcoWSEvent, MarcoClient, MarcoWSSyncPoke, EndpointConfig, EndpointError, EndpointResponse, LabelSpecialUse } from './types';
5
4
  export { marcoSchemas } from './schemas';
5
+ export { marcoSDK } from './sdk';
6
6
  export { marcoWS } from './ws';
7
+ export { MarcoWSEvent, MarcoClient, MarcoWSSyncPoke, EndpointConfig, EndpointError, EndpointResponse, LabelSpecialUse } from './types';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACtI,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
+ export { accountUtils } from './utils';
1
2
  export { marcoClients, marcoClientsUtils } from './clients';
2
3
  export { marcoPublicConfig, MARCO_ENV } from './marcoPublicConfig';
3
- export { marcoSDK } from './sdk';
4
4
  export { marcoSchemas } from './schemas';
5
+ export { marcoSDK } from './sdk';
5
6
  export { marcoWS } from './ws';
@@ -151,6 +151,38 @@ export declare const endpoints: {
151
151
  }, undefined>;
152
152
  readonly status: import("valibot").LiteralSchema<200, undefined>;
153
153
  }, undefined>], undefined>>;
154
+ user: EndpointConfig<"/v1/pv/sync/pull/user", import("valibot").ObjectSchema<{
155
+ readonly clientGroupID: import("valibot").StringSchema<undefined>;
156
+ readonly cookie: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
157
+ }, undefined>, GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
158
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
159
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
160
+ }, undefined>, import("valibot").ObjectSchema<{
161
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
162
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
163
+ }, undefined>, import("valibot").ObjectSchema<{
164
+ readonly data: import("valibot").ObjectSchema<{
165
+ readonly cookie: import("valibot").NumberSchema<undefined>;
166
+ readonly lastMutationIDChanges: import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>;
167
+ readonly patch: import("valibot").ArraySchema<import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
168
+ readonly op: import("valibot").LiteralSchema<"clear", undefined>;
169
+ }, undefined>, import("valibot").ObjectSchema<{
170
+ readonly key: import("valibot").StringSchema<undefined>;
171
+ readonly op: import("valibot").LiteralSchema<"del", undefined>;
172
+ }, undefined>, import("valibot").ObjectSchema<{
173
+ readonly key: import("valibot").StringSchema<undefined>;
174
+ readonly op: import("valibot").LiteralSchema<"put", undefined>;
175
+ readonly value: import("valibot").ObjectSchema<{
176
+ readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
177
+ readonly settings: import("valibot").ObjectSchema<{
178
+ readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
179
+ readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
180
+ }, undefined>;
181
+ }, undefined>;
182
+ }, undefined>], undefined>, undefined>;
183
+ }, undefined>;
184
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
185
+ }, undefined>], undefined>>;
154
186
  };
155
187
  push: {
156
188
  account: EndpointConfig<"/v1/pv/sync/push/account", import("valibot").ObjectSchema<{
@@ -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"}
@@ -148,6 +148,38 @@ export declare const privateGroup: {
148
148
  }, undefined>;
149
149
  readonly status: import("valibot").LiteralSchema<200, undefined>;
150
150
  }, undefined>], undefined>>;
151
+ user: import("../../..").EndpointConfig<"/v1/pv/sync/pull/user", import("valibot").ObjectSchema<{
152
+ readonly clientGroupID: import("valibot").StringSchema<undefined>;
153
+ readonly cookie: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
154
+ }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
155
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
156
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
157
+ }, undefined>, import("valibot").ObjectSchema<{
158
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
159
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
160
+ }, undefined>, import("valibot").ObjectSchema<{
161
+ readonly data: import("valibot").ObjectSchema<{
162
+ readonly cookie: import("valibot").NumberSchema<undefined>;
163
+ readonly lastMutationIDChanges: import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>;
164
+ readonly patch: import("valibot").ArraySchema<import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
165
+ readonly op: import("valibot").LiteralSchema<"clear", undefined>;
166
+ }, undefined>, import("valibot").ObjectSchema<{
167
+ readonly key: import("valibot").StringSchema<undefined>;
168
+ readonly op: import("valibot").LiteralSchema<"del", undefined>;
169
+ }, undefined>, import("valibot").ObjectSchema<{
170
+ readonly key: import("valibot").StringSchema<undefined>;
171
+ readonly op: import("valibot").LiteralSchema<"put", undefined>;
172
+ readonly value: import("valibot").ObjectSchema<{
173
+ readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
174
+ readonly settings: import("valibot").ObjectSchema<{
175
+ readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
176
+ readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
177
+ }, undefined>;
178
+ }, undefined>;
179
+ }, undefined>], undefined>, undefined>;
180
+ }, undefined>;
181
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
182
+ }, undefined>], undefined>>;
151
183
  };
152
184
  push: {
153
185
  account: import("../../..").EndpointConfig<"/v1/pv/sync/push/account", import("valibot").ObjectSchema<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxB,CAAA"}
@@ -147,6 +147,38 @@ export declare const sync: {
147
147
  }, undefined>;
148
148
  readonly status: import("valibot").LiteralSchema<200, undefined>;
149
149
  }, undefined>], undefined>>;
150
+ user: import("../../../..").EndpointConfig<"/v1/pv/sync/pull/user", import("valibot").ObjectSchema<{
151
+ readonly clientGroupID: import("valibot").StringSchema<undefined>;
152
+ readonly cookie: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
153
+ }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
154
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
155
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
156
+ }, undefined>, import("valibot").ObjectSchema<{
157
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
158
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
159
+ }, undefined>, import("valibot").ObjectSchema<{
160
+ readonly data: import("valibot").ObjectSchema<{
161
+ readonly cookie: import("valibot").NumberSchema<undefined>;
162
+ readonly lastMutationIDChanges: import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>;
163
+ readonly patch: import("valibot").ArraySchema<import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
164
+ readonly op: import("valibot").LiteralSchema<"clear", undefined>;
165
+ }, undefined>, import("valibot").ObjectSchema<{
166
+ readonly key: import("valibot").StringSchema<undefined>;
167
+ readonly op: import("valibot").LiteralSchema<"del", undefined>;
168
+ }, undefined>, import("valibot").ObjectSchema<{
169
+ readonly key: import("valibot").StringSchema<undefined>;
170
+ readonly op: import("valibot").LiteralSchema<"put", undefined>;
171
+ readonly value: import("valibot").ObjectSchema<{
172
+ readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
173
+ readonly settings: import("valibot").ObjectSchema<{
174
+ readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
175
+ readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
176
+ }, undefined>;
177
+ }, undefined>;
178
+ }, undefined>], undefined>, undefined>;
179
+ }, undefined>;
180
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
181
+ }, undefined>], undefined>>;
150
182
  };
151
183
  push: {
152
184
  account: import("../../../..").EndpointConfig<"/v1/pv/sync/push/account", import("valibot").ObjectSchema<{
@@ -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"}
@@ -146,5 +146,37 @@ export declare const pull: {
146
146
  }, undefined>;
147
147
  readonly status: import("valibot").LiteralSchema<200, undefined>;
148
148
  }, undefined>], undefined>>;
149
+ user: import("../../../../..").EndpointConfig<"/v1/pv/sync/pull/user", import("valibot").ObjectSchema<{
150
+ readonly clientGroupID: import("valibot").StringSchema<undefined>;
151
+ readonly cookie: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
152
+ }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
153
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
154
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
155
+ }, undefined>, import("valibot").ObjectSchema<{
156
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
157
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
158
+ }, undefined>, import("valibot").ObjectSchema<{
159
+ readonly data: import("valibot").ObjectSchema<{
160
+ readonly cookie: import("valibot").NumberSchema<undefined>;
161
+ readonly lastMutationIDChanges: import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>;
162
+ readonly patch: import("valibot").ArraySchema<import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
163
+ readonly op: import("valibot").LiteralSchema<"clear", undefined>;
164
+ }, undefined>, import("valibot").ObjectSchema<{
165
+ readonly key: import("valibot").StringSchema<undefined>;
166
+ readonly op: import("valibot").LiteralSchema<"del", undefined>;
167
+ }, undefined>, import("valibot").ObjectSchema<{
168
+ readonly key: import("valibot").StringSchema<undefined>;
169
+ readonly op: import("valibot").LiteralSchema<"put", undefined>;
170
+ readonly value: import("valibot").ObjectSchema<{
171
+ readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
172
+ readonly settings: import("valibot").ObjectSchema<{
173
+ readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
174
+ readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
175
+ }, undefined>;
176
+ }, undefined>;
177
+ }, undefined>], undefined>, undefined>;
178
+ }, undefined>;
179
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
180
+ }, undefined>], undefined>>;
149
181
  };
150
182
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAqC,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { syncPullAccount as account } from './account';
2
2
  import { syncPullContact as contact } from './contact';
3
3
  import { syncPullThread as thread } from './thread';
4
- export const pull = { account, contact, thread };
4
+ import { syncPullUser as user } from './user';
5
+ export const pull = { account, contact, thread, user };
@@ -0,0 +1,34 @@
1
+ import * as v from 'valibot';
2
+ export declare const syncPullUser: import("../../../../..").EndpointConfig<"/v1/pv/sync/pull/user", v.ObjectSchema<{
3
+ readonly clientGroupID: v.StringSchema<undefined>;
4
+ readonly cookie: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
5
+ }, undefined>, v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>> | undefined, v.UnionSchema<[v.ObjectSchema<{
6
+ readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
7
+ readonly status: v.LiteralSchema<400, undefined>;
8
+ }, undefined>, v.ObjectSchema<{
9
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
10
+ readonly status: v.LiteralSchema<401, undefined>;
11
+ }, undefined>, v.ObjectSchema<{
12
+ readonly data: v.ObjectSchema<{
13
+ readonly cookie: v.NumberSchema<undefined>;
14
+ readonly lastMutationIDChanges: v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>;
15
+ readonly patch: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
16
+ readonly op: v.LiteralSchema<"clear", undefined>;
17
+ }, undefined>, v.ObjectSchema<{
18
+ readonly key: v.StringSchema<undefined>;
19
+ readonly op: v.LiteralSchema<"del", undefined>;
20
+ }, undefined>, v.ObjectSchema<{
21
+ readonly key: v.StringSchema<undefined>;
22
+ readonly op: v.LiteralSchema<"put", undefined>;
23
+ readonly value: v.ObjectSchema<{
24
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
25
+ readonly settings: v.ObjectSchema<{
26
+ readonly firstName: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
27
+ readonly lastName: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
28
+ }, undefined>;
29
+ }, undefined>;
30
+ }, undefined>], undefined>, undefined>;
31
+ }, undefined>;
32
+ readonly status: v.LiteralSchema<200, undefined>;
33
+ }, undefined>], undefined>>;
34
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/sync/pull/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwBvB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import * as v from 'valibot';
2
+ import { user } from '../../../../../clients/user';
3
+ import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
4
+ import { errorManifest } from '../../../../../sdk/validation/errors';
5
+ export const syncPullUser = createEndpoint({
6
+ body: v.object({
7
+ clientGroupID: v.string(),
8
+ cookie: v.nullable(v.number()),
9
+ }),
10
+ method: 'POST',
11
+ path: user.pullURL,
12
+ response: v.union([
13
+ errorManifest.validationFailedErrorSchema,
14
+ errorManifest.authenticationFailedErrorSchema,
15
+ v.object({
16
+ data: v.object({
17
+ cookie: v.number(),
18
+ lastMutationIDChanges: v.record(v.string(), v.number()),
19
+ patch: v.array(v.union([
20
+ v.object({ op: v.literal('clear') }),
21
+ v.object({ key: v.string(), op: v.literal('del') }),
22
+ v.object({ key: v.string(), op: v.literal('put'), value: user.model }),
23
+ ])),
24
+ }),
25
+ status: v.literal(200),
26
+ }),
27
+ ]),
28
+ });
@@ -150,6 +150,38 @@ export declare const marcoSDK: {
150
150
  }, undefined>;
151
151
  readonly status: import("valibot").LiteralSchema<200, undefined>;
152
152
  }, undefined>], undefined>>;
153
+ user: import("..").EndpointConfig<"/v1/pv/sync/pull/user", import("valibot").ObjectSchema<{
154
+ readonly clientGroupID: import("valibot").StringSchema<undefined>;
155
+ readonly cookie: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
156
+ }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
157
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
158
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
159
+ }, undefined>, import("valibot").ObjectSchema<{
160
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
161
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
162
+ }, undefined>, import("valibot").ObjectSchema<{
163
+ readonly data: import("valibot").ObjectSchema<{
164
+ readonly cookie: import("valibot").NumberSchema<undefined>;
165
+ readonly lastMutationIDChanges: import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>;
166
+ readonly patch: import("valibot").ArraySchema<import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
167
+ readonly op: import("valibot").LiteralSchema<"clear", undefined>;
168
+ }, undefined>, import("valibot").ObjectSchema<{
169
+ readonly key: import("valibot").StringSchema<undefined>;
170
+ readonly op: import("valibot").LiteralSchema<"del", undefined>;
171
+ }, undefined>, import("valibot").ObjectSchema<{
172
+ readonly key: import("valibot").StringSchema<undefined>;
173
+ readonly op: import("valibot").LiteralSchema<"put", undefined>;
174
+ readonly value: import("valibot").ObjectSchema<{
175
+ readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
176
+ readonly settings: import("valibot").ObjectSchema<{
177
+ readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
178
+ readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
179
+ }, undefined>;
180
+ }, undefined>;
181
+ }, undefined>], undefined>, undefined>;
182
+ }, undefined>;
183
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
184
+ }, undefined>], undefined>>;
153
185
  };
154
186
  push: {
155
187
  account: import("..").EndpointConfig<"/v1/pv/sync/push/account", import("valibot").ObjectSchema<{
@@ -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,2 @@
1
+ export declare const generateAccountColor: (emailAddress: string) => string;
2
+ //# sourceMappingURL=generateAccountColor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateAccountColor.d.ts","sourceRoot":"","sources":["../../../src/utils/accounts/generateAccountColor.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,iBAAkB,MAAM,KAAG,MAqC3D,CAAA"}
@@ -0,0 +1,38 @@
1
+ export const generateAccountColor = (emailAddress) => {
2
+ const goldenRatio = 0.618033988749895;
3
+ let hash = 0;
4
+ for (let i = 0; i < emailAddress.length; i++) {
5
+ hash = emailAddress.charCodeAt(i) + ((hash << 5) - hash);
6
+ }
7
+ const normalizedHash = Math.abs(hash) / (2 ** 32);
8
+ const hue = (normalizedHash + goldenRatio) % 1;
9
+ const h = hue * 6;
10
+ const s = 0.8;
11
+ const v = 0.95;
12
+ const i = Math.floor(h);
13
+ const f = h - i;
14
+ const p = v * (1 - s);
15
+ const q = v * (1 - s * f);
16
+ const t = v * (1 - s * (1 - f));
17
+ let r, g, b;
18
+ switch (i % 6) {
19
+ case 0:
20
+ [r, g, b] = [v, t, p];
21
+ break;
22
+ case 1:
23
+ [r, g, b] = [q, v, p];
24
+ break;
25
+ case 2:
26
+ [r, g, b] = [p, v, t];
27
+ break;
28
+ case 3:
29
+ [r, g, b] = [p, q, v];
30
+ break;
31
+ case 4:
32
+ [r, g, b] = [t, p, v];
33
+ break;
34
+ default: [r, g, b] = [v, p, q];
35
+ }
36
+ const toHex = (n) => Math.floor(n * 255).toString(16).padStart(2, '0');
37
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
38
+ };
@@ -0,0 +1,4 @@
1
+ export declare const accountUtils: {
2
+ generateColor: (emailAddress: string) => string;
3
+ };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/accounts/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;CAExB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { generateAccountColor } from './generateAccountColor';
2
+ export const accountUtils = {
3
+ generateColor: generateAccountColor,
4
+ };
@@ -0,0 +1,2 @@
1
+ export { accountUtils } from './accounts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { accountUtils } from './accounts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.157",
3
+ "version": "2.0.159",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",