dub 0.30.3 → 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 -2
- package/docs/sdks/domains/README.md +0 -105
- package/docs/sdks/tags/README.md +54 -3
- package/docs/sdks/workspaces/README.md +53 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/operations/createtag.d.ts +9 -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/index.d.ts +2 -2
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -2
- package/models/operations/index.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/{setprimarydomain.js → updateworkspace.js} +9 -21
- package/models/operations/updateworkspace.js.map +1 -0
- 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 +7 -0
- package/sdk/workspaces.d.ts.map +1 -1
- package/sdk/workspaces.js +80 -0
- package/sdk/workspaces.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/operations/createtag.ts +13 -4
- package/src/models/operations/index.ts +2 -2
- package/src/models/operations/updatetag.ts +138 -0
- package/src/models/operations/updateworkspace.ts +30 -0
- package/src/sdk/domains.ts +0 -202
- package/src/sdk/tags.ts +101 -0
- package/src/sdk/workspaces.ts +99 -0
- package/models/operations/setprimarydomain.d.ts +0 -35
- package/models/operations/setprimarydomain.d.ts.map +0 -1
- package/models/operations/setprimarydomain.js.map +0 -1
- package/models/operations/transferdomain.d.ts +0 -51
- 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/setprimarydomain.ts +0 -60
- package/src/models/operations/transferdomain.ts +0 -98
|
@@ -37,11 +37,17 @@ export type CreateTagRequestBody = {
|
|
|
37
37
|
/**
|
|
38
38
|
* The name of the tag to create.
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
name?: string | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
|
43
43
|
*/
|
|
44
44
|
color?: Color | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The name of the tag to create.
|
|
47
|
+
*
|
|
48
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
49
|
+
*/
|
|
50
|
+
tag?: string | undefined;
|
|
45
51
|
};
|
|
46
52
|
|
|
47
53
|
/** @internal */
|
|
@@ -71,19 +77,22 @@ export namespace Color$ {
|
|
|
71
77
|
/** @internal */
|
|
72
78
|
export namespace CreateTagRequestBody$ {
|
|
73
79
|
export const inboundSchema: z.ZodType<CreateTagRequestBody, z.ZodTypeDef, unknown> = z.object({
|
|
74
|
-
|
|
80
|
+
name: z.string().optional(),
|
|
75
81
|
color: Color$.inboundSchema.optional(),
|
|
82
|
+
tag: z.string().optional(),
|
|
76
83
|
});
|
|
77
84
|
|
|
78
85
|
export type Outbound = {
|
|
79
|
-
|
|
86
|
+
name?: string | undefined;
|
|
80
87
|
color?: string | undefined;
|
|
88
|
+
tag?: string | undefined;
|
|
81
89
|
};
|
|
82
90
|
|
|
83
91
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagRequestBody> = z.object(
|
|
84
92
|
{
|
|
85
|
-
|
|
93
|
+
name: z.string().optional(),
|
|
86
94
|
color: Color$.outboundSchema.optional(),
|
|
95
|
+
tag: z.string().optional(),
|
|
87
96
|
}
|
|
88
97
|
);
|
|
89
98
|
}
|
|
@@ -17,11 +17,11 @@ export * from "./gettags.js";
|
|
|
17
17
|
export * from "./getworkspace.js";
|
|
18
18
|
export * from "./listdomains.js";
|
|
19
19
|
export * from "./retrieveanalytics.js";
|
|
20
|
-
export * from "./setprimarydomain.js";
|
|
21
20
|
export * from "./trackcustomer.js";
|
|
22
21
|
export * from "./tracklead.js";
|
|
23
22
|
export * from "./tracksale.js";
|
|
24
|
-
export * from "./transferdomain.js";
|
|
25
23
|
export * from "./updatedomain.js";
|
|
26
24
|
export * from "./updatelink.js";
|
|
25
|
+
export * from "./updatetag.js";
|
|
26
|
+
export * from "./updateworkspace.js";
|
|
27
27
|
export * from "./upsertlink.js";
|
|
@@ -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
|
+
}
|
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
|
}
|
package/src/sdk/workspaces.ts
CHANGED
|
@@ -137,4 +137,103 @@ export class Workspaces extends ClientSDK {
|
|
|
137
137
|
|
|
138
138
|
return result$;
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Update a workspace
|
|
143
|
+
*
|
|
144
|
+
* @remarks
|
|
145
|
+
* Update a workspace by ID or slug.
|
|
146
|
+
*/
|
|
147
|
+
async update(
|
|
148
|
+
request: operations.UpdateWorkspaceRequest,
|
|
149
|
+
options?: RequestOptions
|
|
150
|
+
): Promise<components.WorkspaceSchema> {
|
|
151
|
+
const input$ = request;
|
|
152
|
+
const headers$ = new Headers();
|
|
153
|
+
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
154
|
+
headers$.set("Accept", "application/json");
|
|
155
|
+
|
|
156
|
+
const payload$ = schemas$.parse(
|
|
157
|
+
input$,
|
|
158
|
+
(value$) => operations.UpdateWorkspaceRequest$.outboundSchema.parse(value$),
|
|
159
|
+
"Input validation failed"
|
|
160
|
+
);
|
|
161
|
+
const body$ = null;
|
|
162
|
+
|
|
163
|
+
const pathParams$ = {
|
|
164
|
+
idOrSlug: encodeSimple$("idOrSlug", payload$.idOrSlug, {
|
|
165
|
+
explode: false,
|
|
166
|
+
charEncoding: "percent",
|
|
167
|
+
}),
|
|
168
|
+
};
|
|
169
|
+
const path$ = this.templateURLComponent("/workspaces/{idOrSlug}")(pathParams$);
|
|
170
|
+
|
|
171
|
+
const query$ = "";
|
|
172
|
+
|
|
173
|
+
let security$;
|
|
174
|
+
if (typeof this.options$.token === "function") {
|
|
175
|
+
security$ = { token: await this.options$.token() };
|
|
176
|
+
} else if (this.options$.token) {
|
|
177
|
+
security$ = { token: this.options$.token };
|
|
178
|
+
} else {
|
|
179
|
+
security$ = {};
|
|
180
|
+
}
|
|
181
|
+
const context = {
|
|
182
|
+
operationID: "updateWorkspace",
|
|
183
|
+
oAuth2Scopes: [],
|
|
184
|
+
securitySource: this.options$.token,
|
|
185
|
+
};
|
|
186
|
+
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
187
|
+
|
|
188
|
+
const doOptions = {
|
|
189
|
+
context,
|
|
190
|
+
errorCodes: [
|
|
191
|
+
"400",
|
|
192
|
+
"401",
|
|
193
|
+
"403",
|
|
194
|
+
"404",
|
|
195
|
+
"409",
|
|
196
|
+
"410",
|
|
197
|
+
"422",
|
|
198
|
+
"429",
|
|
199
|
+
"4XX",
|
|
200
|
+
"500",
|
|
201
|
+
"5XX",
|
|
202
|
+
],
|
|
203
|
+
};
|
|
204
|
+
const request$ = this.createRequest$(
|
|
205
|
+
context,
|
|
206
|
+
{
|
|
207
|
+
security: securitySettings$,
|
|
208
|
+
method: "PATCH",
|
|
209
|
+
path: path$,
|
|
210
|
+
headers: headers$,
|
|
211
|
+
query: query$,
|
|
212
|
+
body: body$,
|
|
213
|
+
},
|
|
214
|
+
options
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
const response = await this.do$(request$, doOptions);
|
|
218
|
+
|
|
219
|
+
const responseFields$ = {
|
|
220
|
+
HttpMeta: { Response: response, Request: request$ },
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
const [result$] = await this.matcher<components.WorkspaceSchema>()
|
|
224
|
+
.json(200, components.WorkspaceSchema$)
|
|
225
|
+
.json(400, errors.BadRequest$, { err: true })
|
|
226
|
+
.json(401, errors.Unauthorized$, { err: true })
|
|
227
|
+
.json(403, errors.Forbidden$, { err: true })
|
|
228
|
+
.json(404, errors.NotFound$, { err: true })
|
|
229
|
+
.json(409, errors.Conflict$, { err: true })
|
|
230
|
+
.json(410, errors.InviteExpired$, { err: true })
|
|
231
|
+
.json(422, errors.UnprocessableEntity$, { err: true })
|
|
232
|
+
.json(429, errors.RateLimitExceeded$, { err: true })
|
|
233
|
+
.json(500, errors.InternalServerError$, { err: true })
|
|
234
|
+
.fail(["4XX", "5XX"])
|
|
235
|
+
.match(response, { extraFields: responseFields$ });
|
|
236
|
+
|
|
237
|
+
return result$;
|
|
238
|
+
}
|
|
140
239
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export type SetPrimaryDomainGlobals = {
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
5
|
-
*/
|
|
6
|
-
workspaceId?: string | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
9
|
-
*/
|
|
10
|
-
projectSlug?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
export type SetPrimaryDomainRequest = {
|
|
13
|
-
/**
|
|
14
|
-
* The domain name.
|
|
15
|
-
*/
|
|
16
|
-
slug: string;
|
|
17
|
-
};
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare namespace SetPrimaryDomainGlobals$ {
|
|
20
|
-
const inboundSchema: z.ZodType<SetPrimaryDomainGlobals, z.ZodTypeDef, unknown>;
|
|
21
|
-
type Outbound = {
|
|
22
|
-
workspaceId?: string | undefined;
|
|
23
|
-
projectSlug?: string | undefined;
|
|
24
|
-
};
|
|
25
|
-
const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainGlobals>;
|
|
26
|
-
}
|
|
27
|
-
/** @internal */
|
|
28
|
-
export declare namespace SetPrimaryDomainRequest$ {
|
|
29
|
-
const inboundSchema: z.ZodType<SetPrimaryDomainRequest, z.ZodTypeDef, unknown>;
|
|
30
|
-
type Outbound = {
|
|
31
|
-
slug: string;
|
|
32
|
-
};
|
|
33
|
-
const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainRequest>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=setprimarydomain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setprimarydomain.d.ts","sourceRoot":"","sources":["../../src/models/operations/setprimarydomain.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,uBAAuB,GAAG;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAI9E,CAAC;IAEP,KAAY,QAAQ,GAAG;QACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACpC,CAAC;IAEK,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,UAAU,EAAE,uBAAuB,CAIhF,CAAC;CACV;AAED,gBAAgB;AAChB,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAG9E,CAAC;IAEP,KAAY,QAAQ,GAAG;QACnB,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IAEK,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,UAAU,EAAE,uBAAuB,CAGhF,CAAC;CACV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setprimarydomain.js","sourceRoot":"","sources":["../../src/models/operations/setprimarydomain.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAoBzB,gBAAgB;AAChB,IAAiB,wBAAwB,CAiBxC;AAjBD,WAAiB,wBAAwB;IACxB,sCAAa,GACtB,CAAC,CAAC,MAAM,CAAC;QACL,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC;IAOM,uCAAc,GACvB,CAAC,CAAC,MAAM,CAAC;QACL,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC;AACX,CAAC,EAjBgB,wBAAwB,wCAAxB,wBAAwB,QAiBxC;AAED,gBAAgB;AAChB,IAAiB,wBAAwB,CAcxC;AAdD,WAAiB,wBAAwB;IACxB,sCAAa,GACtB,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACnB,CAAC,CAAC;IAMM,uCAAc,GACvB,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACnB,CAAC,CAAC;AACX,CAAC,EAdgB,wBAAwB,wCAAxB,wBAAwB,QAcxC"}
|