@zyphr-dev/node-sdk 0.1.23 → 0.1.25

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.js CHANGED
@@ -1086,6 +1086,9 @@ function AuthUserFromJSONTyped(json, ignoreDiscriminator) {
1086
1086
  "phoneVerified": json["phone_verified"] == null ? void 0 : json["phone_verified"],
1087
1087
  "status": json["status"] == null ? void 0 : json["status"],
1088
1088
  "mfaEnabled": json["mfa_enabled"] == null ? void 0 : json["mfa_enabled"],
1089
+ "isAnonymous": json["is_anonymous"] == null ? void 0 : json["is_anonymous"],
1090
+ "anonymousDeviceId": json["anonymous_device_id"] == null ? void 0 : json["anonymous_device_id"],
1091
+ "firstActivityAt": json["first_activity_at"] == null ? void 0 : new Date(json["first_activity_at"]),
1089
1092
  "createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"]),
1090
1093
  "updatedAt": json["updated_at"] == null ? void 0 : new Date(json["updated_at"]),
1091
1094
  "lastLoginAt": json["last_login_at"] == null ? void 0 : new Date(json["last_login_at"])
@@ -1109,6 +1112,9 @@ function AuthUserToJSONTyped(value, ignoreDiscriminator = false) {
1109
1112
  "phone_verified": value["phoneVerified"],
1110
1113
  "status": value["status"],
1111
1114
  "mfa_enabled": value["mfaEnabled"],
1115
+ "is_anonymous": value["isAnonymous"],
1116
+ "anonymous_device_id": value["anonymousDeviceId"],
1117
+ "first_activity_at": value["firstActivityAt"] == null ? void 0 : value["firstActivityAt"].toISOString(),
1112
1118
  "created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString(),
1113
1119
  "updated_at": value["updatedAt"] == null ? void 0 : value["updatedAt"].toISOString(),
1114
1120
  "last_login_at": value["lastLoginAt"] == null ? void 0 : value["lastLoginAt"].toISOString()
@@ -1386,6 +1392,38 @@ function BatchPublishWaaSEvents201ResponseToJSONTyped(value, ignoreDiscriminator
1386
1392
  };
1387
1393
  }
1388
1394
 
1395
+ // src/src/models/BatchRecipient.ts
1396
+ function instanceOfBatchRecipient(value) {
1397
+ if (!("email" in value) || value["email"] === void 0) return false;
1398
+ return true;
1399
+ }
1400
+ function BatchRecipientFromJSON(json) {
1401
+ return BatchRecipientFromJSONTyped(json, false);
1402
+ }
1403
+ function BatchRecipientFromJSONTyped(json, ignoreDiscriminator) {
1404
+ if (json == null) {
1405
+ return json;
1406
+ }
1407
+ return {
1408
+ "email": json["email"],
1409
+ "name": json["name"] == null ? void 0 : json["name"],
1410
+ "variables": json["variables"] == null ? void 0 : json["variables"]
1411
+ };
1412
+ }
1413
+ function BatchRecipientToJSON(json) {
1414
+ return BatchRecipientToJSONTyped(json, false);
1415
+ }
1416
+ function BatchRecipientToJSONTyped(value, ignoreDiscriminator = false) {
1417
+ if (value == null) {
1418
+ return value;
1419
+ }
1420
+ return {
1421
+ "email": value["email"],
1422
+ "name": value["name"],
1423
+ "variables": value["variables"]
1424
+ };
1425
+ }
1426
+
1389
1427
  // src/src/models/BulkRetryWebhookDeliveriesRequest.ts
1390
1428
  var BulkRetryWebhookDeliveriesRequestStatusEnum = {
1391
1429
  FAILED: "failed",
@@ -2028,6 +2066,172 @@ function ConsentWithdrawResponseToJSONTyped(value, ignoreDiscriminator = false)
2028
2066
  };
2029
2067
  }
2030
2068
 
