@vercel/sdk 1.17.3 → 1.17.5

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.
Files changed (110) hide show
  1. package/README.md +28 -24
  2. package/bin/mcp-server.js +1496 -1252
  3. package/bin/mcp-server.js.map +18 -12
  4. package/esm/__tests__/accessgroups.test.js +1 -3
  5. package/esm/__tests__/accessgroups.test.js.map +1 -1
  6. package/esm/__tests__/checks.test.js +1 -1
  7. package/esm/__tests__/checks.test.js.map +1 -1
  8. package/esm/__tests__/domains.test.js +4 -10
  9. package/esm/__tests__/domains.test.js.map +1 -1
  10. package/esm/__tests__/edgeconfig.test.js +6 -6
  11. package/esm/__tests__/edgeconfig.test.js.map +1 -1
  12. package/esm/__tests__/integrations.test.js +1 -1
  13. package/esm/__tests__/logdrains.test.js +1 -3
  14. package/esm/__tests__/logdrains.test.js.map +1 -1
  15. package/esm/__tests__/rollingrelease.test.js +2 -6
  16. package/esm/__tests__/rollingrelease.test.js.map +1 -1
  17. package/esm/__tests__/security.test.js +4 -4
  18. package/esm/__tests__/security.test.js.map +1 -1
  19. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.d.ts +17 -0
  20. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.d.ts.map +1 -0
  21. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.js +85 -0
  22. package/esm/funcs/edgeCacheDangerouslyDeleteBySrcImages.js.map +1 -0
  23. package/esm/funcs/edgeCacheInvalidateBySrcImages.d.ts +17 -0
  24. package/esm/funcs/edgeCacheInvalidateBySrcImages.d.ts.map +1 -0
  25. package/esm/funcs/edgeCacheInvalidateBySrcImages.js +85 -0
  26. package/esm/funcs/edgeCacheInvalidateBySrcImages.js.map +1 -0
  27. package/esm/lib/config.d.ts +3 -3
  28. package/esm/lib/config.js +3 -3
  29. package/esm/mcp-server/mcp-server.js +1 -1
  30. package/esm/mcp-server/server.d.ts.map +1 -1
  31. package/esm/mcp-server/server.js +5 -1
  32. package/esm/mcp-server/server.js.map +1 -1
  33. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.d.ts +7 -0
  34. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.d.ts.map +1 -0
  35. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.js +27 -0
  36. package/esm/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.js.map +1 -0
  37. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.d.ts +7 -0
  38. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.d.ts.map +1 -0
  39. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.js +27 -0
  40. package/esm/mcp-server/tools/edgeCacheInvalidateBySrcImages.js.map +1 -0
  41. package/esm/models/canceldeploymentop.d.ts +0 -37
  42. package/esm/models/canceldeploymentop.d.ts.map +1 -1
  43. package/esm/models/canceldeploymentop.js +0 -23
  44. package/esm/models/canceldeploymentop.js.map +1 -1
  45. package/esm/models/createdeploymentop.d.ts +0 -37
  46. package/esm/models/createdeploymentop.d.ts.map +1 -1
  47. package/esm/models/createdeploymentop.js +0 -22
  48. package/esm/models/createdeploymentop.js.map +1 -1
  49. package/esm/models/createintegrationstoredirectop.d.ts +152 -152
  50. package/esm/models/createintegrationstoredirectop.js +218 -218
  51. package/esm/models/dangerouslydeletebysrcimagesop.d.ts +44 -0
  52. package/esm/models/dangerouslydeletebysrcimagesop.d.ts.map +1 -0
  53. package/esm/models/dangerouslydeletebysrcimagesop.js +51 -0
  54. package/esm/models/dangerouslydeletebysrcimagesop.js.map +1 -0
  55. package/esm/models/getconfigurationproductsop.d.ts +200 -200
  56. package/esm/models/getconfigurationproductsop.js +290 -290
  57. package/esm/models/getdeploymentop.d.ts +0 -37
  58. package/esm/models/getdeploymentop.d.ts.map +1 -1
  59. package/esm/models/getdeploymentop.js +0 -22
  60. package/esm/models/getdeploymentop.js.map +1 -1
  61. package/esm/models/getmemberop.d.ts +4 -0
  62. package/esm/models/getmemberop.d.ts.map +1 -1
  63. package/esm/models/getmemberop.js +4 -0
  64. package/esm/models/getmemberop.js.map +1 -1
  65. package/esm/models/invalidatebysrcimagesop.d.ts +42 -0
  66. package/esm/models/invalidatebysrcimagesop.d.ts.map +1 -0
  67. package/esm/models/invalidatebysrcimagesop.js +51 -0
  68. package/esm/models/invalidatebysrcimagesop.js.map +1 -0
  69. package/esm/sdk/edgecache.d.ts +16 -0
  70. package/esm/sdk/edgecache.d.ts.map +1 -1
  71. package/esm/sdk/edgecache.js +20 -0
  72. package/esm/sdk/edgecache.js.map +1 -1
  73. package/esm/types/enums.d.ts +1 -8
  74. package/esm/types/enums.d.ts.map +1 -1
  75. package/esm/types/enums.js +1 -18
  76. package/esm/types/enums.js.map +1 -1
  77. package/esm/types/unrecognized.d.ts +10 -0
  78. package/esm/types/unrecognized.d.ts.map +1 -0
  79. package/esm/types/unrecognized.js +23 -0
  80. package/esm/types/unrecognized.js.map +1 -0
  81. package/examples/package-lock.json +1 -1
  82. package/jsr.json +1 -1
  83. package/package.json +1 -1
  84. package/src/__tests__/accessgroups.test.ts +1 -3
  85. package/src/__tests__/checks.test.ts +1 -1
  86. package/src/__tests__/domains.test.ts +4 -10
  87. package/src/__tests__/edgeconfig.test.ts +6 -6
  88. package/src/__tests__/integrations.test.ts +1 -1
  89. package/src/__tests__/logdrains.test.ts +1 -3
  90. package/src/__tests__/rollingrelease.test.ts +2 -6
  91. package/src/__tests__/security.test.ts +4 -4
  92. package/src/funcs/edgeCacheDangerouslyDeleteBySrcImages.ts +171 -0
  93. package/src/funcs/edgeCacheInvalidateBySrcImages.ts +171 -0
  94. package/src/lib/config.ts +3 -3
  95. package/src/mcp-server/mcp-server.ts +1 -1
  96. package/src/mcp-server/server.ts +5 -1
  97. package/src/mcp-server/tools/edgeCacheDangerouslyDeleteBySrcImages.ts +37 -0
  98. package/src/mcp-server/tools/edgeCacheInvalidateBySrcImages.ts +36 -0
  99. package/src/models/canceldeploymentop.ts +0 -76
  100. package/src/models/createdeploymentop.ts +0 -87
  101. package/src/models/createintegrationstoredirectop.ts +471 -471
  102. package/src/models/dangerouslydeletebysrcimagesop.ts +141 -0
  103. package/src/models/getconfigurationproductsop.ts +627 -627
  104. package/src/models/getdeploymentop.ts +0 -88
  105. package/src/models/getmemberop.ts +8 -0
  106. package/src/models/invalidatebysrcimagesop.ts +127 -0
  107. package/src/sdk/edgecache.ts +38 -0
  108. package/src/types/enums.ts +1 -21
  109. package/src/types/unrecognized.ts +27 -0
  110. package/vercel-spec.json +274 -169
