@scalar/oas-utils 0.1.17 → 0.2.1
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 +19 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/workspace/collection/collection.d.ts +314 -0
- package/dist/entities/workspace/collection/collection.d.ts.map +1 -0
- package/dist/entities/workspace/collection/collection.js +112 -0
- package/dist/entities/workspace/collection/index.d.ts +2 -0
- package/dist/entities/workspace/collection/index.d.ts.map +1 -0
- package/dist/entities/workspace/collection/index.js +1 -0
- package/dist/entities/workspace/cookie/cookie.d.ts +84 -0
- package/dist/entities/workspace/cookie/cookie.d.ts.map +1 -0
- package/dist/entities/workspace/cookie/cookie.js +44 -0
- package/dist/entities/workspace/cookie/index.d.ts +2 -0
- package/dist/entities/workspace/cookie/index.d.ts.map +1 -0
- package/dist/entities/workspace/cookie/index.js +1 -0
- package/dist/entities/workspace/environment/environment.d.ts +55 -0
- package/dist/entities/workspace/environment/environment.d.ts.map +1 -0
- package/dist/entities/workspace/environment/environment.js +23 -0
- package/dist/entities/workspace/environment/index.d.ts +2 -0
- package/dist/entities/workspace/environment/index.d.ts.map +1 -0
- package/dist/entities/workspace/environment/index.js +1 -0
- package/dist/entities/workspace/folder/folder.d.ts +36 -0
- package/dist/entities/workspace/folder/folder.d.ts.map +1 -0
- package/dist/entities/workspace/folder/folder.js +21 -0
- package/dist/entities/workspace/folder/index.d.ts +2 -0
- package/dist/entities/workspace/folder/index.d.ts.map +1 -0
- package/dist/entities/workspace/folder/index.js +1 -0
- package/dist/entities/workspace/index.d.ts +2 -0
- package/dist/entities/workspace/index.d.ts.map +1 -0
- package/dist/entities/workspace/index.js +1 -0
- package/dist/entities/workspace/security-schemes/index.d.ts +2 -0
- package/dist/entities/workspace/security-schemes/index.d.ts.map +1 -0
- package/dist/entities/workspace/security-schemes/index.js +1 -0
- package/dist/entities/workspace/security-schemes/security-schemes.d.ts +19 -0
- package/dist/entities/workspace/security-schemes/security-schemes.d.ts.map +1 -0
- package/dist/entities/workspace/security-schemes/security-schemes.js +15 -0
- package/dist/entities/workspace/server/index.d.ts +2 -0
- package/dist/entities/workspace/server/index.d.ts.map +1 -0
- package/dist/entities/workspace/server/index.js +1 -0
- package/dist/entities/workspace/server/server.d.ts +84 -0
- package/dist/entities/workspace/server/server.d.ts.map +1 -0
- package/dist/entities/workspace/server/server.js +46 -0
- package/dist/entities/workspace/shared/index.d.ts +2 -0
- package/dist/entities/workspace/shared/index.d.ts.map +1 -0
- package/dist/entities/workspace/shared/index.js +1 -0
- package/dist/entities/workspace/shared/utility.d.ts +6 -0
- package/dist/entities/workspace/shared/utility.d.ts.map +1 -0
- package/dist/entities/workspace/shared/utility.js +11 -0
- package/dist/entities/workspace/spec/components.d.ts +3 -0
- package/dist/entities/workspace/spec/components.d.ts.map +1 -0
- package/dist/entities/workspace/spec/index.d.ts +5 -0
- package/dist/entities/workspace/spec/index.d.ts.map +1 -0
- package/dist/entities/workspace/spec/index.js +2 -0
- package/dist/entities/workspace/spec/parameters.d.ts +16 -0
- package/dist/entities/workspace/spec/parameters.d.ts.map +1 -0
- package/dist/entities/workspace/spec/refs.d.ts +30 -0
- package/dist/entities/workspace/spec/refs.d.ts.map +1 -0
- package/dist/entities/workspace/spec/refs.js +9 -0
- package/dist/entities/workspace/spec/request-examples.d.ts +479 -0
- package/dist/entities/workspace/spec/request-examples.d.ts.map +1 -0
- package/dist/entities/workspace/spec/request-examples.js +68 -0
- package/dist/entities/workspace/spec/requests.d.ts +149 -0
- package/dist/entities/workspace/spec/requests.d.ts.map +1 -0
- package/dist/entities/workspace/spec/requests.js +52 -0
- package/dist/entities/workspace/spec/spec.d.ts +18 -0
- package/dist/entities/workspace/spec/spec.d.ts.map +1 -0
- package/dist/entities/workspace/spec/spec.js +8 -0
- package/dist/entities/workspace/workspace.d.ts +45 -0
- package/dist/entities/workspace/workspace.d.ts.map +1 -0
- package/dist/entities/workspace/workspace.js +20 -0
- package/dist/helpers/createHash.d.ts.map +1 -0
- package/dist/helpers/createHash.js +20 -0
- package/dist/helpers/deepMerge.d.ts +7 -0
- package/dist/helpers/deepMerge.d.ts.map +1 -0
- package/dist/helpers/deepMerge.js +28 -0
- package/dist/helpers/fetchSpecFromUrl.d.ts.map +1 -0
- package/dist/helpers/fetchSpecFromUrl.js +31 -0
- package/dist/helpers/httpMethods.d.ts +93 -0
- package/dist/helpers/httpMethods.d.ts.map +1 -0
- package/dist/helpers/httpMethods.js +64 -0
- package/dist/helpers/httpStatusCodes.d.ts.map +1 -0
- package/dist/helpers/httpStatusCodes.js +252 -0
- package/dist/helpers/index.d.ts +14 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +13 -0
- package/dist/helpers/iterateTitle.d.ts +5 -0
- package/dist/helpers/iterateTitle.d.ts.map +1 -0
- package/dist/helpers/iterateTitle.js +15 -0
- package/dist/helpers/json2xml.d.ts.map +1 -0
- package/dist/helpers/json2xml.js +51 -0
- package/dist/{normalizeMimeType.d.ts → helpers/normalizeMimeType.d.ts} +1 -1
- package/dist/helpers/normalizeMimeType.d.ts.map +1 -0
- package/dist/helpers/normalizeMimeType.js +20 -0
- package/dist/{normalizeMimeTypeObject.d.ts → helpers/normalizeMimeTypeObject.d.ts} +1 -1
- package/dist/helpers/normalizeMimeTypeObject.d.ts.map +1 -0
- package/dist/helpers/normalizeMimeTypeObject.js +34 -0
- package/dist/helpers/objectMerge.d.ts +5 -0
- package/dist/helpers/objectMerge.d.ts.map +1 -0
- package/dist/helpers/objectMerge.js +16 -0
- package/dist/{parse.d.ts → helpers/parse.d.ts} +1 -1
- package/dist/helpers/parse.d.ts.map +1 -0
- package/dist/helpers/parse.js +89 -0
- package/dist/helpers/prettyPrintJson.d.ts.map +1 -0
- package/dist/helpers/prettyPrintJson.js +19 -0
- package/dist/helpers/schema-model.d.ts +5 -0
- package/dist/helpers/schema-model.d.ts.map +1 -0
- package/dist/helpers/schema-model.js +21 -0
- package/dist/{ssrState.d.ts → helpers/ssrState.d.ts} +1 -1
- package/dist/helpers/ssrState.d.ts.map +1 -0
- package/dist/helpers/ssrState.js +9 -0
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -914
- package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -0
- package/dist/spec-getters/getExampleFromSchema.js +246 -0
- package/dist/{getParametersFromOperation.d.ts → spec-getters/getParametersFromOperation.d.ts} +1 -1
- package/dist/spec-getters/getParametersFromOperation.d.ts.map +1 -0
- package/dist/spec-getters/getParametersFromOperation.js +44 -0
- package/dist/{getRequestBodyFromOperation.d.ts → spec-getters/getRequestBodyFromOperation.d.ts} +1 -1
- package/dist/spec-getters/getRequestBodyFromOperation.d.ts.map +1 -0
- package/dist/spec-getters/getRequestBodyFromOperation.js +199 -0
- package/dist/{getRequestFromOperation.d.ts → spec-getters/getRequestFromOperation.d.ts} +5 -1
- package/dist/spec-getters/getRequestFromOperation.d.ts.map +1 -0
- package/dist/spec-getters/getRequestFromOperation.js +49 -0
- package/dist/spec-getters/index.d.ts +5 -0
- package/dist/spec-getters/index.d.ts.map +1 -0
- package/dist/spec-getters/index.js +4 -0
- package/dist/transforms/import-spec.d.ts +67 -0
- package/dist/transforms/import-spec.d.ts.map +1 -0
- package/dist/transforms/import-spec.js +136 -0
- package/dist/transforms/index.d.ts +2 -0
- package/dist/transforms/index.d.ts.map +1 -0
- package/dist/transforms/index.js +1 -0
- package/dist/types.d.ts +43 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +63 -14
- package/dist/createHash.d.ts.map +0 -1
- package/dist/fetchSpecFromUrl.d.ts.map +0 -1
- package/dist/getExampleFromSchema.d.ts.map +0 -1
- package/dist/getHarRequest.d.ts +0 -4
- package/dist/getHarRequest.d.ts.map +0 -1
- package/dist/getParametersFromOperation.d.ts.map +0 -1
- package/dist/getRequestBodyFromOperation.d.ts.map +0 -1
- package/dist/getRequestFromOperation.d.ts.map +0 -1
- package/dist/httpStatusCodes.d.ts.map +0 -1
- package/dist/json2xml.d.ts.map +0 -1
- package/dist/normalizeMimeType.d.ts.map +0 -1
- package/dist/normalizeMimeTypeObject.d.ts.map +0 -1
- package/dist/parse.d.ts.map +0 -1
- package/dist/prettyPrintJson.d.ts.map +0 -1
- package/dist/ssrState.d.ts.map +0 -1
- /package/dist/{createHash.d.ts → helpers/createHash.d.ts} +0 -0
- /package/dist/{fetchSpecFromUrl.d.ts → helpers/fetchSpecFromUrl.d.ts} +0 -0
- /package/dist/{httpStatusCodes.d.ts → helpers/httpStatusCodes.d.ts} +0 -0
- /package/dist/{json2xml.d.ts → helpers/json2xml.d.ts} +0 -0
- /package/dist/{prettyPrintJson.d.ts → helpers/prettyPrintJson.d.ts} +0 -0
- /package/dist/{getExampleFromSchema.d.ts → spec-getters/getExampleFromSchema.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @scalar/oas-utils
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e0fc110: chore: patch bump all package
|
|
8
|
+
- f0acc89: chore: upgrade to new @scalar/openapi-parser version
|
|
9
|
+
|
|
10
|
+
## 0.2.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 7f8ef74: chore: remove aliasing
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 96347a1: feat: use example values for path variables
|
|
19
|
+
- 8494349: Migrate to highlightjs based syntax highlighting
|
|
20
|
+
- 6fbb57e: feat: release all the packages
|
|
21
|
+
|
|
3
22
|
## 0.1.17
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* External Documentation
|
|
4
|
+
* Allows referencing an external resource for extended documentation.
|
|
5
|
+
*
|
|
6
|
+
* @see https://spec.openapis.org/oas/latest.html#external-documentation-object
|
|
7
|
+
*/
|
|
8
|
+
declare const exteralDocumentationSchema: z.ZodObject<{
|
|
9
|
+
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
10
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11
|
+
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
12
|
+
url: z.ZodDefault<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
url: string;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
url?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type ExternalDocumentation = z.infer<typeof exteralDocumentationSchema>;
|
|
21
|
+
declare const collectionSchema: z.ZodObject<{
|
|
22
|
+
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
spec: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
24
|
+
openapi: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"3.1.0">, z.ZodLiteral<"4.0.0">]>>>;
|
|
25
|
+
/** OAS info */
|
|
26
|
+
info: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
/** REQUIRED. The title of the API. */
|
|
28
|
+
title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
/** A short summary of the API. */
|
|
30
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
31
|
+
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
32
|
+
description: z.ZodOptional<z.ZodString>;
|
|
33
|
+
/** A URL to the Terms of Service for the API. This MUST be in the form of a URL. */
|
|
34
|
+
termsOfService: z.ZodOptional<z.ZodString>;
|
|
35
|
+
/** The contact information for the exposed API. */
|
|
36
|
+
contact: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
/** The identifying name of the contact person/organization. */
|
|
38
|
+
name: z.ZodOptional<z.ZodString>;
|
|
39
|
+
/** The URL pointing to the contact information. This MUST be in the form of a URL. */
|
|
40
|
+
url: z.ZodOptional<z.ZodString>;
|
|
41
|
+
/** The email address of the contact person/organization. This MUST be in the form of an email address. */
|
|
42
|
+
email: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
url?: string | undefined;
|
|
46
|
+
email?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
url?: string | undefined;
|
|
50
|
+
email?: string | undefined;
|
|
51
|
+
}>>;
|
|
52
|
+
/** The license information for the exposed API. */
|
|
53
|
+
license: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
/** REQUIRED. The license name used for the API. */
|
|
55
|
+
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
56
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
57
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
58
|
+
/**
|
|
59
|
+
* A URL to the license used for the API. This MUST be in the form of a URL. The url field
|
|
60
|
+
* is mutually exclusive of the identifier field.
|
|
61
|
+
*/
|
|
62
|
+
url: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
name: string;
|
|
65
|
+
identifier?: string | undefined;
|
|
66
|
+
url?: string | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
identifier?: string | undefined;
|
|
70
|
+
url?: string | undefined;
|
|
71
|
+
}>>;
|
|
72
|
+
/**
|
|
73
|
+
* REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI
|
|
74
|
+
* Specification version or the API implementation version).
|
|
75
|
+
*/
|
|
76
|
+
version: z.ZodDefault<z.ZodString>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
title: string;
|
|
79
|
+
version: string;
|
|
80
|
+
summary?: string | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
termsOfService?: string | undefined;
|
|
83
|
+
contact?: {
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
url?: string | undefined;
|
|
86
|
+
email?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
license?: {
|
|
89
|
+
name: string;
|
|
90
|
+
identifier?: string | undefined;
|
|
91
|
+
url?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
title?: string | undefined;
|
|
95
|
+
summary?: string | undefined;
|
|
96
|
+
description?: string | undefined;
|
|
97
|
+
termsOfService?: string | undefined;
|
|
98
|
+
contact?: {
|
|
99
|
+
name?: string | undefined;
|
|
100
|
+
url?: string | undefined;
|
|
101
|
+
email?: string | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
license?: {
|
|
104
|
+
name?: string | undefined;
|
|
105
|
+
identifier?: string | undefined;
|
|
106
|
+
url?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
108
|
+
version?: string | undefined;
|
|
109
|
+
}>>;
|
|
110
|
+
/** Uids which refer to servers on the workspace base */
|
|
111
|
+
serverUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
112
|
+
/** OAS Tags */
|
|
113
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
114
|
+
/** REQUIRED. The name of the tag. */
|
|
115
|
+
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
116
|
+
/** A description for the tag. CommonMark syntax MAY be used for rich text representation. */
|
|
117
|
+
description: z.ZodOptional<z.ZodString>;
|
|
118
|
+
/** Additional external documentation for this tag. */
|
|
119
|
+
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
121
|
+
description: z.ZodOptional<z.ZodString>;
|
|
122
|
+
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
123
|
+
url: z.ZodDefault<z.ZodString>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
url: string;
|
|
126
|
+
description?: string | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
description?: string | undefined;
|
|
129
|
+
url?: string | undefined;
|
|
130
|
+
}>>;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
name: string;
|
|
133
|
+
description?: string | undefined;
|
|
134
|
+
externalDocs?: {
|
|
135
|
+
url: string;
|
|
136
|
+
description?: string | undefined;
|
|
137
|
+
} | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
name?: string | undefined;
|
|
140
|
+
description?: string | undefined;
|
|
141
|
+
externalDocs?: {
|
|
142
|
+
description?: string | undefined;
|
|
143
|
+
url?: string | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
}>, "many">>;
|
|
146
|
+
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
148
|
+
description: z.ZodOptional<z.ZodString>;
|
|
149
|
+
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
150
|
+
url: z.ZodDefault<z.ZodString>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
url: string;
|
|
153
|
+
description?: string | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
description?: string | undefined;
|
|
156
|
+
url?: string | undefined;
|
|
157
|
+
}>>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
openapi: string;
|
|
160
|
+
serverUids: string[];
|
|
161
|
+
tags: {
|
|
162
|
+
name: string;
|
|
163
|
+
description?: string | undefined;
|
|
164
|
+
externalDocs?: {
|
|
165
|
+
url: string;
|
|
166
|
+
description?: string | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
}[];
|
|
169
|
+
info?: {
|
|
170
|
+
title: string;
|
|
171
|
+
version: string;
|
|
172
|
+
summary?: string | undefined;
|
|
173
|
+
description?: string | undefined;
|
|
174
|
+
termsOfService?: string | undefined;
|
|
175
|
+
contact?: {
|
|
176
|
+
name?: string | undefined;
|
|
177
|
+
url?: string | undefined;
|
|
178
|
+
email?: string | undefined;
|
|
179
|
+
} | undefined;
|
|
180
|
+
license?: {
|
|
181
|
+
name: string;
|
|
182
|
+
identifier?: string | undefined;
|
|
183
|
+
url?: string | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
} | undefined;
|
|
186
|
+
externalDocs?: {
|
|
187
|
+
url: string;
|
|
188
|
+
description?: string | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
openapi?: string | undefined;
|
|
192
|
+
info?: {
|
|
193
|
+
title?: string | undefined;
|
|
194
|
+
summary?: string | undefined;
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
termsOfService?: string | undefined;
|
|
197
|
+
contact?: {
|
|
198
|
+
name?: string | undefined;
|
|
199
|
+
url?: string | undefined;
|
|
200
|
+
email?: string | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
license?: {
|
|
203
|
+
name?: string | undefined;
|
|
204
|
+
identifier?: string | undefined;
|
|
205
|
+
url?: string | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
version?: string | undefined;
|
|
208
|
+
} | undefined;
|
|
209
|
+
serverUids?: string[] | undefined;
|
|
210
|
+
tags?: {
|
|
211
|
+
name?: string | undefined;
|
|
212
|
+
description?: string | undefined;
|
|
213
|
+
externalDocs?: {
|
|
214
|
+
description?: string | undefined;
|
|
215
|
+
url?: string | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
}[] | undefined;
|
|
218
|
+
externalDocs?: {
|
|
219
|
+
description?: string | undefined;
|
|
220
|
+
url?: string | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
}>>>;
|
|
223
|
+
/** The currently selected server */
|
|
224
|
+
selectedServerUid: z.ZodDefault<z.ZodString>;
|
|
225
|
+
/** List of uids that correspond to collection requests or folders */
|
|
226
|
+
childUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
uid: string;
|
|
229
|
+
spec: {
|
|
230
|
+
openapi: string;
|
|
231
|
+
serverUids: string[];
|
|
232
|
+
tags: {
|
|
233
|
+
name: string;
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
externalDocs?: {
|
|
236
|
+
url: string;
|
|
237
|
+
description?: string | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
}[];
|
|
240
|
+
info?: {
|
|
241
|
+
title: string;
|
|
242
|
+
version: string;
|
|
243
|
+
summary?: string | undefined;
|
|
244
|
+
description?: string | undefined;
|
|
245
|
+
termsOfService?: string | undefined;
|
|
246
|
+
contact?: {
|
|
247
|
+
name?: string | undefined;
|
|
248
|
+
url?: string | undefined;
|
|
249
|
+
email?: string | undefined;
|
|
250
|
+
} | undefined;
|
|
251
|
+
license?: {
|
|
252
|
+
name: string;
|
|
253
|
+
identifier?: string | undefined;
|
|
254
|
+
url?: string | undefined;
|
|
255
|
+
} | undefined;
|
|
256
|
+
} | undefined;
|
|
257
|
+
externalDocs?: {
|
|
258
|
+
url: string;
|
|
259
|
+
description?: string | undefined;
|
|
260
|
+
} | undefined;
|
|
261
|
+
};
|
|
262
|
+
selectedServerUid: string;
|
|
263
|
+
childUids: string[];
|
|
264
|
+
}, {
|
|
265
|
+
uid?: string | undefined;
|
|
266
|
+
spec?: {
|
|
267
|
+
openapi?: string | undefined;
|
|
268
|
+
info?: {
|
|
269
|
+
title?: string | undefined;
|
|
270
|
+
summary?: string | undefined;
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
termsOfService?: string | undefined;
|
|
273
|
+
contact?: {
|
|
274
|
+
name?: string | undefined;
|
|
275
|
+
url?: string | undefined;
|
|
276
|
+
email?: string | undefined;
|
|
277
|
+
} | undefined;
|
|
278
|
+
license?: {
|
|
279
|
+
name?: string | undefined;
|
|
280
|
+
identifier?: string | undefined;
|
|
281
|
+
url?: string | undefined;
|
|
282
|
+
} | undefined;
|
|
283
|
+
version?: string | undefined;
|
|
284
|
+
} | undefined;
|
|
285
|
+
serverUids?: string[] | undefined;
|
|
286
|
+
tags?: {
|
|
287
|
+
name?: string | undefined;
|
|
288
|
+
description?: string | undefined;
|
|
289
|
+
externalDocs?: {
|
|
290
|
+
description?: string | undefined;
|
|
291
|
+
url?: string | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
}[] | undefined;
|
|
294
|
+
externalDocs?: {
|
|
295
|
+
description?: string | undefined;
|
|
296
|
+
url?: string | undefined;
|
|
297
|
+
} | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
selectedServerUid?: string | undefined;
|
|
300
|
+
childUids?: string[] | undefined;
|
|
301
|
+
}>;
|
|
302
|
+
/**
|
|
303
|
+
* A collection must be able to map 1:1 with an OAS 3.1 spec file
|
|
304
|
+
*
|
|
305
|
+
* Collections will have two modes of display:
|
|
306
|
+
* - Standard: Ordered by tag similar to ApiReference Sidebar
|
|
307
|
+
* - Folder: Ordered into arbitrary folders. See x-scalar-folder.yaml
|
|
308
|
+
*/
|
|
309
|
+
export type Collection = z.infer<typeof collectionSchema>;
|
|
310
|
+
export type CollectionPayload = z.input<typeof collectionSchema>;
|
|
311
|
+
/** Create Collction helper */
|
|
312
|
+
export declare const createCollection: (payload: CollectionPayload) => Collection;
|
|
313
|
+
export {};
|
|
314
|
+
//# sourceMappingURL=collection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/collection/collection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA6DvB;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B;IAC9B,6GAA6G;;IAE7G,yFAAyF;;;;;;;;EAEzF,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAgC9E,QAAA,MAAM,gBAAgB;;;;QATpB,eAAe;;YAtDf,sCAAsC;;YAEtC,kCAAkC;;YAElC,4FAA4F;;YAE5F,oFAAoF;;YAEpF,mDAAmD;;gBAxBnD,+DAA+D;;gBAE/D,sFAAsF;;gBAEtF,0GAA0G;;;;;;;;;;;YAsB1G,mDAAmD;;gBA5CnD,mDAAmD;;gBAEnD,2GAA2G;;gBAE3G;;;mBAGG;;;;;;;;;;;YAuCH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAyCH,wDAAwD;;QAExD,eAAe;;YAjBf,qCAAqC;;YAErC,6FAA6F;;YAE7F,sDAAsD;;gBAnBtD,6GAA6G;;gBAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;YAFzF,6GAA6G;;YAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsCzF,oCAAoC;;IAEpC,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtE,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEhE,8BAA8B;AAC9B,eAAO,MAAM,gBAAgB,YAAa,iBAAiB,KAAG,UACd,CAAA"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { nanoidSchema } from '../shared/utility.js';
|
|
3
|
+
import { deepMerge } from '../../../helpers/deepMerge.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* License information for the exposed API.
|
|
7
|
+
*
|
|
8
|
+
* @see https://spec.openapis.org/oas/latest.html#license-object
|
|
9
|
+
*/
|
|
10
|
+
const licenseSchema = z.object({
|
|
11
|
+
/** REQUIRED. The license name used for the API. */
|
|
12
|
+
name: z.string().optional().default('name'),
|
|
13
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
14
|
+
identifier: z.string().optional(),
|
|
15
|
+
/**
|
|
16
|
+
* A URL to the license used for the API. This MUST be in the form of a URL. The url field
|
|
17
|
+
* is mutually exclusive of the identifier field.
|
|
18
|
+
*/
|
|
19
|
+
url: z.string().url().optional(),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Contact
|
|
23
|
+
* Contact information for the exposed API.
|
|
24
|
+
*
|
|
25
|
+
* @see https://spec.openapis.org/oas/latest.html#contact-object
|
|
26
|
+
*/
|
|
27
|
+
const contactSchema = z.object({
|
|
28
|
+
/** The identifying name of the contact person/organization. */
|
|
29
|
+
name: z.string().optional(),
|
|
30
|
+
/** The URL pointing to the contact information. This MUST be in the form of a URL. */
|
|
31
|
+
url: z.string().url().optional(),
|
|
32
|
+
/** The email address of the contact person/organization. This MUST be in the form of an email address. */
|
|
33
|
+
email: z.string().email().optional(),
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Info
|
|
37
|
+
* The object provides metadata about the API. The metadata MAY be used by the clients if needed,
|
|
38
|
+
* and MAY be presented in editing or documentation generation tools for convenience.
|
|
39
|
+
*
|
|
40
|
+
* @see https://spec.openapis.org/oas/latest.html#info-object
|
|
41
|
+
*/
|
|
42
|
+
const infoSchema = z.object({
|
|
43
|
+
/** REQUIRED. The title of the API. */
|
|
44
|
+
title: z.string().optional().default('default'),
|
|
45
|
+
/** A short summary of the API. */
|
|
46
|
+
summary: z.string().optional(),
|
|
47
|
+
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
48
|
+
description: z.string().optional(),
|
|
49
|
+
/** A URL to the Terms of Service for the API. This MUST be in the form of a URL. */
|
|
50
|
+
termsOfService: z.string().optional(),
|
|
51
|
+
/** The contact information for the exposed API. */
|
|
52
|
+
contact: contactSchema.optional(),
|
|
53
|
+
/** The license information for the exposed API. */
|
|
54
|
+
license: licenseSchema.optional(),
|
|
55
|
+
/**
|
|
56
|
+
* REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI
|
|
57
|
+
* Specification version or the API implementation version).
|
|
58
|
+
*/
|
|
59
|
+
version: z.string().default('0.0.1'),
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* External Documentation
|
|
63
|
+
* Allows referencing an external resource for extended documentation.
|
|
64
|
+
*
|
|
65
|
+
* @see https://spec.openapis.org/oas/latest.html#external-documentation-object
|
|
66
|
+
*/
|
|
67
|
+
const exteralDocumentationSchema = z.object({
|
|
68
|
+
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
69
|
+
description: z.string().optional(),
|
|
70
|
+
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
71
|
+
url: z.string().default(''),
|
|
72
|
+
});
|
|
73
|
+
/**
|
|
74
|
+
* Tag
|
|
75
|
+
* Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag
|
|
76
|
+
* Object per tag defined in the Operation Object instances.
|
|
77
|
+
*
|
|
78
|
+
* @see https://spec.openapis.org/oas/latest.html#tag-object
|
|
79
|
+
*/
|
|
80
|
+
const tagSchema = z.object({
|
|
81
|
+
/** REQUIRED. The name of the tag. */
|
|
82
|
+
name: z.string().optional().default('default'),
|
|
83
|
+
/** A description for the tag. CommonMark syntax MAY be used for rich text representation. */
|
|
84
|
+
description: z.string().optional(),
|
|
85
|
+
/** Additional external documentation for this tag. */
|
|
86
|
+
externalDocs: exteralDocumentationSchema.optional(),
|
|
87
|
+
});
|
|
88
|
+
const specSchema = z.object({
|
|
89
|
+
openapi: z
|
|
90
|
+
.union([z.string(), z.literal('3.1.0'), z.literal('4.0.0')])
|
|
91
|
+
.optional()
|
|
92
|
+
.default('3.1.0'),
|
|
93
|
+
/** OAS info */
|
|
94
|
+
info: infoSchema.optional(),
|
|
95
|
+
/** Uids which refer to servers on the workspace base */
|
|
96
|
+
serverUids: z.array(z.string()).default([]),
|
|
97
|
+
/** OAS Tags */
|
|
98
|
+
tags: z.array(tagSchema).default([]),
|
|
99
|
+
externalDocs: exteralDocumentationSchema.optional(),
|
|
100
|
+
});
|
|
101
|
+
const collectionSchema = z.object({
|
|
102
|
+
uid: nanoidSchema,
|
|
103
|
+
spec: specSchema.optional().default({}),
|
|
104
|
+
/** The currently selected server */
|
|
105
|
+
selectedServerUid: z.string().default(''),
|
|
106
|
+
/** List of uids that correspond to collection requests or folders */
|
|
107
|
+
childUids: z.array(z.string()).default([]),
|
|
108
|
+
});
|
|
109
|
+
/** Create Collction helper */
|
|
110
|
+
const createCollection = (payload) => deepMerge(collectionSchema.parse({}), payload);
|
|
111
|
+
|
|
112
|
+
export { createCollection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/collection/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createCollection } from './collection.js';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const cookieSchema: z.ZodObject<{
|
|
3
|
+
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
4
|
+
/** Defines the cookie name and its value. A cookie definition begins with a name-value pair. */
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
value: z.ZodString;
|
|
7
|
+
/** Defines the host to which the cookie will be sent. */
|
|
8
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
9
|
+
/** Indicates the maximum lifetime of the cookie as an HTTP-date timestamp. See Date for the required formatting. */
|
|
10
|
+
expires: z.ZodOptional<z.ZodDate>;
|
|
11
|
+
/**
|
|
12
|
+
* Forbids JavaScript from accessing the cookie, for example, through the Document.cookie property. Note that a cookie
|
|
13
|
+
* that has been created with HttpOnly will still be sent with JavaScript-initiated requests, for example, when
|
|
14
|
+
* calling XMLHttpRequest.send() or fetch(). This mitigates attacks against cross-site scripting (XSS).
|
|
15
|
+
*/
|
|
16
|
+
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Indicates the number of seconds until the cookie expires. A zero or negative number will expire the cookie
|
|
19
|
+
* immediately. If both Expires and Max-Age are set, Max-Age has precedence.
|
|
20
|
+
*/
|
|
21
|
+
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
/** Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
|
|
23
|
+
* State (CHIPS) for more details.
|
|
24
|
+
*/
|
|
25
|
+
partitioned: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
/** Indicates the path that must exist in the requested URL for the browser to send the Cookie header. */
|
|
27
|
+
path: z.ZodOptional<z.ZodString>;
|
|
28
|
+
/** Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
|
|
29
|
+
* request forgery attacks (CSRF).
|
|
30
|
+
*/
|
|
31
|
+
sameSite: z.ZodUnion<[z.ZodLiteral<"Lax">, z.ZodLiteral<"Strict">, z.ZodLiteral<"None">]>;
|
|
32
|
+
/**
|
|
33
|
+
* Indicates that the cookie is sent to the server only when a request is made with the https: scheme (except on
|
|
34
|
+
* localhost), and therefore, is more resistant to man-in-the-middle attacks.
|
|
35
|
+
*/
|
|
36
|
+
secure: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
value: string;
|
|
39
|
+
name: string;
|
|
40
|
+
uid: string;
|
|
41
|
+
sameSite: "Lax" | "Strict" | "None";
|
|
42
|
+
domain?: string | undefined;
|
|
43
|
+
expires?: Date | undefined;
|
|
44
|
+
httpOnly?: boolean | undefined;
|
|
45
|
+
maxAge?: number | undefined;
|
|
46
|
+
partitioned?: boolean | undefined;
|
|
47
|
+
path?: string | undefined;
|
|
48
|
+
secure?: boolean | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
value: string;
|
|
51
|
+
name: string;
|
|
52
|
+
sameSite: "Lax" | "Strict" | "None";
|
|
53
|
+
uid?: string | undefined;
|
|
54
|
+
domain?: string | undefined;
|
|
55
|
+
expires?: Date | undefined;
|
|
56
|
+
httpOnly?: boolean | undefined;
|
|
57
|
+
maxAge?: number | undefined;
|
|
58
|
+
partitioned?: boolean | undefined;
|
|
59
|
+
path?: string | undefined;
|
|
60
|
+
secure?: boolean | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* Cookies
|
|
64
|
+
*
|
|
65
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
|
66
|
+
*/
|
|
67
|
+
export type Cookie = z.infer<typeof cookieSchema>;
|
|
68
|
+
export type CookiePayload = z.input<typeof cookieSchema>;
|
|
69
|
+
/** Create cookie helper */
|
|
70
|
+
export declare const createCookie: (payload: CookiePayload) => {
|
|
71
|
+
value: string;
|
|
72
|
+
name: string;
|
|
73
|
+
uid: string;
|
|
74
|
+
sameSite: "Lax" | "Strict" | "None";
|
|
75
|
+
domain?: string | undefined;
|
|
76
|
+
expires?: Date | undefined;
|
|
77
|
+
httpOnly?: boolean | undefined;
|
|
78
|
+
maxAge?: number | undefined;
|
|
79
|
+
partitioned?: boolean | undefined;
|
|
80
|
+
path?: string | undefined;
|
|
81
|
+
secure?: boolean | undefined;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=cookie.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/cookie/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,YAAY;;IAEhB,kGAAkG;;;IAGlG,yDAAyD;;IAEzD,oHAAoH;;IAEpH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH,yGAAyG;;IAEzG;;OAEG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;;CACP,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { nanoidSchema } from '../shared/utility.js';
|
|
3
|
+
import { deepMerge } from '../../../helpers/deepMerge.js';
|
|
4
|
+
|
|
5
|
+
const cookieSchema = z.object({
|
|
6
|
+
uid: nanoidSchema,
|
|
7
|
+
/** Defines the cookie name and its value. A cookie definition begins with a name-value pair. */
|
|
8
|
+
name: z.string(),
|
|
9
|
+
value: z.string(),
|
|
10
|
+
/** Defines the host to which the cookie will be sent. */
|
|
11
|
+
domain: z.string().optional(),
|
|
12
|
+
/** Indicates the maximum lifetime of the cookie as an HTTP-date timestamp. See Date for the required formatting. */
|
|
13
|
+
expires: z.date().optional(),
|
|
14
|
+
/**
|
|
15
|
+
* Forbids JavaScript from accessing the cookie, for example, through the Document.cookie property. Note that a cookie
|
|
16
|
+
* that has been created with HttpOnly will still be sent with JavaScript-initiated requests, for example, when
|
|
17
|
+
* calling XMLHttpRequest.send() or fetch(). This mitigates attacks against cross-site scripting (XSS).
|
|
18
|
+
*/
|
|
19
|
+
httpOnly: z.boolean().optional(),
|
|
20
|
+
/**
|
|
21
|
+
* Indicates the number of seconds until the cookie expires. A zero or negative number will expire the cookie
|
|
22
|
+
* immediately. If both Expires and Max-Age are set, Max-Age has precedence.
|
|
23
|
+
*/
|
|
24
|
+
maxAge: z.number().optional(),
|
|
25
|
+
/** Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
|
|
26
|
+
* State (CHIPS) for more details.
|
|
27
|
+
*/
|
|
28
|
+
partitioned: z.boolean().optional(),
|
|
29
|
+
/** Indicates the path that must exist in the requested URL for the browser to send the Cookie header. */
|
|
30
|
+
path: z.string().optional(),
|
|
31
|
+
/** Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
|
|
32
|
+
* request forgery attacks (CSRF).
|
|
33
|
+
*/
|
|
34
|
+
sameSite: z.union([z.literal('Lax'), z.literal('Strict'), z.literal('None')]),
|
|
35
|
+
/**
|
|
36
|
+
* Indicates that the cookie is sent to the server only when a request is made with the https: scheme (except on
|
|
37
|
+
* localhost), and therefore, is more resistant to man-in-the-middle attacks.
|
|
38
|
+
*/
|
|
39
|
+
secure: z.boolean().optional(),
|
|
40
|
+
});
|
|
41
|
+
/** Create cookie helper */
|
|
42
|
+
const createCookie = (payload) => deepMerge(cookieSchema.parse({}), payload);
|
|
43
|
+
|
|
44
|
+
export { createCookie };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/cookie/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createCookie } from './cookie.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const environmentSchema: z.ZodObject<{
|
|
3
|
+
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
4
|
+
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
5
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
6
|
+
raw: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
7
|
+
parsed: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
|
+
key: z.ZodString;
|
|
9
|
+
value: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
value: string;
|
|
12
|
+
key: string;
|
|
13
|
+
}, {
|
|
14
|
+
value: string;
|
|
15
|
+
key: string;
|
|
16
|
+
}>, "many">>>;
|
|
17
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
name: string;
|
|
20
|
+
uid: string;
|
|
21
|
+
color: string;
|
|
22
|
+
raw: string;
|
|
23
|
+
parsed: {
|
|
24
|
+
value: string;
|
|
25
|
+
key: string;
|
|
26
|
+
}[];
|
|
27
|
+
isDefault?: boolean | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
uid?: string | undefined;
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
color?: string | undefined;
|
|
32
|
+
raw?: string | undefined;
|
|
33
|
+
parsed?: {
|
|
34
|
+
value: string;
|
|
35
|
+
key: string;
|
|
36
|
+
}[] | undefined;
|
|
37
|
+
isDefault?: boolean | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
/** Environment */
|
|
40
|
+
export type Environment = z.infer<typeof environmentSchema>;
|
|
41
|
+
export type EnvironmentPayload = z.input<typeof environmentSchema>;
|
|
42
|
+
/** Create environment helper */
|
|
43
|
+
export declare const createEnvironment: (payload: EnvironmentPayload) => {
|
|
44
|
+
name: string;
|
|
45
|
+
uid: string;
|
|
46
|
+
color: string;
|
|
47
|
+
raw: string;
|
|
48
|
+
parsed: {
|
|
49
|
+
value: string;
|
|
50
|
+
key: string;
|
|
51
|
+
}[];
|
|
52
|
+
isDefault?: boolean | undefined;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=environment.d.ts.map
|