@tellescope/schema 1.237.6 → 1.239.0

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/src/schema.ts CHANGED
@@ -309,6 +309,7 @@ import {
309
309
  listOfUniqueStringsValidatorEmptyOk,
310
310
  ticketReminderValidator,
311
311
  insuranceOptionalValidator,
312
+ pharmacyValidator,
312
313
  listOfStringsValidatorUniqueOptionalOrEmptyOkay,
313
314
  diagnosesValidator,
314
315
  stateValidatorOptional,
@@ -703,8 +704,8 @@ export type CustomActions = {
703
704
  },
704
705
  form_responses: {
705
706
  prepare_form_response: CustomAction<
706
- {
707
- formId: string, enduserId: string, automationStepId?: string, expireAt?: Date, sharedVia?: CommunicationsChannel
707
+ {
708
+ formId: string, enduserId: string, automationStepId?: string, expireAt?: Date, sharedVia?: CommunicationsChannel
708
709
  isInternalNote?: boolean, title?: string,
709
710
  rootResponseId?: string,
710
711
  parentResponseId?: string,
@@ -714,7 +715,8 @@ export type CustomActions = {
714
715
  groupId?: string,
715
716
  groupInstance?: string,
716
717
  groupPosition?: number,
717
- },
718
+ startedViaPinnedForm?: boolean,
719
+ },
718
720
  { accessCode: string, url: string, response: FormResponse, fullURL: string }>
719
721
  ,
720
722
  submit_form_response: CustomAction<
@@ -1213,7 +1215,7 @@ export type CustomActions = {
1213
1215
  { alreadyBuilt: boolean }
1214
1216
  >,
1215
1217
  load_threads: CustomAction<
1216
- { limit?: number, ids?: string[], excludeIds?: string[], lastTimestamp?: Date, userIds?: string[], enduserIds?: string[], phoneNumber?: string, returnCount?: boolean, mdbFilter?: object, sortBy?: 'timestamp' | 'outboundTimestamp' },
1218
+ { limit?: number, ids?: string[], excludeIds?: string[], lastTimestamp?: Date, userIds?: string[], enduserIds?: string[], phoneNumber?: string, returnCount?: boolean, mdbFilter?: object, sortBy?: 'timestamp' | 'outboundTimestamp', autobuild?: boolean },
1217
1219
  { threads: InboxThread[], count?: number }
1218
1220
  >,
1219
1221
  reset_threads: CustomAction<
@@ -1236,10 +1238,10 @@ export type PublicActions = {
1236
1238
  }, { }>,
1237
1239
  request_password_reset: CustomAction<{ email: string, businessId: string, organizationIds?: string[] }, { }>,
1238
1240
  reset_password: CustomAction<{ resetToken: string, newPassword: string, businessId: string, organizationIds?: string[] }, { }>,
1239
- begin_login_flow: CustomAction<{ email?: string, phone?: string, redir?: string, dateOfBirth?: string, businessId: string, organizationIds?: string[] }, { result: LoginFlowResult, email?: string, otpToken?: string }>,
1241
+ begin_login_flow: CustomAction<{ email?: string, phone?: string, redir?: string, dateOfBirth?: string, brandId?: string, businessId: string, organizationIds?: string[] }, { result: LoginFlowResult, email?: string, otpToken?: string }>,
1240
1242
  unsubscribe: CustomAction<{ enduserId: string, unsubscribeFrom: string[] }, { }>,
1241
1243
  get_otp_methods: CustomAction<{ token: string }, { methods: string[] }>,
1242
- send_otp: CustomAction<{ token: string, method: string }, { }>,
1244
+ send_otp: CustomAction<{ token: string, method: string, brandId?: string }, { }>,
1243
1245
  verify_otp: CustomAction<{ token: string, code: string }, { authToken: string, enduser: Enduser }>,
1244
1246
  },
1245
1247
  users: {
@@ -1594,6 +1596,7 @@ export const schema: SchemaV1 = build_schema({
1594
1596
  unsubscribedFromPhones: { validator: listOfStringsValidatorUniqueOptionalOrEmptyOkay, redactions: ['enduser'] },
1595
1597
  lockedFromPortal: { validator: booleanValidator },
1596
1598
  eligibleForAutoMerge: { validator: booleanValidator },
1599
+ preferredPharmacy: { validator: pharmacyValidator, redactions: ['enduser'] },
1597
1600
  // recentMessagePreview: {
1598
1601
  // validator: stringValidator,
1599
1602
  // },
@@ -1968,6 +1971,7 @@ export const schema: SchemaV1 = build_schema({
1968
1971
  email: { validator: emailValidator },
1969
1972
  redir: { validator: stringValidator },
1970
1973
  dateOfBirth: { validator: stringValidator250 },
1974
+ brandId: { validator: mongoIdStringValidator },
1971
1975
  },
1972
1976
  returns: {
1973
1977
  result: { validator: loginFlowResultValidator, required: true },
@@ -2063,9 +2067,10 @@ export const schema: SchemaV1 = build_schema({
2063
2067
  name: 'Send OTP Code',
2064
2068
  path: '/endusers/send-otp-code',
2065
2069
  description: "Sends a otp code for a given method (e.g. email or sms)",
2066
- parameters: {
2070
+ parameters: {
2067
2071
  token: { validator: stringValidator, required: true },
2068
2072
  method: { validator: stringValidator, required: true },
2073
+ brandId: { validator: mongoIdStringValidator },
2069
2074
  },
2070
2075
  returns: { },
2071
2076
  },
@@ -4785,6 +4790,7 @@ export const schema: SchemaV1 = build_schema({
4785
4790
  timestamp: dateValidator,
4786
4791
  }))
4787
4792
  },
4793
+ startedViaPinnedForm: { validator: booleanValidator },
4788
4794
  },
4789
4795
  defaultActions: DEFAULT_OPERATIONS,
4790
4796
  enduserActions: {
@@ -4814,6 +4820,7 @@ export const schema: SchemaV1 = build_schema({
4814
4820
  groupId: { validator: mongoIdStringValidator },
4815
4821
  groupInstance: { validator: stringValidator100 },
4816
4822
  groupPosition: { validator: nonNegNumberValidator },
4823
+ startedViaPinnedForm: { validator: booleanValidator },
4817
4824
  },
4818
4825
  returns: {
4819
4826
  accessCode: { validator: stringValidator250, required: true },
@@ -7189,6 +7196,7 @@ export const schema: SchemaV1 = build_schema({
7189
7196
  limitedToCareTeam: { validator: booleanValidator },
7190
7197
  limitedByState: { validator: booleanValidator },
7191
7198
  limitedByTagsPortal: { validator: listOfStringsValidatorUniqueOptionalOrEmptyOkay },
7199
+ enableUserSelection: { validator: booleanValidator },
7192
7200
  topLogo: { validator: stringValidator },
7193
7201
  requireLocationSelection: { validator: booleanValidator },
7194
7202
  fontFace: { validator: stringValidator },
@@ -7876,6 +7884,7 @@ If a voicemail is left, it is indicated by recordingURI, transcription, or recor
7876
7884
  acknowledgedAt: { validator: dateOptionalOrEmptyStringValidator },
7877
7885
  journeyId: { validator: mongoIdStringValidator },
7878
7886
  enduserId: { validator: mongoIdStringValidator },
7887
+ userId: { validator: mongoIdStringValidator },
7879
7888
  }
7880
7889
  },
7881
7890
  automation_triggers: {
@@ -9208,6 +9217,7 @@ If a voicemail is left, it is indicated by recordingURI, transcription, or recor
9208
9217
  returnCount: { validator: booleanValidatorOptional },
9209
9218
  mdbFilter: { validator: objectAnyFieldsAnyValuesValidator },
9210
9219
  sortBy: { validator: exactMatchValidatorOptional<'timestamp' | 'outboundTimestamp'>(['timestamp', 'outboundTimestamp']) },
9220
+ autobuild: { validator: booleanValidatorOptional },
9211
9221
  },
9212
9222
  returns: {
9213
9223
  threads: { validator: 'inbox_threads' as any },