2069
+ // src/src/models/ConvertAnonymousUserRequestOneOf.ts
2070
+ var ConvertAnonymousUserRequestOneOfMethodEnum = {
2071
+ PASSWORD: "password"
2072
+ };
2073
+ function instanceOfConvertAnonymousUserRequestOneOf(value) {
2074
+ if (!("method" in value) || value["method"] === void 0) return false;
2075
+ if (!("email" in value) || value["email"] === void 0) return false;
2076
+ if (!("password" in value) || value["password"] === void 0) return false;
2077
+ return true;
2078
+ }
2079
+ function ConvertAnonymousUserRequestOneOfFromJSON(json) {
2080
+ return ConvertAnonymousUserRequestOneOfFromJSONTyped(json, false);
2081
+ }
2082
+ function ConvertAnonymousUserRequestOneOfFromJSONTyped(json, ignoreDiscriminator) {
2083
+ if (json == null) {
2084
+ return json;
2085
+ }
2086
+ return {
2087
+ "method": json["method"],
2088
+ "email": json["email"],
2089
+ "password": json["password"],
2090
+ "name": json["name"] == null ? void 0 : json["name"]
2091
+ };
2092
+ }
2093
+ function ConvertAnonymousUserRequestOneOfToJSON(json) {
2094
+ return ConvertAnonymousUserRequestOneOfToJSONTyped(json, false);
2095
+ }
2096
+ function ConvertAnonymousUserRequestOneOfToJSONTyped(value, ignoreDiscriminator = false) {
2097
+ if (value == null) {
2098
+ return value;
2099
+ }
2100
+ return {
2101
+ "method": value["method"],
2102
+ "email": value["email"],
2103
+ "password": value["password"],
2104
+ "name": value["name"]
2105
+ };
2106
+ }
2107
+
2108
+ // src/src/models/ConvertAnonymousUserRequestOneOf1AppleUserName.ts
2109
+ function instanceOfConvertAnonymousUserRequestOneOf1AppleUserName(value) {
2110
+ return true;
2111
+ }
2112
+ function ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON(json) {
2113
+ return ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped(json, false);
2114
+ }
2115
+ function ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped(json, ignoreDiscriminator) {
2116
+ if (json == null) {
2117
+ return json;
2118
+ }
2119
+ return {
2120
+ "firstName": json["firstName"] == null ? void 0 : json["firstName"],
2121
+ "lastName": json["lastName"] == null ? void 0 : json["lastName"]
2122
+ };
2123
+ }
2124
+ function ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON(json) {
2125
+ return ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped(json, false);
2126
+ }
2127
+ function ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped(value, ignoreDiscriminator = false) {
2128
+ if (value == null) {
2129
+ return value;
2130
+ }
2131
+ return {
2132
+ "firstName": value["firstName"],
2133
+ "lastName": value["lastName"]
2134
+ };
2135
+ }
2136
+
2137
+ // src/src/models/ConvertAnonymousUserRequestOneOf1AppleUser.ts
2138
+ function instanceOfConvertAnonymousUserRequestOneOf1AppleUser(value) {
2139
+ return true;
2140
+ }
2141
+ function ConvertAnonymousUserRequestOneOf1AppleUserFromJSON(json) {
2142
+ return ConvertAnonymousUserRequestOneOf1AppleUserFromJSONTyped(json, false);
2143
+ }
2144
+ function ConvertAnonymousUserRequestOneOf1AppleUserFromJSONTyped(json, ignoreDiscriminator) {
2145
+ if (json == null) {
2146
+ return json;
2147
+ }
2148
+ return {
2149
+ "name": json["name"] == null ? void 0 : ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON(json["name"])
2150
+ };
2151
+ }
2152
+ function ConvertAnonymousUserRequestOneOf1AppleUserToJSON(json) {
2153
+ return ConvertAnonymousUserRequestOneOf1AppleUserToJSONTyped(json, false);
2154
+ }
2155
+ function ConvertAnonymousUserRequestOneOf1AppleUserToJSONTyped(value, ignoreDiscriminator = false) {
2156
+ if (value == null) {
2157
+ return value;
2158
+ }
2159
+ return {
2160
+ "name": ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON(value["name"])
2161
+ };
2162
+ }
2163
+
2164
+ // src/src/models/ConvertAnonymousUserRequestOneOf1.ts
2165
+ var ConvertAnonymousUserRequestOneOf1MethodEnum = {
2166
+ OAUTH: "oauth"
2167
+ };
2168
+ function instanceOfConvertAnonymousUserRequestOneOf1(value) {
2169
+ if (!("method" in value) || value["method"] === void 0) return false;
2170
+ if (!("code" in value) || value["code"] === void 0) return false;
2171
+ if (!("state" in value) || value["state"] === void 0) return false;
2172
+ return true;
2173
+ }
2174
+ function ConvertAnonymousUserRequestOneOf1FromJSON(json) {
2175
+ return ConvertAnonymousUserRequestOneOf1FromJSONTyped(json, false);
2176
+ }
2177
+ function ConvertAnonymousUserRequestOneOf1FromJSONTyped(json, ignoreDiscriminator) {
2178
+ if (json == null) {
2179
+ return json;
2180
+ }
2181
+ return {
2182
+ "method": json["method"],
2183
+ "code": json["code"],
2184
+ "state": json["state"],
2185
+ "appleUser": json["apple_user"] == null ? void 0 : ConvertAnonymousUserRequestOneOf1AppleUserFromJSON(json["apple_user"])
2186
+ };
2187
+ }
2188
+ function ConvertAnonymousUserRequestOneOf1ToJSON(json) {
2189
+ return ConvertAnonymousUserRequestOneOf1ToJSONTyped(json, false);
2190
+ }
2191
+ function ConvertAnonymousUserRequestOneOf1ToJSONTyped(value, ignoreDiscriminator = false) {
2192
+ if (value == null) {
2193
+ return value;
2194
+ }
2195
+ return {
2196
+ "method": value["method"],
2197
+ "code": value["code"],
2198
+ "state": value["state"],
2199
+ "apple_user": ConvertAnonymousUserRequestOneOf1AppleUserToJSON(value["appleUser"])
2200
+ };
2201
+ }
2202
+
2203
+ // src/src/models/ConvertAnonymousUserRequest.ts
2204
+ function ConvertAnonymousUserRequestFromJSON(json) {
2205
+ return ConvertAnonymousUserRequestFromJSONTyped(json, false);
2206
+ }
2207
+ function ConvertAnonymousUserRequestFromJSONTyped(json, ignoreDiscriminator) {
2208
+ if (json == null) {
2209
+ return json;
2210
+ }
2211
+ if (instanceOfConvertAnonymousUserRequestOneOf(json)) {
2212
+ return ConvertAnonymousUserRequestOneOfFromJSONTyped(json, true);
2213
+ }
2214
+ if (instanceOfConvertAnonymousUserRequestOneOf1(json)) {
2215
+ return ConvertAnonymousUserRequestOneOf1FromJSONTyped(json, true);
2216
+ }
2217
+ return {};
2218
+ }
2219
+ function ConvertAnonymousUserRequestToJSON(json) {
2220
+ return ConvertAnonymousUserRequestToJSONTyped(json, false);
2221
+ }
2222
+ function ConvertAnonymousUserRequestToJSONTyped(value, ignoreDiscriminator = false) {
2223
+ if (value == null) {
2224
+ return value;
2225
+ }
2226
+ if (instanceOfConvertAnonymousUserRequestOneOf(value)) {
2227
+ return ConvertAnonymousUserRequestOneOfToJSON(value);
2228
+ }
2229
+ if (instanceOfConvertAnonymousUserRequestOneOf1(value)) {
2230
+ return ConvertAnonymousUserRequestOneOf1ToJSON(value);
2231
+ }
2232
+ return {};
2233
+ }
2234
+
2031
2235
  // src/src/models/CreateCategoryRequest.ts
