@amerged/ohmyhost-sdk 0.1.11 → 0.1.14
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 +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sdk.gen.d.ts +115 -19
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +259 -49
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +652 -134
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/managed-mail-response.d.ts +4 -0
- package/dist/managed-mail-response.d.ts.map +1 -0
- package/dist/managed-mail-response.js +185 -0
- package/dist/managed-mail-response.js.map +1 -0
- package/dist/managed-mail.d.ts +32 -0
- package/dist/managed-mail.d.ts.map +1 -0
- package/dist/managed-mail.js +42 -0
- package/dist/managed-mail.js.map +1 -0
- package/package.json +1 -1
- package/src/packages/sdk-ts/generated/index.ts +71 -16
- package/src/packages/sdk-ts/generated/sdk.gen.ts +500 -96
- package/src/packages/sdk-ts/generated/types.gen.ts +741 -162
- package/src/packages/sdk-ts/index.ts +1 -0
- package/src/packages/sdk-ts/managed-mail-response.ts +195 -0
- package/src/packages/sdk-ts/managed-mail.ts +85 -0
|
@@ -15,16 +15,17 @@ import type {
|
|
|
15
15
|
ApplyPaidProjectDomainResponses,
|
|
16
16
|
ChangeDatabaseComputeErrors,
|
|
17
17
|
ChangeDatabaseComputeResponses,
|
|
18
|
+
ChangeProjectHandleErrors,
|
|
19
|
+
ChangeProjectHandleResponses,
|
|
18
20
|
CompleteCloudflareDnsAuthorizationErrors,
|
|
19
21
|
CompleteCloudflareDnsAuthorizationResponses,
|
|
20
22
|
CompleteGithubSourceAuthorizationErrors,
|
|
21
23
|
ConfigureBillingRechargeErrors,
|
|
22
24
|
ConfigureBillingRechargeResponses,
|
|
25
|
+
ConfigureManagedMailDomainErrors,
|
|
26
|
+
ConfigureManagedMailDomainResponses,
|
|
23
27
|
ConfigureProjectDomainsErrors,
|
|
24
28
|
ConfigureProjectDomainsResponses,
|
|
25
|
-
ConfigureProjectMailDomainErrors,
|
|
26
|
-
ConfigureProjectMailDomainRequest,
|
|
27
|
-
ConfigureProjectMailDomainResponses,
|
|
28
29
|
ConfigureProjectSourceAutoDeployErrors,
|
|
29
30
|
ConfigureProjectSourceAutoDeployResponses,
|
|
30
31
|
ConfigureSourceAutoDeployRequest,
|
|
@@ -62,6 +63,8 @@ import type {
|
|
|
62
63
|
DeletePaidProjectDomainResponses,
|
|
63
64
|
DeleteProjectErrors,
|
|
64
65
|
DeleteProjectResponses,
|
|
66
|
+
DisableManagedMailReceivingErrors,
|
|
67
|
+
DisableManagedMailReceivingResponses,
|
|
65
68
|
FeedbackSubmission,
|
|
66
69
|
GetAccountProfileErrors,
|
|
67
70
|
GetAccountProfileResponses,
|
|
@@ -83,6 +86,12 @@ import type {
|
|
|
83
86
|
GetFeatureInterestsResponses,
|
|
84
87
|
GetGithubOrganizationConnectionErrors,
|
|
85
88
|
GetGithubOrganizationConnectionResponses,
|
|
89
|
+
GetManagedMailAttachmentErrors,
|
|
90
|
+
GetManagedMailAttachmentResponses,
|
|
91
|
+
GetManagedMailDomainErrors,
|
|
92
|
+
GetManagedMailDomainResponses,
|
|
93
|
+
GetManagedMailMessageErrors,
|
|
94
|
+
GetManagedMailMessageResponses,
|
|
86
95
|
GetOperationErrors,
|
|
87
96
|
GetOperationResponses,
|
|
88
97
|
GetOrganizationAccountErrors,
|
|
@@ -102,8 +111,6 @@ import type {
|
|
|
102
111
|
GetProjectExportResponses,
|
|
103
112
|
GetProjectHandleAvailabilityErrors,
|
|
104
113
|
GetProjectHandleAvailabilityResponses,
|
|
105
|
-
GetProjectMailDomainErrors,
|
|
106
|
-
GetProjectMailDomainResponses,
|
|
107
114
|
GetProjectResponses,
|
|
108
115
|
GetProjectSourceAutoDeployErrors,
|
|
109
116
|
GetProjectSourceAutoDeployResponses,
|
|
@@ -124,12 +131,16 @@ import type {
|
|
|
124
131
|
ListEnvironmentSecretsResponses,
|
|
125
132
|
ListFunctionRunsErrors,
|
|
126
133
|
ListFunctionRunsResponses,
|
|
134
|
+
ListManagedMailMessagesErrors,
|
|
135
|
+
ListManagedMailMessagesResponses,
|
|
127
136
|
ListProjectDatabaseAccessErrors,
|
|
128
137
|
ListProjectDatabaseAccessResponses,
|
|
129
138
|
ListProjectsErrors,
|
|
130
139
|
ListProjectsResponses,
|
|
131
140
|
ListUserApiKeysErrors,
|
|
132
141
|
ListUserApiKeysResponses,
|
|
142
|
+
ManagedMailDomainRequest,
|
|
143
|
+
ManagedMailWebhookRequest,
|
|
133
144
|
PaidDomainRequest,
|
|
134
145
|
PlanDeploymentErrors,
|
|
135
146
|
PlanDeploymentPromotionErrors,
|
|
@@ -142,6 +153,8 @@ import type {
|
|
|
142
153
|
PlanPaidProjectDomainResponses,
|
|
143
154
|
PlanProjectDeletionErrors,
|
|
144
155
|
PlanProjectDeletionResponses,
|
|
156
|
+
PrepareManagedMailWebhookErrors,
|
|
157
|
+
PrepareManagedMailWebhookResponses,
|
|
145
158
|
ProjectDatabaseAccessRequest,
|
|
146
159
|
ProjectDatabaseQueryRequest,
|
|
147
160
|
ProjectDatabaseWriteRequest,
|
|
@@ -158,6 +171,8 @@ import type {
|
|
|
158
171
|
RecordSignupSourceResponses,
|
|
159
172
|
RegisterFeatureInterestErrors,
|
|
160
173
|
RegisterFeatureInterestResponses,
|
|
174
|
+
RetryManagedMailMessageErrors,
|
|
175
|
+
RetryManagedMailMessageResponses,
|
|
161
176
|
RevokeCurrentSessionErrors,
|
|
162
177
|
RevokeCurrentSessionResponses,
|
|
163
178
|
RevokeProjectDatabaseAccessErrors,
|
|
@@ -183,6 +198,8 @@ import type {
|
|
|
183
198
|
SubmitFeedbackResponses,
|
|
184
199
|
Ulid,
|
|
185
200
|
UserApiKeyId,
|
|
201
|
+
VerifyManagedMailWebhookErrors,
|
|
202
|
+
VerifyManagedMailWebhookResponses,
|
|
186
203
|
WriteProjectDatabaseErrors,
|
|
187
204
|
WriteProjectDatabaseResponses,
|
|
188
205
|
} from "./types.gen.js";
|
|
@@ -2070,6 +2087,54 @@ export const getCloudflareDnsAuthorizationStatus = <ThrowOnError extends boolean
|
|
|
2070
2087
|
});
|
|
2071
2088
|
};
|
|
2072
2089
|
|
|
2090
|
+
/**
|
|
2091
|
+
* Move a project to a chosen address
|
|
2092
|
+
*
|
|
2093
|
+
* Starts a durable operation that re-publishes the project's Dev and Prod gateways at the chosen address and stores it only once both serve it. The previous address stops answering and returns to the pool for any project to claim. Ask GET /v1/project-handles/{handle} first; a taken, unusable or unchanged address is refused before any gateway moves, and a project with an operation in flight is refused until it finishes.
|
|
2094
|
+
*/
|
|
2095
|
+
export const changeProjectHandle = <ThrowOnError extends boolean = true>(
|
|
2096
|
+
parameters: {
|
|
2097
|
+
"X-Request-Id"?: string;
|
|
2098
|
+
"Idempotency-Key": string;
|
|
2099
|
+
"If-Match": string;
|
|
2100
|
+
project_id: Ulid;
|
|
2101
|
+
handle: string;
|
|
2102
|
+
},
|
|
2103
|
+
options?: Options<never, ThrowOnError>,
|
|
2104
|
+
): RequestResult<ChangeProjectHandleResponses, ChangeProjectHandleErrors, ThrowOnError, "data"> => {
|
|
2105
|
+
const params = buildClientParams(
|
|
2106
|
+
[parameters],
|
|
2107
|
+
[
|
|
2108
|
+
{
|
|
2109
|
+
args: [
|
|
2110
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2111
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2112
|
+
{ in: "headers", key: "If-Match" },
|
|
2113
|
+
{ in: "path", key: "project_id" },
|
|
2114
|
+
{ in: "body", key: "handle" },
|
|
2115
|
+
],
|
|
2116
|
+
},
|
|
2117
|
+
],
|
|
2118
|
+
);
|
|
2119
|
+
return (options?.client ?? client).put<
|
|
2120
|
+
ChangeProjectHandleResponses,
|
|
2121
|
+
ChangeProjectHandleErrors,
|
|
2122
|
+
ThrowOnError,
|
|
2123
|
+
"data"
|
|
2124
|
+
>({
|
|
2125
|
+
responseStyle: "data",
|
|
2126
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2127
|
+
url: "/v1/projects/{project_id}/handle",
|
|
2128
|
+
...options,
|
|
2129
|
+
...params,
|
|
2130
|
+
headers: {
|
|
2131
|
+
"Content-Type": "application/json",
|
|
2132
|
+
...options?.headers,
|
|
2133
|
+
...params.headers,
|
|
2134
|
+
},
|
|
2135
|
+
});
|
|
2136
|
+
};
|
|
2137
|
+
|
|
2073
2138
|
/**
|
|
2074
2139
|
* Apply the server-derived project domains
|
|
2075
2140
|
*
|
|
@@ -2301,97 +2366,6 @@ export const applyPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
|
2301
2366
|
});
|
|
2302
2367
|
};
|
|
2303
2368
|
|
|
2304
|
-
/**
|
|
2305
|
-
* Get sender-domain delegation status
|
|
2306
|
-
*/
|
|
2307
|
-
export const getProjectMailDomain = <ThrowOnError extends boolean = true>(
|
|
2308
|
-
parameters: {
|
|
2309
|
-
"X-Request-Id"?: string;
|
|
2310
|
-
project_id: Ulid;
|
|
2311
|
-
},
|
|
2312
|
-
options?: Options<never, ThrowOnError>,
|
|
2313
|
-
): RequestResult<
|
|
2314
|
-
GetProjectMailDomainResponses,
|
|
2315
|
-
GetProjectMailDomainErrors,
|
|
2316
|
-
ThrowOnError,
|
|
2317
|
-
"data"
|
|
2318
|
-
> => {
|
|
2319
|
-
const params = buildClientParams(
|
|
2320
|
-
[parameters],
|
|
2321
|
-
[
|
|
2322
|
-
{
|
|
2323
|
-
args: [
|
|
2324
|
-
{ in: "headers", key: "X-Request-Id" },
|
|
2325
|
-
{ in: "path", key: "project_id" },
|
|
2326
|
-
],
|
|
2327
|
-
},
|
|
2328
|
-
],
|
|
2329
|
-
);
|
|
2330
|
-
return (options?.client ?? client).get<
|
|
2331
|
-
GetProjectMailDomainResponses,
|
|
2332
|
-
GetProjectMailDomainErrors,
|
|
2333
|
-
ThrowOnError,
|
|
2334
|
-
"data"
|
|
2335
|
-
>({
|
|
2336
|
-
responseStyle: "data",
|
|
2337
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2338
|
-
url: "/v1/projects/{project_id}/mail-domain",
|
|
2339
|
-
...options,
|
|
2340
|
-
...params,
|
|
2341
|
-
});
|
|
2342
|
-
};
|
|
2343
|
-
|
|
2344
|
-
/**
|
|
2345
|
-
* Configure the project sender subdomain
|
|
2346
|
-
*
|
|
2347
|
-
* Create-only admission for one canonical sender subdomain, requiring a confirmed current Paid service period. Top-ups and promotional credits do not enable Paid. Provider mutation occurs only inside a later authorized deployment Workflow.
|
|
2348
|
-
*/
|
|
2349
|
-
export const configureProjectMailDomain = <ThrowOnError extends boolean = true>(
|
|
2350
|
-
parameters: {
|
|
2351
|
-
"X-Request-Id"?: string;
|
|
2352
|
-
"Idempotency-Key": string;
|
|
2353
|
-
project_id: Ulid;
|
|
2354
|
-
configureProjectMailDomainRequest: ConfigureProjectMailDomainRequest;
|
|
2355
|
-
},
|
|
2356
|
-
options?: Options<never, ThrowOnError>,
|
|
2357
|
-
): RequestResult<
|
|
2358
|
-
ConfigureProjectMailDomainResponses,
|
|
2359
|
-
ConfigureProjectMailDomainErrors,
|
|
2360
|
-
ThrowOnError,
|
|
2361
|
-
"data"
|
|
2362
|
-
> => {
|
|
2363
|
-
const params = buildClientParams(
|
|
2364
|
-
[parameters],
|
|
2365
|
-
[
|
|
2366
|
-
{
|
|
2367
|
-
args: [
|
|
2368
|
-
{ in: "headers", key: "X-Request-Id" },
|
|
2369
|
-
{ in: "headers", key: "Idempotency-Key" },
|
|
2370
|
-
{ in: "path", key: "project_id" },
|
|
2371
|
-
{ key: "configureProjectMailDomainRequest", map: "body" },
|
|
2372
|
-
],
|
|
2373
|
-
},
|
|
2374
|
-
],
|
|
2375
|
-
);
|
|
2376
|
-
return (options?.client ?? client).put<
|
|
2377
|
-
ConfigureProjectMailDomainResponses,
|
|
2378
|
-
ConfigureProjectMailDomainErrors,
|
|
2379
|
-
ThrowOnError,
|
|
2380
|
-
"data"
|
|
2381
|
-
>({
|
|
2382
|
-
responseStyle: "data",
|
|
2383
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2384
|
-
url: "/v1/projects/{project_id}/mail-domain",
|
|
2385
|
-
...options,
|
|
2386
|
-
...params,
|
|
2387
|
-
headers: {
|
|
2388
|
-
"Content-Type": "application/json",
|
|
2389
|
-
...options?.headers,
|
|
2390
|
-
...params.headers,
|
|
2391
|
-
},
|
|
2392
|
-
});
|
|
2393
|
-
};
|
|
2394
|
-
|
|
2395
2369
|
/**
|
|
2396
2370
|
* Plan a deployment
|
|
2397
2371
|
*
|
|
@@ -3482,3 +3456,433 @@ export const listAuditEvents = <ThrowOnError extends boolean = true>(
|
|
|
3482
3456
|
...params,
|
|
3483
3457
|
});
|
|
3484
3458
|
};
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
* Read independent sending and receiving readiness
|
|
3462
|
+
*
|
|
3463
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3464
|
+
*/
|
|
3465
|
+
export const getManagedMailDomain = <ThrowOnError extends boolean = true>(
|
|
3466
|
+
parameters: {
|
|
3467
|
+
"X-Request-Id"?: string;
|
|
3468
|
+
project_id: Ulid;
|
|
3469
|
+
environment_id: Ulid;
|
|
3470
|
+
},
|
|
3471
|
+
options?: Options<never, ThrowOnError>,
|
|
3472
|
+
): RequestResult<
|
|
3473
|
+
GetManagedMailDomainResponses,
|
|
3474
|
+
GetManagedMailDomainErrors,
|
|
3475
|
+
ThrowOnError,
|
|
3476
|
+
"data"
|
|
3477
|
+
> => {
|
|
3478
|
+
const params = buildClientParams(
|
|
3479
|
+
[parameters],
|
|
3480
|
+
[
|
|
3481
|
+
{
|
|
3482
|
+
args: [
|
|
3483
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3484
|
+
{ in: "path", key: "project_id" },
|
|
3485
|
+
{ in: "path", key: "environment_id" },
|
|
3486
|
+
],
|
|
3487
|
+
},
|
|
3488
|
+
],
|
|
3489
|
+
);
|
|
3490
|
+
return (options?.client ?? client).get<
|
|
3491
|
+
GetManagedMailDomainResponses,
|
|
3492
|
+
GetManagedMailDomainErrors,
|
|
3493
|
+
ThrowOnError,
|
|
3494
|
+
"data"
|
|
3495
|
+
>({
|
|
3496
|
+
responseStyle: "data",
|
|
3497
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3498
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain",
|
|
3499
|
+
...options,
|
|
3500
|
+
...params,
|
|
3501
|
+
});
|
|
3502
|
+
};
|
|
3503
|
+
|
|
3504
|
+
/**
|
|
3505
|
+
* Configure sending and receiving on a selected mail domain
|
|
3506
|
+
*
|
|
3507
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3508
|
+
*/
|
|
3509
|
+
export const configureManagedMailDomain = <ThrowOnError extends boolean = true>(
|
|
3510
|
+
parameters: {
|
|
3511
|
+
"X-Request-Id"?: string;
|
|
3512
|
+
"Idempotency-Key": string;
|
|
3513
|
+
project_id: Ulid;
|
|
3514
|
+
environment_id: Ulid;
|
|
3515
|
+
managedMailDomainRequest: ManagedMailDomainRequest;
|
|
3516
|
+
},
|
|
3517
|
+
options?: Options<never, ThrowOnError>,
|
|
3518
|
+
): RequestResult<
|
|
3519
|
+
ConfigureManagedMailDomainResponses,
|
|
3520
|
+
ConfigureManagedMailDomainErrors,
|
|
3521
|
+
ThrowOnError,
|
|
3522
|
+
"data"
|
|
3523
|
+
> => {
|
|
3524
|
+
const params = buildClientParams(
|
|
3525
|
+
[parameters],
|
|
3526
|
+
[
|
|
3527
|
+
{
|
|
3528
|
+
args: [
|
|
3529
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3530
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
3531
|
+
{ in: "path", key: "project_id" },
|
|
3532
|
+
{ in: "path", key: "environment_id" },
|
|
3533
|
+
{ key: "managedMailDomainRequest", map: "body" },
|
|
3534
|
+
],
|
|
3535
|
+
},
|
|
3536
|
+
],
|
|
3537
|
+
);
|
|
3538
|
+
return (options?.client ?? client).put<
|
|
3539
|
+
ConfigureManagedMailDomainResponses,
|
|
3540
|
+
ConfigureManagedMailDomainErrors,
|
|
3541
|
+
ThrowOnError,
|
|
3542
|
+
"data"
|
|
3543
|
+
>({
|
|
3544
|
+
responseStyle: "data",
|
|
3545
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3546
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain",
|
|
3547
|
+
...options,
|
|
3548
|
+
...params,
|
|
3549
|
+
headers: {
|
|
3550
|
+
"Content-Type": "application/json",
|
|
3551
|
+
...options?.headers,
|
|
3552
|
+
...params.headers,
|
|
3553
|
+
},
|
|
3554
|
+
});
|
|
3555
|
+
};
|
|
3556
|
+
|
|
3557
|
+
/**
|
|
3558
|
+
* Disable receiving and remove the customer webhook
|
|
3559
|
+
*
|
|
3560
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3561
|
+
*/
|
|
3562
|
+
export const disableManagedMailReceiving = <ThrowOnError extends boolean = true>(
|
|
3563
|
+
parameters: {
|
|
3564
|
+
"X-Request-Id"?: string;
|
|
3565
|
+
"Idempotency-Key": string;
|
|
3566
|
+
project_id: Ulid;
|
|
3567
|
+
environment_id: Ulid;
|
|
3568
|
+
},
|
|
3569
|
+
options?: Options<never, ThrowOnError>,
|
|
3570
|
+
): RequestResult<
|
|
3571
|
+
DisableManagedMailReceivingResponses,
|
|
3572
|
+
DisableManagedMailReceivingErrors,
|
|
3573
|
+
ThrowOnError,
|
|
3574
|
+
"data"
|
|
3575
|
+
> => {
|
|
3576
|
+
const params = buildClientParams(
|
|
3577
|
+
[parameters],
|
|
3578
|
+
[
|
|
3579
|
+
{
|
|
3580
|
+
args: [
|
|
3581
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3582
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
3583
|
+
{ in: "path", key: "project_id" },
|
|
3584
|
+
{ in: "path", key: "environment_id" },
|
|
3585
|
+
],
|
|
3586
|
+
},
|
|
3587
|
+
],
|
|
3588
|
+
);
|
|
3589
|
+
return (options?.client ?? client).delete<
|
|
3590
|
+
DisableManagedMailReceivingResponses,
|
|
3591
|
+
DisableManagedMailReceivingErrors,
|
|
3592
|
+
ThrowOnError,
|
|
3593
|
+
"data"
|
|
3594
|
+
>({
|
|
3595
|
+
responseStyle: "data",
|
|
3596
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3597
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-webhook",
|
|
3598
|
+
...options,
|
|
3599
|
+
...params,
|
|
3600
|
+
});
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3603
|
+
/**
|
|
3604
|
+
* Prepare a required customer webhook and return its signing secret
|
|
3605
|
+
*
|
|
3606
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3607
|
+
*/
|
|
3608
|
+
export const prepareManagedMailWebhook = <ThrowOnError extends boolean = true>(
|
|
3609
|
+
parameters: {
|
|
3610
|
+
"X-Request-Id"?: string;
|
|
3611
|
+
"Idempotency-Key": string;
|
|
3612
|
+
project_id: Ulid;
|
|
3613
|
+
environment_id: Ulid;
|
|
3614
|
+
managedMailWebhookRequest: ManagedMailWebhookRequest;
|
|
3615
|
+
},
|
|
3616
|
+
options?: Options<never, ThrowOnError>,
|
|
3617
|
+
): RequestResult<
|
|
3618
|
+
PrepareManagedMailWebhookResponses,
|
|
3619
|
+
PrepareManagedMailWebhookErrors,
|
|
3620
|
+
ThrowOnError,
|
|
3621
|
+
"data"
|
|
3622
|
+
> => {
|
|
3623
|
+
const params = buildClientParams(
|
|
3624
|
+
[parameters],
|
|
3625
|
+
[
|
|
3626
|
+
{
|
|
3627
|
+
args: [
|
|
3628
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3629
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
3630
|
+
{ in: "path", key: "project_id" },
|
|
3631
|
+
{ in: "path", key: "environment_id" },
|
|
3632
|
+
{ key: "managedMailWebhookRequest", map: "body" },
|
|
3633
|
+
],
|
|
3634
|
+
},
|
|
3635
|
+
],
|
|
3636
|
+
);
|
|
3637
|
+
return (options?.client ?? client).put<
|
|
3638
|
+
PrepareManagedMailWebhookResponses,
|
|
3639
|
+
PrepareManagedMailWebhookErrors,
|
|
3640
|
+
ThrowOnError,
|
|
3641
|
+
"data"
|
|
3642
|
+
>({
|
|
3643
|
+
responseStyle: "data",
|
|
3644
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3645
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-webhook",
|
|
3646
|
+
...options,
|
|
3647
|
+
...params,
|
|
3648
|
+
headers: {
|
|
3649
|
+
"Content-Type": "application/json",
|
|
3650
|
+
...options?.headers,
|
|
3651
|
+
...params.headers,
|
|
3652
|
+
},
|
|
3653
|
+
});
|
|
3654
|
+
};
|
|
3655
|
+
|
|
3656
|
+
/**
|
|
3657
|
+
* Verify the customer endpoint and enable receiving
|
|
3658
|
+
*
|
|
3659
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3660
|
+
*/
|
|
3661
|
+
export const verifyManagedMailWebhook = <ThrowOnError extends boolean = true>(
|
|
3662
|
+
parameters: {
|
|
3663
|
+
"X-Request-Id"?: string;
|
|
3664
|
+
"Idempotency-Key": string;
|
|
3665
|
+
project_id: Ulid;
|
|
3666
|
+
environment_id: Ulid;
|
|
3667
|
+
},
|
|
3668
|
+
options?: Options<never, ThrowOnError>,
|
|
3669
|
+
): RequestResult<
|
|
3670
|
+
VerifyManagedMailWebhookResponses,
|
|
3671
|
+
VerifyManagedMailWebhookErrors,
|
|
3672
|
+
ThrowOnError,
|
|
3673
|
+
"data"
|
|
3674
|
+
> => {
|
|
3675
|
+
const params = buildClientParams(
|
|
3676
|
+
[parameters],
|
|
3677
|
+
[
|
|
3678
|
+
{
|
|
3679
|
+
args: [
|
|
3680
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3681
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
3682
|
+
{ in: "path", key: "project_id" },
|
|
3683
|
+
{ in: "path", key: "environment_id" },
|
|
3684
|
+
],
|
|
3685
|
+
},
|
|
3686
|
+
],
|
|
3687
|
+
);
|
|
3688
|
+
return (options?.client ?? client).post<
|
|
3689
|
+
VerifyManagedMailWebhookResponses,
|
|
3690
|
+
VerifyManagedMailWebhookErrors,
|
|
3691
|
+
ThrowOnError,
|
|
3692
|
+
"data"
|
|
3693
|
+
>({
|
|
3694
|
+
responseStyle: "data",
|
|
3695
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3696
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-webhook/verify",
|
|
3697
|
+
...options,
|
|
3698
|
+
...params,
|
|
3699
|
+
});
|
|
3700
|
+
};
|
|
3701
|
+
|
|
3702
|
+
/**
|
|
3703
|
+
* List mail handoff metadata within the 72 hour window
|
|
3704
|
+
*
|
|
3705
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3706
|
+
*/
|
|
3707
|
+
export const listManagedMailMessages = <ThrowOnError extends boolean = true>(
|
|
3708
|
+
parameters: {
|
|
3709
|
+
"X-Request-Id"?: string;
|
|
3710
|
+
project_id: Ulid;
|
|
3711
|
+
environment_id: Ulid;
|
|
3712
|
+
after?: Ulid;
|
|
3713
|
+
},
|
|
3714
|
+
options?: Options<never, ThrowOnError>,
|
|
3715
|
+
): RequestResult<
|
|
3716
|
+
ListManagedMailMessagesResponses,
|
|
3717
|
+
ListManagedMailMessagesErrors,
|
|
3718
|
+
ThrowOnError,
|
|
3719
|
+
"data"
|
|
3720
|
+
> => {
|
|
3721
|
+
const params = buildClientParams(
|
|
3722
|
+
[parameters],
|
|
3723
|
+
[
|
|
3724
|
+
{
|
|
3725
|
+
args: [
|
|
3726
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3727
|
+
{ in: "path", key: "project_id" },
|
|
3728
|
+
{ in: "path", key: "environment_id" },
|
|
3729
|
+
{ in: "query", key: "after" },
|
|
3730
|
+
],
|
|
3731
|
+
},
|
|
3732
|
+
],
|
|
3733
|
+
);
|
|
3734
|
+
return (options?.client ?? client).get<
|
|
3735
|
+
ListManagedMailMessagesResponses,
|
|
3736
|
+
ListManagedMailMessagesErrors,
|
|
3737
|
+
ThrowOnError,
|
|
3738
|
+
"data"
|
|
3739
|
+
>({
|
|
3740
|
+
responseStyle: "data",
|
|
3741
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3742
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail/messages",
|
|
3743
|
+
...options,
|
|
3744
|
+
...params,
|
|
3745
|
+
});
|
|
3746
|
+
};
|
|
3747
|
+
|
|
3748
|
+
/**
|
|
3749
|
+
* Retrieve owned mail content before expiry
|
|
3750
|
+
*
|
|
3751
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3752
|
+
*/
|
|
3753
|
+
export const getManagedMailMessage = <ThrowOnError extends boolean = true>(
|
|
3754
|
+
parameters: {
|
|
3755
|
+
"X-Request-Id"?: string;
|
|
3756
|
+
project_id: Ulid;
|
|
3757
|
+
environment_id: Ulid;
|
|
3758
|
+
message_id: Ulid;
|
|
3759
|
+
},
|
|
3760
|
+
options?: Options<never, ThrowOnError>,
|
|
3761
|
+
): RequestResult<
|
|
3762
|
+
GetManagedMailMessageResponses,
|
|
3763
|
+
GetManagedMailMessageErrors,
|
|
3764
|
+
ThrowOnError,
|
|
3765
|
+
"data"
|
|
3766
|
+
> => {
|
|
3767
|
+
const params = buildClientParams(
|
|
3768
|
+
[parameters],
|
|
3769
|
+
[
|
|
3770
|
+
{
|
|
3771
|
+
args: [
|
|
3772
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3773
|
+
{ in: "path", key: "project_id" },
|
|
3774
|
+
{ in: "path", key: "environment_id" },
|
|
3775
|
+
{ in: "path", key: "message_id" },
|
|
3776
|
+
],
|
|
3777
|
+
},
|
|
3778
|
+
],
|
|
3779
|
+
);
|
|
3780
|
+
return (options?.client ?? client).get<
|
|
3781
|
+
GetManagedMailMessageResponses,
|
|
3782
|
+
GetManagedMailMessageErrors,
|
|
3783
|
+
ThrowOnError,
|
|
3784
|
+
"data"
|
|
3785
|
+
>({
|
|
3786
|
+
responseStyle: "data",
|
|
3787
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3788
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail/messages/{message_id}",
|
|
3789
|
+
...options,
|
|
3790
|
+
...params,
|
|
3791
|
+
});
|
|
3792
|
+
};
|
|
3793
|
+
|
|
3794
|
+
/**
|
|
3795
|
+
* Retry within the shared maximum of three retries
|
|
3796
|
+
*
|
|
3797
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.
|
|
3798
|
+
*/
|
|
3799
|
+
export const retryManagedMailMessage = <ThrowOnError extends boolean = true>(
|
|
3800
|
+
parameters: {
|
|
3801
|
+
"X-Request-Id"?: string;
|
|
3802
|
+
"Idempotency-Key": string;
|
|
3803
|
+
project_id: Ulid;
|
|
3804
|
+
environment_id: Ulid;
|
|
3805
|
+
message_id: Ulid;
|
|
3806
|
+
},
|
|
3807
|
+
options?: Options<never, ThrowOnError>,
|
|
3808
|
+
): RequestResult<
|
|
3809
|
+
RetryManagedMailMessageResponses,
|
|
3810
|
+
RetryManagedMailMessageErrors,
|
|
3811
|
+
ThrowOnError,
|
|
3812
|
+
"data"
|
|
3813
|
+
> => {
|
|
3814
|
+
const params = buildClientParams(
|
|
3815
|
+
[parameters],
|
|
3816
|
+
[
|
|
3817
|
+
{
|
|
3818
|
+
args: [
|
|
3819
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3820
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
3821
|
+
{ in: "path", key: "project_id" },
|
|
3822
|
+
{ in: "path", key: "environment_id" },
|
|
3823
|
+
{ in: "path", key: "message_id" },
|
|
3824
|
+
],
|
|
3825
|
+
},
|
|
3826
|
+
],
|
|
3827
|
+
);
|
|
3828
|
+
return (options?.client ?? client).post<
|
|
3829
|
+
RetryManagedMailMessageResponses,
|
|
3830
|
+
RetryManagedMailMessageErrors,
|
|
3831
|
+
ThrowOnError,
|
|
3832
|
+
"data"
|
|
3833
|
+
>({
|
|
3834
|
+
responseStyle: "data",
|
|
3835
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3836
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail/messages/{message_id}/retry",
|
|
3837
|
+
...options,
|
|
3838
|
+
...params,
|
|
3839
|
+
});
|
|
3840
|
+
};
|
|
3841
|
+
|
|
3842
|
+
/**
|
|
3843
|
+
* Download an owned attachment before expiry
|
|
3844
|
+
*
|
|
3845
|
+
* One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt. Downloads over 50 MiB return 413.
|
|
3846
|
+
*/
|
|
3847
|
+
export const getManagedMailAttachment = <ThrowOnError extends boolean = true>(
|
|
3848
|
+
parameters: {
|
|
3849
|
+
"X-Request-Id"?: string;
|
|
3850
|
+
project_id: Ulid;
|
|
3851
|
+
environment_id: Ulid;
|
|
3852
|
+
message_id: Ulid;
|
|
3853
|
+
attachment_id: string;
|
|
3854
|
+
},
|
|
3855
|
+
options?: Options<never, ThrowOnError>,
|
|
3856
|
+
): RequestResult<
|
|
3857
|
+
GetManagedMailAttachmentResponses,
|
|
3858
|
+
GetManagedMailAttachmentErrors,
|
|
3859
|
+
ThrowOnError,
|
|
3860
|
+
"data"
|
|
3861
|
+
> => {
|
|
3862
|
+
const params = buildClientParams(
|
|
3863
|
+
[parameters],
|
|
3864
|
+
[
|
|
3865
|
+
{
|
|
3866
|
+
args: [
|
|
3867
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3868
|
+
{ in: "path", key: "project_id" },
|
|
3869
|
+
{ in: "path", key: "environment_id" },
|
|
3870
|
+
{ in: "path", key: "message_id" },
|
|
3871
|
+
{ in: "path", key: "attachment_id" },
|
|
3872
|
+
],
|
|
3873
|
+
},
|
|
3874
|
+
],
|
|
3875
|
+
);
|
|
3876
|
+
return (options?.client ?? client).get<
|
|
3877
|
+
GetManagedMailAttachmentResponses,
|
|
3878
|
+
GetManagedMailAttachmentErrors,
|
|
3879
|
+
ThrowOnError,
|
|
3880
|
+
"data"
|
|
3881
|
+
>({
|
|
3882
|
+
responseStyle: "data",
|
|
3883
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3884
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail/messages/{message_id}/attachments/{attachment_id}",
|
|
3885
|
+
...options,
|
|
3886
|
+
...params,
|
|
3887
|
+
});
|
|
3888
|
+
};
|