@@ -2151,22 +2151,6 @@ export type ResponseBodyFlags =
2151
2151
  | GetDeploymentFlags1
2152
2152
  | Array<GetDeploymentFlags2>;
2153
2153
 
2154
- /**
2155
- * A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. Note: this field will be removed when MFE alias routing is fully rolled out.
2156
- */
2157
- export type GetDeploymentMicrofrontendsApplications = {
2158
- isDefaultApp?: boolean | undefined;
2159
- /**
2160
- * This is the production alias, it will always show the most up to date of each application.
2161
- */
2162
- productionHost: string;
2163
- /**
2164
- * Use the fixed deploymentAlias and deploymentHost so that the microfrontend preview stays in sync with the deployment. These are only present for mono-repos when a single commit creates multiple deployments. If they are not present, productionHost will be used.
2165
- */
2166
- deploymentAlias?: string | undefined;
2167
- deploymentHost?: string | undefined;
2168
- };
2169
-
2170
2154
  /**
2171
2155
  * The result of the microfrontends config upload during deployment creation / build. Only set for default app deployments. The config upload is attempted during deployment create, and then again during the build. If the config is not in the root directory, or the deployment is prebuilt, the config cannot be uploaded during deployment create. The upload during deployment build finds the config even if it's not in the root directory, as it has access to all files. Uploading the config during create is ideal, as then all child deployments are guaranteed to have access to the default app deployment config even if the default app has not yet started building. If the config is not uploaded, the child app will show as building until the config has been uploaded during the default app build. - `success` - The config was uploaded successfully, either when the deployment was created or during the build. - `waiting_on_build` - The config could not be uploaded during deployment create, will be attempted again during the build. - `no_config` - No config was found. Only set once the build has not found the config in any of the deployment's files. - `undefined` - Legacy deployments, or there was an error uploading the config during deployment create.
2172
2156
  */
