@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
251 lines • 11.2 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
export const View = {
Account: "account",
Project: "project",
};
export const InstallationType = {
Marketplace: "marketplace",
External: "external",
Provisioning: "provisioning",
};
export const TagIds = {
TagAgents: "tag_agents",
TagAi: "tag_ai",
TagAnalytics: "tag_analytics",
TagAuthentication: "tag_authentication",
TagCms: "tag_cms",
TagCodeRepository: "tag_code_repository",
TagCodeReview: "tag_code_review",
TagCodeSecurity: "tag_code_security",
TagCodeTesting: "tag_code_testing",
TagCommerce: "tag_commerce",
TagDatabases: "tag_databases",
TagDevTools: "tag_dev_tools",
TagExperimentation: "tag_experimentation",
TagFlags: "tag_flags",
TagLogging: "tag_logging",
TagMessaging: "tag_messaging",
TagMonitoring: "tag_monitoring",
TagObservability: "tag_observability",
TagPayments: "tag_payments",
TagPerformance: "tag_performance",
TagProductivity: "tag_productivity",
TagSearching: "tag_searching",
TagSecurity: "tag_security",
TagSupportAgent: "tag_support_agent",
TagTesting: "tag_testing",
TagVideo: "tag_video",
TagWebAutomation: "tag_web_automation",
TagWorkflow: "tag_workflow",
};
/**
* The configuration status. Optional. If not defined, assume 'ready'.
*/
export const GetConfigurationsResponseBodyIntegrationsStatus = {
Error: "error",
Onboarding: "onboarding",
Pending: "pending",
Ready: "ready",
Resumed: "resumed",
Suspended: "suspended",
Uninstalled: "uninstalled",
};
/**
* Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics.
*/
export const GetConfigurationsResponseBodyIntegrationsSource = {
Backoffice: "backoffice",
Cli: "cli",
DeployButton: "deploy-button",
External: "external",
Marketplace: "marketplace",
Oauth: "oauth",
ResourceClaims: "resource-claims",
V0: "v0",
};
export const GetConfigurationsResponseBodyIntegrationsType = {
IntegrationConfiguration: "integration-configuration",
};
export const GetConfigurationsResponseBodyIntegrationsDisabledReason = {
AccountPlanDowngrade: "account-plan-downgrade",
DisabledByAdmin: "disabled-by-admin",
DisabledByOwner: "disabled-by-owner",
FeatureNotAvailable: "feature-not-available",
OriginalOwnerLeftTheTeam: "original-owner-left-the-team",
OriginalOwnerRoleDowngraded: "original-owner-role-downgraded",
};
/**
* Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external'
*/
export const GetConfigurationsResponseBodyInstallationType = {
External: "external",
Marketplace: "marketplace",
};
/**
* The configuration status. Optional. If not defined, assume 'ready'.
*/
export const GetConfigurationsResponseBodyStatus = {
Error: "error",
Onboarding: "onboarding",
Pending: "pending",
Ready: "ready",
Resumed: "resumed",
Suspended: "suspended",
Uninstalled: "uninstalled",
};
/**
* Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics.
*/
export const GetConfigurationsResponseBodySource = {
Backoffice: "backoffice",
Cli: "cli",
DeployButton: "deploy-button",
External: "external",
Marketplace: "marketplace",
Oauth: "oauth",
ResourceClaims: "resource-claims",
V0: "v0",
};
export const GetConfigurationsResponseBodyType = {
IntegrationConfiguration: "integration-configuration",
};
export const GetConfigurationsResponseBodyDisabledReason = {
AccountPlanDowngrade: "account-plan-downgrade",
DisabledByAdmin: "disabled-by-admin",
DisabledByOwner: "disabled-by-owner",
FeatureNotAvailable: "feature-not-available",
OriginalOwnerLeftTheTeam: "original-owner-left-the-team",
OriginalOwnerRoleDowngraded: "original-owner-role-downgraded",
};
/**
* Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external'
*/
export const ResponseBodyInstallationType = {
External: "external",
Marketplace: "marketplace",
};
/** @internal */
export const View$outboundSchema = z.nativeEnum(View);
/** @internal */
export const InstallationType$outboundSchema = z.nativeEnum(InstallationType);
/** @internal */
export const GetConfigurationsRequest$outboundSchema = z.object({
view: View$outboundSchema,
installationType: InstallationType$outboundSchema.optional(),
integrationIdOrSlug: z.string().optional(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getConfigurationsRequestToJSON(getConfigurationsRequest) {
return JSON.stringify(GetConfigurationsRequest$outboundSchema.parse(getConfigurationsRequest));
}
/** @internal */
export const TagIds$inboundSchema = z
.nativeEnum(TagIds);
/** @internal */
export const ResponseBodyIntegration$inboundSchema = z.object({
name: types.string(),
icon: types.string(),
isLegacy: types.boolean(),
flags: types.optional(z.array(types.string())),
assignedBetaLabelAt: types.optional(types.number()),
tagIds: types.optional(z.array(TagIds$inboundSchema)),
});
export function responseBodyIntegrationFromJSON(jsonString) {
return safeParse(jsonString, (x) => ResponseBodyIntegration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyIntegration' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsStatus$inboundSchema = z
.nativeEnum(GetConfigurationsResponseBodyIntegrationsStatus);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsSource$inboundSchema = z
.nativeEnum(GetConfigurationsResponseBodyIntegrationsSource);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsType$inboundSchema = z
.nativeEnum(GetConfigurationsResponseBodyIntegrationsType);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsDisabledReason$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyIntegrationsDisabledReason);
/** @internal */
export const GetConfigurationsResponseBodyInstallationType$inboundSchema = z
.nativeEnum(GetConfigurationsResponseBodyInstallationType);
/** @internal */
export const GetConfigurationsResponseBody2$inboundSchema = z.object({
integration: z.lazy(() => ResponseBodyIntegration$inboundSchema),
completedAt: types.optional(types.number()),
createdAt: types.number(),
id: types.string(),
integrationId: types.string(),
ownerId: types.string(),
status: types.optional(GetConfigurationsResponseBodyIntegrationsStatus$inboundSchema),
externalId: types.optional(types.string()),
projects: types.optional(z.array(types.string())),
source: types.optional(GetConfigurationsResponseBodyIntegrationsSource$inboundSchema),
slug: types.string(),
teamId: z.nullable(types.string()).optional(),
type: GetConfigurationsResponseBodyIntegrationsType$inboundSchema,
updatedAt: types.number(),
userId: types.string(),
scopes: z.array(types.string()),
disabledAt: types.optional(types.number()),
deletedAt: z.nullable(types.number()).optional(),
deleteRequestedAt: z.nullable(types.number()).optional(),
customerDeleteRequestedAt: z.nullable(types.number()).optional(),
disabledReason: types.optional(GetConfigurationsResponseBodyIntegrationsDisabledReason$inboundSchema),
installationType: types.optional(GetConfigurationsResponseBodyInstallationType$inboundSchema),
});
export function getConfigurationsResponseBody2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetConfigurationsResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsResponseBody2' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBodyStatus$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyStatus);
/** @internal */
export const GetConfigurationsResponseBodySource$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodySource);
/** @internal */
export const GetConfigurationsResponseBodyType$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyType);
/** @internal */
export const GetConfigurationsResponseBodyDisabledReason$inboundSchema = z
.nativeEnum(GetConfigurationsResponseBodyDisabledReason);
/** @internal */
export const ResponseBodyInstallationType$inboundSchema = z.nativeEnum(ResponseBodyInstallationType);
/** @internal */
export const GetConfigurationsResponseBody1$inboundSchema = z.object({
completedAt: types.optional(types.number()),
createdAt: types.optional(types.number()),
id: types.optional(types.string()),
integrationId: types.optional(types.string()),
ownerId: types.optional(types.string()),
status: types.optional(GetConfigurationsResponseBodyStatus$inboundSchema),
externalId: types.optional(types.string()),
projects: types.optional(z.array(types.string())),
source: types.optional(GetConfigurationsResponseBodySource$inboundSchema),
slug: types.optional(types.string()),
teamId: z.nullable(types.string()).optional(),
type: types.optional(GetConfigurationsResponseBodyType$inboundSchema),
updatedAt: types.optional(types.number()),
userId: types.optional(types.string()),
scopes: types.optional(z.array(types.string())),
disabledAt: types.optional(types.number()),
deletedAt: z.nullable(types.number()).optional(),
deleteRequestedAt: z.nullable(types.number()).optional(),
customerDeleteRequestedAt: z.nullable(types.number()).optional(),
disabledReason: types.optional(GetConfigurationsResponseBodyDisabledReason$inboundSchema),
installationType: types.optional(ResponseBodyInstallationType$inboundSchema),
});
export function getConfigurationsResponseBody1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetConfigurationsResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsResponseBody1' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBody$inboundSchema = smartUnion([
z.array(z.lazy(() => GetConfigurationsResponseBody1$inboundSchema)),
z.array(z.lazy(() => GetConfigurationsResponseBody2$inboundSchema)),
]);
export function getConfigurationsResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetConfigurationsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsResponseBody' from JSON`);
}
//# sourceMappingURL=getconfigurationsop.js.map