@marcoappio/marco-config 2.0.108 → 2.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import * as v from 'valibot';
2
+ import { IMAPPasswordConfigStatus } from '../types';
2
3
  export declare const account: {
3
4
  model: v.ObjectSchema<{
4
5
  readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
@@ -7,7 +8,7 @@ export declare const account: {
7
8
  readonly host: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
8
9
  readonly password: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
9
10
  readonly port: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
10
- readonly status: v.UnionSchema<[v.LiteralSchema<"AWAITING_CONNECTION", undefined>, v.LiteralSchema<"CONNECTED", undefined>, v.LiteralSchema<"CONNECTION_FAILED", undefined>], undefined>;
11
+ readonly status: v.EnumSchema<typeof IMAPPasswordConfigStatus, undefined>;
11
12
  }, undefined>, undefined>;
12
13
  readonly labels: v.ArraySchema<v.ObjectSchema<{
13
14
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
@@ -21,6 +22,14 @@ export declare const account: {
21
22
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
22
23
  }, undefined>;
23
24
  };
25
+ setIMAPPasswordConfig: {
26
+ delta: v.ObjectSchema<{
27
+ readonly status: v.LiteralSchema<IMAPPasswordConfigStatus.AWAITING_CONNECTION, undefined>;
28
+ readonly host: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
29
+ readonly password: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
30
+ readonly port: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
31
+ }, undefined>;
32
+ };
24
33
  };
25
34
  name: "account";
26
35
  pullURL: "/v1/pv/sync/pull/account";
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/clients/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAK5B,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCG,CAAA"}
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/clients/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAG5B,OAAO,EAAE,wBAAwB,EAAe,MAAM,qBAAqB,CAAA;AAS3E,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BG,CAAA"}
@@ -1,19 +1,17 @@
1
1
  import * as v from 'valibot';
2
2
  import { marcoSchemas } from '../schemas';
3
+ import { IMAPPasswordConfigStatus } from '../types';
4
+ const imapPasswordConfig = v.object({
5
+ host: marcoSchemas.string.required(),
6
+ password: marcoSchemas.string.required(),
7
+ port: marcoSchemas.number.minMax(1, 65535),
8
+ status: v.enum(IMAPPasswordConfigStatus),
9
+ });
3
10
  export const account = {
4
11
  model: v.object({
5
12
  emailAddress: marcoSchemas.string.email(),
6
13
  id: marcoSchemas.string.required(),
7
- imapPasswordConfig: v.nullable(v.object({
8
- host: marcoSchemas.string.required(),
9
- password: marcoSchemas.string.required(),
10
- port: marcoSchemas.number.minMax(1, 65535),
11
- status: v.union([
12
- v.literal('AWAITING_CONNECTION'),
13
- v.literal('CONNECTED'),
14
- v.literal('CONNECTION_FAILED'),
15
- ]),
16
- })),
14
+ imapPasswordConfig: v.nullable(imapPasswordConfig),
17
15
  labels: v.array(v.object({
18
16
  id: marcoSchemas.string.required(),
19
17
  name: marcoSchemas.string.required(),
@@ -26,6 +24,12 @@ export const account = {
26
24
  id: marcoSchemas.string.required(),
27
25
  }),
28
26
  },
27
+ setIMAPPasswordConfig: {
28
+ delta: v.object({
29
+ ...imapPasswordConfig.entries,
30
+ status: v.literal(IMAPPasswordConfigStatus.AWAITING_CONNECTION),
31
+ }),
32
+ },
29
33
  },
30
34
  name: 'account',
31
35
  pullURL: '/v1/pv/sync/pull/account',
@@ -7,7 +7,7 @@ export declare const marcoClients: {
7
7
  readonly host: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
8
8
  readonly password: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
9
9
  readonly port: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, number, undefined>, import("valibot").MaxValueAction<number, number, undefined>]>, undefined>;
10
- readonly status: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"AWAITING_CONNECTION", undefined>, import("valibot").LiteralSchema<"CONNECTED", undefined>, import("valibot").LiteralSchema<"CONNECTION_FAILED", undefined>], undefined>;
10
+ readonly status: import("valibot").EnumSchema<typeof import("../types").IMAPPasswordConfigStatus, undefined>;
11
11
  }, undefined>, undefined>;
12
12
  readonly labels: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
13
13
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
@@ -21,6 +21,14 @@ export declare const marcoClients: {
21
21
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
22
22
  }, undefined>;
23
23
  };
24
+ setIMAPPasswordConfig: {
25
+ delta: import("valibot").ObjectSchema<{
26
+ readonly status: import("valibot").LiteralSchema<import("../types").IMAPPasswordConfigStatus.AWAITING_CONNECTION, undefined>;
27
+ readonly host: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
28
+ readonly password: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
29
+ readonly port: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, number, undefined>, import("valibot").MaxValueAction<number, number, undefined>]>, undefined>;
30
+ }, undefined>;
31
+ };
24
32
  };
25
33
  name: "account";
26
34
  pullURL: "/v1/pv/sync/pull/account";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIc,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare enum IMAPPasswordConfigStatus {
2
+ AWAITING_CONNECTION = "AWAITING_CONNECTION",
3
+ CONNECTED = "CONNECTED",
4
+ CONNECTION_FAILED = "CONNECTION_FAILED"
5
+ }
6
+ //# sourceMappingURL=IMAPPasswordConfigStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IMAPPasswordConfigStatus.d.ts","sourceRoot":"","sources":["../../src/types/IMAPPasswordConfigStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,iBAAiB,sBAAsB;CACxC"}
@@ -0,0 +1,6 @@
1
+ export var IMAPPasswordConfigStatus;
2
+ (function (IMAPPasswordConfigStatus) {
3
+ IMAPPasswordConfigStatus["AWAITING_CONNECTION"] = "AWAITING_CONNECTION";
4
+ IMAPPasswordConfigStatus["CONNECTED"] = "CONNECTED";
5
+ IMAPPasswordConfigStatus["CONNECTION_FAILED"] = "CONNECTION_FAILED";
6
+ })(IMAPPasswordConfigStatus || (IMAPPasswordConfigStatus = {}));
@@ -1,4 +1,5 @@
1
1
  export * from './Endpoint';
2
+ export * from './IMAPPasswordConfigStatus';
2
3
  export * from './MarcoClient';
3
4
  export * from './WS';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,eAAe,CAAA;AAC7B,cAAc,MAAM,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export * from './Endpoint';
2
+ export * from './IMAPPasswordConfigStatus';
2
3
  export * from './MarcoClient';
3
4
  export * from './WS';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.108",
3
+ "version": "2.0.109",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",