@marcoappio/marco-config 6.0.3 → 7.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.
- package/dist/schemas/index.d.ts +6 -4
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/mutators/mutatorSchemas.d.ts +6 -4
- package/dist/schemas/mutators/mutatorSchemas.d.ts.map +1 -1
- package/dist/schemas/mutators/mutatorSchemas.js +5 -10
- package/dist/sdk/endpoints/index.d.ts +10 -0
- package/dist/sdk/endpoints/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/draftAttachment/index.d.ts +10 -0
- package/dist/sdk/endpoints/private/draftAttachment/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/draftAttachment/uploadDraftAttachment.d.ts +10 -0
- package/dist/sdk/endpoints/private/draftAttachment/uploadDraftAttachment.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/draftAttachment/uploadDraftAttachment.js +3 -1
- package/dist/sdk/endpoints/private/index.d.ts +10 -0
- package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/createAttachment.d.ts +3 -2
- package/dist/sdk/endpoints/private/mutations/draft/createAttachment.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/createDraft.d.ts +3 -2
- package/dist/sdk/endpoints/private/mutations/draft/createDraft.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +22 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/validation/errors.d.ts +24 -0
- package/dist/sdk/validation/errors.d.ts.map +1 -1
- package/dist/sdk/validation/errors.js +10 -0
- package/dist/sdk/validation/index.d.ts +12 -0
- package/dist/sdk/validation/index.d.ts.map +1 -1
- package/dist/types/SDKError.d.ts +1 -1
- package/dist/types/SDKError.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/schemas/index.d.ts
CHANGED
|
@@ -427,25 +427,27 @@ export declare const marcoSchemas: {
|
|
|
427
427
|
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>;
|
|
428
428
|
}, undefined>;
|
|
429
429
|
createAttachment: import("valibot").ObjectSchema<{
|
|
430
|
-
readonly attachment: import("valibot").
|
|
430
|
+
readonly attachment: import("valibot").StrictObjectSchema<Omit<{
|
|
431
|
+
readonly draftId: 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, "DraftId">]>, undefined>;
|
|
431
432
|
readonly fileName: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
432
433
|
readonly 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, "AttachmentId">]>, undefined>;
|
|
433
434
|
readonly mimeType: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
434
435
|
readonly status: import("valibot").PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
435
436
|
readonly totalSize: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
|
|
436
|
-
}, undefined>;
|
|
437
|
+
}, "status" | "draftId">, undefined>;
|
|
437
438
|
readonly 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, "DraftId">]>, undefined>;
|
|
438
439
|
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>;
|
|
439
440
|
}, undefined>;
|
|
440
441
|
createDraft: import("valibot").ObjectSchema<{
|
|
441
442
|
readonly 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>;
|
|
442
|
-
readonly attachments: import("valibot").ArraySchema<import("valibot").
|
|
443
|
+
readonly attachments: import("valibot").ArraySchema<import("valibot").StrictObjectSchema<Omit<{
|
|
444
|
+
readonly draftId: 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, "DraftId">]>, undefined>;
|
|
443
445
|
readonly fileName: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
444
446
|
readonly 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, "AttachmentId">]>, undefined>;
|
|
445
447
|
readonly mimeType: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
446
448
|
readonly status: import("valibot").PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
447
449
|
readonly totalSize: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
|
|
448
|
-
}, undefined>, undefined>;
|
|
450
|
+
}, "status" | "draftId">, undefined>, undefined>;
|
|
449
451
|
readonly body: import("valibot").ObjectSchema<{
|
|
450
452
|
readonly bcc: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
451
453
|
readonly cc: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AA+BA,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
|
|
1
|
+
{"version":3,"file":"index.d.ts","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA"}
|
|
@@ -85,25 +85,27 @@ export declare const mutatorSchemas: {
|
|
|
85
85
|
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
86
86
|
}, undefined>;
|
|
87
87
|
createAttachment: v.ObjectSchema<{
|
|
88
|
-
readonly attachment: v.
|
|
88
|
+
readonly attachment: v.StrictObjectSchema<Omit<{
|
|
89
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
89
90
|
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
90
91
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AttachmentId">]>, undefined>;
|
|
91
92
|
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
92
93
|
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
93
94
|
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
94
|
-
}, undefined>;
|
|
95
|
+
}, "status" | "draftId">, undefined>;
|
|
95
96
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
96
97
|
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
97
98
|
}, undefined>;
|
|
98
99
|
createDraft: v.ObjectSchema<{
|
|
99
100
|
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
100
|
-
readonly attachments: v.ArraySchema<v.
|
|
101
|
+
readonly attachments: v.ArraySchema<v.StrictObjectSchema<Omit<{
|
|
102
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
101
103
|
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
102
104
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AttachmentId">]>, undefined>;
|
|
103
105
|
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
104
106
|
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
105
107
|
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
106
|
-
}, undefined>, undefined>;
|
|
108
|
+
}, "status" | "draftId">, undefined>, undefined>;
|
|
107
109
|
readonly body: v.ObjectSchema<{
|
|
108
110
|
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
109
111
|
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA4D5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqL1B,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { marcoConstants } from '../../constants';
|
|
3
|
-
import {
|
|
3
|
+
import { DRAFT_STATUSES, DRAFT_TYPES, USER_SETTINGS_CUSTOM_VIEW_ICONS } from '../../types';
|
|
4
4
|
import { emailAccount } from '../emailAccount';
|
|
5
5
|
import { id } from '../id';
|
|
6
|
+
import { draftAttachmentSchema } from '../models/draft';
|
|
6
7
|
import { number } from '../number';
|
|
7
8
|
import { string } from '../string';
|
|
8
9
|
const accountAliasSchema = v.object({
|
|
@@ -27,13 +28,7 @@ const draftBodySchema = v.object({
|
|
|
27
28
|
subject: string.nullable(),
|
|
28
29
|
to: v.array(string.email()),
|
|
29
30
|
});
|
|
30
|
-
const
|
|
31
|
-
fileName: string.required(),
|
|
32
|
-
id: id.attachmentId.required(),
|
|
33
|
-
mimeType: string.required(255),
|
|
34
|
-
status: v.picklist(DRAFT_ATTACHMENT_UPLOAD_STATUSES),
|
|
35
|
-
totalSize: number.positiveInteger(),
|
|
36
|
-
});
|
|
31
|
+
const draftAttachmentInputSchema = v.strictObject(v.omit(draftAttachmentSchema, ['draftId', 'status']).entries);
|
|
37
32
|
const userPushNotificationTokenSchema = v.object({
|
|
38
33
|
createdAt: number.positiveInteger(),
|
|
39
34
|
id: id.pushNotificationTokenId.required(),
|
|
@@ -112,13 +107,13 @@ export const mutatorSchemas = {
|
|
|
112
107
|
updatedAt: number.positiveInteger(),
|
|
113
108
|
}),
|
|
114
109
|
createAttachment: v.object({
|
|
115
|
-
attachment:
|
|
110
|
+
attachment: draftAttachmentInputSchema,
|
|
116
111
|
id: id.draftId.required(),
|
|
117
112
|
updatedAt: number.positiveInteger(),
|
|
118
113
|
}),
|
|
119
114
|
createDraft: v.object({
|
|
120
115
|
accountId: id.accountId.required(),
|
|
121
|
-
attachments: v.array(
|
|
116
|
+
attachments: v.array(draftAttachmentInputSchema),
|
|
122
117
|
body: draftBodySchema,
|
|
123
118
|
error: string.nullable(),
|
|
124
119
|
from: string.email(),
|
|
@@ -13,11 +13,21 @@ export declare const endpoints: {
|
|
|
13
13
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_NOT_FOUND", undefined>;
|
|
14
14
|
}, undefined>;
|
|
15
15
|
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
16
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
17
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
18
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
19
|
+
}, undefined>;
|
|
20
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
16
21
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
17
22
|
readonly data: import("valibot").ObjectSchema<{
|
|
18
23
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
19
24
|
}, undefined>;
|
|
20
25
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
26
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
27
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
28
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
readonly status: import("valibot").LiteralSchema<500, undefined>;
|
|
21
31
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
22
32
|
readonly data: import("valibot").ObjectSchema<{
|
|
23
33
|
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAA;AAWtE,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAA;AAWtE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGM,CAAA"}
|
|
@@ -9,11 +9,21 @@ export declare const draftAttachment: {
|
|
|
9
9
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_NOT_FOUND", undefined>;
|
|
10
10
|
}, undefined>;
|
|
11
11
|
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
12
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
13
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
14
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
12
17
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
13
18
|
readonly data: import("valibot").ObjectSchema<{
|
|
14
19
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
15
20
|
}, undefined>;
|
|
16
21
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
22
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
23
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
24
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
25
|
+
}, undefined>;
|
|
26
|
+
readonly status: import("valibot").LiteralSchema<500, undefined>;
|
|
17
27
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
18
28
|
readonly data: import("valibot").ObjectSchema<{
|
|
19
29
|
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/draftAttachment/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/draftAttachment/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE3B,CAAA"}
|
|
@@ -9,11 +9,21 @@ export declare const uploadDraftAttachment: import("../../../..").EndpointConfig
|
|
|
9
9
|
readonly code: v.LiteralSchema<"ATTACHMENT_NOT_FOUND", undefined>;
|
|
10
10
|
}, undefined>;
|
|
11
11
|
readonly status: v.LiteralSchema<404, undefined>;
|
|
12
|
+
}, undefined>, v.ObjectSchema<{
|
|
13
|
+
readonly data: v.ObjectSchema<{
|
|
14
|
+
readonly code: v.LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
12
17
|
}, undefined>, v.ObjectSchema<{
|
|
13
18
|
readonly data: v.ObjectSchema<{
|
|
14
19
|
readonly code: v.LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
15
20
|
}, undefined>;
|
|
16
21
|
readonly status: v.LiteralSchema<409, undefined>;
|
|
22
|
+
}, undefined>, v.ObjectSchema<{
|
|
23
|
+
readonly data: v.ObjectSchema<{
|
|
24
|
+
readonly code: v.LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
25
|
+
}, undefined>;
|
|
26
|
+
readonly status: v.LiteralSchema<500, undefined>;
|
|
17
27
|
}, undefined>, v.ObjectSchema<{
|
|
18
28
|
readonly data: v.ObjectSchema<{
|
|
19
29
|
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadDraftAttachment.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/draftAttachment/uploadDraftAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"uploadDraftAttachment.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/draftAttachment/uploadDraftAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAY5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBhC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
|
|
3
|
-
import { attachmentNotFoundErrorSchema, attachmentStateInvalidErrorSchema, authFailedErrorSchema, validationFailedErrorSchema, } from '../../../../sdk/validation/errors';
|
|
3
|
+
import { attachmentNotFoundErrorSchema, attachmentSizeMismatchErrorSchema, attachmentStateInvalidErrorSchema, attachmentUploadFailedErrorSchema, authFailedErrorSchema, validationFailedErrorSchema, } from '../../../../sdk/validation/errors';
|
|
4
4
|
export const uploadDraftAttachment = createEndpoint({
|
|
5
5
|
body: v.blob(),
|
|
6
6
|
bodyType: 'blob',
|
|
@@ -9,7 +9,9 @@ export const uploadDraftAttachment = createEndpoint({
|
|
|
9
9
|
response: v.union([
|
|
10
10
|
authFailedErrorSchema,
|
|
11
11
|
attachmentNotFoundErrorSchema,
|
|
12
|
+
attachmentSizeMismatchErrorSchema,
|
|
12
13
|
attachmentStateInvalidErrorSchema,
|
|
14
|
+
attachmentUploadFailedErrorSchema,
|
|
13
15
|
validationFailedErrorSchema,
|
|
14
16
|
v.object({
|
|
15
17
|
status: v.literal(200),
|
|
@@ -10,11 +10,21 @@ export declare const privateGroup: {
|
|
|
10
10
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_NOT_FOUND", undefined>;
|
|
11
11
|
}, undefined>;
|
|
12
12
|
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
13
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
14
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
15
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
13
18
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
14
19
|
readonly data: import("valibot").ObjectSchema<{
|
|
15
20
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
16
21
|
}, undefined>;
|
|
17
22
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
23
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
24
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
25
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
readonly status: import("valibot").LiteralSchema<500, undefined>;
|
|
18
28
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
19
29
|
readonly data: import("valibot").ObjectSchema<{
|
|
20
30
|
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxB,CAAA"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const createAttachment: import("../../../../..").EndpointConfig<"/v1/pv/models/draft/:draftId/attachments/create", v.ObjectSchema<{
|
|
3
|
-
readonly attachment: v.
|
|
3
|
+
readonly attachment: v.StrictObjectSchema<Omit<{
|
|
4
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
4
5
|
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
5
6
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AttachmentId">]>, undefined>;
|
|
6
7
|
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
8
|
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
8
9
|
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
9
|
-
}, undefined>;
|
|
10
|
+
}, "status" | "draftId">, undefined>;
|
|
10
11
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
11
12
|
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
12
13
|
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/draft/createAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAY5B,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"createAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/draft/createAttachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAY5B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAc3B,CAAA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const createDraft: import("../../../../..").EndpointConfig<"/v1/pv/models/drafts/create", v.ObjectSchema<{
|
|
3
3
|
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
4
|
-
readonly attachments: v.ArraySchema<v.
|
|
4
|
+
readonly attachments: v.ArraySchema<v.StrictObjectSchema<Omit<{
|
|
5
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
5
6
|
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
7
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AttachmentId">]>, undefined>;
|
|
7
8
|
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
8
9
|
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
9
10
|
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
10
|
-
}, undefined>, undefined>;
|
|
11
|
+
}, "status" | "draftId">, undefined>, undefined>;
|
|
11
12
|
readonly body: v.ObjectSchema<{
|
|
12
13
|
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
13
14
|
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/draft/createDraft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAY5B,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"createDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/draft/createDraft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAY5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BActB,CAAA"}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -12,11 +12,21 @@ export declare const marcoSDK: {
|
|
|
12
12
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_NOT_FOUND", undefined>;
|
|
13
13
|
}, undefined>;
|
|
14
14
|
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
15
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
16
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
17
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
18
|
+
}, undefined>;
|
|
19
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
15
20
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
16
21
|
readonly data: import("valibot").ObjectSchema<{
|
|
17
22
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
18
23
|
}, undefined>;
|
|
19
24
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
25
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
26
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
27
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly status: import("valibot").LiteralSchema<500, undefined>;
|
|
20
30
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
21
31
|
readonly data: import("valibot").ObjectSchema<{
|
|
22
32
|
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
@@ -271,12 +281,24 @@ export declare const marcoSDK: {
|
|
|
271
281
|
}, undefined>;
|
|
272
282
|
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
273
283
|
}, undefined>;
|
|
284
|
+
readonly attachmentSizeMismatchErrorSchema: import("valibot").ObjectSchema<{
|
|
285
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
286
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
287
|
+
}, undefined>;
|
|
288
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
289
|
+
}, undefined>;
|
|
274
290
|
readonly attachmentStateInvalidErrorSchema: import("valibot").ObjectSchema<{
|
|
275
291
|
readonly data: import("valibot").ObjectSchema<{
|
|
276
292
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
277
293
|
}, undefined>;
|
|
278
294
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
279
295
|
}, undefined>;
|
|
296
|
+
readonly attachmentUploadFailedErrorSchema: import("valibot").ObjectSchema<{
|
|
297
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
298
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
299
|
+
}, undefined>;
|
|
300
|
+
readonly status: import("valibot").LiteralSchema<500, undefined>;
|
|
301
|
+
}, undefined>;
|
|
280
302
|
readonly authCodeExpiredErrorSchema: import("valibot").ObjectSchema<{
|
|
281
303
|
readonly data: import("valibot").ObjectSchema<{
|
|
282
304
|
readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
|
|
@@ -77,6 +77,18 @@ export declare const attachmentStateInvalidErrorSchema: v.ObjectSchema<{
|
|
|
77
77
|
}, undefined>;
|
|
78
78
|
readonly status: v.LiteralSchema<409, undefined>;
|
|
79
79
|
}, undefined>;
|
|
80
|
+
export declare const attachmentSizeMismatchErrorSchema: v.ObjectSchema<{
|
|
81
|
+
readonly data: v.ObjectSchema<{
|
|
82
|
+
readonly code: v.LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
83
|
+
}, undefined>;
|
|
84
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
85
|
+
}, undefined>;
|
|
86
|
+
export declare const attachmentUploadFailedErrorSchema: v.ObjectSchema<{
|
|
87
|
+
readonly data: v.ObjectSchema<{
|
|
88
|
+
readonly code: v.LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
89
|
+
}, undefined>;
|
|
90
|
+
readonly status: v.LiteralSchema<500, undefined>;
|
|
91
|
+
}, undefined>;
|
|
80
92
|
export declare const accountNotFoundErrorSchema: v.ObjectSchema<{
|
|
81
93
|
readonly data: v.ObjectSchema<{
|
|
82
94
|
readonly code: v.LiteralSchema<"ACCOUNT_NOT_FOUND", undefined>;
|
|
@@ -179,12 +191,24 @@ export declare const errors: {
|
|
|
179
191
|
}, undefined>;
|
|
180
192
|
readonly status: v.LiteralSchema<404, undefined>;
|
|
181
193
|
}, undefined>;
|
|
194
|
+
readonly attachmentSizeMismatchErrorSchema: v.ObjectSchema<{
|
|
195
|
+
readonly data: v.ObjectSchema<{
|
|
196
|
+
readonly code: v.LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
197
|
+
}, undefined>;
|
|
198
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
199
|
+
}, undefined>;
|
|
182
200
|
readonly attachmentStateInvalidErrorSchema: v.ObjectSchema<{
|
|
183
201
|
readonly data: v.ObjectSchema<{
|
|
184
202
|
readonly code: v.LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
185
203
|
}, undefined>;
|
|
186
204
|
readonly status: v.LiteralSchema<409, undefined>;
|
|
187
205
|
}, undefined>;
|
|
206
|
+
readonly attachmentUploadFailedErrorSchema: v.ObjectSchema<{
|
|
207
|
+
readonly data: v.ObjectSchema<{
|
|
208
|
+
readonly code: v.LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
209
|
+
}, undefined>;
|
|
210
|
+
readonly status: v.LiteralSchema<500, undefined>;
|
|
211
|
+
}, undefined>;
|
|
188
212
|
readonly authCodeExpiredErrorSchema: v.ObjectSchema<{
|
|
189
213
|
readonly data: v.ObjectSchema<{
|
|
190
214
|
readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,yBAAyB;;;;;aAGpC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;aAGzC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BT,CAAA"}
|
|
@@ -51,6 +51,14 @@ export const attachmentStateInvalidErrorSchema = v.object({
|
|
|
51
51
|
data: v.object({ code: v.literal('ATTACHMENT_STATE_INVALID') }),
|
|
52
52
|
status: v.literal(409),
|
|
53
53
|
});
|
|
54
|
+
export const attachmentSizeMismatchErrorSchema = v.object({
|
|
55
|
+
data: v.object({ code: v.literal('ATTACHMENT_SIZE_MISMATCH') }),
|
|
56
|
+
status: v.literal(400),
|
|
57
|
+
});
|
|
58
|
+
export const attachmentUploadFailedErrorSchema = v.object({
|
|
59
|
+
data: v.object({ code: v.literal('ATTACHMENT_UPLOAD_FAILED') }),
|
|
60
|
+
status: v.literal(500),
|
|
61
|
+
});
|
|
54
62
|
export const accountNotFoundErrorSchema = v.object({
|
|
55
63
|
data: v.object({ code: v.literal('ACCOUNT_NOT_FOUND') }),
|
|
56
64
|
status: v.literal(404),
|
|
@@ -114,7 +122,9 @@ export const errors = {
|
|
|
114
122
|
accountNotFoundErrorSchema,
|
|
115
123
|
aliasNotFoundErrorSchema,
|
|
116
124
|
attachmentNotFoundErrorSchema,
|
|
125
|
+
attachmentSizeMismatchErrorSchema,
|
|
117
126
|
attachmentStateInvalidErrorSchema,
|
|
127
|
+
attachmentUploadFailedErrorSchema,
|
|
118
128
|
authCodeExpiredErrorSchema,
|
|
119
129
|
authCodeInvalidErrorSchema,
|
|
120
130
|
authCodePreviouslyUsedErrorSchema,
|
|
@@ -18,12 +18,24 @@ export declare const validation: {
|
|
|
18
18
|
}, undefined>;
|
|
19
19
|
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
20
20
|
}, undefined>;
|
|
21
|
+
readonly attachmentSizeMismatchErrorSchema: import("valibot").ObjectSchema<{
|
|
22
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
23
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_SIZE_MISMATCH", undefined>;
|
|
24
|
+
}, undefined>;
|
|
25
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
26
|
+
}, undefined>;
|
|
21
27
|
readonly attachmentStateInvalidErrorSchema: import("valibot").ObjectSchema<{
|
|
22
28
|
readonly data: import("valibot").ObjectSchema<{
|
|
23
29
|
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_STATE_INVALID", undefined>;
|
|
24
30
|
}, undefined>;
|
|
25
31
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
26
32
|
}, undefined>;
|
|
33
|
+
readonly attachmentUploadFailedErrorSchema: import("valibot").ObjectSchema<{
|
|
34
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
35
|
+
readonly code: import("valibot").LiteralSchema<"ATTACHMENT_UPLOAD_FAILED", undefined>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
readonly status: import("valibot").LiteralSchema<500, undefined>;
|
|
38
|
+
}, undefined>;
|
|
27
39
|
readonly authCodeExpiredErrorSchema: import("valibot").ObjectSchema<{
|
|
28
40
|
readonly data: import("valibot").ObjectSchema<{
|
|
29
41
|
readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAA"}
|
package/dist/types/SDKError.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as v from 'valibot';
|
|
2
2
|
import type { errors } from '../sdk/validation/errors';
|
|
3
|
-
export type SDKError = v.InferOutput<typeof errors.accountNotFoundErrorSchema> | v.InferOutput<typeof errors.aliasNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentStateInvalidErrorSchema> | v.InferOutput<typeof errors.authCodeExpiredErrorSchema> | v.InferOutput<typeof errors.authCodeInvalidErrorSchema> | v.InferOutput<typeof errors.authCodePreviouslyUsedErrorSchema> | v.InferOutput<typeof errors.authFailedErrorSchema> | v.InferOutput<typeof errors.authRefreshTokenInvalid> | v.InferOutput<typeof errors.authServerResponseUnexpectedErrorSchema> | v.InferOutput<typeof errors.authTooManyAttemptsErrorSchema> | v.InferOutput<typeof errors.contactNotFoundErrorSchema> | v.InferOutput<typeof errors.draftNotFoundErrorSchema> | v.InferOutput<typeof errors.fileTooLargeErrorSchema> | v.InferOutput<typeof errors.invalidFileTypeErrorSchema> | v.InferOutput<typeof errors.invalidImageDimensionsErrorSchema> | v.InferOutput<typeof errors.inviteNotFoundErrorSchema> | v.InferOutput<typeof errors.labelAlreadyExistsErrorSchema> | v.InferOutput<typeof errors.labelNotFoundErrorSchema> | v.InferOutput<typeof errors.messageNotFoundErrorSchema> | v.InferOutput<typeof errors.mutationRejectedErrorSchema> | v.InferOutput<typeof errors.threadNotFoundErrorSchema> | v.InferOutput<typeof errors.userMarkedForDeletionErrorSchema> | v.InferOutput<typeof errors.userNotFoundErrorSchema> | v.InferOutput<typeof errors.validationFailedErrorSchema> | v.InferOutput<typeof errors.viewNotFoundErrorSchema>;
|
|
3
|
+
export type SDKError = v.InferOutput<typeof errors.accountNotFoundErrorSchema> | v.InferOutput<typeof errors.aliasNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentSizeMismatchErrorSchema> | v.InferOutput<typeof errors.attachmentStateInvalidErrorSchema> | v.InferOutput<typeof errors.attachmentUploadFailedErrorSchema> | v.InferOutput<typeof errors.authCodeExpiredErrorSchema> | v.InferOutput<typeof errors.authCodeInvalidErrorSchema> | v.InferOutput<typeof errors.authCodePreviouslyUsedErrorSchema> | v.InferOutput<typeof errors.authFailedErrorSchema> | v.InferOutput<typeof errors.authRefreshTokenInvalid> | v.InferOutput<typeof errors.authServerResponseUnexpectedErrorSchema> | v.InferOutput<typeof errors.authTooManyAttemptsErrorSchema> | v.InferOutput<typeof errors.contactNotFoundErrorSchema> | v.InferOutput<typeof errors.draftNotFoundErrorSchema> | v.InferOutput<typeof errors.fileTooLargeErrorSchema> | v.InferOutput<typeof errors.invalidFileTypeErrorSchema> | v.InferOutput<typeof errors.invalidImageDimensionsErrorSchema> | v.InferOutput<typeof errors.inviteNotFoundErrorSchema> | v.InferOutput<typeof errors.labelAlreadyExistsErrorSchema> | v.InferOutput<typeof errors.labelNotFoundErrorSchema> | v.InferOutput<typeof errors.messageNotFoundErrorSchema> | v.InferOutput<typeof errors.mutationRejectedErrorSchema> | v.InferOutput<typeof errors.threadNotFoundErrorSchema> | v.InferOutput<typeof errors.userMarkedForDeletionErrorSchema> | v.InferOutput<typeof errors.userNotFoundErrorSchema> | v.InferOutput<typeof errors.validationFailedErrorSchema> | v.InferOutput<typeof errors.viewNotFoundErrorSchema>;
|
|
4
4
|
//# sourceMappingURL=SDKError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDKError.d.ts","sourceRoot":"","sources":["../../src/types/SDKError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAEjE,MAAM,MAAM,QAAQ,GAChB,CAAC,CAAC,WAAW,CAAC,OAA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