2032
2236
  function instanceOfCreateCategoryRequest(value) {
2033
2237
  if (!("name" in value) || value["name"] === void 0) return false;
@@ -7193,92 +7397,50 @@ function RevokeSessionRequestToJSONTyped(value, ignoreDiscriminator = false) {
7193
7397
  };
7194
7398
  }
7195
7399
 
7196
- // src/src/models/SendEmailRequest.ts
7197
- function instanceOfSendEmailRequest(value) {
7400
+ // src/src/models/SendBatchEmailRequest.ts
7401
+ function instanceOfSendBatchEmailRequest(value) {
7402
+ if (!("from" in value) || value["from"] === void 0) return false;
7198
7403
  if (!("to" in value) || value["to"] === void 0) return false;
7199
- if (!("subject" in value) || value["subject"] === void 0) return false;
7200
7404
  return true;
7201
7405
  }
7202
- function SendEmailRequestFromJSON(json) {
7203
- return SendEmailRequestFromJSONTyped(json, false);
7406
+ function SendBatchEmailRequestFromJSON(json) {
7407
+ return SendBatchEmailRequestFromJSONTyped(json, false);
7204
7408
  }
7205
- function SendEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
7409
+ function SendBatchEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
7206
7410
  if (json == null) {
7207
7411
  return json;
7208
7412
  }
7209
7413
  return {
7210
- "to": json["to"].map(EmailAddressFromJSON),
7211
- "from": json["from"] == null ? void 0 : EmailAddressFromJSON(json["from"]),
7414
+ "from": EmailAddressFromJSON(json["from"]),
7415
+ "to": json["to"].map(BatchRecipientFromJSON),
7212
7416
  "replyTo": json["reply_to"] == null ? void 0 : EmailAddressFromJSON(json["reply_to"]),
7213
- "cc": json["cc"] == null ? void 0 : json["cc"],
7214
- "bcc": json["bcc"] == null ? void 0 : json["bcc"],
7215
- "subject": json["subject"],
7417
+ "subject": json["subject"] == null ? void 0 : json["subject"],
7216
7418
  "html": json["html"] == null ? void 0 : json["html"],
7217
7419
  "text": json["text"] == null ? void 0 : json["text"],
7218
7420
  "templateId": json["template_id"] == null ? void 0 : json["template_id"],
7219
7421
  "templateData": json["template_data"] == null ? void 0 : json["template_data"],
7220
- "attachments": json["attachments"] == null ? void 0 : json["attachments"].map(EmailAttachmentFromJSON),
7221
- "headers": json["headers"] == null ? void 0 : json["headers"],
7222
7422
  "tags": json["tags"] == null ? void 0 : json["tags"],
7223
- "metadata": json["metadata"] == null ? void 0 : json["metadata"],
7224
- "scheduledAt": json["scheduled_at"] == null ? void 0 : new Date(json["scheduled_at"]),
7225
- "subscriberId": json["subscriber_id"] == null ? void 0 : json["subscriber_id"],
7226
- "category": json["category"] == null ? void 0 : json["category"]
7423
+ "metadata": json["metadata"] == null ? void 0 : json["metadata"]
7227
7424
  };
7228
7425
  }
7229
- function SendEmailRequestToJSON(json) {
7230
- return SendEmailRequestToJSONTyped(json, false);
7426
+ function SendBatchEmailRequestToJSON(json) {
7427
+ return SendBatchEmailRequestToJSONTyped(json, false);
7231
7428
  }
7232
- function SendEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
7429
+ function SendBatchEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
7233
7430
  if (value == null) {
7234
7431
  return value;
7235
7432
  }
7236
7433
  return {
7237
- "to": value["to"].map(EmailAddressToJSON),
7238
7434
  "from": EmailAddressToJSON(value["from"]),
7435
+ "to": value["to"].map(BatchRecipientToJSON),
7239
7436
  "reply_to": EmailAddressToJSON(value["replyTo"]),
7240
- "cc": value["cc"],
7241
- "bcc": value["bcc"],
7242
7437
  "subject": value["subject"],
7243
7438
  "html": value["html"],
7244
7439
  "text": value["text"],
7245
7440
  "template_id": value["templateId"],
7246
7441
  "template_data": value["templateData"],
7247
- "attachments": value["attachments"] == null ? void 0 : value["attachments"].map(EmailAttachmentToJSON),
7248
- "headers": value["headers"],
7249
7442
  "tags": value["tags"],
7250
- "metadata": value["metadata"],
7251
- "scheduled_at": value["scheduledAt"] == null ? void 0 : value["scheduledAt"].toISOString(),
7252
- "subscriber_id": value["subscriberId"],
7253
- "category": value["category"]
7254
- };
7255
- }
7256
-
7257
- // src/src/models/SendBatchEmailRequest.ts
7258
- function instanceOfSendBatchEmailRequest(value) {
7259
- if (!("messages" in value) || value["messages"] === void 0) return false;
7260
- return true;
7261
- }
7262
- function SendBatchEmailRequestFromJSON(json) {
7263
- return SendBatchEmailRequestFromJSONTyped(json, false);
7264
- }
7265
- function SendBatchEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
7266
- if (json == null) {
7267
- return json;
7268
- }
7269
- return {
7270
- "messages": json["messages"].map(SendEmailRequestFromJSON)
7271
- };
7272
- }
7273
- function SendBatchEmailRequestToJSON(json) {
7274
- return SendBatchEmailRequestToJSONTyped(json, false);
7275
- }
7276
- function SendBatchEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
7277
- if (value == null) {
7278
- return value;
7279
- }
7280
- return {
7281
- "messages": value["messages"].map(SendEmailRequestToJSON)
7443
+ "metadata": value["metadata"]
7282
7444
  };
