@zyphr-dev/node-sdk 0.1.33 → 0.1.34

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/dist/index.cjs CHANGED
@@ -526,6 +526,43 @@ __export(index_exports, {
526
526
  InAppNotificationPriorityEnum: () => InAppNotificationPriorityEnum,
527
527
  InAppNotificationToJSON: () => InAppNotificationToJSON,
528
528
  InAppNotificationToJSONTyped: () => InAppNotificationToJSONTyped,
529
+ InboundAttachmentUrlResponseDataFromJSON: () => InboundAttachmentUrlResponseDataFromJSON,
530
+ InboundAttachmentUrlResponseDataFromJSONTyped: () => InboundAttachmentUrlResponseDataFromJSONTyped,
531
+ InboundAttachmentUrlResponseDataToJSON: () => InboundAttachmentUrlResponseDataToJSON,
532
+ InboundAttachmentUrlResponseDataToJSONTyped: () => InboundAttachmentUrlResponseDataToJSONTyped,
533
+ InboundAttachmentUrlResponseFromJSON: () => InboundAttachmentUrlResponseFromJSON,
534
+ InboundAttachmentUrlResponseFromJSONTyped: () => InboundAttachmentUrlResponseFromJSONTyped,
535
+ InboundAttachmentUrlResponseToJSON: () => InboundAttachmentUrlResponseToJSON,
536
+ InboundAttachmentUrlResponseToJSONTyped: () => InboundAttachmentUrlResponseToJSONTyped,
537
+ InboundEmailApi: () => InboundEmailApi,
538
+ InboundEmailAttachmentFromJSON: () => InboundEmailAttachmentFromJSON,
539
+ InboundEmailAttachmentFromJSONTyped: () => InboundEmailAttachmentFromJSONTyped,
540
+ InboundEmailAttachmentToJSON: () => InboundEmailAttachmentToJSON,
541
+ InboundEmailAttachmentToJSONTyped: () => InboundEmailAttachmentToJSONTyped,
542
+ InboundEmailDkimVerdictEnum: () => InboundEmailDkimVerdictEnum,
543
+ InboundEmailDmarcVerdictEnum: () => InboundEmailDmarcVerdictEnum,
544
+ InboundEmailFromFromJSON: () => InboundEmailFromFromJSON,
545
+ InboundEmailFromFromJSONTyped: () => InboundEmailFromFromJSONTyped,
546
+ InboundEmailFromJSON: () => InboundEmailFromJSON,
547
+ InboundEmailFromJSONTyped: () => InboundEmailFromJSONTyped,
548
+ InboundEmailFromToJSON: () => InboundEmailFromToJSON,
549
+ InboundEmailFromToJSONTyped: () => InboundEmailFromToJSONTyped,
550
+ InboundEmailListResponseFromJSON: () => InboundEmailListResponseFromJSON,
551
+ InboundEmailListResponseFromJSONTyped: () => InboundEmailListResponseFromJSONTyped,
552
+ InboundEmailListResponseMetaFromJSON: () => InboundEmailListResponseMetaFromJSON,
553
+ InboundEmailListResponseMetaFromJSONTyped: () => InboundEmailListResponseMetaFromJSONTyped,
554
+ InboundEmailListResponseMetaToJSON: () => InboundEmailListResponseMetaToJSON,
555
+ InboundEmailListResponseMetaToJSONTyped: () => InboundEmailListResponseMetaToJSONTyped,
556
+ InboundEmailListResponseToJSON: () => InboundEmailListResponseToJSON,
557
+ InboundEmailListResponseToJSONTyped: () => InboundEmailListResponseToJSONTyped,
558
+ InboundEmailResponseFromJSON: () => InboundEmailResponseFromJSON,
559
+ InboundEmailResponseFromJSONTyped: () => InboundEmailResponseFromJSONTyped,
560
+ InboundEmailResponseToJSON: () => InboundEmailResponseToJSON,
561
+ InboundEmailResponseToJSONTyped: () => InboundEmailResponseToJSONTyped,
562
+ InboundEmailSpfVerdictEnum: () => InboundEmailSpfVerdictEnum,
563
+ InboundEmailStatusEnum: () => InboundEmailStatusEnum,
564
+ InboundEmailToJSON: () => InboundEmailToJSON,
565
+ InboundEmailToJSONTyped: () => InboundEmailToJSONTyped,
529
566
  InboxApi: () => InboxApi,
530
567
  InboxListMetaFromJSON: () => InboxListMetaFromJSON,
531
568
  InboxListMetaFromJSONTyped: () => InboxListMetaFromJSONTyped,
@@ -543,6 +580,7 @@ __export(index_exports, {
543
580
  ListAllInboxStatusEnum: () => ListAllInboxStatusEnum,
544
581
  ListDevicesPlatformEnum: () => ListDevicesPlatformEnum,
545
582
  ListEmailsStatusEnum: () => ListEmailsStatusEnum,
583
+ ListInboundEmailsStatusEnum: () => ListInboundEmailsStatusEnum,
546
584
  ListPushStatusEnum: () => ListPushStatusEnum,
547
585
  ListSlackMessagesStatusEnum: () => ListSlackMessagesStatusEnum,
548
586
  ListSmsStatusEnum: () => ListSmsStatusEnum,
@@ -1145,6 +1183,10 @@ __export(index_exports, {
1145
1183
  SessionListResponseFromJSONTyped: () => SessionListResponseFromJSONTyped,
1146
1184
  SessionListResponseToJSON: () => SessionListResponseToJSON,
1147
1185
  SessionListResponseToJSONTyped: () => SessionListResponseToJSONTyped,
1186
+ SetDomainInboundRequestFromJSON: () => SetDomainInboundRequestFromJSON,
1187
+ SetDomainInboundRequestFromJSONTyped: () => SetDomainInboundRequestFromJSONTyped,
1188
+ SetDomainInboundRequestToJSON: () => SetDomainInboundRequestToJSON,
1189
+ SetDomainInboundRequestToJSONTyped: () => SetDomainInboundRequestToJSONTyped,
1148
1190
  SetPreferencesRequestFromJSON: () => SetPreferencesRequestFromJSON,
1149
1191
  SetPreferencesRequestFromJSONTyped: () => SetPreferencesRequestFromJSONTyped,
1150
1192
  SetPreferencesRequestPreferencesInnerFromJSON: () => SetPreferencesRequestPreferencesInnerFromJSON,
@@ -1922,6 +1964,14 @@ __export(index_exports, {
1922
1964
  instanceOfGetWaaSEndpoint200Response: () => instanceOfGetWaaSEndpoint200Response,
1923
1965
  instanceOfGetWaaSUsage200Response: () => instanceOfGetWaaSUsage200Response,
1924
1966
  instanceOfInAppNotification: () => instanceOfInAppNotification,
1967
+ instanceOfInboundAttachmentUrlResponse: () => instanceOfInboundAttachmentUrlResponse,
1968
+ instanceOfInboundAttachmentUrlResponseData: () => instanceOfInboundAttachmentUrlResponseData,
1969
+ instanceOfInboundEmail: () => instanceOfInboundEmail,
1970
+ instanceOfInboundEmailAttachment: () => instanceOfInboundEmailAttachment,
1971
+ instanceOfInboundEmailFrom: () => instanceOfInboundEmailFrom,
1972
+ instanceOfInboundEmailListResponse: () => instanceOfInboundEmailListResponse,
1973
+ instanceOfInboundEmailListResponseMeta: () => instanceOfInboundEmailListResponseMeta,
1974
+ instanceOfInboundEmailResponse: () => instanceOfInboundEmailResponse,
1925
1975
  instanceOfInboxListMeta: () => instanceOfInboxListMeta,
1926
1976
  instanceOfInboxListResponse: () => instanceOfInboxListResponse,
1927
1977
  instanceOfInboxNotificationResponse: () => instanceOfInboxNotificationResponse,
@@ -2069,6 +2119,7 @@ __export(index_exports, {
2069
2119
  instanceOfSessionListResponse: () => instanceOfSessionListResponse,
2070
2120
  instanceOfSessionListResponseData: () => instanceOfSessionListResponseData,
2071
2121
  instanceOfSessionListResponseDataSessionInfo: () => instanceOfSessionListResponseDataSessionInfo,
2122
+ instanceOfSetDomainInboundRequest: () => instanceOfSetDomainInboundRequest,
2072
2123
  instanceOfSetPreferencesRequest: () => instanceOfSetPreferencesRequest,
2073
2124
  instanceOfSetPreferencesRequestPreferencesInner: () => instanceOfSetPreferencesRequestPreferencesInner,
2074
2125
  instanceOfSignInAnonymouslyRequest: () => instanceOfSignInAnonymouslyRequest,
@@ -6931,6 +6982,301 @@ function InAppNotificationToJSONTyped(value, ignoreDiscriminator = false) {
6931
6982
  };
6932
6983
  }
6933
6984
 
6985
+ // src/src/models/InboundAttachmentUrlResponseData.ts
6986
+ function instanceOfInboundAttachmentUrlResponseData(value) {
6987
+ return true;
6988
+ }
6989
+ function InboundAttachmentUrlResponseDataFromJSON(json) {
6990
+ return InboundAttachmentUrlResponseDataFromJSONTyped(json, false);
6991
+ }
6992
+ function InboundAttachmentUrlResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6993
+ if (json == null) {
6994
+ return json;
6995
+ }
6996
+ return {
6997
+ "downloadUrl": json["download_url"] == null ? void 0 : json["download_url"],
6998
+ "filename": json["filename"] == null ? void 0 : json["filename"],
6999
+ "contentType": json["content_type"] == null ? void 0 : json["content_type"]
7000
+ };
7001
+ }
7002
+ function InboundAttachmentUrlResponseDataToJSON(json) {
7003
+ return InboundAttachmentUrlResponseDataToJSONTyped(json, false);
7004
+ }
7005
+ function InboundAttachmentUrlResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
7006
+ if (value == null) {
7007
+ return value;
7008
+ }
7009
+ return {
7010
+ "download_url": value["downloadUrl"],
7011
+ "filename": value["filename"],
7012
+ "content_type": value["contentType"]
7013
+ };
7014
+ }
7015
+
7016
+ // src/src/models/InboundAttachmentUrlResponse.ts
7017
+ function instanceOfInboundAttachmentUrlResponse(value) {
7018
+ return true;
7019
+ }
7020
+ function InboundAttachmentUrlResponseFromJSON(json) {
7021
+ return InboundAttachmentUrlResponseFromJSONTyped(json, false);
7022
+ }
7023
+ function InboundAttachmentUrlResponseFromJSONTyped(json, ignoreDiscriminator) {
7024
+ if (json == null) {
7025
+ return json;
7026
+ }
7027
+ return {
7028
+ "data": json["data"] == null ? void 0 : InboundAttachmentUrlResponseDataFromJSON(json["data"]),
7029
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
7030
+ };
7031
+ }
7032
+ function InboundAttachmentUrlResponseToJSON(json) {
7033
+ return InboundAttachmentUrlResponseToJSONTyped(json, false);
7034
+ }
7035
+ function InboundAttachmentUrlResponseToJSONTyped(value, ignoreDiscriminator = false) {
7036
+ if (value == null) {
7037
+ return value;
7038
+ }
7039
+ return {
7040
+ "data": InboundAttachmentUrlResponseDataToJSON(value["data"]),
7041
+ "meta": RequestMetaToJSON(value["meta"])
7042
+ };
7043
+ }
7044
+
7045
+ // src/src/models/InboundEmailFrom.ts
7046
+ function instanceOfInboundEmailFrom(value) {
7047
+ return true;
7048
+ }
7049
+ function InboundEmailFromFromJSON(json) {
7050
+ return InboundEmailFromFromJSONTyped(json, false);
7051
+ }
7052
+ function InboundEmailFromFromJSONTyped(json, ignoreDiscriminator) {
7053
+ if (json == null) {
7054
+ return json;
7055
+ }
7056
+ return {
7057
+ "email": json["email"] == null ? void 0 : json["email"],
7058
+ "name": json["name"] == null ? void 0 : json["name"]
7059
+ };
7060
+ }
7061
+ function InboundEmailFromToJSON(json) {
7062
+ return InboundEmailFromToJSONTyped(json, false);
7063
+ }
7064
+ function InboundEmailFromToJSONTyped(value, ignoreDiscriminator = false) {
7065
+ if (value == null) {
7066
+ return value;
7067
+ }
7068
+ return {
7069
+ "email": value["email"],
7070
+ "name": value["name"]
7071
+ };
7072
+ }
7073
+
7074
+ // src/src/models/InboundEmailAttachment.ts
7075
+ function instanceOfInboundEmailAttachment(value) {
7076
+ return true;
7077
+ }
7078
+ function InboundEmailAttachmentFromJSON(json) {
7079
+ return InboundEmailAttachmentFromJSONTyped(json, false);
7080
+ }
7081
+ function InboundEmailAttachmentFromJSONTyped(json, ignoreDiscriminator) {
7082
+ if (json == null) {
7083
+ return json;
7084
+ }
7085
+ return {
7086
+ "id": json["id"] == null ? void 0 : json["id"],
7087
+ "filename": json["filename"] == null ? void 0 : json["filename"],
7088
+ "contentType": json["content_type"] == null ? void 0 : json["content_type"],
7089
+ "size": json["size"] == null ? void 0 : json["size"]
7090
+ };
7091
+ }
7092
+ function InboundEmailAttachmentToJSON(json) {
7093
+ return InboundEmailAttachmentToJSONTyped(json, false);
7094
+ }
7095
+ function InboundEmailAttachmentToJSONTyped(value, ignoreDiscriminator = false) {
7096
+ if (value == null) {
7097
+ return value;
7098
+ }
7099
+ return {
7100
+ "id": value["id"],
7101
+ "filename": value["filename"],
7102
+ "content_type": value["contentType"],
7103
+ "size": value["size"]
7104
+ };
7105
+ }
7106
+
7107
+ // src/src/models/InboundEmail.ts
7108
+ var InboundEmailSpfVerdictEnum = {
7109
+ PASS: "PASS",
7110
+ FAIL: "FAIL",
7111
+ GRAY: "GRAY",
7112
+ PROCESSING_FAILED: "PROCESSING_FAILED"
7113
+ };
7114
+ var InboundEmailDkimVerdictEnum = {
7115
+ PASS: "PASS",
7116
+ FAIL: "FAIL",
7117
+ GRAY: "GRAY",
7118
+ PROCESSING_FAILED: "PROCESSING_FAILED"
7119
+ };
7120
+ var InboundEmailDmarcVerdictEnum = {
7121
+ PASS: "PASS",
7122
+ FAIL: "FAIL",
7123
+ GRAY: "GRAY",
7124
+ PROCESSING_FAILED: "PROCESSING_FAILED"
7125
+ };
7126
+ var InboundEmailStatusEnum = {
7127
+ RECEIVED: "received",
7128
+ PROCESSED: "processed",
7129
+ QUARANTINED: "quarantined",
7130
+ DROPPED: "dropped",
7131
+ FAILED: "failed"
7132
+ };
7133
+ function instanceOfInboundEmail(value) {
7134
+ return true;
7135
+ }
7136
+ function InboundEmailFromJSON(json) {
7137
+ return InboundEmailFromJSONTyped(json, false);
7138
+ }
7139
+ function InboundEmailFromJSONTyped(json, ignoreDiscriminator) {
7140
+ if (json == null) {
7141
+ return json;
7142
+ }
7143
+ return {
7144
+ "id": json["id"] == null ? void 0 : json["id"],
7145
+ "toEmail": json["to_email"] == null ? void 0 : json["to_email"],
7146
+ "from": json["from"] == null ? void 0 : InboundEmailFromFromJSON(json["from"]),
7147
+ "cc": json["cc"] == null ? void 0 : json["cc"],
7148
+ "subject": json["subject"] == null ? void 0 : json["subject"],
7149
+ "textBody": json["text_body"] == null ? void 0 : json["text_body"],
7150
+ "htmlBody": json["html_body"] == null ? void 0 : json["html_body"],
7151
+ "inReplyTo": json["in_reply_to"] == null ? void 0 : json["in_reply_to"],
7152
+ "repliedToMessageId": json["replied_to_message_id"] == null ? void 0 : json["replied_to_message_id"],
7153
+ "verified": json["verified"] == null ? void 0 : json["verified"],
7154
+ "spfVerdict": json["spf_verdict"] == null ? void 0 : json["spf_verdict"],
7155
+ "dkimVerdict": json["dkim_verdict"] == null ? void 0 : json["dkim_verdict"],
7156
+ "dmarcVerdict": json["dmarc_verdict"] == null ? void 0 : json["dmarc_verdict"],
7157
+ "status": json["status"] == null ? void 0 : json["status"],
7158
+ "attachments": json["attachments"] == null ? void 0 : json["attachments"].map(InboundEmailAttachmentFromJSON),
7159
+ "createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"])
7160
+ };
7161
+ }
7162
+ function InboundEmailToJSON(json) {
7163
+ return InboundEmailToJSONTyped(json, false);
7164
+ }
7165
+ function InboundEmailToJSONTyped(value, ignoreDiscriminator = false) {
7166
+ if (value == null) {
7167
+ return value;
7168
+ }
7169
+ return {
7170
+ "id": value["id"],
7171
+ "to_email": value["toEmail"],
7172
+ "from": InboundEmailFromToJSON(value["from"]),
7173
+ "cc": value["cc"],
7174
+ "subject": value["subject"],
7175
+ "text_body": value["textBody"],
7176
+ "html_body": value["htmlBody"],
7177
+ "in_reply_to": value["inReplyTo"],
7178
+ "replied_to_message_id": value["repliedToMessageId"],
7179
+ "verified": value["verified"],
7180
+ "spf_verdict": value["spfVerdict"],
7181
+ "dkim_verdict": value["dkimVerdict"],
7182
+ "dmarc_verdict": value["dmarcVerdict"],
7183
+ "status": value["status"],
7184
+ "attachments": value["attachments"] == null ? void 0 : value["attachments"].map(InboundEmailAttachmentToJSON),
7185
+ "created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString()
7186
+ };
7187
+ }
7188
+
7189
+ // src/src/models/InboundEmailListResponseMeta.ts
7190
+ function instanceOfInboundEmailListResponseMeta(value) {
7191
+ return true;
7192
+ }
7193
+ function InboundEmailListResponseMetaFromJSON(json) {
7194
+ return InboundEmailListResponseMetaFromJSONTyped(json, false);
7195
+ }
7196
+ function InboundEmailListResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
7197
+ if (json == null) {
7198
+ return json;
7199
+ }
7200
+ return {
7201
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"],
7202
+ "total": json["total"] == null ? void 0 : json["total"],
7203
+ "limit": json["limit"] == null ? void 0 : json["limit"],
7204
+ "offset": json["offset"] == null ? void 0 : json["offset"]
7205
+ };
7206
+ }
7207
+ function InboundEmailListResponseMetaToJSON(json) {
7208
+ return InboundEmailListResponseMetaToJSONTyped(json, false);
7209
+ }
7210
+ function InboundEmailListResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
7211
+ if (value == null) {
7212
+ return value;
7213
+ }
7214
+ return {
7215
+ "request_id": value["requestId"],
7216
+ "total": value["total"],
7217
+ "limit": value["limit"],
7218
+ "offset": value["offset"]
7219
+ };
7220
+ }
7221
+
7222
+ // src/src/models/InboundEmailListResponse.ts
7223
+ function instanceOfInboundEmailListResponse(value) {
7224
+ return true;
7225
+ }
7226
+ function InboundEmailListResponseFromJSON(json) {
7227
+ return InboundEmailListResponseFromJSONTyped(json, false);
7228
+ }
7229
+ function InboundEmailListResponseFromJSONTyped(json, ignoreDiscriminator) {
7230
+ if (json == null) {
7231
+ return json;
7232
+ }
7233
+ return {
7234
+ "data": json["data"] == null ? void 0 : json["data"].map(InboundEmailFromJSON),
7235
+ "meta": json["meta"] == null ? void 0 : InboundEmailListResponseMetaFromJSON(json["meta"])
7236
+ };
7237
+ }
7238
+ function InboundEmailListResponseToJSON(json) {
7239
+ return InboundEmailListResponseToJSONTyped(json, false);
7240
+ }
7241
+ function InboundEmailListResponseToJSONTyped(value, ignoreDiscriminator = false) {
7242
+ if (value == null) {
7243
+ return value;
7244
+ }
7245
+ return {
7246
+ "data": value["data"] == null ? void 0 : value["data"].map(InboundEmailToJSON),
7247
+ "meta": InboundEmailListResponseMetaToJSON(value["meta"])
7248
+ };
7249
+ }
7250
+
7251
+ // src/src/models/InboundEmailResponse.ts
7252
+ function instanceOfInboundEmailResponse(value) {
7253
+ return true;
7254
+ }
7255
+ function InboundEmailResponseFromJSON(json) {
7256
+ return InboundEmailResponseFromJSONTyped(json, false);
7257
+ }
7258
+ function InboundEmailResponseFromJSONTyped(json, ignoreDiscriminator) {
7259
+ if (json == null) {
7260
+ return json;
7261
+ }
7262
+ return {
7263
+ "data": json["data"] == null ? void 0 : InboundEmailFromJSON(json["data"]),
7264
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
7265
+ };
7266
+ }
7267
+ function InboundEmailResponseToJSON(json) {
7268
+ return InboundEmailResponseToJSONTyped(json, false);
7269
+ }
7270
+ function InboundEmailResponseToJSONTyped(value, ignoreDiscriminator = false) {
7271
+ if (value == null) {
7272
+ return value;
7273
+ }
7274
+ return {
7275
+ "data": InboundEmailToJSON(value["data"]),
7276
+ "meta": RequestMetaToJSON(value["meta"])
7277
+ };
7278
+ }
7279
+
6934
7280
  // src/src/models/InboxListMeta.ts
6935
7281
  function instanceOfInboxListMeta(value) {
6936
7282
  return true;
@@ -11903,6 +12249,33 @@ function SessionListResponseToJSONTyped(value, ignoreDiscriminator = false) {
11903
12249
  };
11904
12250
  }
11905
12251
 
12252
+ // src/src/models/SetDomainInboundRequest.ts
12253
+ function instanceOfSetDomainInboundRequest(value) {
12254
+ return true;
12255
+ }
12256
+ function SetDomainInboundRequestFromJSON(json) {
12257
+ return SetDomainInboundRequestFromJSONTyped(json, false);
12258
+ }
12259
+ function SetDomainInboundRequestFromJSONTyped(json, ignoreDiscriminator) {
12260
+ if (json == null) {
12261
+ return json;
12262
+ }
12263
+ return {
12264
+ "enabled": json["enabled"] == null ? void 0 : json["enabled"]
12265
+ };
12266
+ }
12267
+ function SetDomainInboundRequestToJSON(json) {
12268
+ return SetDomainInboundRequestToJSONTyped(json, false);
12269
+ }
12270
+ function SetDomainInboundRequestToJSONTyped(value, ignoreDiscriminator = false) {
12271
+ if (value == null) {
12272
+ return value;
12273
+ }
12274
+ return {
12275
+ "enabled": value["enabled"]
12276
+ };
12277
+ }
12278
+
11906
12279
  // src/src/models/SetPreferencesRequestPreferencesInner.ts
11907
12280
  function instanceOfSetPreferencesRequestPreferencesInner(value) {
11908
12281
  return true;
@@ -19282,6 +19655,45 @@ var DomainsApi = class extends BaseAPI {
19282
19655
  const response = await this.listDomainsRaw(initOverrides);
19283
19656
  return await response.value();
19284
19657
  }
19658
+ /**
19659
+ * Toggle email receiving for a domain. When enabled, the domain\'s DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
19660
+ * Enable or disable inbound email for a domain
19661
+ */
19662
+ async setDomainInboundRaw(requestParameters, initOverrides) {
19663
+ if (requestParameters["id"] == null) {
19664
+ throw new RequiredError(
19665
+ "id",
19666
+ 'Required parameter "id" was null or undefined when calling setDomainInbound().'
19667
+ );
19668
+ }
19669
+ if (requestParameters["setDomainInboundRequest"] == null) {
19670
+ throw new RequiredError(
19671
+ "setDomainInboundRequest",
19672
+ 'Required parameter "setDomainInboundRequest" was null or undefined when calling setDomainInbound().'
19673
+ );
19674
+ }
19675
+ const queryParameters = {};
19676
+ const headerParameters = {};
19677
+ headerParameters["Content-Type"] = "application/json";
19678
+ if (this.configuration && this.configuration.apiKey) {
19679
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19680
+ }
19681
+ const response = await this.request({
19682
+ path: `/domains/{id}/inbound`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19683
+ method: "PUT",
19684
+ headers: headerParameters,
19685
+ query: queryParameters,
19686
+ body: SetDomainInboundRequestToJSON(requestParameters["setDomainInboundRequest"])
19687
+ }, initOverrides);
19688
+ return new VoidApiResponse(response);
19689
+ }
19690
+ /**
19691
+ * Toggle email receiving for a domain. When enabled, the domain\'s DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
19692
+ * Enable or disable inbound email for a domain
19693
+ */
19694
+ async setDomainInbound(id, setDomainInboundRequest, initOverrides) {
19695
+ await this.setDomainInboundRaw({ id, setDomainInboundRequest }, initOverrides);
19696
+ }
19285
19697
  /**
19286
19698
  * Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
19287
19699
  * Trigger domain verification
@@ -19631,6 +20043,128 @@ var ExecutionsApi = class extends BaseAPI {
19631
20043
  }
19632
20044
  };
19633
20045
 
20046
+ // src/src/apis/InboundEmailApi.ts
20047
+ var InboundEmailApi = class extends BaseAPI {
20048
+ /**
20049
+ * Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email\'s `attachments` array.
20050
+ * Get an attachment download URL
20051
+ */
20052
+ async getInboundAttachmentUrlRaw(requestParameters, initOverrides) {
20053
+ if (requestParameters["id"] == null) {
20054
+ throw new RequiredError(
20055
+ "id",
20056
+ 'Required parameter "id" was null or undefined when calling getInboundAttachmentUrl().'
20057
+ );
20058
+ }
20059
+ if (requestParameters["attachmentId"] == null) {
20060
+ throw new RequiredError(
20061
+ "attachmentId",
20062
+ 'Required parameter "attachmentId" was null or undefined when calling getInboundAttachmentUrl().'
20063
+ );
20064
+ }
20065
+ const queryParameters = {};
20066
+ const headerParameters = {};
20067
+ if (this.configuration && this.configuration.apiKey) {
20068
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20069
+ }
20070
+ const response = await this.request({
20071
+ path: `/inbound-emails/{id}/attachments/{attachmentId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters["attachmentId"]))),
20072
+ method: "GET",
20073
+ headers: headerParameters,
20074
+ query: queryParameters
20075
+ }, initOverrides);
20076
+ return new JSONApiResponse(response, (jsonValue) => InboundAttachmentUrlResponseFromJSON(jsonValue));
20077
+ }
20078
+ /**
20079
+ * Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email\'s `attachments` array.
20080
+ * Get an attachment download URL
20081
+ */
20082
+ async getInboundAttachmentUrl(id, attachmentId, initOverrides) {
20083
+ const response = await this.getInboundAttachmentUrlRaw({ id, attachmentId }, initOverrides);
20084
+ return await response.value();
20085
+ }
20086
+ /**
20087
+ * Retrieve a single inbound email by id (scoped to the project).
20088
+ * Get a received email
20089
+ */
20090
+ async getInboundEmailRaw(requestParameters, initOverrides) {
20091
+ if (requestParameters["id"] == null) {
20092
+ throw new RequiredError(
20093
+ "id",
20094
+ 'Required parameter "id" was null or undefined when calling getInboundEmail().'
20095
+ );
20096
+ }
20097
+ const queryParameters = {};
20098
+ const headerParameters = {};
20099
+ if (this.configuration && this.configuration.apiKey) {
20100
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20101
+ }
20102
+ const response = await this.request({
20103
+ path: `/inbound-emails/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
20104
+ method: "GET",
20105
+ headers: headerParameters,
20106
+ query: queryParameters
20107
+ }, initOverrides);
20108
+ return new JSONApiResponse(response, (jsonValue) => InboundEmailResponseFromJSON(jsonValue));
20109
+ }
20110
+ /**
20111
+ * Retrieve a single inbound email by id (scoped to the project).
20112
+ * Get a received email
20113
+ */
20114
+ async getInboundEmail(id, initOverrides) {
20115
+ const response = await this.getInboundEmailRaw({ id }, initOverrides);
20116
+ return await response.value();
20117
+ }
20118
+ /**
20119
+ * List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
20120
+ * List received emails
20121
+ */
20122
+ async listInboundEmailsRaw(requestParameters, initOverrides) {
20123
+ const queryParameters = {};
20124
+ if (requestParameters["status"] != null) {
20125
+ queryParameters["status"] = requestParameters["status"];
20126
+ }
20127
+ if (requestParameters["to"] != null) {
20128
+ queryParameters["to"] = requestParameters["to"];
20129
+ }
20130
+ if (requestParameters["includeWithheld"] != null) {
20131
+ queryParameters["include_withheld"] = requestParameters["includeWithheld"];
20132
+ }
20133
+ if (requestParameters["limit"] != null) {
20134
+ queryParameters["limit"] = requestParameters["limit"];
20135
+ }
20136
+ if (requestParameters["offset"] != null) {
20137
+ queryParameters["offset"] = requestParameters["offset"];
20138
+ }
20139
+ const headerParameters = {};
20140
+ if (this.configuration && this.configuration.apiKey) {
20141
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20142
+ }
20143
+ const response = await this.request({
20144
+ path: `/inbound-emails`,
20145
+ method: "GET",
20146
+ headers: headerParameters,
20147
+ query: queryParameters
20148
+ }, initOverrides);
20149
+ return new JSONApiResponse(response, (jsonValue) => InboundEmailListResponseFromJSON(jsonValue));
20150
+ }
20151
+ /**
20152
+ * List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
20153
+ * List received emails
20154
+ */
20155
+ async listInboundEmails(status, to, includeWithheld, limit, offset, initOverrides) {
20156
+ const response = await this.listInboundEmailsRaw({ status, to, includeWithheld, limit, offset }, initOverrides);
20157
+ return await response.value();
20158
+ }
20159
+ };
20160
+ var ListInboundEmailsStatusEnum = {
20161
+ RECEIVED: "received",
20162
+ PROCESSED: "processed",
20163
+ QUARANTINED: "quarantined",
20164
+ DROPPED: "dropped",
20165
+ FAILED: "failed"
20166
+ };
20167
+
19634
20168
  // src/src/apis/InboxApi.ts
19635
20169
  var InboxApi = class extends BaseAPI {
19636
20170
  /**
@@ -24606,6 +25140,8 @@ var Zyphr = class {
24606
25140
  topics;
24607
25141
  devices;
24608
25142
  domains;
25143
+ /** Inbound (received) email — read access. Requires the `email:read` scope. */
25144
+ inbound;
24609
25145
  waas;
24610
25146
  auth;
24611
25147
  options;
@@ -24631,6 +25167,7 @@ var Zyphr = class {
24631
25167
  this.topics = new TopicsApi(config);
24632
25168
  this.devices = new DevicesApi(config);
24633
25169
  this.domains = new DomainsApi(config);
25170
+ this.inbound = new InboundEmailApi(config);
24634
25171
  this.waas = {
24635
25172
  applications: new WaaSApplicationsApi(config),
24636
25173
  eventTypes: new WaaSEventTypesApi(config),
@@ -25195,6 +25732,43 @@ var SDK_VERSION = "0.1.0";
25195
25732
  InAppNotificationPriorityEnum,
25196
25733
  InAppNotificationToJSON,
25197
25734
  InAppNotificationToJSONTyped,
25735
+ InboundAttachmentUrlResponseDataFromJSON,
25736
+ InboundAttachmentUrlResponseDataFromJSONTyped,
25737
+ InboundAttachmentUrlResponseDataToJSON,
25738
+ InboundAttachmentUrlResponseDataToJSONTyped,
25739
+ InboundAttachmentUrlResponseFromJSON,
25740
+ InboundAttachmentUrlResponseFromJSONTyped,
25741
+ InboundAttachmentUrlResponseToJSON,
25742
+ InboundAttachmentUrlResponseToJSONTyped,
25743
+ InboundEmailApi,
25744
+ InboundEmailAttachmentFromJSON,
25745
+ InboundEmailAttachmentFromJSONTyped,
25746
+ InboundEmailAttachmentToJSON,
25747
+ InboundEmailAttachmentToJSONTyped,
25748
+ InboundEmailDkimVerdictEnum,
25749
+ InboundEmailDmarcVerdictEnum,
25750
+ InboundEmailFromFromJSON,
25751
+ InboundEmailFromFromJSONTyped,
25752
+ InboundEmailFromJSON,
25753
+ InboundEmailFromJSONTyped,
25754
+ InboundEmailFromToJSON,
25755
+ InboundEmailFromToJSONTyped,
25756
+ InboundEmailListResponseFromJSON,
25757
+ InboundEmailListResponseFromJSONTyped,
25758
+ InboundEmailListResponseMetaFromJSON,
25759
+ InboundEmailListResponseMetaFromJSONTyped,
25760
+ InboundEmailListResponseMetaToJSON,
25761
+ InboundEmailListResponseMetaToJSONTyped,
25762
+ InboundEmailListResponseToJSON,
25763
+ InboundEmailListResponseToJSONTyped,
25764
+ InboundEmailResponseFromJSON,
25765
+ InboundEmailResponseFromJSONTyped,
25766
+ InboundEmailResponseToJSON,
25767
+ InboundEmailResponseToJSONTyped,
25768
+ InboundEmailSpfVerdictEnum,
25769
+ InboundEmailStatusEnum,
25770
+ InboundEmailToJSON,
25771
+ InboundEmailToJSONTyped,
25198
25772
  InboxApi,
25199
25773
  InboxListMetaFromJSON,
25200
25774
  InboxListMetaFromJSONTyped,
@@ -25212,6 +25786,7 @@ var SDK_VERSION = "0.1.0";
25212
25786
  ListAllInboxStatusEnum,
25213
25787
  ListDevicesPlatformEnum,
25214
25788
  ListEmailsStatusEnum,
25789
+ ListInboundEmailsStatusEnum,
25215
25790
  ListPushStatusEnum,
25216
25791
  ListSlackMessagesStatusEnum,
25217
25792
  ListSmsStatusEnum,
@@ -25814,6 +26389,10 @@ var SDK_VERSION = "0.1.0";
25814
26389
  SessionListResponseFromJSONTyped,
25815
26390
  SessionListResponseToJSON,
25816
26391
  SessionListResponseToJSONTyped,
26392
+ SetDomainInboundRequestFromJSON,
26393
+ SetDomainInboundRequestFromJSONTyped,
26394
+ SetDomainInboundRequestToJSON,
26395
+ SetDomainInboundRequestToJSONTyped,
25817
26396
  SetPreferencesRequestFromJSON,
25818
26397
  SetPreferencesRequestFromJSONTyped,
25819
26398
  SetPreferencesRequestPreferencesInnerFromJSON,
@@ -26591,6 +27170,14 @@ var SDK_VERSION = "0.1.0";
26591
27170
  instanceOfGetWaaSEndpoint200Response,
26592
27171
  instanceOfGetWaaSUsage200Response,
26593
27172
  instanceOfInAppNotification,
27173
+ instanceOfInboundAttachmentUrlResponse,
27174
+ instanceOfInboundAttachmentUrlResponseData,
27175
+ instanceOfInboundEmail,
27176
+ instanceOfInboundEmailAttachment,
27177
+ instanceOfInboundEmailFrom,
27178
+ instanceOfInboundEmailListResponse,
27179
+ instanceOfInboundEmailListResponseMeta,
27180
+ instanceOfInboundEmailResponse,
26594
27181
  instanceOfInboxListMeta,
26595
27182
  instanceOfInboxListResponse,
26596
27183
  instanceOfInboxNotificationResponse,
@@ -26738,6 +27325,7 @@ var SDK_VERSION = "0.1.0";
26738
27325
  instanceOfSessionListResponse,
26739
27326
  instanceOfSessionListResponseData,
26740
27327
  instanceOfSessionListResponseDataSessionInfo,
27328
+ instanceOfSetDomainInboundRequest,
26741
27329
  instanceOfSetPreferencesRequest,
26742
27330
  instanceOfSetPreferencesRequestPreferencesInner,
26743
27331
  instanceOfSignInAnonymouslyRequest,