@@ -2184,12 +2168,6 @@ export type GetDeploymentMicrofrontendsMfeConfigUploadState = ClosedEnum<
2184
2168
 
2185
2169
  export type GetDeploymentMicrofrontends2 = {
2186
2170
  isDefaultApp: boolean;
2187
- /**
2188
- * A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. Note: this field will be removed when MFE alias routing is fully rolled out.
2189
- */
2190
- applications?:
2191
- | { [k: string]: GetDeploymentMicrofrontendsApplications }
2192
- | undefined;
2193
2171
  /**
2194
2172
  * The result of the microfrontends config upload during deployment creation / build. Only set for default app deployments. The config upload is attempted during deployment create, and then again during the build. If the config is not in the root directory, or the deployment is prebuilt, the config cannot be uploaded during deployment create. The upload during deployment build finds the config even if it's not in the root directory, as it has access to all files. Uploading the config during create is ideal, as then all child deployments are guaranteed to have access to the default app deployment config even if the default app has not yet started building. If the config is not uploaded, the child app will show as building until the config has been uploaded during the default app build. - `success` - The config was uploaded successfully, either when the deployment was created or during the build. - `waiting_on_build` - The config could not be uploaded during deployment create, will be attempted again during the build. - `no_config` - No config was found. Only set once the build has not found the config in any of the deployment's files. - `undefined` - Legacy deployments, or there was an error uploading the config during deployment create.
2195
2173
  */
@@ -10019,63 +9997,6 @@ export function responseBodyFlagsFromJSON(
10019
9997
  );
10020
9998
  }
10021
9999
 
10022
- /** @internal */
10023
- export const GetDeploymentMicrofrontendsApplications$inboundSchema: z.ZodType<
10024
- GetDeploymentMicrofrontendsApplications,
10025
- z.ZodTypeDef,
10026
- unknown
10027
- > = z.object({
10028
- isDefaultApp: z.boolean().optional(),
10029
- productionHost: z.string(),
10030
- deploymentAlias: z.string().optional(),
10031
- deploymentHost: z.string().optional(),
10032
- });
10033
- /** @internal */
10034
- export type GetDeploymentMicrofrontendsApplications$Outbound = {
10035
- isDefaultApp?: boolean | undefined;
10036
- productionHost: string;
10037
- deploymentAlias?: string | undefined;
10038
- deploymentHost?: string | undefined;
10039
- };
10040
-
10041
- /** @internal */
10042
- export const GetDeploymentMicrofrontendsApplications$outboundSchema: z.ZodType<
10043
- GetDeploymentMicrofrontendsApplications$Outbound,
10044
- z.ZodTypeDef,
10045
- GetDeploymentMicrofrontendsApplications
10046
- > = z.object({
10047
- isDefaultApp: z.boolean().optional(),
10048
- productionHost: z.string(),
10049
- deploymentAlias: z.string().optional(),
10050
- deploymentHost: z.string().optional(),
10051
- });
10052
-
10053
- export function getDeploymentMicrofrontendsApplicationsToJSON(
10054
- getDeploymentMicrofrontendsApplications:
10055
- GetDeploymentMicrofrontendsApplications,
10056
- ): string {
10057
- return JSON.stringify(
10058
- GetDeploymentMicrofrontendsApplications$outboundSchema.parse(
10059
- getDeploymentMicrofrontendsApplications,
10060
- ),
10061
- );
10062
- }
10063
- export function getDeploymentMicrofrontendsApplicationsFromJSON(
10064
- jsonString: string,
10065
- ): SafeParseResult<
10066
- GetDeploymentMicrofrontendsApplications,
10067
- SDKValidationError
10068
- > {
10069
- return safeParse(
10070
- jsonString,
10071
- (x) =>
10072
- GetDeploymentMicrofrontendsApplications$inboundSchema.parse(
10073
- JSON.parse(x),
10074
- ),
10075
- `Failed to parse 'GetDeploymentMicrofrontendsApplications' from JSON`,
10076
- );
10077
- }
10078
-
10079
10000
  /** @internal */