7283
7445
  }
7284
7446
 
@@ -7685,6 +7847,67 @@ function SendBatchSmsResponseToJSONTyped(value, ignoreDiscriminator = false) {
7685
7847
  };
7686
7848
  }
7687
7849
 
7850
+ // src/src/models/SendEmailRequest.ts
7851
+ function instanceOfSendEmailRequest(value) {
7852
+ if (!("to" in value) || value["to"] === void 0) return false;
7853
+ if (!("subject" in value) || value["subject"] === void 0) return false;
7854
+ return true;
7855
+ }
7856
+ function SendEmailRequestFromJSON(json) {
7857
+ return SendEmailRequestFromJSONTyped(json, false);
7858
+ }
7859
+ function SendEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
7860
+ if (json == null) {
7861
+ return json;
7862
+ }
7863
+ return {
7864
+ "to": json["to"].map(EmailAddressFromJSON),
7865
+ "from": json["from"] == null ? void 0 : EmailAddressFromJSON(json["from"]),
7866
+ "replyTo": json["reply_to"] == null ? void 0 : EmailAddressFromJSON(json["reply_to"]),
7867
+ "cc": json["cc"] == null ? void 0 : json["cc"],
7868
+ "bcc": json["bcc"] == null ? void 0 : json["bcc"],
7869
+ "subject": json["subject"],
7870
+ "html": json["html"] == null ? void 0 : json["html"],
7871
+ "text": json["text"] == null ? void 0 : json["text"],
7872
+ "templateId": json["template_id"] == null ? void 0 : json["template_id"],
7873
+ "templateData": json["template_data"] == null ? void 0 : json["template_data"],
7874
+ "attachments": json["attachments"] == null ? void 0 : json["attachments"].map(EmailAttachmentFromJSON),
7875
+ "headers": json["headers"] == null ? void 0 : json["headers"],
7876
+ "tags": json["tags"] == null ? void 0 : json["tags"],
7877
+ "metadata": json["metadata"] == null ? void 0 : json["metadata"],
7878
+ "scheduledAt": json["scheduled_at"] == null ? void 0 : new Date(json["scheduled_at"]),
7879
+ "subscriberId": json["subscriber_id"] == null ? void 0 : json["subscriber_id"],
7880
+ "category": json["category"] == null ? void 0 : json["category"]
7881
+ };
7882
+ }
7883
+ function SendEmailRequestToJSON(json) {
7884
+ return SendEmailRequestToJSONTyped(json, false);
7885
+ }
7886
+ function SendEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
7887
+ if (value == null) {
7888
+ return value;
7889
+ }
7890
+ return {
7891
+ "to": value["to"].map(EmailAddressToJSON),
7892
+ "from": EmailAddressToJSON(value["from"]),
7893
+ "reply_to": EmailAddressToJSON(value["replyTo"]),
7894
+ "cc": value["cc"],
7895
+ "bcc": value["bcc"],
7896
+ "subject": value["subject"],
7897
+ "html": value["html"],
7898
+ "text": value["text"],
7899
+ "template_id": value["templateId"],
7900
+ "template_data": value["templateData"],
7901
+ "attachments": value["attachments"] == null ? void 0 : value["attachments"].map(EmailAttachmentToJSON),
7902
+ "headers": value["headers"],
7903
+ "tags": value["tags"],
7904
+ "metadata": value["metadata"],
7905
+ "scheduled_at": value["scheduledAt"] == null ? void 0 : value["scheduledAt"].toISOString(),
7906
+ "subscriber_id": value["subscriberId"],
7907
+ "category": value["category"]
7908
+ };
7909
+ }
7910
+
7688
7911
  // src/src/models/SendEmailResponseMeta.ts
