@or-sdk/library-types-v1 6.0.8 → 6.0.10
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/CHANGELOG.md +12 -0
- package/dist/cjs/index.js +272 -552
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +272 -552
- package/dist/esm/index.js.map +4 -4
- package/dist/types/Packages/param.d.ts +3 -0
- package/package.json +1 -2
- package/src/Categories/body.ts +0 -21
- package/src/Categories/index.ts +0 -3
- package/src/Categories/param.ts +0 -7
- package/src/Categories/response.ts +0 -14
- package/src/PackageMeta.ts +0 -19
- package/src/Packages/body.ts +0 -100
- package/src/Packages/index.ts +0 -7
- package/src/Packages/param.ts +0 -157
- package/src/Packages/propTransformer.ts +0 -17
- package/src/Packages/response.ts +0 -217
- package/src/Packages/union.ts +0 -41
- package/src/Sources/body.ts +0 -101
- package/src/Sources/index.ts +0 -3
- package/src/Sources/param.ts +0 -9
- package/src/Sources/response.ts +0 -122
- package/src/Sync/index.ts +0 -1
- package/src/Sync/response.ts +0 -17
- package/src/UploadUrl.ts +0 -15
- package/src/User.ts +0 -15
- package/src/index.private.ts +0 -3
- package/src/index.public.ts +0 -13
- package/src/index.ts +0 -55
package/src/Sources/body.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { PackageMeta } from '../PackageMeta';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
export const SourceDataBody = z
|
|
5
|
-
.object({
|
|
6
|
-
helpTextSource: z.string().trim().optional(),
|
|
7
|
-
hooksSource: z.string().trim().optional(),
|
|
8
|
-
migrationSource: z.string().trim().optional(),
|
|
9
|
-
logicSource: z.string().trim().optional(),
|
|
10
|
-
invalidData: z.any().optional(),
|
|
11
|
-
rootInputSettings: z.any().optional(),
|
|
12
|
-
rootInputUrn: z.any().optional(),
|
|
13
|
-
// TODO: use packageMeta instead
|
|
14
|
-
stepDetails: z.any().optional().describe('Deprecated'),
|
|
15
|
-
stepPackages: z.any().optional(),
|
|
16
|
-
})
|
|
17
|
-
.or(z.any())
|
|
18
|
-
.optional();
|
|
19
|
-
|
|
20
|
-
export const SourceMetaMocksBody = z
|
|
21
|
-
.object({
|
|
22
|
-
mocks: z.any().optional(),
|
|
23
|
-
})
|
|
24
|
-
.or(z.any())
|
|
25
|
-
.optional();
|
|
26
|
-
|
|
27
|
-
export const SourceMetaLabelBody = z
|
|
28
|
-
.object({
|
|
29
|
-
label: z.string().trim().nonempty(),
|
|
30
|
-
})
|
|
31
|
-
.or(z.any())
|
|
32
|
-
.optional();
|
|
33
|
-
|
|
34
|
-
export const CreateSourceBody = z.object({
|
|
35
|
-
id: z.string().trim().optional(),
|
|
36
|
-
meta: SourceMetaLabelBody,
|
|
37
|
-
source: z.object({
|
|
38
|
-
data: SourceDataBody,
|
|
39
|
-
meta: z.intersection(SourceMetaMocksBody, SourceMetaLabelBody),
|
|
40
|
-
packageMeta: PackageMeta,
|
|
41
|
-
}),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export const SetPublishedBody = z.object({
|
|
45
|
-
version: z.string().trim(),
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export const CreateSourceSourceRevisionBody = z.intersection(
|
|
49
|
-
z.intersection(
|
|
50
|
-
z.object({
|
|
51
|
-
data: SourceDataBody,
|
|
52
|
-
}),
|
|
53
|
-
z.object({
|
|
54
|
-
meta: SourceMetaMocksBody,
|
|
55
|
-
}),
|
|
56
|
-
),
|
|
57
|
-
z.object({
|
|
58
|
-
packageMeta: PackageMeta,
|
|
59
|
-
}),
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
export const ForkSourceBranchBody = z
|
|
63
|
-
.object({
|
|
64
|
-
meta: z.intersection(SourceMetaMocksBody, SourceMetaLabelBody).optional(),
|
|
65
|
-
label: z.string().trim().optional(),
|
|
66
|
-
})
|
|
67
|
-
.transform((data) => {
|
|
68
|
-
return {
|
|
69
|
-
...data,
|
|
70
|
-
label: data?.label || data?.meta?.label,
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export const UpdateMetaBranchBodyLegacy = z
|
|
75
|
-
.object({
|
|
76
|
-
sourceMembers: z
|
|
77
|
-
.object({
|
|
78
|
-
accountId: z.array(z.string().trim()).optional(),
|
|
79
|
-
userId: z.array(z.string().trim()).optional(),
|
|
80
|
-
})
|
|
81
|
-
.optional(),
|
|
82
|
-
meta: z
|
|
83
|
-
.intersection(
|
|
84
|
-
SourceMetaLabelBody,
|
|
85
|
-
z.object({
|
|
86
|
-
shared: z
|
|
87
|
-
.object({
|
|
88
|
-
currentAccount: z.boolean().optional(),
|
|
89
|
-
})
|
|
90
|
-
.optional(),
|
|
91
|
-
}),
|
|
92
|
-
)
|
|
93
|
-
.optional(),
|
|
94
|
-
label: z.string().trim().optional(),
|
|
95
|
-
})
|
|
96
|
-
.transform((data) => {
|
|
97
|
-
return {
|
|
98
|
-
...data,
|
|
99
|
-
label: data?.label || data?.meta?.label,
|
|
100
|
-
};
|
|
101
|
-
});
|
package/src/Sources/index.ts
DELETED
package/src/Sources/param.ts
DELETED
package/src/Sources/response.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { PackageMeta } from '../PackageMeta';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
// TODO: refactor this
|
|
5
|
-
export const GetSourceItemBranchResponse = z.object({
|
|
6
|
-
id: z.string(),
|
|
7
|
-
meta: z.object({
|
|
8
|
-
label: z.string(),
|
|
9
|
-
mocks: z.any(),
|
|
10
|
-
}),
|
|
11
|
-
createdBy: z
|
|
12
|
-
.object({
|
|
13
|
-
id: z.any(),
|
|
14
|
-
accountId: z.string(),
|
|
15
|
-
userId: z.string(),
|
|
16
|
-
createdAt: z.date().or(z.string()),
|
|
17
|
-
})
|
|
18
|
-
.optional(),
|
|
19
|
-
published: z
|
|
20
|
-
.object({
|
|
21
|
-
version: z.string(),
|
|
22
|
-
})
|
|
23
|
-
.optional(),
|
|
24
|
-
latestRevisionId: z.string().optional(),
|
|
25
|
-
packageMeta: PackageMeta,
|
|
26
|
-
revision: z.array(
|
|
27
|
-
z.object({
|
|
28
|
-
id: z.string(),
|
|
29
|
-
accountId: z.string().optional(),
|
|
30
|
-
userId: z.string().optional(),
|
|
31
|
-
createdAt: z.date().or(z.string()).optional(),
|
|
32
|
-
}),
|
|
33
|
-
),
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
export const GetSourceItemResponse = z.object({
|
|
37
|
-
id: z.string().optional(),
|
|
38
|
-
createdAt: z.date().or(z.string()),
|
|
39
|
-
meta: z
|
|
40
|
-
.object({
|
|
41
|
-
shared: z.object({
|
|
42
|
-
currentAccount: z.boolean(),
|
|
43
|
-
}),
|
|
44
|
-
label: z.string(),
|
|
45
|
-
})
|
|
46
|
-
.optional(),
|
|
47
|
-
createdBy: z
|
|
48
|
-
.object({
|
|
49
|
-
id: z.any(),
|
|
50
|
-
accountId: z.string(),
|
|
51
|
-
userId: z.string(),
|
|
52
|
-
createdAt: z.date().or(z.string()),
|
|
53
|
-
})
|
|
54
|
-
.optional(),
|
|
55
|
-
source: z.array(GetSourceItemBranchResponse),
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// TODO: refactor this
|
|
59
|
-
export const GetSourcesResponse = z.object({
|
|
60
|
-
total: z.number(),
|
|
61
|
-
hits: z.array(GetSourceItemResponse),
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// TODO: refactor this
|
|
65
|
-
export const GetSourceRevisionResponse = z.object({
|
|
66
|
-
data: z.any().or(
|
|
67
|
-
z.object({
|
|
68
|
-
helpTextSource: z.string().trim().optional(),
|
|
69
|
-
hooksSource: z.string().trim().optional(),
|
|
70
|
-
invalidData: z.any().optional(),
|
|
71
|
-
logicSource: z.string().trim().optional(),
|
|
72
|
-
migrationSource: z.string().trim().optional(),
|
|
73
|
-
rootInputSettings: z.any().optional(),
|
|
74
|
-
rootInputUrn: z.string().trim().optional(),
|
|
75
|
-
// TODO: use packageMeta instead
|
|
76
|
-
stepDetails: z.any().optional().describe('Deprecated'),
|
|
77
|
-
stepPackages: z.any().optional(),
|
|
78
|
-
}),
|
|
79
|
-
),
|
|
80
|
-
published: z
|
|
81
|
-
.object({
|
|
82
|
-
version: z.string(),
|
|
83
|
-
})
|
|
84
|
-
.optional(),
|
|
85
|
-
sandboxUploaded: z.boolean().optional(), // TODO: remove this after frontend will be updated #SA-32
|
|
86
|
-
playgroundUploaded: z.boolean().optional(),
|
|
87
|
-
sourceMeta: z
|
|
88
|
-
.any()
|
|
89
|
-
.or(
|
|
90
|
-
z.object({
|
|
91
|
-
meta: z
|
|
92
|
-
.any()
|
|
93
|
-
.or(
|
|
94
|
-
z.object({
|
|
95
|
-
label: z.string().trim().nonempty().optional(),
|
|
96
|
-
mocks: z.any().optional(),
|
|
97
|
-
}),
|
|
98
|
-
)
|
|
99
|
-
.optional(),
|
|
100
|
-
revision: z
|
|
101
|
-
.any()
|
|
102
|
-
.or(
|
|
103
|
-
z.object({
|
|
104
|
-
accountId: z.string().trim().optional(),
|
|
105
|
-
createdAt: z.date().or(z.string()).optional(),
|
|
106
|
-
id: z.string().trim().optional(),
|
|
107
|
-
userId: z.string().trim().optional(),
|
|
108
|
-
}),
|
|
109
|
-
)
|
|
110
|
-
.optional(),
|
|
111
|
-
}),
|
|
112
|
-
)
|
|
113
|
-
.optional()
|
|
114
|
-
.describe('branch and revision meta data'),
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
export const ForkSourceBranchResponse = z.object({
|
|
118
|
-
id: z.string(),
|
|
119
|
-
revisionId: z.string(),
|
|
120
|
-
sourceId: z.string(),
|
|
121
|
-
packageUpdateResult: z.any().optional(),
|
|
122
|
-
});
|
package/src/Sync/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './response';
|
package/src/Sync/response.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PackageTypeEnum } from '@or-sdk/library-prisma';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
export const SyncLegacyResponse = z.object({
|
|
5
|
-
id: z.string(),
|
|
6
|
-
version: z.string(),
|
|
7
|
-
created: z.boolean(),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const PutLegacyVersionResponse = z.object({
|
|
11
|
-
id: z.string(),
|
|
12
|
-
version: z.string(),
|
|
13
|
-
revisionId: z.string(),
|
|
14
|
-
type: z.nativeEnum(PackageTypeEnum),
|
|
15
|
-
fileName: z.string().nullable().optional(),
|
|
16
|
-
key: z.string().nullable().optional(),
|
|
17
|
-
});
|
package/src/UploadUrl.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const UploadUrlSchema = z.object({
|
|
4
|
-
id: z.string().optional(),
|
|
5
|
-
version: z.string().trim(),
|
|
6
|
-
type: z.string(),
|
|
7
|
-
fileName: z.string().optional().optional(),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const UploadUrlSchemaRequired = UploadUrlSchema.required({
|
|
11
|
-
id: true,
|
|
12
|
-
version: true,
|
|
13
|
-
type: true,
|
|
14
|
-
fileName: true,
|
|
15
|
-
});
|
package/src/User.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const IUserRequestData = z.object({
|
|
4
|
-
accountId: z.string(),
|
|
5
|
-
userId: z.string(),
|
|
6
|
-
authorization: z.string(),
|
|
7
|
-
allow: z.boolean().optional(),
|
|
8
|
-
isDevelopmentAccount: z.boolean().optional(),
|
|
9
|
-
multiUserId: z.string().optional(),
|
|
10
|
-
role: z.string().optional(),
|
|
11
|
-
silent: z.boolean().optional(),
|
|
12
|
-
tokenType: z.string().optional(),
|
|
13
|
-
twoFactorEnabled: z.boolean().optional(),
|
|
14
|
-
username: z.string().optional(),
|
|
15
|
-
});
|
package/src/index.private.ts
DELETED
package/src/index.public.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './Categories';
|
|
2
|
-
export * from './Packages';
|
|
3
|
-
export * from './Sources';
|
|
4
|
-
export * from './Sync';
|
|
5
|
-
export * from './UploadUrl';
|
|
6
|
-
export * from './PackageMeta';
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
PackageTypeEnum,
|
|
10
|
-
PackageSchemaTypeEnum,
|
|
11
|
-
PackageStatusDetailsStatusEnum,
|
|
12
|
-
PackageStatusDetailsLevelEnum,
|
|
13
|
-
} from '@or-sdk/library-prisma';
|
package/src/index.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as allZodSchemas from './index.public';
|
|
3
|
-
export type CreateCategoryBodyDTO = z.infer<typeof allZodSchemas.CreateCategoryBody>
|
|
4
|
-
export type UpdateCategoryBodyDTO = z.infer<typeof allZodSchemas.UpdateCategoryBody>
|
|
5
|
-
export type CategoriesParamUniversalDTO = z.infer<typeof allZodSchemas.CategoriesParamUniversal>
|
|
6
|
-
export type CategoryItemResponseDTO = z.infer<typeof allZodSchemas.CategoryItemResponse>
|
|
7
|
-
export type CategoryListResponseDTO = z.infer<typeof allZodSchemas.CategoryListResponse>
|
|
8
|
-
export type GetPackagesQueryFilterDTO = z.infer<typeof allZodSchemas.GetPackagesQueryFilter>
|
|
9
|
-
export type GetPackagesQueryDTO = z.infer<typeof allZodSchemas.GetPackagesQuery>
|
|
10
|
-
export type PackageParamUniversalDTO = z.infer<typeof allZodSchemas.PackageParamUniversal>
|
|
11
|
-
export type CreateReleaseParamsDTO = z.infer<typeof allZodSchemas.CreateReleaseParams>
|
|
12
|
-
export type PackageParamNpmScopeDTO = z.infer<typeof allZodSchemas.PackageParamNpmScope>
|
|
13
|
-
export type PackageIncludesParamsDTO = z.infer<typeof allZodSchemas.PackageIncludesParams>
|
|
14
|
-
export type PackageSetSystemStatusParamsDTO = z.infer<typeof allZodSchemas.PackageSetSystemStatusParams>
|
|
15
|
-
export type CreatePackageByVersionBodyDTO = z.infer<typeof allZodSchemas.CreatePackageByVersionBody>
|
|
16
|
-
export type CreatePackageReleaseBodyDTO = z.infer<typeof allZodSchemas.CreatePackageReleaseBody>
|
|
17
|
-
export type CreatePackageFromJsonBodyDTO = z.infer<typeof allZodSchemas.CreatePackageFromJsonBody>
|
|
18
|
-
export type DeprecateLegacyStepsBodyDTO = z.infer<typeof allZodSchemas.DeprecateLegacyStepsBody>
|
|
19
|
-
export type PutLegacyPackageBodyDTO = z.infer<typeof allZodSchemas.PutLegacyPackageBody>
|
|
20
|
-
export type CreateReleaseUnionDTO = z.infer<typeof allZodSchemas.CreateReleaseUnion>
|
|
21
|
-
export type CreatePackageFromJsonUnionDTO = z.infer<typeof allZodSchemas.CreatePackageFromJsonUnion>
|
|
22
|
-
export type StatusDetailsReleaseParamDTO = z.infer<typeof allZodSchemas.StatusDetailsReleaseParam>
|
|
23
|
-
export type CreatePackageByVersionUnionDTO = z.infer<typeof allZodSchemas.CreatePackageByVersionUnion>
|
|
24
|
-
export type GetPackageByIdQueryUnionDTO = z.infer<typeof allZodSchemas.GetPackageByIdQueryUnion>
|
|
25
|
-
export type GetPackagesResponseEntityDTO = z.infer<typeof allZodSchemas.GetPackagesResponseEntity>
|
|
26
|
-
export type GetPackagesResponseDTO = z.infer<typeof allZodSchemas.GetPackagesResponse>
|
|
27
|
-
export type PackageStatusDetailsDTO = z.infer<typeof allZodSchemas.PackageStatusDetails>
|
|
28
|
-
export type GetPackageResponseDTO = z.infer<typeof allZodSchemas.GetPackageResponse>
|
|
29
|
-
export type GetPackageByIdIncludesDTO = z.infer<typeof allZodSchemas.GetPackageByIdIncludes>
|
|
30
|
-
export type GetPackageByIdResponseDTO = z.infer<typeof allZodSchemas.GetPackageByIdResponse>
|
|
31
|
-
export type GetPackageByIdLatestResponseDTO = z.infer<typeof allZodSchemas.GetPackageByIdLatestResponse>
|
|
32
|
-
export type GetPackageArchiveSignedUrlDTO = z.infer<typeof allZodSchemas.GetPackageArchiveSignedUrl>
|
|
33
|
-
export type CreatePackageByVersionFileNamesResponseDTO = z.infer<typeof allZodSchemas.CreatePackageByVersionFileNamesResponse>
|
|
34
|
-
export type CreatePackageByVersionResponseDTO = z.infer<typeof allZodSchemas.CreatePackageByVersionResponse>
|
|
35
|
-
export type GetPackageSystemStatusResponseDTO = z.infer<typeof allZodSchemas.GetPackageSystemStatusResponse>
|
|
36
|
-
export type SourcesParamUniversalDTO = z.infer<typeof allZodSchemas.SourcesParamUniversal>
|
|
37
|
-
export type SourceDataBodyDTO = z.infer<typeof allZodSchemas.SourceDataBody>
|
|
38
|
-
export type SourceMetaMocksBodyDTO = z.infer<typeof allZodSchemas.SourceMetaMocksBody>
|
|
39
|
-
export type SourceMetaLabelBodyDTO = z.infer<typeof allZodSchemas.SourceMetaLabelBody>
|
|
40
|
-
export type CreateSourceBodyDTO = z.infer<typeof allZodSchemas.CreateSourceBody>
|
|
41
|
-
export type SetPublishedBodyDTO = z.infer<typeof allZodSchemas.SetPublishedBody>
|
|
42
|
-
export type CreateSourceSourceRevisionBodyDTO = z.infer<typeof allZodSchemas.CreateSourceSourceRevisionBody>
|
|
43
|
-
export type ForkSourceBranchBodyDTO = z.infer<typeof allZodSchemas.ForkSourceBranchBody>
|
|
44
|
-
export type UpdateMetaBranchBodyLegacyDTO = z.infer<typeof allZodSchemas.UpdateMetaBranchBodyLegacy>
|
|
45
|
-
export type GetSourceItemBranchResponseDTO = z.infer<typeof allZodSchemas.GetSourceItemBranchResponse>
|
|
46
|
-
export type GetSourceItemResponseDTO = z.infer<typeof allZodSchemas.GetSourceItemResponse>
|
|
47
|
-
export type GetSourcesResponseDTO = z.infer<typeof allZodSchemas.GetSourcesResponse>
|
|
48
|
-
export type GetSourceRevisionResponseDTO = z.infer<typeof allZodSchemas.GetSourceRevisionResponse>
|
|
49
|
-
export type ForkSourceBranchResponseDTO = z.infer<typeof allZodSchemas.ForkSourceBranchResponse>
|
|
50
|
-
export type SyncLegacyResponseDTO = z.infer<typeof allZodSchemas.SyncLegacyResponse>
|
|
51
|
-
export type PutLegacyVersionResponseDTO = z.infer<typeof allZodSchemas.PutLegacyVersionResponse>
|
|
52
|
-
export type UploadUrlSchemaDTO = z.infer<typeof allZodSchemas.UploadUrlSchema>
|
|
53
|
-
export type UploadUrlSchemaRequiredDTO = z.infer<typeof allZodSchemas.UploadUrlSchemaRequired>
|
|
54
|
-
export type PackageMetaDTO = z.infer<typeof allZodSchemas.PackageMeta>
|
|
55
|
-
export * from './index.public';
|