diff --git a/packages/expo-sms/build/SMS.d.ts b/packages/expo-sms/build/SMS.d.ts index c6733f81d0a76..7ca00dc3da534 100644 --- a/packages/expo-sms/build/SMS.d.ts +++ b/packages/expo-sms/build/SMS.d.ts @@ -1,6 +1,6 @@ -import { SMSResponse } from './SMS.types'; +import { SMSResponse, MMSAttachmentType } from './SMS.types'; export { SMSResponse }; -export declare function sendSMSAsync(addresses: string | string[], message: string): Promise; +export declare function sendSMSAsync(addresses: string | string[], message: string, attachmentData?: MMSAttachmentType): Promise; /** * The device has a telephony radio with data communication support. * - Always returns `false` in the iOS simulator, and browser diff --git a/packages/expo-sms/build/SMS.js b/packages/expo-sms/build/SMS.js index 99ec2c0e6ae07..06666a4a6dc1e 100644 --- a/packages/expo-sms/build/SMS.js +++ b/packages/expo-sms/build/SMS.js @@ -1,11 +1,11 @@ import { UnavailabilityError } from '@unimodules/core'; import ExpoSMS from './ExpoSMS'; -export async function sendSMSAsync(addresses, message) { +export async function sendSMSAsync(addresses, message, attachmentData) { const finalAddresses = Array.isArray(addresses) ? addresses : [addresses]; if (!ExpoSMS.sendSMSAsync) { throw new UnavailabilityError('expo-sms', 'sendSMSAsync'); } - return ExpoSMS.sendSMSAsync(finalAddresses, message); + return ExpoSMS.sendSMSAsync(finalAddresses, message, attachmentData); } /** * The device has a telephony radio with data communication support. diff --git a/packages/expo-sms/build/SMS.js.map b/packages/expo-sms/build/SMS.js.map index b3eaca58cb15a..39fde6a0af4cc 100644 --- a/packages/expo-sms/build/SMS.js.map +++ b/packages/expo-sms/build/SMS.js.map @@ -1 +1 @@ -{"version":3,"file":"SMS.js","sourceRoot":"","sources":["../src/SMS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,OAAO,MAAM,WAAW,CAAC;AAKhC,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,SAA4B,EAC5B,OAAe;IAEf,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1E,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;QACzB,MAAM,IAAI,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;KAC3D;IACD,OAAO,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,OAAO,CAAC,gBAAgB,EAAE,CAAC;AACpC,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\n\nimport ExpoSMS from './ExpoSMS';\nimport { SMSResponse } from './SMS.types';\n\nexport { SMSResponse };\n\nexport async function sendSMSAsync(\n addresses: string | string[],\n message: string\n): Promise {\n const finalAddresses = Array.isArray(addresses) ? addresses : [addresses];\n if (!ExpoSMS.sendSMSAsync) {\n throw new UnavailabilityError('expo-sms', 'sendSMSAsync');\n }\n return ExpoSMS.sendSMSAsync(finalAddresses, message);\n}\n\n/**\n * The device has a telephony radio with data communication support.\n * - Always returns `false` in the iOS simulator, and browser\n */\nexport async function isAvailableAsync(): Promise {\n return ExpoSMS.isAvailableAsync();\n}\n"]} \ No newline at end of file +{"version":3,"file":"SMS.js","sourceRoot":"","sources":["../src/SMS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,OAAO,MAAM,WAAW,CAAC;AAKhC,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,SAA4B,EAC5B,OAAe,EACf,cAAkC;IAElC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1E,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;QACzB,MAAM,IAAI,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;KAC3D;IACD,OAAO,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,OAAO,CAAC,gBAAgB,EAAE,CAAC;AACpC,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\n\nimport ExpoSMS from './ExpoSMS';\nimport { SMSResponse, MMSAttachmentType } from './SMS.types';\n\nexport { SMSResponse };\n\nexport async function sendSMSAsync(\n addresses: string | string[],\n message: string,\n attachmentData?: MMSAttachmentType\n): Promise {\n const finalAddresses = Array.isArray(addresses) ? addresses : [addresses];\n if (!ExpoSMS.sendSMSAsync) {\n throw new UnavailabilityError('expo-sms', 'sendSMSAsync');\n }\n return ExpoSMS.sendSMSAsync(finalAddresses, message, attachmentData);\n}\n\n/**\n * The device has a telephony radio with data communication support.\n * - Always returns `false` in the iOS simulator, and browser\n */\nexport async function isAvailableAsync(): Promise {\n return ExpoSMS.isAvailableAsync();\n}\n"]} \ No newline at end of file diff --git a/packages/expo-sms/build/SMS.types.d.ts b/packages/expo-sms/build/SMS.types.d.ts index 556e1d91e77c1..c9f6287acfa20 100644 --- a/packages/expo-sms/build/SMS.types.d.ts +++ b/packages/expo-sms/build/SMS.types.d.ts @@ -1,3 +1,9 @@ export declare type SMSResponse = { result: 'unknown' | 'sent' | 'cancelled'; }; +export declare type MMSAttachmentType = { + contentUri: string; + androidType: 'image/png' | 'image/jpeg'; + iOSType: 'public.png' | 'public.jpeg'; + iOSFilename: string; +}; diff --git a/packages/expo-sms/build/SMS.types.js.map b/packages/expo-sms/build/SMS.types.js.map index 4e17acd2db5dc..136a1a5e74274 100644 --- a/packages/expo-sms/build/SMS.types.js.map +++ b/packages/expo-sms/build/SMS.types.js.map @@ -1 +1 @@ -{"version":3,"file":"SMS.types.js","sourceRoot":"","sources":["../src/SMS.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SMSResponse = {\n result: 'unknown' | 'sent' | 'cancelled';\n};\n"]} \ No newline at end of file +{"version":3,"file":"SMS.types.js","sourceRoot":"","sources":["../src/SMS.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SMSResponse = {\n result: 'unknown' | 'sent' | 'cancelled';\n};\n\nexport type MMSAttachmentType = {\n contentUri: string;\n androidType: 'image/png' | 'image/jpeg';\n iOSType: 'public.png' | 'public.jpeg';\n iOSFilename: string;\n};\n"]} \ No newline at end of file