7689
7912
  function instanceOfSendEmailResponseMeta(value) {
7690
7913
  return true;
@@ -8653,6 +8876,38 @@ function SetPreferencesRequestToJSONTyped(value, ignoreDiscriminator = false) {
8653
8876
  };
8654
8877
  }
8655
8878
 
8879
+ // src/src/models/SignInAnonymouslyRequest.ts
8880
+ function instanceOfSignInAnonymouslyRequest(value) {
8881
+ if (!("deviceId" in value) || value["deviceId"] === void 0) return false;
8882
+ return true;
8883
+ }
8884
+ function SignInAnonymouslyRequestFromJSON(json) {
8885
+ return SignInAnonymouslyRequestFromJSONTyped(json, false);
8886
+ }
8887
+ function SignInAnonymouslyRequestFromJSONTyped(json, ignoreDiscriminator) {
8888
+ if (json == null) {
8889
+ return json;
8890
+ }
8891
+ return {
8892
+ "deviceId": json["device_id"],
8893
+ "name": json["name"] == null ? void 0 : json["name"],
8894
+ "metadata": json["metadata"] == null ? void 0 : json["metadata"]
8895
+ };
8896
+ }
8897
+ function SignInAnonymouslyRequestToJSON(json) {
8898
+ return SignInAnonymouslyRequestToJSONTyped(json, false);
8899
+ }
8900
+ function SignInAnonymouslyRequestToJSONTyped(value, ignoreDiscriminator = false) {
8901
+ if (value == null) {
8902
+ return value;
8903
+ }
8904
+ return {
8905
+ "device_id": value["deviceId"],
8906
+ "name": value["name"],
8907
+ "metadata": value["metadata"]
8908
+ };
8909
+ }
8910
+
8656
8911
  // src/src/models/SlackMessage.ts