10080
10001
  export const GetDeploymentMicrofrontendsMfeConfigUploadState$inboundSchema:
10081
10002
  z.ZodNativeEnum<typeof GetDeploymentMicrofrontendsMfeConfigUploadState> = z
@@ -10092,9 +10013,6 @@ export const GetDeploymentMicrofrontends2$inboundSchema: z.ZodType<
10092
10013
  unknown
10093
10014
  > = z.object({
10094
10015
  isDefaultApp: z.boolean(),
10095
- applications: z.record(
10096
- z.lazy(() => GetDeploymentMicrofrontendsApplications$inboundSchema),
10097
- ).optional(),
10098
10016
  mfeConfigUploadState:
10099
10017
  GetDeploymentMicrofrontendsMfeConfigUploadState$inboundSchema.optional(),
10100
10018
  defaultAppProjectName: z.string(),
@@ -10104,9 +10022,6 @@ export const GetDeploymentMicrofrontends2$inboundSchema: z.ZodType<
10104
10022
  /** @internal */
10105
10023
  export type GetDeploymentMicrofrontends2$Outbound = {
10106
10024
  isDefaultApp: boolean;
10107
- applications?: {
10108
- [k: string]: GetDeploymentMicrofrontendsApplications$Outbound;
10109
- } | undefined;
10110
10025
  mfeConfigUploadState?: string | undefined;
10111
10026
  defaultAppProjectName: string;
10112
10027
  defaultRoute?: string | undefined;
@@ -10120,9 +10035,6 @@ export const GetDeploymentMicrofrontends2$outboundSchema: z.ZodType<
10120
10035
  GetDeploymentMicrofrontends2
10121
10036
  > = z.object({
10122
10037
  isDefaultApp: z.boolean(),
10123
- applications: z.record(
10124
- z.lazy(() => GetDeploymentMicrofrontendsApplications$outboundSchema),
10125
- ).optional(),
10126
10038
  mfeConfigUploadState:
10127
10039
  GetDeploymentMicrofrontendsMfeConfigUploadState$outboundSchema.optional(),
10128
10040
  defaultAppProjectName: z.string(),
@@ -31,6 +31,8 @@ export type GetMemberResponseBody = {
31
31
  * "The `ADMIN` role, by default, is provided to users capable of installing integrations, while the `USER` role can be granted to Vercel users with the Vercel `Billing` or Vercel `Viewer` role, which are considered to be Read-Only roles."
32
32
  */
33
33
  role: GetMemberRole;
34
+ globalUserId?: string | undefined;
35
+ userEmail?: string | undefined;
34
36
  };
35
37
 
36
38
  /** @internal */
@@ -92,11 +94,15 @@ export const GetMemberResponseBody$inboundSchema: z.ZodType<
92
94
  > = z.object({
93
95
  id: z.string(),
94
96
  role: GetMemberRole$inboundSchema,
97
+ globalUserId: z.string().optional(),
98
+ userEmail: z.string().optional(),
95
99
  });
96
100
  /** @internal */
97
101
  export type GetMemberResponseBody$Outbound = {
98
102
  id: string;
99
103
  role: string;
104
+ globalUserId?: string | undefined;
105
+ userEmail?: string | undefined;
100
106
  };
101
107
 
102
108
  /** @internal */
@@ -107,6 +113,8 @@ export const GetMemberResponseBody$outboundSchema: z.ZodType<
107
113
  > = z.object({
108
114
  id: z.string(),
109
115
  role: GetMemberRole$outboundSchema,
116
+ globalUserId: z.string().optional(),
117
+ userEmail: z.string().optional(),
110
118
  });
111
119
 
112
120
  export function getMemberResponseBodyToJSON(
@@ -0,0 +1,127 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./sdkvalidationerror.js";
10
+
11
+ export type InvalidateBySrcImagesRequestBody = {
12
+ srcImages: Array<string>;
13
+ };
14
+
15
+ export type InvalidateBySrcImagesRequest = {
16
+ projectIdOrName: string;
17
+ /**
18
+ * The Team identifier to perform the request on behalf of.
19
+ */
20
+ teamId?: string | undefined;
21
+ /**
22
+ * The Team slug to perform the request on behalf of.
23
+ */
24
+ slug?: string | undefined;
25
+ requestBody?: InvalidateBySrcImagesRequestBody | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const InvalidateBySrcImagesRequestBody$inboundSchema: z.ZodType<
30
+ InvalidateBySrcImagesRequestBody,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ srcImages: z.array(z.string()),
35
+ });
36
+ /** @internal */
37
+ export type InvalidateBySrcImagesRequestBody$Outbound = {
38
+ srcImages: Array<string>;
39
+ };
40
+
41
+ /** @internal */
42
+ export const InvalidateBySrcImagesRequestBody$outboundSchema: z.ZodType<
43
+ InvalidateBySrcImagesRequestBody$Outbound,
44
+ z.ZodTypeDef,
45
+ InvalidateBySrcImagesRequestBody
46
+ > = z.object({
47
+ srcImages: z.array(z.string()),
48
+ });
49
+
50
+ export function invalidateBySrcImagesRequestBodyToJSON(
51
+ invalidateBySrcImagesRequestBody: InvalidateBySrcImagesRequestBody,
52
+ ): string {
53
+ return JSON.stringify(
54
+ InvalidateBySrcImagesRequestBody$outboundSchema.parse(
55
+ invalidateBySrcImagesRequestBody,
56
+ ),
57
+ );
58
+ }
59
+ export function invalidateBySrcImagesRequestBodyFromJSON(
60
+ jsonString: string,
61
+ ): SafeParseResult<InvalidateBySrcImagesRequestBody, SDKValidationError> {
62
+ return safeParse(
63
+ jsonString,
64
+ (x) => InvalidateBySrcImagesRequestBody$inboundSchema.parse(JSON.parse(x)),
65
+ `Failed to parse 'InvalidateBySrcImagesRequestBody' from JSON`,
66
+ );
67
+ }
68
+
69
+ /** @internal */
70
+ export const InvalidateBySrcImagesRequest$inboundSchema: z.ZodType<
71
+ InvalidateBySrcImagesRequest,
72
+ z.ZodTypeDef,
73
+ unknown
74
+ > = z.object({
75
+ projectIdOrName: z.string(),
76
+ teamId: z.string().optional(),
77
+ slug: z.string().optional(),
78
+ RequestBody: z.lazy(() => InvalidateBySrcImagesRequestBody$inboundSchema)
79
+ .optional(),
80
+ }).transform((v) => {
81
+ return remap$(v, {
82
+ "RequestBody": "requestBody",
83
+ });
84
+ });
85
+ /** @internal */
86
+ export type InvalidateBySrcImagesRequest$Outbound = {
87
+ projectIdOrName: string;
88
+ teamId?: string | undefined;
89
+ slug?: string | undefined;
90
+ RequestBody?: InvalidateBySrcImagesRequestBody$Outbound | undefined;
91
+ };
92
+
93
+ /** @internal */
94
+ export const InvalidateBySrcImagesRequest$outboundSchema: z.ZodType<
95
+ InvalidateBySrcImagesRequest$Outbound,
96
+ z.ZodTypeDef,
97
+ InvalidateBySrcImagesRequest
98
+ > = z.object({
99
+ projectIdOrName: z.string(),
100
+ teamId: z.string().optional(),
101
+ slug: z.string().optional(),
102
+ requestBody: z.lazy(() => InvalidateBySrcImagesRequestBody$outboundSchema)
103
+ .optional(),
104
+ }).transform((v) => {
105
+ return remap$(v, {
106
+ requestBody: "RequestBody",
107
+ });
108
+ });
109
+
110
+ export function invalidateBySrcImagesRequestToJSON(
111
+ invalidateBySrcImagesRequest: InvalidateBySrcImagesRequest,
112
+ ): string {
113
+ return JSON.stringify(
114
+ InvalidateBySrcImagesRequest$outboundSchema.parse(
115
+ invalidateBySrcImagesRequest,
116
+ ),
117
+ );
118
+ }
119
+ export function invalidateBySrcImagesRequestFromJSON(
120
+ jsonString: string,
121
+ ): SafeParseResult<InvalidateBySrcImagesRequest, SDKValidationError> {
122
+ return safeParse(
123
+ jsonString,
124
+ (x) => InvalidateBySrcImagesRequest$inboundSchema.parse(JSON.parse(x)),
125
+ `Failed to parse 'InvalidateBySrcImagesRequest' from JSON`,
126
+ );
127
+ }
@@ -2,10 +2,14 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { edgeCacheDangerouslyDeleteBySrcImages } from "../funcs/edgeCacheDangerouslyDeleteBySrcImages.js";
5
6
  import { edgeCacheDangerouslyDeleteByTags } from "../funcs/edgeCacheDangerouslyDeleteByTags.js";
7
+ import { edgeCacheInvalidateBySrcImages } from "../funcs/edgeCacheInvalidateBySrcImages.js";
6
8
  import { edgeCacheInvalidateByTags } from "../funcs/edgeCacheInvalidateByTags.js";
7
9
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
10
+ import { DangerouslyDeleteBySrcImagesRequest } from "../models/dangerouslydeletebysrcimagesop.js";
8
11
  import { DangerouslyDeleteByTagsRequest } from "../models/dangerouslydeletebytagsop.js";
12
+ import { InvalidateBySrcImagesRequest } from "../models/invalidatebysrcimagesop.js";
9
13
  import { InvalidateByTagsRequest } from "../models/invalidatebytagsop.js";
10
14
  import { unwrapAsync } from "../types/fp.js";
11
15
 
@@ -43,4 +47,38 @@ export class EdgeCache extends ClientSDK {
43
47
  options,
44
48
  ));
45
49
  }
50
+
51
+ /**
52
+ * Invalidate by source image
53
+ *
54
+ * @remarks
55
+ * Marks a source image as stale, causing its corresponding transformed images to be revalidated in the background on the next request.
56
+ */
57
+ async invalidateBySrcImages(
58
+ request: InvalidateBySrcImagesRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<void> {
61
+ return unwrapAsync(edgeCacheInvalidateBySrcImages(
62
+ this,
63
+ request,
64
+ options,
65
+ ));
66
+ }
67
+
68
+ /**
69
+ * Dangerously delete by source image
70
+ *
71
+ * @remarks
72
+ * Marks a source image as deleted, causing cache entries associated with that source image to be revalidated in the foreground on the next request. Use this method with caution because one source image can be associated with many paths and deleting the cache can cause many concurrent requests to the origin leading to cache stampede problem. A good use case for deleting the cache is when the origin has also been deleted, for example it returns a 404 or 410 status code.
73
+ */
74
+ async dangerouslyDeleteBySrcImages(
75
+ request: DangerouslyDeleteBySrcImagesRequest,
76
+ options?: RequestOptions,
77
+ ): Promise<void> {
78
+ return unwrapAsync(edgeCacheDangerouslyDeleteBySrcImages(
79
+ this,
80
+ request,
81
+ options,
82
+ ));
83
+ }
46
84
  }
@@ -3,34 +3,14 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { Unrecognized, unrecognized } from "./unrecognized.js";
6
7
 
7
- declare const __brand: unique symbol;
8
- export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
9
8
  export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
10
9
  T[keyof T];
11
10
  export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
12
11
  | T[keyof T]
13
12
  | Unrecognized<T[keyof T] extends number ? number : string>;
14
13
 
15
- function unrecognized<T>(value: T): Unrecognized<T> {
16
- unrecognizedCount++;
17
- return value as Unrecognized<T>;
18
- }
19
-
20
- let unrecognizedCount = 0;
21
- let refCount = 0;
22
- export function unrecognizedCounter() {
23
- refCount++;
24
- const start = unrecognizedCount;
25
- return {
26
- count: () => {
27
- const count = unrecognizedCount - start;
28
- if (--refCount === 0) unrecognizedCount = 0;
29
- return count;
30
- },
31
- };
32
- }
33
-
34
14
  export function inboundSchema<T extends Record<string, string>>(
35
15
  enumObj: T,
36
16
  ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ declare const __brand: unique symbol;
6
+ export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
7
+
8
+ function unrecognized<T>(value: T): Unrecognized<T> {
9
+ globalCount++;
10
+ return value as Unrecognized<T>;
11
+ }
12
+
13
+ let globalCount = 0;
14
+ let refCount = 0;
15
+ export function startCountingUnrecognized() {
16
+ refCount++;
17
+ const start = globalCount;
18
+ return {
19
+ end: () => {
20
+ const count = globalCount - start;
21
+ if (--refCount === 0) globalCount = 0;
22
+ return count;
23
+ },
24
+ };
25
+ }
26
+
27
+ export { unrecognized };