dub 0.30.2 → 0.30.4
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/README.md +2 -4
- package/docs/sdks/domains/README.md +0 -105
- package/docs/sdks/tags/README.md +54 -3
- package/docs/sdks/workspaces/README.md +10 -61
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/operations/bulkcreatelinks.d.ts +3 -0
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/createdomain.d.ts +3 -0
- package/models/operations/createdomain.d.ts.map +1 -1
- package/models/operations/createdomain.js.map +1 -1
- package/models/operations/createlink.d.ts +3 -0
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/createtag.d.ts +12 -2
- package/models/operations/createtag.d.ts.map +1 -1
- package/models/operations/createtag.js +4 -2
- package/models/operations/createtag.js.map +1 -1
- package/models/operations/deletedomain.d.ts +3 -0
- package/models/operations/deletedomain.d.ts.map +1 -1
- package/models/operations/deletedomain.js.map +1 -1
- package/models/operations/deletelink.d.ts +3 -0
- package/models/operations/deletelink.d.ts.map +1 -1
- package/models/operations/deletelink.js.map +1 -1
- package/models/operations/getlinkinfo.d.ts +3 -0
- package/models/operations/getlinkinfo.d.ts.map +1 -1
- package/models/operations/getlinkinfo.js.map +1 -1
- package/models/operations/getlinks.d.ts +3 -0
- package/models/operations/getlinks.d.ts.map +1 -1
- package/models/operations/getlinks.js +2 -2
- package/models/operations/getlinks.js.map +1 -1
- package/models/operations/getlinkscount.d.ts +3 -0
- package/models/operations/getlinkscount.d.ts.map +1 -1
- package/models/operations/getlinkscount.js.map +1 -1
- package/models/operations/gettags.d.ts +3 -0
- package/models/operations/gettags.d.ts.map +1 -1
- package/models/operations/gettags.js.map +1 -1
- package/models/operations/index.d.ts +2 -3
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -3
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdomains.d.ts +3 -0
- package/models/operations/listdomains.d.ts.map +1 -1
- package/models/operations/listdomains.js.map +1 -1
- package/models/operations/retrieveanalytics.d.ts +3 -0
- package/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/models/operations/retrieveanalytics.js.map +1 -1
- package/models/operations/trackcustomer.d.ts +3 -0
- package/models/operations/trackcustomer.d.ts.map +1 -1
- package/models/operations/trackcustomer.js.map +1 -1
- package/models/operations/tracklead.d.ts +3 -0
- package/models/operations/tracklead.d.ts.map +1 -1
- package/models/operations/tracklead.js.map +1 -1
- package/models/operations/tracksale.d.ts +3 -0
- package/models/operations/tracksale.d.ts.map +1 -1
- package/models/operations/tracksale.js.map +1 -1
- package/models/operations/updatedomain.d.ts +3 -0
- package/models/operations/updatedomain.d.ts.map +1 -1
- package/models/operations/updatedomain.js.map +1 -1
- package/models/operations/updatelink.d.ts +3 -0
- package/models/operations/updatelink.d.ts.map +1 -1
- package/models/operations/updatelink.js.map +1 -1
- package/models/operations/updatetag.d.ts +85 -0
- package/models/operations/updatetag.d.ts.map +1 -0
- package/models/operations/updatetag.js +100 -0
- package/models/operations/updatetag.js.map +1 -0
- package/models/operations/updateworkspace.d.ts +16 -0
- package/models/operations/updateworkspace.d.ts.map +1 -0
- package/models/operations/{createworkspace.js → updateworkspace.js} +9 -13
- package/models/operations/updateworkspace.js.map +1 -0
- package/models/operations/upsertlink.d.ts +3 -0
- package/models/operations/upsertlink.d.ts.map +1 -1
- package/models/operations/upsertlink.js.map +1 -1
- package/package.json +1 -1
- package/sdk/domains.d.ts +0 -14
- package/sdk/domains.d.ts.map +1 -1
- package/sdk/domains.js +0 -166
- package/sdk/domains.js.map +1 -1
- package/sdk/tags.d.ts +7 -0
- package/sdk/tags.d.ts.map +1 -1
- package/sdk/tags.js +81 -0
- package/sdk/tags.js.map +1 -1
- package/sdk/workspaces.d.ts +6 -13
- package/sdk/workspaces.d.ts.map +1 -1
- package/sdk/workspaces.js +20 -86
- package/sdk/workspaces.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/operations/bulkcreatelinks.ts +3 -0
- package/src/models/operations/createdomain.ts +3 -0
- package/src/models/operations/createlink.ts +3 -0
- package/src/models/operations/createtag.ts +16 -4
- package/src/models/operations/deletedomain.ts +3 -0
- package/src/models/operations/deletelink.ts +3 -0
- package/src/models/operations/getlinkinfo.ts +3 -0
- package/src/models/operations/getlinks.ts +5 -2
- package/src/models/operations/getlinkscount.ts +3 -0
- package/src/models/operations/gettags.ts +3 -0
- package/src/models/operations/index.ts +2 -3
- package/src/models/operations/listdomains.ts +3 -0
- package/src/models/operations/retrieveanalytics.ts +3 -0
- package/src/models/operations/trackcustomer.ts +3 -0
- package/src/models/operations/tracklead.ts +3 -0
- package/src/models/operations/tracksale.ts +3 -0
- package/src/models/operations/updatedomain.ts +3 -0
- package/src/models/operations/updatelink.ts +3 -0
- package/src/models/operations/updatetag.ts +138 -0
- package/src/models/operations/updateworkspace.ts +30 -0
- package/src/models/operations/upsertlink.ts +3 -0
- package/src/sdk/domains.ts +0 -202
- package/src/sdk/tags.ts +101 -0
- package/src/sdk/workspaces.ts +23 -102
- package/models/operations/createworkspace.d.ts +0 -17
- package/models/operations/createworkspace.d.ts.map +0 -1
- package/models/operations/createworkspace.js.map +0 -1
- package/models/operations/setprimarydomain.d.ts +0 -32
- package/models/operations/setprimarydomain.d.ts.map +0 -1
- package/models/operations/setprimarydomain.js +0 -53
- package/models/operations/setprimarydomain.js.map +0 -1
- package/models/operations/transferdomain.d.ts +0 -48
- package/models/operations/transferdomain.d.ts.map +0 -1
- package/models/operations/transferdomain.js +0 -78
- package/models/operations/transferdomain.js.map +0 -1
- package/src/models/operations/createworkspace.ts +0 -34
- package/src/models/operations/setprimarydomain.ts +0 -57
- package/src/models/operations/transferdomain.ts +0 -95
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
export type GetTagsGlobals = {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10
|
+
*/
|
|
8
11
|
workspaceId?: string | undefined;
|
|
9
12
|
/**
|
|
10
13
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -6,7 +6,6 @@ export * from "./bulkcreatelinks.js";
|
|
|
6
6
|
export * from "./createdomain.js";
|
|
7
7
|
export * from "./createlink.js";
|
|
8
8
|
export * from "./createtag.js";
|
|
9
|
-
export * from "./createworkspace.js";
|
|
10
9
|
export * from "./deletedomain.js";
|
|
11
10
|
export * from "./deletelink.js";
|
|
12
11
|
export * from "./getlinkinfo.js";
|
|
@@ -18,11 +17,11 @@ export * from "./gettags.js";
|
|
|
18
17
|
export * from "./getworkspace.js";
|
|
19
18
|
export * from "./listdomains.js";
|
|
20
19
|
export * from "./retrieveanalytics.js";
|
|
21
|
-
export * from "./setprimarydomain.js";
|
|
22
20
|
export * from "./trackcustomer.js";
|
|
23
21
|
export * from "./tracklead.js";
|
|
24
22
|
export * from "./tracksale.js";
|
|
25
|
-
export * from "./transferdomain.js";
|
|
26
23
|
export * from "./updatedomain.js";
|
|
27
24
|
export * from "./updatelink.js";
|
|
25
|
+
export * from "./updatetag.js";
|
|
26
|
+
export * from "./updateworkspace.js";
|
|
28
27
|
export * from "./upsertlink.js";
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
export type ListDomainsGlobals = {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10
|
+
*/
|
|
8
11
|
workspaceId?: string | undefined;
|
|
9
12
|
/**
|
|
10
13
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -7,6 +7,9 @@ import * as components from "../components/index.js";
|
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
|
|
9
9
|
export type RetrieveAnalyticsGlobals = {
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
12
|
+
*/
|
|
10
13
|
workspaceId?: string | undefined;
|
|
11
14
|
/**
|
|
12
15
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
export type TrackCustomerGlobals = {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10
|
+
*/
|
|
8
11
|
workspaceId?: string | undefined;
|
|
9
12
|
/**
|
|
10
13
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
export type TrackLeadGlobals = {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10
|
+
*/
|
|
8
11
|
workspaceId?: string | undefined;
|
|
9
12
|
/**
|
|
10
13
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -6,6 +6,9 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
export type TrackSaleGlobals = {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
11
|
+
*/
|
|
9
12
|
workspaceId?: string | undefined;
|
|
10
13
|
/**
|
|
11
14
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -6,6 +6,9 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
export type UpdateDomainGlobals = {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
11
|
+
*/
|
|
9
12
|
workspaceId?: string | undefined;
|
|
10
13
|
/**
|
|
11
14
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -7,6 +7,9 @@ import * as components from "../components/index.js";
|
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
|
|
9
9
|
export type UpdateLinkGlobals = {
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
12
|
+
*/
|
|
10
13
|
workspaceId?: string | undefined;
|
|
11
14
|
/**
|
|
12
15
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
import * as z from "zod";
|
|
8
|
+
|
|
9
|
+
export type UpdateTagGlobals = {
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
12
|
+
*/
|
|
13
|
+
workspaceId?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
16
|
+
*/
|
|
17
|
+
projectSlug?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
|
22
|
+
*/
|
|
23
|
+
export const UpdateTagColor = {
|
|
24
|
+
Red: "red",
|
|
25
|
+
Yellow: "yellow",
|
|
26
|
+
Green: "green",
|
|
27
|
+
Blue: "blue",
|
|
28
|
+
Purple: "purple",
|
|
29
|
+
Pink: "pink",
|
|
30
|
+
Brown: "brown",
|
|
31
|
+
} as const;
|
|
32
|
+
/**
|
|
33
|
+
* The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
|
34
|
+
*/
|
|
35
|
+
export type UpdateTagColor = ClosedEnum<typeof UpdateTagColor>;
|
|
36
|
+
|
|
37
|
+
export type UpdateTagRequestBody = {
|
|
38
|
+
/**
|
|
39
|
+
* The name of the tag to create.
|
|
40
|
+
*/
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
|
44
|
+
*/
|
|
45
|
+
color?: UpdateTagColor | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The name of the tag to create.
|
|
48
|
+
*
|
|
49
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
50
|
+
*/
|
|
51
|
+
tag?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type UpdateTagRequest = {
|
|
55
|
+
/**
|
|
56
|
+
* The ID of the tag
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
requestBody?: UpdateTagRequestBody | undefined;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export namespace UpdateTagGlobals$ {
|
|
64
|
+
export const inboundSchema: z.ZodType<UpdateTagGlobals, z.ZodTypeDef, unknown> = z.object({
|
|
65
|
+
workspaceId: z.string().optional(),
|
|
66
|
+
projectSlug: z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export type Outbound = {
|
|
70
|
+
workspaceId?: string | undefined;
|
|
71
|
+
projectSlug?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateTagGlobals> = z.object({
|
|
75
|
+
workspaceId: z.string().optional(),
|
|
76
|
+
projectSlug: z.string().optional(),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export namespace UpdateTagColor$ {
|
|
82
|
+
export const inboundSchema: z.ZodNativeEnum<typeof UpdateTagColor> =
|
|
83
|
+
z.nativeEnum(UpdateTagColor);
|
|
84
|
+
export const outboundSchema: z.ZodNativeEnum<typeof UpdateTagColor> = inboundSchema;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export namespace UpdateTagRequestBody$ {
|
|
89
|
+
export const inboundSchema: z.ZodType<UpdateTagRequestBody, z.ZodTypeDef, unknown> = z.object({
|
|
90
|
+
name: z.string().optional(),
|
|
91
|
+
color: UpdateTagColor$.inboundSchema.optional(),
|
|
92
|
+
tag: z.string().optional(),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export type Outbound = {
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
color?: string | undefined;
|
|
98
|
+
tag?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateTagRequestBody> = z.object(
|
|
102
|
+
{
|
|
103
|
+
name: z.string().optional(),
|
|
104
|
+
color: UpdateTagColor$.outboundSchema.optional(),
|
|
105
|
+
tag: z.string().optional(),
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export namespace UpdateTagRequest$ {
|
|
112
|
+
export const inboundSchema: z.ZodType<UpdateTagRequest, z.ZodTypeDef, unknown> = z
|
|
113
|
+
.object({
|
|
114
|
+
id: z.string(),
|
|
115
|
+
RequestBody: z.lazy(() => UpdateTagRequestBody$.inboundSchema).optional(),
|
|
116
|
+
})
|
|
117
|
+
.transform((v) => {
|
|
118
|
+
return remap$(v, {
|
|
119
|
+
RequestBody: "requestBody",
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export type Outbound = {
|
|
124
|
+
id: string;
|
|
125
|
+
RequestBody?: UpdateTagRequestBody$.Outbound | undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateTagRequest> = z
|
|
129
|
+
.object({
|
|
130
|
+
id: z.string(),
|
|
131
|
+
requestBody: z.lazy(() => UpdateTagRequestBody$.outboundSchema).optional(),
|
|
132
|
+
})
|
|
133
|
+
.transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
requestBody: "RequestBody",
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type UpdateWorkspaceRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The ID or slug of the workspace.
|
|
10
|
+
*/
|
|
11
|
+
idOrSlug: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export namespace UpdateWorkspaceRequest$ {
|
|
16
|
+
export const inboundSchema: z.ZodType<UpdateWorkspaceRequest, z.ZodTypeDef, unknown> = z.object(
|
|
17
|
+
{
|
|
18
|
+
idOrSlug: z.string(),
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export type Outbound = {
|
|
23
|
+
idOrSlug: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateWorkspaceRequest> =
|
|
27
|
+
z.object({
|
|
28
|
+
idOrSlug: z.string(),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -6,6 +6,9 @@ import * as components from "../components/index.js";
|
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
export type UpsertLinkGlobals = {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
11
|
+
*/
|
|
9
12
|
workspaceId?: string | undefined;
|
|
10
13
|
/**
|
|
11
14
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
package/src/sdk/domains.ts
CHANGED
|
@@ -435,206 +435,4 @@ export class Domains extends ClientSDK {
|
|
|
435
435
|
|
|
436
436
|
return result$;
|
|
437
437
|
}
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Set a domain as primary
|
|
441
|
-
*
|
|
442
|
-
* @remarks
|
|
443
|
-
* Set a domain as primary for the authenticated workspace.
|
|
444
|
-
*/
|
|
445
|
-
async setPrimary(slug: string, options?: RequestOptions): Promise<components.DomainSchema> {
|
|
446
|
-
const input$: operations.SetPrimaryDomainRequest = {
|
|
447
|
-
slug: slug,
|
|
448
|
-
};
|
|
449
|
-
const headers$ = new Headers();
|
|
450
|
-
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
451
|
-
headers$.set("Accept", "application/json");
|
|
452
|
-
|
|
453
|
-
const payload$ = schemas$.parse(
|
|
454
|
-
input$,
|
|
455
|
-
(value$) => operations.SetPrimaryDomainRequest$.outboundSchema.parse(value$),
|
|
456
|
-
"Input validation failed"
|
|
457
|
-
);
|
|
458
|
-
const body$ = null;
|
|
459
|
-
|
|
460
|
-
const pathParams$ = {
|
|
461
|
-
slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }),
|
|
462
|
-
};
|
|
463
|
-
const path$ = this.templateURLComponent("/domains/{slug}/primary")(pathParams$);
|
|
464
|
-
|
|
465
|
-
const query$ = encodeFormQuery$({
|
|
466
|
-
projectSlug: this.options$.projectSlug,
|
|
467
|
-
workspaceId: this.options$.workspaceId,
|
|
468
|
-
});
|
|
469
|
-
|
|
470
|
-
let security$;
|
|
471
|
-
if (typeof this.options$.token === "function") {
|
|
472
|
-
security$ = { token: await this.options$.token() };
|
|
473
|
-
} else if (this.options$.token) {
|
|
474
|
-
security$ = { token: this.options$.token };
|
|
475
|
-
} else {
|
|
476
|
-
security$ = {};
|
|
477
|
-
}
|
|
478
|
-
const context = {
|
|
479
|
-
operationID: "setPrimaryDomain",
|
|
480
|
-
oAuth2Scopes: [],
|
|
481
|
-
securitySource: this.options$.token,
|
|
482
|
-
};
|
|
483
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
484
|
-
|
|
485
|
-
const doOptions = {
|
|
486
|
-
context,
|
|
487
|
-
errorCodes: [
|
|
488
|
-
"400",
|
|
489
|
-
"401",
|
|
490
|
-
"403",
|
|
491
|
-
"404",
|
|
492
|
-
"409",
|
|
493
|
-
"410",
|
|
494
|
-
"422",
|
|
495
|
-
"429",
|
|
496
|
-
"4XX",
|
|
497
|
-
"500",
|
|
498
|
-
"5XX",
|
|
499
|
-
],
|
|
500
|
-
};
|
|
501
|
-
const request$ = this.createRequest$(
|
|
502
|
-
context,
|
|
503
|
-
{
|
|
504
|
-
security: securitySettings$,
|
|
505
|
-
method: "POST",
|
|
506
|
-
path: path$,
|
|
507
|
-
headers: headers$,
|
|
508
|
-
query: query$,
|
|
509
|
-
body: body$,
|
|
510
|
-
},
|
|
511
|
-
options
|
|
512
|
-
);
|
|
513
|
-
|
|
514
|
-
const response = await this.do$(request$, doOptions);
|
|
515
|
-
|
|
516
|
-
const responseFields$ = {
|
|
517
|
-
HttpMeta: { Response: response, Request: request$ },
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
const [result$] = await this.matcher<components.DomainSchema>()
|
|
521
|
-
.json(200, components.DomainSchema$)
|
|
522
|
-
.json(400, errors.BadRequest$, { err: true })
|
|
523
|
-
.json(401, errors.Unauthorized$, { err: true })
|
|
524
|
-
.json(403, errors.Forbidden$, { err: true })
|
|
525
|
-
.json(404, errors.NotFound$, { err: true })
|
|
526
|
-
.json(409, errors.Conflict$, { err: true })
|
|
527
|
-
.json(410, errors.InviteExpired$, { err: true })
|
|
528
|
-
.json(422, errors.UnprocessableEntity$, { err: true })
|
|
529
|
-
.json(429, errors.RateLimitExceeded$, { err: true })
|
|
530
|
-
.json(500, errors.InternalServerError$, { err: true })
|
|
531
|
-
.fail(["4XX", "5XX"])
|
|
532
|
-
.match(response, { extraFields: responseFields$ });
|
|
533
|
-
|
|
534
|
-
return result$;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* Transfer a domain
|
|
539
|
-
*
|
|
540
|
-
* @remarks
|
|
541
|
-
* Transfer a domain to another workspace within the authenticated account.
|
|
542
|
-
*/
|
|
543
|
-
async transfer(
|
|
544
|
-
slug: string,
|
|
545
|
-
requestBody?: operations.TransferDomainRequestBody | undefined,
|
|
546
|
-
options?: RequestOptions
|
|
547
|
-
): Promise<components.DomainSchema> {
|
|
548
|
-
const input$: operations.TransferDomainRequest = {
|
|
549
|
-
slug: slug,
|
|
550
|
-
requestBody: requestBody,
|
|
551
|
-
};
|
|
552
|
-
const headers$ = new Headers();
|
|
553
|
-
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
554
|
-
headers$.set("Content-Type", "application/json");
|
|
555
|
-
headers$.set("Accept", "application/json");
|
|
556
|
-
|
|
557
|
-
const payload$ = schemas$.parse(
|
|
558
|
-
input$,
|
|
559
|
-
(value$) => operations.TransferDomainRequest$.outboundSchema.parse(value$),
|
|
560
|
-
"Input validation failed"
|
|
561
|
-
);
|
|
562
|
-
const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true });
|
|
563
|
-
|
|
564
|
-
const pathParams$ = {
|
|
565
|
-
slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }),
|
|
566
|
-
};
|
|
567
|
-
const path$ = this.templateURLComponent("/domains/{slug}/transfer")(pathParams$);
|
|
568
|
-
|
|
569
|
-
const query$ = encodeFormQuery$({
|
|
570
|
-
projectSlug: this.options$.projectSlug,
|
|
571
|
-
workspaceId: this.options$.workspaceId,
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
let security$;
|
|
575
|
-
if (typeof this.options$.token === "function") {
|
|
576
|
-
security$ = { token: await this.options$.token() };
|
|
577
|
-
} else if (this.options$.token) {
|
|
578
|
-
security$ = { token: this.options$.token };
|
|
579
|
-
} else {
|
|
580
|
-
security$ = {};
|
|
581
|
-
}
|
|
582
|
-
const context = {
|
|
583
|
-
operationID: "transferDomain",
|
|
584
|
-
oAuth2Scopes: [],
|
|
585
|
-
securitySource: this.options$.token,
|
|
586
|
-
};
|
|
587
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
588
|
-
|
|
589
|
-
const doOptions = {
|
|
590
|
-
context,
|
|
591
|
-
errorCodes: [
|
|
592
|
-
"400",
|
|
593
|
-
"401",
|
|
594
|
-
"403",
|
|
595
|
-
"404",
|
|
596
|
-
"409",
|
|
597
|
-
"410",
|
|
598
|
-
"422",
|
|
599
|
-
"429",
|
|
600
|
-
"4XX",
|
|
601
|
-
"500",
|
|
602
|
-
"5XX",
|
|
603
|
-
],
|
|
604
|
-
};
|
|
605
|
-
const request$ = this.createRequest$(
|
|
606
|
-
context,
|
|
607
|
-
{
|
|
608
|
-
security: securitySettings$,
|
|
609
|
-
method: "POST",
|
|
610
|
-
path: path$,
|
|
611
|
-
headers: headers$,
|
|
612
|
-
query: query$,
|
|
613
|
-
body: body$,
|
|
614
|
-
},
|
|
615
|
-
options
|
|
616
|
-
);
|
|
617
|
-
|
|
618
|
-
const response = await this.do$(request$, doOptions);
|
|
619
|
-
|
|
620
|
-
const responseFields$ = {
|
|
621
|
-
HttpMeta: { Response: response, Request: request$ },
|
|
622
|
-
};
|
|
623
|
-
|
|
624
|
-
const [result$] = await this.matcher<components.DomainSchema>()
|
|
625
|
-
.json(200, components.DomainSchema$)
|
|
626
|
-
.json(400, errors.BadRequest$, { err: true })
|
|
627
|
-
.json(401, errors.Unauthorized$, { err: true })
|
|
628
|
-
.json(403, errors.Forbidden$, { err: true })
|
|
629
|
-
.json(404, errors.NotFound$, { err: true })
|
|
630
|
-
.json(409, errors.Conflict$, { err: true })
|
|
631
|
-
.json(410, errors.InviteExpired$, { err: true })
|
|
632
|
-
.json(422, errors.UnprocessableEntity$, { err: true })
|
|
633
|
-
.json(429, errors.RateLimitExceeded$, { err: true })
|
|
634
|
-
.json(500, errors.InternalServerError$, { err: true })
|
|
635
|
-
.fail(["4XX", "5XX"])
|
|
636
|
-
.match(response, { extraFields: responseFields$ });
|
|
637
|
-
|
|
638
|
-
return result$;
|
|
639
|
-
}
|
|
640
438
|
}
|
package/src/sdk/tags.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js
|
|
|
7
7
|
import {
|
|
8
8
|
encodeFormQuery as encodeFormQuery$,
|
|
9
9
|
encodeJSON as encodeJSON$,
|
|
10
|
+
encodeSimple as encodeSimple$,
|
|
10
11
|
} from "../lib/encodings.js";
|
|
11
12
|
import { HTTPClient } from "../lib/http.js";
|
|
12
13
|
import * as schemas$ from "../lib/schemas.js";
|
|
@@ -229,4 +230,104 @@ export class Tags extends ClientSDK {
|
|
|
229
230
|
|
|
230
231
|
return result$;
|
|
231
232
|
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Update a tag
|
|
236
|
+
*
|
|
237
|
+
* @remarks
|
|
238
|
+
* Update a tag in the workspace.
|
|
239
|
+
*/
|
|
240
|
+
async update(
|
|
241
|
+
request: operations.UpdateTagRequest,
|
|
242
|
+
options?: RequestOptions
|
|
243
|
+
): Promise<components.TagSchema> {
|
|
244
|
+
const input$ = request;
|
|
245
|
+
const headers$ = new Headers();
|
|
246
|
+
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
247
|
+
headers$.set("Content-Type", "application/json");
|
|
248
|
+
headers$.set("Accept", "application/json");
|
|
249
|
+
|
|
250
|
+
const payload$ = schemas$.parse(
|
|
251
|
+
input$,
|
|
252
|
+
(value$) => operations.UpdateTagRequest$.outboundSchema.parse(value$),
|
|
253
|
+
"Input validation failed"
|
|
254
|
+
);
|
|
255
|
+
const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true });
|
|
256
|
+
|
|
257
|
+
const pathParams$ = {
|
|
258
|
+
id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }),
|
|
259
|
+
};
|
|
260
|
+
const path$ = this.templateURLComponent("/tags/{id}")(pathParams$);
|
|
261
|
+
|
|
262
|
+
const query$ = encodeFormQuery$({
|
|
263
|
+
projectSlug: this.options$.projectSlug,
|
|
264
|
+
workspaceId: this.options$.workspaceId,
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
let security$;
|
|
268
|
+
if (typeof this.options$.token === "function") {
|
|
269
|
+
security$ = { token: await this.options$.token() };
|
|
270
|
+
} else if (this.options$.token) {
|
|
271
|
+
security$ = { token: this.options$.token };
|
|
272
|
+
} else {
|
|
273
|
+
security$ = {};
|
|
274
|
+
}
|
|
275
|
+
const context = {
|
|
276
|
+
operationID: "updateTag",
|
|
277
|
+
oAuth2Scopes: [],
|
|
278
|
+
securitySource: this.options$.token,
|
|
279
|
+
};
|
|
280
|
+
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
281
|
+
|
|
282
|
+
const doOptions = {
|
|
283
|
+
context,
|
|
284
|
+
errorCodes: [
|
|
285
|
+
"400",
|
|
286
|
+
"401",
|
|
287
|
+
"403",
|
|
288
|
+
"404",
|
|
289
|
+
"409",
|
|
290
|
+
"410",
|
|
291
|
+
"422",
|
|
292
|
+
"429",
|
|
293
|
+
"4XX",
|
|
294
|
+
"500",
|
|
295
|
+
"5XX",
|
|
296
|
+
],
|
|
297
|
+
};
|
|
298
|
+
const request$ = this.createRequest$(
|
|
299
|
+
context,
|
|
300
|
+
{
|
|
301
|
+
security: securitySettings$,
|
|
302
|
+
method: "PATCH",
|
|
303
|
+
path: path$,
|
|
304
|
+
headers: headers$,
|
|
305
|
+
query: query$,
|
|
306
|
+
body: body$,
|
|
307
|
+
},
|
|
308
|
+
options
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
const response = await this.do$(request$, doOptions);
|
|
312
|
+
|
|
313
|
+
const responseFields$ = {
|
|
314
|
+
HttpMeta: { Response: response, Request: request$ },
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
const [result$] = await this.matcher<components.TagSchema>()
|
|
318
|
+
.json(200, components.TagSchema$)
|
|
319
|
+
.json(400, errors.BadRequest$, { err: true })
|
|
320
|
+
.json(401, errors.Unauthorized$, { err: true })
|
|
321
|
+
.json(403, errors.Forbidden$, { err: true })
|
|
322
|
+
.json(404, errors.NotFound$, { err: true })
|
|
323
|
+
.json(409, errors.Conflict$, { err: true })
|
|
324
|
+
.json(410, errors.InviteExpired$, { err: true })
|
|
325
|
+
.json(422, errors.UnprocessableEntity$, { err: true })
|
|
326
|
+
.json(429, errors.RateLimitExceeded$, { err: true })
|
|
327
|
+
.json(500, errors.InternalServerError$, { err: true })
|
|
328
|
+
.fail(["4XX", "5XX"])
|
|
329
|
+
.match(response, { extraFields: responseFields$ });
|
|
330
|
+
|
|
331
|
+
return result$;
|
|
332
|
+
}
|
|
232
333
|
}
|