8657
8912
  function instanceOfSlackMessage(value) {
8658
8913
  return true;
@@ -9446,7 +9701,8 @@ function TemplateResponseFromJSONTyped(json, ignoreDiscriminator) {
9446
9701
  }
9447
9702
  return {
9448
9703
  "data": json["data"] == null ? void 0 : TemplateFromJSON(json["data"]),
9449
- "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
9704
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"]),
9705
+ "warnings": json["warnings"] == null ? void 0 : json["warnings"]
9450
9706
  };
9451
9707
  }
9452
9708
  function TemplateResponseToJSON(json) {
@@ -9458,7 +9714,8 @@ function TemplateResponseToJSONTyped(value, ignoreDiscriminator = false) {
9458
9714
  }
9459
9715
  return {
9460
9716
  "data": TemplateToJSON(value["data"]),
9461
- "meta": RequestMetaToJSON(value["meta"])
9717
+ "meta": RequestMetaToJSON(value["meta"]),
9718
+ "warnings": value["warnings"]
9462
9719
  };
9463
9720
  }
9464
9721
 
@@ -14032,6 +14289,37 @@ var AuthPhoneApi = class extends BaseAPI {
14032
14289
 
14033
14290
  // src/src/apis/AuthRegistrationApi.ts
14034
14291
  var AuthRegistrationApi = class extends BaseAPI {
14292
+ /**
14293
+ * Upgrade the calling anonymous user to a full email+password account in place. The end_user.id is preserved, so customer-domain tables with foreign keys to end_users.id need no migration on conversion. All prior sessions for the user (including the anonymous token used to make this call) are revoked. A fresh token pair is returned in the response body. The conversion is the moment the user becomes billable -- MAU is tracked from this point forward.
14294
+ * Convert anonymous account to a full account
14295
+ */
14296
+ async convertAnonymousUserRaw(requestParameters, initOverrides) {
14297
+ if (requestParameters["convertAnonymousUserRequest"] == null) {
14298
+ throw new RequiredError(
14299
+ "convertAnonymousUserRequest",
14300
+ 'Required parameter "convertAnonymousUserRequest" was null or undefined when calling convertAnonymousUser().'
14301
+ );
14302
+ }
14303
+ const queryParameters = {};
14304
+ const headerParameters = {};
14305
+ headerParameters["Content-Type"] = "application/json";
14306
+ const response = await this.request({
14307
+ path: `/auth/users/convert`,
14308
+ method: "POST",
14309
+ headers: headerParameters,
14310
+ query: queryParameters,
14311
+ body: ConvertAnonymousUserRequestToJSON(requestParameters["convertAnonymousUserRequest"])
14312
+ }, initOverrides);
14313
+ return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
14314
+ }
14315
+ /**
14316
+ * Upgrade the calling anonymous user to a full email+password account in place. The end_user.id is preserved, so customer-domain tables with foreign keys to end_users.id need no migration on conversion. All prior sessions for the user (including the anonymous token used to make this call) are revoked. A fresh token pair is returned in the response body. The conversion is the moment the user becomes billable -- MAU is tracked from this point forward.
14317
+ * Convert anonymous account to a full account
14318
+ */
14319
+ async convertAnonymousUser(convertAnonymousUserRequest, initOverrides) {
14320
+ const response = await this.convertAnonymousUserRaw({ convertAnonymousUserRequest }, initOverrides);
14321
+ return await response.value();
14322
+ }
14035
14323
  /**
14036
14324
  * Register a new end user with email and password.
14037
14325
  * Register a new end user
@@ -14069,6 +14357,40 @@ var AuthRegistrationApi = class extends BaseAPI {
14069
14357
  const response = await this.registerEndUserRaw({ registerRequest }, initOverrides);
14070
14358
  return await response.value();
14071
14359
  }
14360
+ /**
14361
+ * Issue an end-user identity to a device without email, password, OAuth, or any other credential. Idempotent per (application, environment, device_id): repeated calls with the same device_id return the same user but a fresh token pair. Prior sessions for the user remain valid until natural expiry. Anonymous users do not count toward MAU quota until their first authenticated request after sign-in (excluding /v1/auth/refresh). Convert an anonymous user to a full account via POST /v1/auth/users/convert.
14362
+ * Sign in anonymously
14363
+ */
14364
+ async signInAnonymouslyRaw(requestParameters, initOverrides) {
14365
+ if (requestParameters["signInAnonymouslyRequest"] == null) {
14366
+ throw new RequiredError(
14367
+ "signInAnonymouslyRequest",
14368
+ 'Required parameter "signInAnonymouslyRequest" was null or undefined when calling signInAnonymously().'
14369
+ );
14370
+ }
14371
+ const queryParameters = {};
14372
+ const headerParameters = {};
14373
+ headerParameters["Content-Type"] = "application/json";
14374
+ if (this.configuration && this.configuration.apiKey) {
14375
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
14376
+ }
14377
+ const response = await this.request({
14378
+ path: `/auth/users/anonymous`,
14379
+ method: "POST",
14380
+ headers: headerParameters,
14381
+ query: queryParameters,
14382
+ body: SignInAnonymouslyRequestToJSON(requestParameters["signInAnonymouslyRequest"])
14383
+ }, initOverrides);
14384
+ return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
14385
+ }
14386
+ /**
14387
+ * Issue an end-user identity to a device without email, password, OAuth, or any other credential. Idempotent per (application, environment, device_id): repeated calls with the same device_id return the same user but a fresh token pair. Prior sessions for the user remain valid until natural expiry. Anonymous users do not count toward MAU quota until their first authenticated request after sign-in (excluding /v1/auth/refresh). Convert an anonymous user to a full account via POST /v1/auth/users/convert.
14388
+ * Sign in anonymously
14389
+ */
14390
+ async signInAnonymously(signInAnonymouslyRequest, initOverrides) {
14391
+ const response = await this.signInAnonymouslyRaw({ signInAnonymouslyRequest }, initOverrides);
14392
+ return await response.value();
14393
+ }
14072
14394
  };
14073
14395
 
14074
14396
  // src/src/apis/AuthSessionsApi.ts
@@ -14975,7 +15297,7 @@ var EmailsApi = class extends BaseAPI {
14975
15297
  return await response.value();
14976
15298
  }
14977
15299
  /**
14978
- * Send up to 100 emails in a single request. Each recipient gets their own message record.
15300
+ * Send a single email to up to 100 recipients in one request. Each recipient gets their own message record. Provide either raw content (`subject` plus `html` and/or `text`) or a `template_id` with `template_data`. Per-recipient `variables` are merged on top of the batch-level `template_data`.
14979
15301
  * Send batch emails
14980
15302
  */
14981
15303
  async sendBatchEmailRaw(requestParameters, initOverrides) {
@@ -15001,7 +15323,7 @@ var EmailsApi = class extends BaseAPI {
15001
15323
  return new JSONApiResponse(response, (jsonValue) => SendBatchEmailResponseFromJSON(jsonValue));
15002
15324
  }
15003
15325
  /**
15004
- * Send up to 100 emails in a single request. Each recipient gets their own message record.
15326
+ * Send a single email to up to 100 recipients in one request. Each recipient gets their own message record. Provide either raw content (`subject` plus `html` and/or `text`) or a `template_id` with `template_data`. Per-recipient `variables` are merged on top of the batch-level `template_data`.
15005
15327
  * Send batch emails
15006
15328
  */
15007
15329
  async sendBatchEmail(sendBatchEmailRequest, initOverrides) {
@@ -20073,6 +20395,10 @@ export {
20073
20395
  BatchPublishWaaSEvents201ResponseFromJSONTyped,
20074
20396
  BatchPublishWaaSEvents201ResponseToJSON,
20075
20397
  BatchPublishWaaSEvents201ResponseToJSONTyped,
20398
+ BatchRecipientFromJSON,
20399
+ BatchRecipientFromJSONTyped,
20400
+ BatchRecipientToJSON,
20401
+ BatchRecipientToJSONTyped,
20076
20402
  BlobApiResponse,
20077
20403
  BulkRetryWebhookDeliveriesRequestFromJSON,
20078
20404
  BulkRetryWebhookDeliveriesRequestFromJSONTyped,
@@ -20141,6 +20467,28 @@ export {
20141
20467
  ConsentWithdrawResponseFromJSONTyped,
20142
20468
  ConsentWithdrawResponseToJSON,
20143
20469
  ConsentWithdrawResponseToJSONTyped,
20470
+ ConvertAnonymousUserRequestFromJSON,
20471
+ ConvertAnonymousUserRequestFromJSONTyped,
20472
+ ConvertAnonymousUserRequestOneOf1AppleUserFromJSON,
20473
+ ConvertAnonymousUserRequestOneOf1AppleUserFromJSONTyped,
20474
+ ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON,
20475
+ ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped,
20476
+ ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON,
20477
+ ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped,
20478
+ ConvertAnonymousUserRequestOneOf1AppleUserToJSON,
20479
+ ConvertAnonymousUserRequestOneOf1AppleUserToJSONTyped,
20480
+ ConvertAnonymousUserRequestOneOf1FromJSON,
20481
+ ConvertAnonymousUserRequestOneOf1FromJSONTyped,
20482
+ ConvertAnonymousUserRequestOneOf1MethodEnum,
20483
+ ConvertAnonymousUserRequestOneOf1ToJSON,
20484
+ ConvertAnonymousUserRequestOneOf1ToJSONTyped,
20485
+ ConvertAnonymousUserRequestOneOfFromJSON,
20486
+ ConvertAnonymousUserRequestOneOfFromJSONTyped,
20487
+ ConvertAnonymousUserRequestOneOfMethodEnum,
20488
+ ConvertAnonymousUserRequestOneOfToJSON,
20489
+ ConvertAnonymousUserRequestOneOfToJSONTyped,
20490
+ ConvertAnonymousUserRequestToJSON,
20491
+ ConvertAnonymousUserRequestToJSONTyped,
20144
20492
  CreateCategoryRequestFromJSON,
20145
20493
  CreateCategoryRequestFromJSONTyped,
20146
20494
  CreateCategoryRequestToJSON,
@@ -20929,6 +21277,10 @@ export {
20929
21277
  SetPreferencesRequestPreferencesInnerToJSONTyped,
20930
21278
  SetPreferencesRequestToJSON,
20931
21279
  SetPreferencesRequestToJSONTyped,
21280
+ SignInAnonymouslyRequestFromJSON,
21281
+ SignInAnonymouslyRequestFromJSONTyped,
21282
+ SignInAnonymouslyRequestToJSON,
21283
+ SignInAnonymouslyRequestToJSONTyped,
20932
21284
  SlackApi,
20933
21285
  SlackMessageFromJSON,
20934
21286
  SlackMessageFromJSONTyped,
@@ -21558,6 +21910,7 @@ export {
21558
21910
  instanceOfAuthUserResponse,
21559
21911
  instanceOfAuthUserResponseData,
21560
21912
  instanceOfBatchPublishWaaSEvents201Response,
21913
+ instanceOfBatchRecipient,
21561
21914
  instanceOfBulkRetryWebhookDeliveriesRequest,
21562
21915
  instanceOfBulkUpsertAuthEmailTemplatesRequest,
21563
21916
  instanceOfBulkUpsertAuthEmailTemplatesResponse,
@@ -21574,6 +21927,10 @@ export {
21574
21927
  instanceOfConsentStatus,
21575
21928
  instanceOfConsentStatusResponse,
21576
21929
  instanceOfConsentWithdrawResponse,
21930
+ instanceOfConvertAnonymousUserRequestOneOf,
21931
+ instanceOfConvertAnonymousUserRequestOneOf1,
21932
+ instanceOfConvertAnonymousUserRequestOneOf1AppleUser,
21933
+ instanceOfConvertAnonymousUserRequestOneOf1AppleUserName,
21577
21934
  instanceOfCreateCategoryRequest,
21578
21935
  instanceOfCreateSubscriberRequest,
21579
21936
  instanceOfCreateTemplateRequest,
@@ -21761,6 +22118,7 @@ export {
21761
22118
  instanceOfSessionListResponseDataSessionInfo,
21762
22119
  instanceOfSetPreferencesRequest,
21763
22120
  instanceOfSetPreferencesRequestPreferencesInner,
22121
+ instanceOfSignInAnonymouslyRequest,
21764
22122
  instanceOfSlackMessage,
21765
22123
  instanceOfSlackMessageListResponse,
21766
22124
  instanceOfSlackMessageListResponseMeta,