Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into fix-51888-cors-errors-are-displaye…
Browse files Browse the repository at this point in the history
…d-for-attachments
  • Loading branch information
Kalydosos authored Dec 23, 2024
2 parents 65fb38c + 5f65aec commit d9cbf9f
Show file tree
Hide file tree
Showing 178 changed files with 2,272 additions and 5,022 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ web/gtm.js
src/libs/SearchParser/searchParser.js
src/libs/SearchParser/autocompleteParser.js
help/_scripts/**
modules/**
12 changes: 11 additions & 1 deletion .eslintrc.changed.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ module.exports = {
},
overrides: [
{
files: ['src/libs/ReportUtils.ts', 'src/libs/actions/IOU.ts', 'src/libs/actions/Report.ts', 'src/libs/actions/Task.ts'],
files: [
'src/libs/ReportUtils.ts',
'src/libs/actions/IOU.ts',
'src/libs/actions/Report.ts',
'src/libs/actions/Task.ts',
'src/libs/OptionsListUtils.ts',
'src/libs/ReportActionsUtils.ts',
'src/libs/TransactionUtils/index.ts',
'src/pages/home/ReportScreen.tsx',
'src/pages/workspace/WorkspaceInitialPage.tsx',
],
rules: {
'rulesdir/no-default-id-values': 'off',
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testBuildHybrid.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and deploy hybrid apps for testing
name: Build and deploy hybird apps for testing

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion Mobile-Expensify
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ It's important to emphasise that a git submodule is just a **regular git reposit
> #### For external contributors
>
> If you'd like to modify the `Mobile-Expensify` source code, it is best that you create your own fork. Then, you can swap origin of the remote repository by executing this command:
>
>
> `cd Mobile-Expensify && git remote set-url origin <YOUR_FORK_URL>`
>
> This way, you'll attach the submodule to your fork repository.
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009007703
versionName "9.0.77-3"
versionCode 1009007706
versionName "9.0.77-6"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
1 change: 0 additions & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# Add any project specific keep options here:
-keep class com.expensify.chat.BuildConfig { *; }
-keep class com.facebook.** { *; }
-keep class com.margelo.nitro.** { *; }
-keep, allowoptimization, allowobfuscation class expo.modules.** { *; }

# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items).
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
// We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later.
// This causes issues if we have gone offline before the pdfjs web worker is set up as we won't be able to load it from the server.
{
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs'),
test: new RegExp('node_modules/pdfjs-dist/build/pdf.worker.min.mjs'),
type: 'asset/source',
},

Expand Down
34 changes: 17 additions & 17 deletions docs/articles/expensify-classic/connections/Expensify-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,50 @@ To begin, review our [Integration Server Manual](https://integrations.expensify.

We've compiled answers to some frequently asked questions to help you get started.

**Should I give your support team my API credentials when I need help?**
## Should I give your support team my API credentials when I need help?

If you’re seeking help with Expensify's API, do not share your partnerUserSecret. If you do, immediately rotate your credentials on [this page](https://www.expensify.com/tools/integrations/).

**Is there a rate limit?**
## Is there a rate limit?

To keep our platform stable and handle high traffic, Expensify limits how many API requests you can send:
- Up to 5 requests every 10 seconds
- Up to 20 requests every 60 seconds

Sending more requests than allowed may result in an error with status code `429`.

**What is a Policy ID?**
## What is a Policy ID?

This is also known as a Workspace ID. To find your Policy/Workspace ID,
Hover over Settings and click Workspaces.
Click the name of the Workspace.
Copy the ID number from the URL. For example, if the URL is https://www.expensify.com/policy?param={"policyID":"0810E551A5F2A9C2”}, then your workspace ID is 0810E551A5F2A9C2.

**Can I use the parent type `file` to export workspace/policy data?**
## Can I use the parent type `file` to export workspace/policy data?

No. The parent type `file` can only be used to export expense and report data — not policy information. To export policy data (e.g., categories, tags), you must use the `get` type with `inputSettings.type` set to `policy`.

**Can I use the API to create Domain Groups?**
## Can I use the API to create Domain Groups?

No, you cannot create domain groups. You can only assign users to them.

**I’m exporting expense IDs `${expense.transactionID}` but when I open my CSV in Excel, it’s changing all the IDs and making them look the same. How can I prevent this?**
## I’m exporting expense IDs `${expense.transactionID}` but when I open my CSV in Excel, it’s changing all the IDs and making them look the same. How can I prevent this?

Try prepending a non-numeric character like a quote to force Excel to interpret the value as a string and not a number (i.e., `'${expense.transactionID}`).

**How can we export the person who will approve a report while the reports are still processing?**
## How can we export the person who will approve a report while the reports are still processing?

Use the field ${report.managerEmail}.

**Why won’t my boolean field return any data?**
## Why won’t my boolean field return any data?

Boolean fields won't output values without a string. For example, instead of using `${expense.billable}`, use `${expense.billable?string("Yes", "No")}`. This will display "Yes" if the expense is billable and "No" if it is not.

**Can I export the reports for just one user?**
## Can I export the reports for just one user?

Not in a quick convenient way, as you would need to include the user in your template. The simplest approach is to export data for all users and then apply a filter in your preferred spreadsheet program.

**Can I create expenses on behalf of users?**
## Can I create expenses on behalf of users?

Yes. However, to access the Expense Creator API on behalf of employees, Expensify needs to verify the following setup:

Expand All @@ -63,17 +63,17 @@ Verify you have internal authorization to add data to other accounts within your

If you need this access, contact [email protected] and reference this help page.

## Using Postman
# Using Postman

Many customers use Postman to help them build out their APIs. Below are some guides contributed by our customers. Please note, in all cases, you will need to first generate your authentication credentials, the steps for which can be found [here](https://integrations.expensify.com/Integration-Server/doc/#introduction) and have them ready:

### Download expenses from a report as a CSV file
## Download expenses from a report as a CSV file

**Step 1: Get the ID of a report you want to export in Expensify**

Find the ID by opening the expense report and clicking Details at the top right corner of the page. At the top of the menu, the ID is provided as the “Long ID.”

**Step 3: Export (generate) a "Report" as a CSV file**
**Step 2: Export (generate) a "Report" as a CSV file**
{% include info.html %}
For this you'll use the Documentation under [Report Exporter](https://integrations.expensify.com/Integration-Server/doc/#export).
{% include end-info.html %}
Expand Down Expand Up @@ -146,11 +146,11 @@ The template key will have the value like below:

The template variable determines what information is saved in your CSV file. If you want more columns than merchant, amount, and transaction date, follow the syntax as defined in the export template format documentation.

**Step 4: Save your generated file name**
**Step 3: Save your generated file name**

Expensify currently supports only the "onReceive":{"immediateResponse":["returnRandomFileName"]} option in step 3, so you should receive a random filename back from the API like "exportc111111d-a1a1-a1a1-a1a1-d1111111f.csv". You will need to document this filename if you plan on running the download command after this one.
Expensify currently supports only the "onReceive":{"immediateResponse":["returnRandomFileName"]} option in step 2, so you should receive a random filename back from the API like "exportc111111d-a1a1-a1a1-a1a1-d1111111f.csv". You will need to document this filename if you plan on running the download command after this one.

**Step 5: Download your exported report**
**Step 4: Download your exported report**

Set up another API call in almost the same way you did before. You don't need the template key in the Body anymore, so delete that and set the Body type to "none". Then modify your requestJobDescription to read like below, but with your own credentials and file name:

Expand All @@ -170,7 +170,7 @@ Click Go and you should see the CSV in the response body.

*Thank you to our customer Frederico Pettinella who originally wrote and shared this guide.*

### Use Advanced Employee Updater API with Postman
## Use Advanced Employee Updater API with Postman

1. Create a new request.
2. Select POST as the method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ When an expense is submitted to a workspace, your approver will receive an email

{% include end-selector.html %}

![Click Global Create]({{site.url}}/assets/images/ExpensifyHelp-CreateExpense-1.png){:width="100%"}
![Click Submit expense]({{site.url}}/assets/images/ExpensifyHelp-CreateExpense-2.png){:width="100%"}
![Click Scan]({{site.url}}/assets/images/ExpensifyHelp-CreateExpense-3.png){:width="100%"}
![Enter workspace or individual's name]({{site.url}}/assets/images/ExpensifyHelp-CreateExpense-4.png){:width="100%"}

{% include info.html %}
You can also forward receipts to [email protected] using your primary or secondary email address. SmartScan will automatically extract all the details from the receipt and add them to your expenses.
{% include end-info.html %}
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.77.3</string>
<string>9.0.77.6</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.77.3</string>
<string>9.0.77.6</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.77</string>
<key>CFBundleVersion</key>
<string>9.0.77.3</string>
<string>9.0.77.6</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
1 change: 0 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ prepare_react_native_project!

setup_permissions([
'Camera',
'Contacts',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse'
Expand Down
57 changes: 2 additions & 55 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,6 @@ PODS:
- AppAuth/Core
- AppLogs (0.1.0)
- boost (1.84.0)
- ContactsModule (0.0.1):
- DoubleConversion
- glog
- hermes-engine
- NitroModules
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- DoubleConversion (1.1.6)
- EXAV (14.0.7):
- ExpoModulesCore
Expand Down Expand Up @@ -309,29 +287,6 @@ PODS:
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- NitroModules (0.18.1):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-callinvoker
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- Onfido (29.7.2)
- onfido-react-native-sdk (10.6.0):
- DoubleConversion
Expand Down Expand Up @@ -2795,7 +2750,6 @@ DEPENDENCIES:
- AirshipServiceExtension
- AppLogs (from `../node_modules/react-native-app-logs/AppLogsPod`)
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- ContactsModule (from `../modules/ContactsNitroModule`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXAV (from `../node_modules/expo-av/ios`)
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
Expand All @@ -2811,7 +2765,6 @@ DEPENDENCIES:
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- lottie-react-native (from `../node_modules/lottie-react-native`)
- NitroModules (from `../node_modules/react-native-nitro-modules`)
- "onfido-react-native-sdk (from `../node_modules/@onfido/react-native-sdk`)"
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
Expand Down Expand Up @@ -2962,8 +2915,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-app-logs/AppLogsPod"
boost:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
ContactsModule:
:path: "../modules/ContactsNitroModule"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXAV:
Expand Down Expand Up @@ -2995,8 +2946,6 @@ EXTERNAL SOURCES:
:tag: hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b
lottie-react-native:
:path: "../node_modules/lottie-react-native"
NitroModules:
:path: "../node_modules/react-native-nitro-modules"
onfido-react-native-sdk:
:path: "../node_modules/@onfido/react-native-sdk"
RCT-Folly:
Expand Down Expand Up @@ -3211,7 +3160,6 @@ SPEC CHECKSUMS:
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
AppLogs: 3bc4e9b141dbf265b9464409caaa40416a9ee0e0
boost: 26992d1adf73c1c7676360643e687aee6dda994b
ContactsModule: 21671b28654413dc28795d1afc3b12eaffa28ed1
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
EXAV: afa491e598334bbbb92a92a2f4dd33d7149ad37f
EXImageLoader: ab589d67d6c5f2c33572afea9917304418566334
Expand Down Expand Up @@ -3251,7 +3199,6 @@ SPEC CHECKSUMS:
MapboxMaps: e76b14f52c54c40b76ddecd04f40448e6f35a864
MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
NitroModules: ebe2ba2d01dc03c1f82441561fe6062b8c3c4366
Onfido: f3af62ea1c9a419589c133e3e511e5d2c4f3f8af
onfido-react-native-sdk: 4ccfdeb10f9ccb4a5799d2555cdbc2a068a42c0d
Plaid: c32f22ffce5ec67c9e6147eaf6c4d7d5f8086d89
Expand Down Expand Up @@ -3348,7 +3295,7 @@ SPEC CHECKSUMS:
RNLiveMarkdown: f19d3c962fba4fb87bb9bc27ce9119216d86d92e
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4
RNPermissions: 9e5c26aaa982fe00743281f6f47fbdc050ebc58f
RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28
RNReactNativeHapticFeedback: 73756a3477a5a622fa16862a3ab0d0fc5e5edff5
RNReanimated: d95f865e1e42c34ca56b987e0719a8c72fc02dbc
RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2
Expand All @@ -3364,6 +3311,6 @@ SPEC CHECKSUMS:
VisionCamera: c95a8ad535f527562be1fb05fb2fd324578e769c
Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8

PODFILE CHECKSUM: e744fa802b4bee097ff8d1977dd8f79d16b21547
PODFILE CHECKSUM: 615266329434ea4a994dccf622008a2197313c88

COCOAPODS: 1.15.2
3 changes: 2 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const {getDefaultConfig: getReactNativeDefaultConfig} = require('@react-native/m
const {mergeConfig} = require('@react-native/metro-config');
const defaultAssetExts = require('metro-config/src/defaults/defaults').assetExts;
const defaultSourceExts = require('metro-config/src/defaults/defaults').sourceExts;
const {wrapWithReanimatedMetroConfig} = require('react-native-reanimated/metro-config');
require('dotenv').config();

const defaultConfig = getReactNativeDefaultConfig(__dirname);
Expand All @@ -26,4 +27,4 @@ const config = {
},
};

module.exports = mergeConfig(defaultConfig, expoConfig, config);
module.exports = wrapWithReanimatedMetroConfig(mergeConfig(defaultConfig, expoConfig, config));
Loading

0 comments on commit d9cbf9f

Please sign in to comment.