@apollo-deploy/schemas 0.9.0 → 1.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/definitions/artifacts/domain.schema.d.ts +2 -2
- package/dist/definitions/artifacts/request.schema.d.ts +4 -4
- package/dist/definitions/artifacts/response.schema.d.ts +9 -9
- package/dist/definitions/audit-log/domain.schema.d.ts +13 -13
- package/dist/definitions/audit-log/request.schema.d.ts +23 -23
- package/dist/definitions/audit-log/response.schema.d.ts +6 -6
- package/dist/definitions/auth/domain.schema.d.ts +2 -2
- package/dist/definitions/billing/domain.schema.d.ts +5 -5
- package/dist/definitions/billing/request.schema.d.ts +3 -3
- package/dist/definitions/billing/response.schema.d.ts +4 -4
- package/dist/definitions/index.d.ts +10 -3
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/index.js +20 -5
- package/dist/definitions/index.js.map +1 -1
- package/dist/definitions/integrations/api.schema.d.ts +72 -72
- package/dist/definitions/integrations/api.schema.d.ts.map +1 -1
- package/dist/definitions/integrations/api.schema.js +37 -37
- package/dist/definitions/integrations/api.schema.js.map +1 -1
- package/dist/definitions/integrations/domain.schema.d.ts +88 -111
- package/dist/definitions/integrations/domain.schema.d.ts.map +1 -1
- package/dist/definitions/integrations/domain.schema.js +55 -78
- package/dist/definitions/integrations/domain.schema.js.map +1 -1
- package/dist/definitions/integrations/index.d.ts +5 -8
- package/dist/definitions/integrations/index.d.ts.map +1 -1
- package/dist/definitions/integrations/index.js +5 -31
- package/dist/definitions/integrations/index.js.map +1 -1
- package/dist/definitions/integrations/integrations-request.schema.d.ts +86 -0
- package/dist/definitions/integrations/integrations-request.schema.d.ts.map +1 -0
- package/dist/definitions/integrations/integrations-request.schema.js +82 -0
- package/dist/definitions/integrations/integrations-request.schema.js.map +1 -0
- package/dist/definitions/integrations/integrations-response.schema.d.ts +212 -0
- package/dist/definitions/integrations/integrations-response.schema.d.ts.map +1 -0
- package/dist/definitions/integrations/integrations-response.schema.js +139 -0
- package/dist/definitions/integrations/integrations-response.schema.js.map +1 -0
- package/dist/definitions/integrations/integrations.schema.d.ts +99 -0
- package/dist/definitions/integrations/integrations.schema.d.ts.map +1 -0
- package/dist/definitions/integrations/integrations.schema.js +62 -0
- package/dist/definitions/integrations/integrations.schema.js.map +1 -0
- package/dist/definitions/integrations/marketplace-request.schema.d.ts +2 -2
- package/dist/definitions/integrations/marketplace-response.schema.d.ts +6 -6
- package/dist/definitions/integrations/marketplace.schema.d.ts +8 -8
- package/dist/definitions/integrations/request.schema.d.ts +74 -129
- package/dist/definitions/integrations/request.schema.d.ts.map +1 -1
- package/dist/definitions/integrations/request.schema.js +71 -125
- package/dist/definitions/integrations/request.schema.js.map +1 -1
- package/dist/definitions/integrations/response.schema.d.ts +191 -121
- package/dist/definitions/integrations/response.schema.d.ts.map +1 -1
- package/dist/definitions/integrations/response.schema.js +132 -48
- package/dist/definitions/integrations/response.schema.js.map +1 -1
- package/dist/definitions/marketplace/domain.schema.d.ts +285 -0
- package/dist/definitions/marketplace/domain.schema.d.ts.map +1 -0
- package/dist/definitions/marketplace/domain.schema.js +123 -0
- package/dist/definitions/marketplace/domain.schema.js.map +1 -0
- package/dist/definitions/marketplace/index.d.ts +9 -0
- package/dist/definitions/marketplace/index.d.ts.map +1 -0
- package/dist/definitions/marketplace/index.js +9 -0
- package/dist/definitions/marketplace/index.js.map +1 -0
- package/dist/definitions/marketplace/marketplace-request.schema.d.ts +107 -0
- package/dist/definitions/marketplace/marketplace-request.schema.d.ts.map +1 -0
- package/dist/definitions/marketplace/marketplace-request.schema.js +86 -0
- package/dist/definitions/marketplace/marketplace-request.schema.js.map +1 -0
- package/dist/definitions/marketplace/marketplace-response.schema.d.ts +378 -0
- package/dist/definitions/marketplace/marketplace-response.schema.d.ts.map +1 -0
- package/dist/definitions/marketplace/marketplace-response.schema.js +81 -0
- package/dist/definitions/marketplace/marketplace-response.schema.js.map +1 -0
- package/dist/definitions/marketplace/marketplace.schema.d.ts +285 -0
- package/dist/definitions/marketplace/marketplace.schema.d.ts.map +1 -0
- package/dist/definitions/marketplace/marketplace.schema.js +123 -0
- package/dist/definitions/marketplace/marketplace.schema.js.map +1 -0
- package/dist/definitions/marketplace/request.schema.d.ts +107 -0
- package/dist/definitions/marketplace/request.schema.d.ts.map +1 -0
- package/dist/definitions/marketplace/request.schema.js +86 -0
- package/dist/definitions/marketplace/request.schema.js.map +1 -0
- package/dist/definitions/marketplace/response.schema.d.ts +378 -0
- package/dist/definitions/marketplace/response.schema.d.ts.map +1 -0
- package/dist/definitions/marketplace/response.schema.js +81 -0
- package/dist/definitions/marketplace/response.schema.js.map +1 -0
- package/dist/definitions/orgs/domain.schema.d.ts +2 -2
- package/dist/definitions/service-accounts/domain.schema.d.ts +2 -2
- package/dist/definitions/service-accounts/response.schema.d.ts +2 -2
- package/dist/definitions/share-links/request.schema.d.ts +1 -1
- package/dist/definitions/teams/request.schema.d.ts +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations — Response Schemas
|
|
3
|
+
*
|
|
4
|
+
* Response shapes for all integrations endpoints.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
export declare const IntegrationsListAvailableResponseSchema: z.ZodObject<{
|
|
8
|
+
integrations: z.ZodArray<z.ZodObject<{
|
|
9
|
+
key: z.ZodString;
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
description: z.ZodNullable<z.ZodString>;
|
|
13
|
+
iconUrl: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
14
|
+
light: z.ZodString;
|
|
15
|
+
dark: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>>;
|
|
17
|
+
category: z.ZodNullable<z.ZodString>;
|
|
18
|
+
docsUrl: z.ZodNullable<z.ZodString>;
|
|
19
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
20
|
+
auth: z.ZodObject<{
|
|
21
|
+
setupFlows: z.ZodArray<z.ZodEnum<{
|
|
22
|
+
oauth_only: "oauth_only";
|
|
23
|
+
credential_form: "credential_form";
|
|
24
|
+
oauth_then_configure: "oauth_then_configure";
|
|
25
|
+
none: "none";
|
|
26
|
+
}>>;
|
|
27
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
+
key: z.ZodString;
|
|
29
|
+
label: z.ZodString;
|
|
30
|
+
type: z.ZodEnum<{
|
|
31
|
+
text: "text";
|
|
32
|
+
password: "password";
|
|
33
|
+
url: "url";
|
|
34
|
+
select: "select";
|
|
35
|
+
textarea: "textarea";
|
|
36
|
+
copy: "copy";
|
|
37
|
+
}>;
|
|
38
|
+
required: z.ZodBoolean;
|
|
39
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
40
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
41
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
label: z.ZodString;
|
|
44
|
+
}, z.core.$strip>>>;
|
|
45
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
46
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
value: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
configured: z.ZodBoolean;
|
|
52
|
+
installed: z.ZodBoolean;
|
|
53
|
+
installationId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
entitled: z.ZodBoolean;
|
|
55
|
+
configSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
key: z.ZodString;
|
|
57
|
+
label: z.ZodString;
|
|
58
|
+
description: z.ZodOptional<z.ZodString>;
|
|
59
|
+
type: z.ZodEnum<{
|
|
60
|
+
number: "number";
|
|
61
|
+
boolean: "boolean";
|
|
62
|
+
text: "text";
|
|
63
|
+
select: "select";
|
|
64
|
+
}>;
|
|
65
|
+
required: z.ZodBoolean;
|
|
66
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
value: z.ZodString;
|
|
68
|
+
label: z.ZodString;
|
|
69
|
+
}, z.core.$strip>>>;
|
|
70
|
+
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export declare const IntegrationsListInstalledResponseSchema: z.ZodObject<{
|
|
75
|
+
integrations: z.ZodArray<z.ZodObject<{
|
|
76
|
+
installationId: z.ZodString;
|
|
77
|
+
integrationKey: z.ZodString;
|
|
78
|
+
status: z.ZodString;
|
|
79
|
+
installedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
80
|
+
connectionCount: z.ZodNumber;
|
|
81
|
+
lastErrorCode: z.ZodNullable<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export declare const IntegrationsInstallResponseSchema: z.ZodObject<{
|
|
85
|
+
installationId: z.ZodString;
|
|
86
|
+
integrationKey: z.ZodString;
|
|
87
|
+
status: z.ZodString;
|
|
88
|
+
installedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
89
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export declare const IntegrationsUninstallResponseSchema: z.ZodObject<{
|
|
92
|
+
uninstalled: z.ZodLiteral<true>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export declare const IntegrationsOAuthInitResponseSchema: z.ZodObject<{
|
|
95
|
+
redirectUrl: z.ZodString;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export declare const IntegrationsOAuthCallbackResponseSchema: z.ZodObject<{
|
|
98
|
+
connectionId: z.ZodString;
|
|
99
|
+
integrationKey: z.ZodString;
|
|
100
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
101
|
+
isNew: z.ZodBoolean;
|
|
102
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export declare const IntegrationsConnectionListResponseSchema: z.ZodObject<{
|
|
105
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
provider: z.ZodString;
|
|
108
|
+
providerAccountId: z.ZodNullable<z.ZodString>;
|
|
109
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
110
|
+
status: z.ZodString;
|
|
111
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
112
|
+
connectedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
113
|
+
lastRefreshedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export declare const IntegrationsRevokeConnectionResponseSchema: z.ZodObject<{
|
|
117
|
+
revoked: z.ZodLiteral<true>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export declare const IntegrationsRefreshConnectionResponseSchema: z.ZodObject<{
|
|
120
|
+
refreshed: z.ZodLiteral<true>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export declare const IntegrationsCredentialSubmitResponseSchema: z.ZodObject<{
|
|
123
|
+
connectionId: z.ZodString;
|
|
124
|
+
integrationKey: z.ZodString;
|
|
125
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
126
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
export declare const IntegrationsConfigResponseSchema: z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
appId: z.ZodString;
|
|
131
|
+
connectedAccountId: z.ZodString;
|
|
132
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
133
|
+
notificationRules: z.ZodArray<z.ZodUnknown>;
|
|
134
|
+
enabled: z.ZodBoolean;
|
|
135
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
136
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export declare const IntegrationsConfigListResponseSchema: z.ZodObject<{
|
|
139
|
+
configs: z.ZodArray<z.ZodObject<{
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
appId: z.ZodString;
|
|
142
|
+
connectedAccountId: z.ZodString;
|
|
143
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
144
|
+
notificationRules: z.ZodArray<z.ZodUnknown>;
|
|
145
|
+
enabled: z.ZodBoolean;
|
|
146
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
147
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
export declare const IntegrationsDeleteConfigResponseSchema: z.ZodObject<{
|
|
151
|
+
deleted: z.ZodLiteral<true>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export declare const IntegrationsEntitlementResponseSchema: z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
orgId: z.ZodString;
|
|
156
|
+
integrationKey: z.ZodString;
|
|
157
|
+
type: z.ZodEnum<{
|
|
158
|
+
allow: "allow";
|
|
159
|
+
deny: "deny";
|
|
160
|
+
}>;
|
|
161
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
162
|
+
grantedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
export declare const IntegrationsEntitlementListResponseSchema: z.ZodObject<{
|
|
165
|
+
overrides: z.ZodArray<z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
orgId: z.ZodString;
|
|
168
|
+
integrationKey: z.ZodString;
|
|
169
|
+
type: z.ZodEnum<{
|
|
170
|
+
allow: "allow";
|
|
171
|
+
deny: "deny";
|
|
172
|
+
}>;
|
|
173
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
174
|
+
grantedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export declare const IntegrationsDeleteEntitlementResponseSchema: z.ZodObject<{
|
|
178
|
+
deleted: z.ZodLiteral<true>;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
export declare const IntegrationsListSourceReposResponseSchema: z.ZodObject<{
|
|
181
|
+
data: z.ZodArray<z.ZodObject<{
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
name: z.ZodString;
|
|
184
|
+
fullName: z.ZodString;
|
|
185
|
+
defaultBranch: z.ZodString;
|
|
186
|
+
private: z.ZodBoolean;
|
|
187
|
+
url: z.ZodString;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
page: z.ZodObject<{
|
|
190
|
+
size: z.ZodNumber;
|
|
191
|
+
totalPages: z.ZodNumber;
|
|
192
|
+
hasMore: z.ZodBoolean;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
export type IntegrationsListAvailableResponse = z.infer<typeof IntegrationsListAvailableResponseSchema>;
|
|
196
|
+
export type IntegrationsListInstalledResponse = z.infer<typeof IntegrationsListInstalledResponseSchema>;
|
|
197
|
+
export type IntegrationsInstallResponse = z.infer<typeof IntegrationsInstallResponseSchema>;
|
|
198
|
+
export type IntegrationsUninstallResponse = z.infer<typeof IntegrationsUninstallResponseSchema>;
|
|
199
|
+
export type IntegrationsOAuthInitResponse = z.infer<typeof IntegrationsOAuthInitResponseSchema>;
|
|
200
|
+
export type IntegrationsOAuthCallbackResponse = z.infer<typeof IntegrationsOAuthCallbackResponseSchema>;
|
|
201
|
+
export type IntegrationsConnectionListResponse = z.infer<typeof IntegrationsConnectionListResponseSchema>;
|
|
202
|
+
export type IntegrationsRevokeConnectionResponse = z.infer<typeof IntegrationsRevokeConnectionResponseSchema>;
|
|
203
|
+
export type IntegrationsRefreshConnectionResponse = z.infer<typeof IntegrationsRefreshConnectionResponseSchema>;
|
|
204
|
+
export type IntegrationsCredentialSubmitResponse = z.infer<typeof IntegrationsCredentialSubmitResponseSchema>;
|
|
205
|
+
export type IntegrationsConfigResponse = z.infer<typeof IntegrationsConfigResponseSchema>;
|
|
206
|
+
export type IntegrationsConfigListResponse = z.infer<typeof IntegrationsConfigListResponseSchema>;
|
|
207
|
+
export type IntegrationsDeleteConfigResponse = z.infer<typeof IntegrationsDeleteConfigResponseSchema>;
|
|
208
|
+
export type IntegrationsEntitlementResponse = z.infer<typeof IntegrationsEntitlementResponseSchema>;
|
|
209
|
+
export type IntegrationsEntitlementListResponse = z.infer<typeof IntegrationsEntitlementListResponseSchema>;
|
|
210
|
+
export type IntegrationsDeleteEntitlementResponse = z.infer<typeof IntegrationsDeleteEntitlementResponseSchema>;
|
|
211
|
+
export type IntegrationsListSourceReposResponse = z.infer<typeof IntegrationsListSourceReposResponseSchema>;
|
|
212
|
+
//# sourceMappingURL=integrations-response.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations-response.schema.d.ts","sourceRoot":"","sources":["../../../src/definitions/integrations/integrations-response.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBlD,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;;;;;;;iBA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AM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAC1G,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC;AAC9G,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAChH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC;AAC9G,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAClG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AACtG,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AACpG,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAC5G,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAChH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations — Response Schemas
|
|
3
|
+
*
|
|
4
|
+
* Response shapes for all integrations endpoints.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { createPaginatedResponseSchema } from "../common.js";
|
|
8
|
+
import { IdentifierSchema, TimestampSchema, NullableTimestampSchema, } from "../common.js";
|
|
9
|
+
import { IntegrationsClientAuthConfigSchema, IntegrationsConfigFieldSchema, IntegrationsSourceRepoItemSchema, } from "./integrations.schema.js";
|
|
10
|
+
// =============================================================================
|
|
11
|
+
// Marketplace
|
|
12
|
+
// =============================================================================
|
|
13
|
+
export const IntegrationsListAvailableResponseSchema = z.object({
|
|
14
|
+
integrations: z.array(z.object({
|
|
15
|
+
key: IdentifierSchema,
|
|
16
|
+
id: IdentifierSchema,
|
|
17
|
+
name: z.string(),
|
|
18
|
+
description: z.string().nullable(),
|
|
19
|
+
iconUrl: z
|
|
20
|
+
.union([
|
|
21
|
+
z.string(),
|
|
22
|
+
z.object({ light: z.string(), dark: z.string() }),
|
|
23
|
+
])
|
|
24
|
+
.nullable(),
|
|
25
|
+
category: z.string().nullable(),
|
|
26
|
+
docsUrl: z.string().url().nullable(),
|
|
27
|
+
capabilities: z.array(z.string()),
|
|
28
|
+
auth: IntegrationsClientAuthConfigSchema,
|
|
29
|
+
configured: z.boolean(),
|
|
30
|
+
installed: z.boolean(),
|
|
31
|
+
installationId: z.string().nullable(),
|
|
32
|
+
entitled: z.boolean(),
|
|
33
|
+
configSchema: z.array(IntegrationsConfigFieldSchema).optional(),
|
|
34
|
+
})),
|
|
35
|
+
});
|
|
36
|
+
export const IntegrationsListInstalledResponseSchema = z.object({
|
|
37
|
+
integrations: z.array(z.object({
|
|
38
|
+
installationId: IdentifierSchema,
|
|
39
|
+
integrationKey: IdentifierSchema,
|
|
40
|
+
status: z.string(),
|
|
41
|
+
installedAt: TimestampSchema,
|
|
42
|
+
connectionCount: z.number(),
|
|
43
|
+
lastErrorCode: z.string().nullable(),
|
|
44
|
+
})),
|
|
45
|
+
});
|
|
46
|
+
// =============================================================================
|
|
47
|
+
// Installation
|
|
48
|
+
// =============================================================================
|
|
49
|
+
export const IntegrationsInstallResponseSchema = z.object({
|
|
50
|
+
installationId: IdentifierSchema,
|
|
51
|
+
integrationKey: IdentifierSchema,
|
|
52
|
+
status: z.string(),
|
|
53
|
+
installedAt: TimestampSchema,
|
|
54
|
+
webhookUrl: z.string().url().nullable().optional(),
|
|
55
|
+
});
|
|
56
|
+
export const IntegrationsUninstallResponseSchema = z.object({
|
|
57
|
+
uninstalled: z.literal(true),
|
|
58
|
+
});
|
|
59
|
+
// =============================================================================
|
|
60
|
+
// OAuth Connections
|
|
61
|
+
// =============================================================================
|
|
62
|
+
export const IntegrationsOAuthInitResponseSchema = z.object({
|
|
63
|
+
redirectUrl: z.string().url(),
|
|
64
|
+
});
|
|
65
|
+
export const IntegrationsOAuthCallbackResponseSchema = z.object({
|
|
66
|
+
connectionId: IdentifierSchema,
|
|
67
|
+
integrationKey: IdentifierSchema,
|
|
68
|
+
displayName: z.string().nullable(),
|
|
69
|
+
isNew: z.boolean(),
|
|
70
|
+
webhookUrl: z.string().url().nullable().optional(),
|
|
71
|
+
});
|
|
72
|
+
export const IntegrationsConnectionListResponseSchema = z.object({
|
|
73
|
+
connections: z.array(z.object({
|
|
74
|
+
id: IdentifierSchema,
|
|
75
|
+
provider: IdentifierSchema,
|
|
76
|
+
providerAccountId: z.string().nullable(),
|
|
77
|
+
displayName: z.string().nullable(),
|
|
78
|
+
status: z.string(),
|
|
79
|
+
scopes: z.array(z.string()),
|
|
80
|
+
connectedAt: TimestampSchema,
|
|
81
|
+
lastRefreshedAt: NullableTimestampSchema,
|
|
82
|
+
})),
|
|
83
|
+
});
|
|
84
|
+
export const IntegrationsRevokeConnectionResponseSchema = z.object({
|
|
85
|
+
revoked: z.literal(true),
|
|
86
|
+
});
|
|
87
|
+
export const IntegrationsRefreshConnectionResponseSchema = z.object({
|
|
88
|
+
refreshed: z.literal(true),
|
|
89
|
+
});
|
|
90
|
+
// =============================================================================
|
|
91
|
+
// Credential Form
|
|
92
|
+
// =============================================================================
|
|
93
|
+
export const IntegrationsCredentialSubmitResponseSchema = z.object({
|
|
94
|
+
connectionId: IdentifierSchema,
|
|
95
|
+
integrationKey: IdentifierSchema,
|
|
96
|
+
displayName: z.string().nullable(),
|
|
97
|
+
webhookUrl: z.string().url().nullable().optional(),
|
|
98
|
+
});
|
|
99
|
+
// =============================================================================
|
|
100
|
+
// App Configs
|
|
101
|
+
// =============================================================================
|
|
102
|
+
export const IntegrationsConfigResponseSchema = z.object({
|
|
103
|
+
id: IdentifierSchema,
|
|
104
|
+
appId: IdentifierSchema,
|
|
105
|
+
connectedAccountId: IdentifierSchema,
|
|
106
|
+
settings: z.record(z.string(), z.unknown()),
|
|
107
|
+
notificationRules: z.array(z.unknown()),
|
|
108
|
+
enabled: z.boolean(),
|
|
109
|
+
createdAt: TimestampSchema,
|
|
110
|
+
updatedAt: TimestampSchema,
|
|
111
|
+
});
|
|
112
|
+
export const IntegrationsConfigListResponseSchema = z.object({
|
|
113
|
+
configs: z.array(IntegrationsConfigResponseSchema),
|
|
114
|
+
});
|
|
115
|
+
export const IntegrationsDeleteConfigResponseSchema = z.object({
|
|
116
|
+
deleted: z.literal(true),
|
|
117
|
+
});
|
|
118
|
+
// =============================================================================
|
|
119
|
+
// Entitlements
|
|
120
|
+
// =============================================================================
|
|
121
|
+
export const IntegrationsEntitlementResponseSchema = z.object({
|
|
122
|
+
id: IdentifierSchema,
|
|
123
|
+
orgId: IdentifierSchema,
|
|
124
|
+
integrationKey: IdentifierSchema,
|
|
125
|
+
type: z.enum(["allow", "deny"]),
|
|
126
|
+
reason: z.string().nullable(),
|
|
127
|
+
grantedAt: TimestampSchema,
|
|
128
|
+
});
|
|
129
|
+
export const IntegrationsEntitlementListResponseSchema = z.object({
|
|
130
|
+
overrides: z.array(IntegrationsEntitlementResponseSchema),
|
|
131
|
+
});
|
|
132
|
+
export const IntegrationsDeleteEntitlementResponseSchema = z.object({
|
|
133
|
+
deleted: z.literal(true),
|
|
134
|
+
});
|
|
135
|
+
// =============================================================================
|
|
136
|
+
// Source Control
|
|
137
|
+
// =============================================================================
|
|
138
|
+
export const IntegrationsListSourceReposResponseSchema = createPaginatedResponseSchema(IntegrationsSourceRepoItemSchema);
|
|
139
|
+
//# sourceMappingURL=integrations-response.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations-response.schema.js","sourceRoot":"","sources":["../../../src/definitions/integrations/integrations-response.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kCAAkC,EAClC,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAElC,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,YAAY,EAAE,CAAC,CAAC,KAAK,CACnB,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,gBAAgB;QACrB,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,CAAC;aACP,KAAK,CAAC;YACL,CAAC,CAAC,MAAM,EAAE;YACV,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;SAClD,CAAC;aACD,QAAQ,EAAE;QACb,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACpC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QACjC,IAAI,EAAE,kCAAkC;QACxC,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;QACvB,SAAS,EAAE,CAAC,CAAC,OAAO,EAA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,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,eAAe;CAC3B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,MAAM,CAAC;IAChE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,qCAAqC,CAAC;CAC1D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC,CAAC,MAAM,CAAC;IAClE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACzB,CAAC,CAAC;AAEH,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,yCAAyC,GACpD,6BAA6B,CAAC,gCAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations — Domain Schemas
|
|
3
|
+
*
|
|
4
|
+
* Core domain types shared across request and response schemas:
|
|
5
|
+
* auth config shapes, credential field definitions, and source repo items.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
export declare const IntegrationsSetupFlowSchema: z.ZodEnum<{
|
|
9
|
+
oauth_only: "oauth_only";
|
|
10
|
+
credential_form: "credential_form";
|
|
11
|
+
oauth_then_configure: "oauth_then_configure";
|
|
12
|
+
none: "none";
|
|
13
|
+
}>;
|
|
14
|
+
export declare const IntegrationsCredentialInputFieldSchema: z.ZodObject<{
|
|
15
|
+
key: z.ZodString;
|
|
16
|
+
label: z.ZodString;
|
|
17
|
+
type: z.ZodEnum<{
|
|
18
|
+
text: "text";
|
|
19
|
+
password: "password";
|
|
20
|
+
url: "url";
|
|
21
|
+
select: "select";
|
|
22
|
+
textarea: "textarea";
|
|
23
|
+
copy: "copy";
|
|
24
|
+
}>;
|
|
25
|
+
required: z.ZodBoolean;
|
|
26
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
27
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
28
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
+
value: z.ZodString;
|
|
30
|
+
label: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>>;
|
|
32
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
33
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
value: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export declare const IntegrationsClientAuthConfigSchema: z.ZodObject<{
|
|
38
|
+
setupFlows: z.ZodArray<z.ZodEnum<{
|
|
39
|
+
oauth_only: "oauth_only";
|
|
40
|
+
credential_form: "credential_form";
|
|
41
|
+
oauth_then_configure: "oauth_then_configure";
|
|
42
|
+
none: "none";
|
|
43
|
+
}>>;
|
|
44
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
45
|
+
key: z.ZodString;
|
|
46
|
+
label: z.ZodString;
|
|
47
|
+
type: z.ZodEnum<{
|
|
48
|
+
text: "text";
|
|
49
|
+
password: "password";
|
|
50
|
+
url: "url";
|
|
51
|
+
select: "select";
|
|
52
|
+
textarea: "textarea";
|
|
53
|
+
copy: "copy";
|
|
54
|
+
}>;
|
|
55
|
+
required: z.ZodBoolean;
|
|
56
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
57
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
58
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
59
|
+
value: z.ZodString;
|
|
60
|
+
label: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
62
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
63
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
value: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>>>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
/** Describes a user-configurable field in integration_configs.settings. */
|
|
69
|
+
export declare const IntegrationsConfigFieldSchema: z.ZodObject<{
|
|
70
|
+
key: z.ZodString;
|
|
71
|
+
label: z.ZodString;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
73
|
+
type: z.ZodEnum<{
|
|
74
|
+
number: "number";
|
|
75
|
+
boolean: "boolean";
|
|
76
|
+
text: "text";
|
|
77
|
+
select: "select";
|
|
78
|
+
}>;
|
|
79
|
+
required: z.ZodBoolean;
|
|
80
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
|
+
value: z.ZodString;
|
|
82
|
+
label: z.ZodString;
|
|
83
|
+
}, z.core.$strip>>>;
|
|
84
|
+
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export declare const IntegrationsSourceRepoItemSchema: z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
fullName: z.ZodString;
|
|
90
|
+
defaultBranch: z.ZodString;
|
|
91
|
+
private: z.ZodBoolean;
|
|
92
|
+
url: z.ZodString;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export type IntegrationsSetupFlow = z.infer<typeof IntegrationsSetupFlowSchema>;
|
|
95
|
+
export type IntegrationsCredentialInputField = z.infer<typeof IntegrationsCredentialInputFieldSchema>;
|
|
96
|
+
export type IntegrationsClientAuthConfig = z.infer<typeof IntegrationsClientAuthConfigSchema>;
|
|
97
|
+
export type IntegrationsConfigField = z.infer<typeof IntegrationsConfigFieldSchema>;
|
|
98
|
+
export type IntegrationsSourceRepoItem = z.infer<typeof IntegrationsSourceRepoItemSchema>;
|
|
99
|
+
//# sourceMappingURL=integrations.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.schema.d.ts","sourceRoot":"","sources":["../../../src/definitions/integrations/integrations.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,2BAA2B;;;;;EAKtC,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;iBAcjD,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK7C,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;iBAWxC,CAAC;AAMH,eAAO,MAAM,gCAAgC;;;;;;;iBAO3C,CAAC;AAMH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AACtG,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations — Domain Schemas
|
|
3
|
+
*
|
|
4
|
+
* Core domain types shared across request and response schemas:
|
|
5
|
+
* auth config shapes, credential field definitions, and source repo items.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// Auth Config (client-safe subset — no scopes or internal auth method)
|
|
10
|
+
// =============================================================================
|
|
11
|
+
export const IntegrationsSetupFlowSchema = z.enum([
|
|
12
|
+
"oauth_only",
|
|
13
|
+
"credential_form",
|
|
14
|
+
"oauth_then_configure",
|
|
15
|
+
"none",
|
|
16
|
+
]);
|
|
17
|
+
export const IntegrationsCredentialInputFieldSchema = z.object({
|
|
18
|
+
key: z.string(),
|
|
19
|
+
label: z.string(),
|
|
20
|
+
type: z.enum(["text", "password", "url", "select", "textarea", "copy"]),
|
|
21
|
+
required: z.boolean(),
|
|
22
|
+
placeholder: z.string().optional(),
|
|
23
|
+
helpText: z.string().optional(),
|
|
24
|
+
options: z
|
|
25
|
+
.array(z.object({ value: z.string(), label: z.string() }))
|
|
26
|
+
.optional(),
|
|
27
|
+
pattern: z.string().optional(),
|
|
28
|
+
minLength: z.number().int().nonnegative().optional(),
|
|
29
|
+
maxLength: z.number().int().positive().optional(),
|
|
30
|
+
value: z.string().optional(),
|
|
31
|
+
});
|
|
32
|
+
export const IntegrationsClientAuthConfigSchema = z.object({
|
|
33
|
+
/** Tells the client which UI flows can be offered. */
|
|
34
|
+
setupFlows: z.array(IntegrationsSetupFlowSchema),
|
|
35
|
+
/** Ordered credential fields (present when credential_form is in setupFlows). */
|
|
36
|
+
fields: z.array(IntegrationsCredentialInputFieldSchema).optional(),
|
|
37
|
+
});
|
|
38
|
+
/** Describes a user-configurable field in integration_configs.settings. */
|
|
39
|
+
export const IntegrationsConfigFieldSchema = z.object({
|
|
40
|
+
key: z.string(),
|
|
41
|
+
label: z.string(),
|
|
42
|
+
description: z.string().optional(),
|
|
43
|
+
type: z.enum(["text", "select", "boolean", "number"]),
|
|
44
|
+
required: z.boolean(),
|
|
45
|
+
options: z
|
|
46
|
+
.array(z.object({ value: z.string(), label: z.string() }))
|
|
47
|
+
.optional(),
|
|
48
|
+
/** If true, the client should fetch options dynamically (e.g. repo list). */
|
|
49
|
+
dynamic: z.boolean().optional(),
|
|
50
|
+
});
|
|
51
|
+
// =============================================================================
|
|
52
|
+
// Source Control
|
|
53
|
+
// =============================================================================
|
|
54
|
+
export const IntegrationsSourceRepoItemSchema = z.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
fullName: z.string(),
|
|
58
|
+
defaultBranch: z.string(),
|
|
59
|
+
private: z.boolean(),
|
|
60
|
+
url: z.string(),
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=integrations.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.schema.js","sourceRoot":"","sources":["../../../src/definitions/integrations/integrations.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAChF,uEAAuE;AACvE,gFAAgF;AAEhF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC;IAChD,YAAY;IACZ,iBAAiB;IACjB,sBAAsB;IACtB,MAAM;CACP,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACvE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACzD,QAAQ,EAAE;IACb,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAA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AAC,CAAC,MAAM,CAAC;IACvD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
|
|
@@ -27,9 +27,9 @@ export declare const CatalogListQuerySchema: z.ZodObject<{
|
|
|
27
27
|
monitoring: "monitoring";
|
|
28
28
|
}>>;
|
|
29
29
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
team: "team";
|
|
31
30
|
free: "free";
|
|
32
31
|
pro: "pro";
|
|
32
|
+
team: "team";
|
|
33
33
|
enterprise: "enterprise";
|
|
34
34
|
}>>;
|
|
35
35
|
isBeta: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<boolean, string | undefined>>;
|
|
@@ -95,9 +95,9 @@ export declare const UpdateCatalogEntryRequestSchema: z.ZodObject<{
|
|
|
95
95
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
96
96
|
docsUrl: z.ZodOptional<z.ZodString>;
|
|
97
97
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
98
|
-
team: "team";
|
|
99
98
|
free: "free";
|
|
100
99
|
pro: "pro";
|
|
100
|
+
team: "team";
|
|
101
101
|
enterprise: "enterprise";
|
|
102
102
|
}>>;
|
|
103
103
|
isBeta: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -26,9 +26,9 @@ export declare const CatalogListResponseSchema: z.ZodObject<{
|
|
|
26
26
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
27
27
|
docsUrl: z.ZodOptional<z.ZodString>;
|
|
28
28
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
29
|
-
team: "team";
|
|
30
29
|
free: "free";
|
|
31
30
|
pro: "pro";
|
|
31
|
+
team: "team";
|
|
32
32
|
enterprise: "enterprise";
|
|
33
33
|
}>>;
|
|
34
34
|
isBeta: z.ZodBoolean;
|
|
@@ -70,9 +70,9 @@ export declare const EnrichedCatalogListResponseSchema: z.ZodObject<{
|
|
|
70
70
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
71
71
|
docsUrl: z.ZodOptional<z.ZodString>;
|
|
72
72
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
73
|
-
team: "team";
|
|
74
73
|
free: "free";
|
|
75
74
|
pro: "pro";
|
|
75
|
+
team: "team";
|
|
76
76
|
enterprise: "enterprise";
|
|
77
77
|
}>>;
|
|
78
78
|
isBeta: z.ZodBoolean;
|
|
@@ -121,9 +121,9 @@ export declare const CatalogEntryResponseSchema: z.ZodObject<{
|
|
|
121
121
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
122
122
|
docsUrl: z.ZodOptional<z.ZodString>;
|
|
123
123
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
124
|
-
team: "team";
|
|
125
124
|
free: "free";
|
|
126
125
|
pro: "pro";
|
|
126
|
+
team: "team";
|
|
127
127
|
enterprise: "enterprise";
|
|
128
128
|
}>>;
|
|
129
129
|
isBeta: z.ZodBoolean;
|
|
@@ -157,9 +157,9 @@ export declare const EnrichedIntegrationResponseSchema: z.ZodObject<{
|
|
|
157
157
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
158
158
|
docsUrl: z.ZodOptional<z.ZodString>;
|
|
159
159
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
160
|
-
team: "team";
|
|
161
160
|
free: "free";
|
|
162
161
|
pro: "pro";
|
|
162
|
+
team: "team";
|
|
163
163
|
enterprise: "enterprise";
|
|
164
164
|
}>>;
|
|
165
165
|
isBeta: z.ZodBoolean;
|
|
@@ -240,17 +240,17 @@ export declare const InstallResultResponseSchema: z.ZodObject<{
|
|
|
240
240
|
export declare const EffectiveEntitlementsResponseSchema: z.ZodObject<{
|
|
241
241
|
orgId: z.ZodString;
|
|
242
242
|
plan: z.ZodEnum<{
|
|
243
|
-
team: "team";
|
|
244
243
|
free: "free";
|
|
245
244
|
pro: "pro";
|
|
245
|
+
team: "team";
|
|
246
246
|
enterprise: "enterprise";
|
|
247
247
|
}>;
|
|
248
248
|
integrations: z.ZodArray<z.ZodObject<{
|
|
249
249
|
key: z.ZodString;
|
|
250
250
|
requiredPlan: z.ZodOptional<z.ZodEnum<{
|
|
251
|
-
team: "team";
|
|
252
251
|
free: "free";
|
|
253
252
|
pro: "pro";
|
|
253
|
+
team: "team";
|
|
254
254
|
enterprise: "enterprise";
|
|
255
255
|
}>>;
|
|
256
256
|
allowed: z.ZodBoolean;
|