├── inventory
├── img
│ ├── empty
│ ├── Chris.jpeg
│ ├── Kafka1.png
│ ├── Kafka2.png
│ ├── appId.png
│ ├── import.png
│ ├── kafka3.png
│ ├── kafka4.png
│ ├── login.png
│ ├── nate.jpeg
│ ├── play3.png
│ ├── users1.png
│ ├── users2.png
│ ├── users3.png
│ ├── APIKey1.png
│ ├── APIKey2.png
│ ├── APIKey3.png
│ ├── APIKey4.png
│ ├── Authors5.png
│ ├── hosting1.png
│ ├── twilio1.png
│ ├── twilio3.png
│ ├── twilioWh.png
│ ├── 2.2.appName.png
│ ├── androidAVD.png
│ ├── androidSDK.png
│ ├── chartsEmbed.png
│ ├── chartsVideo.png
│ ├── copyAppId.png
│ ├── gradleSync.png
│ ├── hosting1a.png
│ ├── multipleAVD.png
│ ├── runMutiple.png
│ ├── 2.5.realmSync.png
│ ├── hostingVideo.png
│ ├── 2.3.realmAppId.png
│ ├── 2.4.realmSchema.png
│ ├── DemoScreenShot.png
│ ├── twilioAuthToken.png
│ ├── twilioWHSettings.png
│ ├── twilioWhFunction.png
│ ├── twilioAccountSID2.png
│ ├── 2.1.createRealmSync.png
│ ├── RealmInventoryDemo2.png
│ ├── RealmInventoryDemo3.png
│ ├── RealmInventoryDemo4.png
│ ├── openExistingProject.png
│ ├── twilioSupplierSecret.png
│ └── twilioSupplierService.png
├── clients
│ ├── android
│ │ ├── .idea
│ │ │ ├── .name
│ │ │ ├── codeStyles
│ │ │ │ └── codeStyleConfig.xml
│ │ │ ├── vcs.xml
│ │ │ ├── runConfigurations.xml
│ │ │ ├── gradle.xml
│ │ │ ├── misc.xml
│ │ │ └── jarRepositories.xml
│ │ ├── app
│ │ │ ├── .gitignore
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── ic_plus-playstore.png
│ │ │ │ │ ├── res
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── fab_plus.xml
│ │ │ │ │ │ └── ic_plus_foreground.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ ├── ic_plus.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_plus_round.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ ├── ic_plus.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_plus_round.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ ├── ic_plus.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_plus_round.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ ├── ic_plus.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_plus_round.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ ├── ic_plus.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_plus_round.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ │ ├── ic_plus.xml
│ │ │ │ │ │ ├── ic_plus_round.xml
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── styles.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── colors.xml
│ │ │ │ │ ├── menu
│ │ │ │ │ │ └── activity_inventory_menu.xml
│ │ │ │ │ ├── layout
│ │ │ │ │ │ ├── activity_task.xml
│ │ │ │ │ │ ├── dialog_create_new_item.xml
│ │ │ │ │ │ └── item_view.xml
│ │ │ │ │ └── drawable-v24
│ │ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── mongodb
│ │ │ │ │ │ └── inventorymanager
│ │ │ │ │ │ ├── model
│ │ │ │ │ │ ├── TaskStatus.kt
│ │ │ │ │ │ └── InventoryItem.kt
│ │ │ │ │ │ └── InventoryManager.kt
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ ├── proguard-rules.pro
│ │ │ └── build.gradle
│ │ ├── settings.gradle
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── gradlew.bat
│ ├── web-graphql
│ │ ├── .gitignore
│ │ ├── img
│ │ │ ├── ss01.png
│ │ │ ├── ss02.png
│ │ │ ├── ss03.png
│ │ │ ├── ss04.png
│ │ │ ├── ss05.png
│ │ │ ├── ss06.png
│ │ │ ├── ss07.png
│ │ │ ├── ss08.png
│ │ │ ├── ss09.png
│ │ │ ├── ss10.png
│ │ │ ├── slide01.png
│ │ │ ├── slide02.png
│ │ │ ├── slide03.png
│ │ │ ├── slide04.png
│ │ │ ├── slide05.png
│ │ │ ├── slide06.png
│ │ │ ├── slide07.png
│ │ │ └── slide08.png
│ │ ├── Stitch-Export
│ │ │ ├── functions
│ │ │ │ └── reset
│ │ │ │ │ ├── config.json
│ │ │ │ │ └── source.js
│ │ │ ├── auth_providers
│ │ │ │ ├── api-key.json
│ │ │ │ └── local-userpass.json
│ │ │ ├── services
│ │ │ │ └── mongodb-atlas
│ │ │ │ │ ├── config.json
│ │ │ │ │ └── rules
│ │ │ │ │ └── sample_mflix.opinions.json
│ │ │ └── stitch.json
│ │ └── SLIDES.md
│ ├── ios
│ │ ├── .gitignore
│ │ ├── InventoryDemo
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Alert.imageset
│ │ │ │ │ ├── Alert.pdf
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── errorColor.colorset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── messageColor.colorset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── InventoryDemo.entitlements
│ │ │ ├── Utils
│ │ │ │ ├── Coordinator.swift
│ │ │ │ ├── Storyboarded.swift
│ │ │ │ └── Settings.swift
│ │ │ ├── Classes
│ │ │ │ ├── Model
│ │ │ │ │ ├── Constants.swift
│ │ │ │ │ └── Models.swift
│ │ │ │ ├── Settings+Application.swift
│ │ │ │ ├── View
│ │ │ │ │ └── InventoryItemTableCell.swift
│ │ │ │ ├── Navigation
│ │ │ │ │ ├── InventoryLoginViewController.swift
│ │ │ │ │ └── MainCoordinator.swift
│ │ │ │ └── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ └── LaunchScreen.storyboard
│ │ │ └── Info.plist
│ │ ├── InventoryDemo.xcodeproj
│ │ │ └── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── swiftpm
│ │ │ │ └── Package.resolved
│ │ ├── README.md
│ │ ├── .swiftformat
│ │ └── InventoryDemoTests
│ │ │ ├── Info.plist
│ │ │ └── InventoryDemoTests.swift
│ └── ios-swiftui
│ │ ├── InventoryDemo
│ │ ├── InventoryDemo
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── icon-40.png
│ │ │ │ │ ├── icon-72.png
│ │ │ │ │ ├── icon-76.png
│ │ │ │ │ ├── icon@2x.png
│ │ │ │ │ ├── icon-40@2x.png
│ │ │ │ │ ├── icon-40@3x.png
│ │ │ │ │ ├── icon-60@2x.png
│ │ │ │ │ ├── icon-60@3x.png
│ │ │ │ │ ├── icon-72@2x.png
│ │ │ │ │ ├── icon-76@2x.png
│ │ │ │ │ ├── icon-83.5@2x.png
│ │ │ │ │ ├── icon-small.png
│ │ │ │ │ ├── icon-small-50.png
│ │ │ │ │ ├── icon-small@2x.png
│ │ │ │ │ ├── icon-small@3x.png
│ │ │ │ │ ├── ios-marketing.png
│ │ │ │ │ ├── icon-small-50@2x.png
│ │ │ │ │ ├── notification-icon@2x.png
│ │ │ │ │ ├── notification-icon@3x.png
│ │ │ │ │ ├── notification-icon~ipad.png
│ │ │ │ │ └── notification-icon~ipad@2x.png
│ │ │ ├── Preview Content
│ │ │ │ └── Preview Assets.xcassets
│ │ │ │ │ └── Contents.json
│ │ │ ├── Utils
│ │ │ │ └── File.swift
│ │ │ ├── Views
│ │ │ │ ├── Components
│ │ │ │ │ ├── CaptionLabel.swift
│ │ │ │ │ ├── CheckBox.swift
│ │ │ │ │ ├── CountStepper.swift
│ │ │ │ │ ├── CallToActionButton.swift
│ │ │ │ │ └── InputField.swift
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── PriceInput.swift
│ │ │ │ ├── AddItemView.swift
│ │ │ │ ├── ItemView.swift
│ │ │ │ ├── InventoryView.swift
│ │ │ │ └── LoginView.swift
│ │ │ ├── Models
│ │ │ │ └── InventoryItem.swift
│ │ │ └── Info.plist
│ │ ├── InventoryDemo.xcodeproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcuserdata
│ │ │ │ │ └── andrew.morgan.xcuserdatad
│ │ │ │ │ │ └── UserInterfaceState.xcuserstate
│ │ │ │ └── xcshareddata
│ │ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ │ └── swiftpm
│ │ │ │ │ └── Package.resolved
│ │ │ └── xcuserdata
│ │ │ │ └── andrew.morgan.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ └── xcschememanagement.plist
│ │ ├── InventoryDemoApp.swift
│ │ ├── InventoryDemoTests
│ │ │ ├── Info.plist
│ │ │ ├── ContentViewTests.swift
│ │ │ └── RealmUtil.swift
│ │ └── InventoryDemoUITests
│ │ │ ├── Info.plist
│ │ │ └── InventoryDemoUITests.swift
│ │ ├── img
│ │ ├── inventory-swiftui-add.png
│ │ ├── inventory-swiftui-login.png
│ │ ├── inventory-swiftui-inventory.png
│ │ └── inventory-demo-swiftui-schemes.png
│ │ └── README.md
└── export
│ ├── backOffice
│ ├── hosting
│ │ ├── metadata.json
│ │ └── files
│ │ │ ├── README.md
│ │ │ ├── logo.png
│ │ │ ├── img
│ │ │ ├── HEB.png
│ │ │ ├── att.png
│ │ │ ├── demo.png
│ │ │ ├── swa.png
│ │ │ ├── config.png
│ │ │ ├── github.png
│ │ │ ├── kafka.png
│ │ │ ├── kroger.png
│ │ │ ├── laredo.png
│ │ │ ├── realm.png
│ │ │ ├── twilio.png
│ │ │ ├── 7-Eleven.png
│ │ │ ├── Emerson.png
│ │ │ ├── diagram.png
│ │ │ ├── downArrow.png
│ │ │ ├── fastenal.png
│ │ │ ├── graphql.png
│ │ │ ├── pizzahut.png
│ │ │ ├── restadd.png
│ │ │ ├── restfind.png
│ │ │ ├── zebraLogo.png
│ │ │ ├── TruckShadow.png
│ │ │ ├── tensorflow.png
│ │ │ ├── BraveOrganics.png
│ │ │ ├── TruckIconTrans.png
│ │ │ ├── presentation.png
│ │ │ ├── RealmInventoryDemo.png
│ │ │ ├── RealmInventoryDemo4.png
│ │ │ └── zebra-technologies-logo.png
│ │ │ ├── loading.gif
│ │ │ ├── BraveOrganics.png
│ │ │ └── slides.html
│ ├── environments
│ │ ├── qa.json
│ │ ├── testing.json
│ │ ├── development.json
│ │ ├── no-environment.json
│ │ └── production.json
│ ├── functions
│ │ ├── fnc_verifyRestock
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_sales
│ │ │ └── config.json
│ │ ├── resetFunc
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_IOT_HIST
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_geoFence
│ │ │ └── config.json
│ │ ├── fnc_kafkaSync
│ │ │ └── config.json
│ │ ├── fnc_loadCSV
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_modelHistory
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_clean_IOT_data
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_transactions
│ │ │ └── config.json
│ │ ├── fnc_getCompanyLogo
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_getCompanyName
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_notifySpoilage
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_restockInventory
│ │ │ └── config.json
│ │ ├── fnc_transactionHistory
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ ├── fnc_reprimandSupplier
│ │ │ ├── config.json
│ │ │ └── source.js
│ │ └── fnc_updateTransaction
│ │ │ ├── config.json
│ │ │ └── source.js
│ ├── auth_providers
│ │ ├── api-key.json
│ │ ├── anon-user.json
│ │ └── local-userpass.json
│ ├── values
│ │ └── ourNumber.json
│ ├── services
│ │ ├── getTFModel
│ │ │ ├── config.json
│ │ │ └── incoming_webhooks
│ │ │ │ └── getTFModelWH
│ │ │ │ ├── config.json
│ │ │ │ └── source.js
│ │ ├── saveTFModel
│ │ │ ├── config.json
│ │ │ └── incoming_webhooks
│ │ │ │ └── SaveTFModelWH
│ │ │ │ ├── config.json
│ │ │ │ └── source.js
│ │ ├── Receive-IOT-Data
│ │ │ ├── config.json
│ │ │ └── incoming_webhooks
│ │ │ │ └── IOT-WH
│ │ │ │ ├── config.json
│ │ │ │ └── source.js
│ │ ├── addStoreItemService
│ │ │ ├── config.json
│ │ │ └── incoming_webhooks
│ │ │ │ └── addStoreItemWH
│ │ │ │ ├── config.json
│ │ │ │ └── source.js
│ │ ├── findStoreItemsService
│ │ │ ├── config.json
│ │ │ └── incoming_webhooks
│ │ │ │ └── findStoreItemsWH
│ │ │ │ ├── config.json
│ │ │ │ └── source.js
│ │ ├── mongodb-atlas
│ │ │ ├── config.json
│ │ │ └── rules
│ │ │ │ ├── InventoryDemo.codes.json
│ │ │ │ ├── InventoryDemo.sales.json
│ │ │ │ ├── InventoryDemo.FuelSales.json
│ │ │ │ ├── InventoryDemo.kafka_sink.json
│ │ │ │ ├── InventoryDemo.location.json
│ │ │ │ ├── InventoryDemo.HousingData.json
│ │ │ │ ├── InventoryDemo.locationData.json
│ │ │ │ ├── InventoryDemo.transactions.json
│ │ │ │ ├── InventoryDemo.inventory_hist.json
│ │ │ │ ├── InventoryDemo.inventory_last.json
│ │ │ │ ├── InventoryDemo.transaction_hist.json
│ │ │ │ ├── InventoryDemo.transaction_updates.json
│ │ │ │ ├── covid.timeseries.json
│ │ │ │ ├── InventoryDemo.IOT_DATA.json
│ │ │ │ └── InventoryDemo.InventoryItem.json
│ │ └── SupplierService
│ │ │ ├── config.json
│ │ │ └── incoming_webhooks
│ │ │ └── TwilioWH
│ │ │ ├── config.json
│ │ │ └── source.js
│ ├── triggers
│ │ ├── trg_clean_IOT_data.json
│ │ ├── trg_IOT_HISTORY.json
│ │ ├── trg_restockInventory.json
│ │ ├── trg_sales.json
│ │ ├── trg_kafkaSink.json
│ │ ├── trg_tfModel.json
│ │ ├── trg_TransactionHistory.json
│ │ └── trg_inventoryTransaction.json
│ └── config.json
│ └── sync
│ ├── auth
│ ├── custom_user_data.json
│ └── providers.json
│ ├── graphql
│ └── config.json
│ ├── data_sources
│ └── mongodb-atlas
│ │ ├── InventoryDemo
│ │ └── InventoryItem
│ │ │ ├── relationships.json
│ │ │ ├── rules.json
│ │ │ └── schema.json
│ │ └── config.json
│ ├── environments
│ ├── qa.json
│ ├── testing.json
│ ├── development.json
│ ├── production.json
│ └── no-environment.json
│ ├── functions
│ ├── config.json
│ └── resetFunc.js
│ ├── realm_config.json
│ └── sync
│ └── config.json
├── .gitignore
└── README.md
/inventory/img/empty:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/.name:
--------------------------------------------------------------------------------
1 | Inventory System
--------------------------------------------------------------------------------
/inventory/clients/android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/metadata.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/environments/qa.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {}
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/environments/testing.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {}
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/export/sync/auth/custom_user_data.json:
--------------------------------------------------------------------------------
1 | {
2 | "enabled": false
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/environments/development.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {}
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/environments/no-environment.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {}
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/environments/production.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {}
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/export/sync/graphql/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "use_natural_pluralization": true
3 | }
4 |
--------------------------------------------------------------------------------
/inventory/clients/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name='Inventory System'
2 | include ':app'
3 |
--------------------------------------------------------------------------------
/inventory/export/sync/data_sources/mongodb-atlas/InventoryDemo/InventoryItem/relationships.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/inventory/img/Chris.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/Chris.jpeg
--------------------------------------------------------------------------------
/inventory/img/Kafka1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/Kafka1.png
--------------------------------------------------------------------------------
/inventory/img/Kafka2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/Kafka2.png
--------------------------------------------------------------------------------
/inventory/img/appId.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/appId.png
--------------------------------------------------------------------------------
/inventory/img/import.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/import.png
--------------------------------------------------------------------------------
/inventory/img/kafka3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/kafka3.png
--------------------------------------------------------------------------------
/inventory/img/kafka4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/kafka4.png
--------------------------------------------------------------------------------
/inventory/img/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/login.png
--------------------------------------------------------------------------------
/inventory/img/nate.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/nate.jpeg
--------------------------------------------------------------------------------
/inventory/img/play3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/play3.png
--------------------------------------------------------------------------------
/inventory/img/users1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/users1.png
--------------------------------------------------------------------------------
/inventory/img/users2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/users2.png
--------------------------------------------------------------------------------
/inventory/img/users3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/users3.png
--------------------------------------------------------------------------------
/inventory/img/APIKey1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/APIKey1.png
--------------------------------------------------------------------------------
/inventory/img/APIKey2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/APIKey2.png
--------------------------------------------------------------------------------
/inventory/img/APIKey3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/APIKey3.png
--------------------------------------------------------------------------------
/inventory/img/APIKey4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/APIKey4.png
--------------------------------------------------------------------------------
/inventory/img/Authors5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/Authors5.png
--------------------------------------------------------------------------------
/inventory/img/hosting1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/hosting1.png
--------------------------------------------------------------------------------
/inventory/img/twilio1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilio1.png
--------------------------------------------------------------------------------
/inventory/img/twilio3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilio3.png
--------------------------------------------------------------------------------
/inventory/img/twilioWh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioWh.png
--------------------------------------------------------------------------------
/inventory/img/2.2.appName.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/2.2.appName.png
--------------------------------------------------------------------------------
/inventory/img/androidAVD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/androidAVD.png
--------------------------------------------------------------------------------
/inventory/img/androidSDK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/androidSDK.png
--------------------------------------------------------------------------------
/inventory/img/chartsEmbed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/chartsEmbed.png
--------------------------------------------------------------------------------
/inventory/img/chartsVideo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/chartsVideo.png
--------------------------------------------------------------------------------
/inventory/img/copyAppId.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/copyAppId.png
--------------------------------------------------------------------------------
/inventory/img/gradleSync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/gradleSync.png
--------------------------------------------------------------------------------
/inventory/img/hosting1a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/hosting1a.png
--------------------------------------------------------------------------------
/inventory/img/multipleAVD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/multipleAVD.png
--------------------------------------------------------------------------------
/inventory/img/runMutiple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/runMutiple.png
--------------------------------------------------------------------------------
/inventory/export/sync/environments/qa.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {
3 | "databaseName": "InventoryDemo"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/img/2.5.realmSync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/2.5.realmSync.png
--------------------------------------------------------------------------------
/inventory/img/hostingVideo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/hostingVideo.png
--------------------------------------------------------------------------------
/inventory/export/sync/environments/testing.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {
3 | "databaseName": "InventoryDemo"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/img/2.3.realmAppId.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/2.3.realmAppId.png
--------------------------------------------------------------------------------
/inventory/img/2.4.realmSchema.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/2.4.realmSchema.png
--------------------------------------------------------------------------------
/inventory/img/DemoScreenShot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/DemoScreenShot.png
--------------------------------------------------------------------------------
/inventory/img/twilioAuthToken.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioAuthToken.png
--------------------------------------------------------------------------------
/inventory/img/twilioWHSettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioWHSettings.png
--------------------------------------------------------------------------------
/inventory/img/twilioWhFunction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioWhFunction.png
--------------------------------------------------------------------------------
/inventory/export/sync/environments/development.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {
3 | "databaseName": "InventoryDemo"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/sync/environments/production.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {
3 | "databaseName": "InventoryDemo"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/img/twilioAccountSID2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioAccountSID2.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_verifyRestock/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_verifyRestock",
3 | "private": false
4 | }
5 |
--------------------------------------------------------------------------------
/inventory/export/sync/environments/no-environment.json:
--------------------------------------------------------------------------------
1 | {
2 | "values": {
3 | "databaseName": "InventoryDemo"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/img/2.1.createRealmSync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/2.1.createRealmSync.png
--------------------------------------------------------------------------------
/inventory/img/RealmInventoryDemo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/RealmInventoryDemo2.png
--------------------------------------------------------------------------------
/inventory/img/RealmInventoryDemo3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/RealmInventoryDemo3.png
--------------------------------------------------------------------------------
/inventory/img/RealmInventoryDemo4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/RealmInventoryDemo4.png
--------------------------------------------------------------------------------
/inventory/img/openExistingProject.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/openExistingProject.png
--------------------------------------------------------------------------------
/inventory/img/twilioSupplierSecret.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioSupplierSecret.png
--------------------------------------------------------------------------------
/inventory/img/twilioSupplierService.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/img/twilioSupplierService.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/auth_providers/api-key.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "api-key",
3 | "type": "api-key",
4 | "disabled": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/clients/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.xcuserdatad
2 | *.hprof
3 | *.xccheckout
4 | *.xcscmblueprint
5 | .DS_Store
6 | .build/
7 | build/
8 | xcuserdata
9 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss01.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss02.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss03.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss04.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss05.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss06.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss07.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss08.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss09.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/ss10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/ss10.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/auth_providers/anon-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "anon-user",
3 | "type": "anon-user",
4 | "disabled": false
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_sales/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_sales",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/resetFunc/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "resetFunc",
4 | "private": false
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/values/ourNumber.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ourNumber",
3 | "value": "+19723625039",
4 | "from_secret": false
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide01.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide02.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide03.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide04.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide05.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide06.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide07.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/img/slide08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/web-graphql/img/slide08.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_IOT_HIST/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_IOT_HIST",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_geoFence/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_geoFence",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_kafkaSync/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_kafkaSync",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_loadCSV/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_loadCSV",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_modelHistory/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_modelHistory",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/logo.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/getTFModel/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getTFModel",
3 | "type": "http",
4 | "config": {},
5 | "version": 1
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_clean_IOT_data/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_clean_IOT_data",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_transactions/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_transactions",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/HEB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/HEB.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/att.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/att.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/demo.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/swa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/swa.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/loading.gif
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/saveTFModel/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "saveTFModel",
3 | "type": "http",
4 | "config": {},
5 | "version": 1
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/export/sync/functions/config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "resetFunc",
4 | "private": false,
5 | "can_evaluate": {}
6 | }
7 | ]
8 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_getCompanyLogo/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_getCompanyLogo",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_getCompanyName/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_getCompanyName",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_notifySpoilage/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_notifySpoilage",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_restockInventory/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_restockInventory",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_transactionHistory/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "can_evaluate": {},
3 | "name": "fnc_transactionHistory",
4 | "private": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/config.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/github.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/kafka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/kafka.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/kroger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/kroger.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/laredo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/laredo.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/realm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/realm.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/twilio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/twilio.png
--------------------------------------------------------------------------------
/inventory/clients/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/img/inventory-swiftui-add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/img/inventory-swiftui-add.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_reprimandSupplier/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_reprimandSupplier",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_updateTransaction/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fnc_updateTransaction",
3 | "private": false,
4 | "run_as_system": true
5 | }
6 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/BraveOrganics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/BraveOrganics.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/7-Eleven.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/7-Eleven.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/Emerson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/Emerson.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/diagram.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/downArrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/downArrow.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/fastenal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/fastenal.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/graphql.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/pizzahut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/pizzahut.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/restadd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/restadd.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/restfind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/restfind.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/zebraLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/zebraLogo.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/Receive-IOT-Data/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Receive-IOT-Data",
3 | "type": "http",
4 | "config": {},
5 | "version": 1
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/ic_plus-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/ic_plus-playstore.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/img/inventory-swiftui-login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/img/inventory-swiftui-login.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/TruckShadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/TruckShadow.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/tensorflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/tensorflow.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/addStoreItemService/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "addStoreItemService",
3 | "type": "http",
4 | "config": {},
5 | "version": 1
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/export/sync/realm_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "config_version": 20210101,
3 | "name": "InventorySync",
4 | "location": "US-VA",
5 | "deployment_model": "GLOBAL"
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/BraveOrganics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/BraveOrganics.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/TruckIconTrans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/TruckIconTrans.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/presentation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/presentation.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/findStoreItemsService/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "findStoreItemsService",
3 | "type": "http",
4 | "config": {},
5 | "version": 1
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_plus.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_plus.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/img/inventory-swiftui-inventory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/img/inventory-swiftui-inventory.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_plus.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_plus.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_plus.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/img/inventory-demo-swiftui-schemes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/img/inventory-demo-swiftui-schemes.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/functions/reset/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "5e4ea953cd66b7c6a4c12c52",
3 | "name": "reset",
4 | "private": false,
5 | "can_evaluate": {}
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/RealmInventoryDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/RealmInventoryDemo.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/RealmInventoryDemo4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/RealmInventoryDemo4.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/auth_providers/api-key.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "5e4ea20c86371298945f285a",
3 | "name": "api-key",
4 | "type": "api-key",
5 | "disabled": true
6 | }
7 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_plus_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_plus_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_plus_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_plus_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_plus_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_plus_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_plus_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_plus_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/img/zebra-technologies-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/export/backOffice/hosting/files/img/zebra-technologies-logo.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_plus_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_plus_round.png
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Assets.xcassets/Alert.imageset/Alert.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios/InventoryDemo/Assets.xcassets/Alert.imageset/Alert.pdf
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/SLIDES.md:
--------------------------------------------------------------------------------
1 | # GraphQL Slides
2 |
3 | 
4 |
5 | 
6 |
7 | 
8 |
9 | 
10 |
11 | 
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small-50.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/ios-marketing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/ios-marketing.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios/README.md:
--------------------------------------------------------------------------------
1 | # Inventory Sync for iOS
2 |
3 | [](https://www.apache.org/licenses/LICENSE-2.0)
4 |
5 | # License
6 |
7 | Distributed under the Apache license. See ``LICENSE`` for more information.
8 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_clean_IOT_data.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_clean_IOT_data",
3 | "type": "SCHEDULED",
4 | "config": {
5 | "schedule": "0 */1 * * *"
6 | },
7 | "function_name": "fnc_clean_IOT_data",
8 | "disabled": false
9 | }
10 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/java/com/mongodb/inventorymanager/model/TaskStatus.kt:
--------------------------------------------------------------------------------
1 | package com.mongodb.inventorymanager.model
2 |
3 |
4 | enum class TaskStatus(val text: String, val code: Int) {
5 | OPEN("Open", 0),
6 | IN_PROGRESS("In Progress", 1),
7 | COMPLETE("Complete", 2)
8 | }
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png
--------------------------------------------------------------------------------
/inventory/clients/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/inventory/clients/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed May 27 16:30:27 MDT 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/inventory/export/sync/data_sources/mongodb-atlas/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mongodb-atlas",
3 | "type": "mongodb-atlas",
4 | "config": {
5 | "clusterName": "Cluster0",
6 | "readPreference": "primary",
7 | "wireProtocolEnabled": false
8 | },
9 | "version": 1
10 | }
11 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mongodb-atlas",
3 | "type": "mongodb-atlas",
4 | "config": {
5 | "clusterName": "Cluster0",
6 | "readPreference": "primary",
7 | "wireProtocolEnabled": false
8 | },
9 | "version": 1
10 | }
11 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/SupplierService/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SupplierService",
3 | "type": "twilio",
4 | "config": {
5 | "sid": "ACfbe8cc73415252bdd8708bb127681316"
6 | },
7 | "secret_config": {
8 | "auth_token": "SupplierSecret"
9 | },
10 | "version": 1
11 | }
12 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-anydpi-v26/ic_plus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-anydpi-v26/ic_plus_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/SupplierService/incoming_webhooks/TwilioWH/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "TwilioWH",
3 | "run_as_authed_user": false,
4 | "run_as_user_id": "",
5 | "run_as_user_id_script_source": "",
6 | "respond_result": true,
7 | "fetch_custom_user_data": false,
8 | "create_user_on_auth": false
9 | }
10 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/auth_providers/local-userpass.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "local-userpass",
3 | "type": "local-userpass",
4 | "config": {
5 | "autoConfirm": true,
6 | "resetFunctionName": "resetFunc",
7 | "runConfirmationFunction": false,
8 | "runResetFunction": true
9 | },
10 | "disabled": false
11 | }
12 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo.xcodeproj/project.xcworkspace/xcuserdata/andrew.morgan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb-developer/realm-demos/HEAD/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo.xcodeproj/project.xcworkspace/xcuserdata/andrew.morgan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/services/mongodb-atlas/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "5e4ea20e86371298945f28eb",
3 | "name": "mongodb-atlas",
4 | "type": "mongodb-atlas",
5 | "config": {
6 | "clusterName": "BrewingUpInnovation",
7 | "readPreference": "primary",
8 | "wireProtocolEnabled": false
9 | },
10 | "version": 1
11 | }
12 |
--------------------------------------------------------------------------------
/inventory/export/sync/sync/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "state": "enabled",
3 | "partition": {
4 | "key": "_partition",
5 | "type": "string",
6 | "required": true,
7 | "permissions": {
8 | "read": {},
9 | "write": {}
10 | }
11 | },
12 | "development_mode_enabled": false,
13 | "service_name": "mongodb-atlas"
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/InventoryDemo.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | keychain-access-groups
6 |
7 | $(AppIdentifierPrefix)com.mongodb.InventoryDemo
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Utils/Coordinator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Coordinator.swift
3 | // see: https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps
4 | //
5 |
6 | import UIKit
7 |
8 | protocol Coordinator {
9 | var childCoordinators: [Coordinator] { get set }
10 | var navigationController: NavigationControllerWithError { get set }
11 |
12 | func start()
13 | }
14 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/auth_providers/local-userpass.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "5e4ea95332f3ef8c16b97108",
3 | "name": "local-userpass",
4 | "type": "local-userpass",
5 | "config": {
6 | "autoConfirm": true,
7 | "resetFunctionName": "reset",
8 | "runConfirmationFunction": false,
9 | "runResetFunction": true
10 | },
11 | "disabled": false
12 | }
13 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Assets.xcassets/Alert.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Alert.pdf",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | },
12 | "properties" : {
13 | "preserves-vector-representation" : true,
14 | "template-rendering-intent" : "template"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "config_version": 20200603,
3 | "name": "Inventory",
4 | "location": "US-VA",
5 | "deployment_model": "GLOBAL",
6 | "security": {},
7 | "hosting": {
8 | "enabled": true
9 | },
10 | "custom_user_data_config": {
11 | "enabled": false
12 | },
13 | "sync": {
14 | "development_mode_enabled": false
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/stitch.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_id": "brewingupinnovation-nlfku",
3 | "config_version": 20180301,
4 | "name": "brewingupinnovation",
5 | "location": "US-VA",
6 | "deployment_model": "LOCAL",
7 | "security": {},
8 | "custom_user_data_config": {
9 | "enabled": false
10 | },
11 | "realm_config": {
12 | "development_mode_enabled": false
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/drawable/fab_plus.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/inventory/export/sync/data_sources/mongodb-atlas/InventoryDemo/InventoryItem/rules.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "InventoryItem",
3 | "database": "%(%%environment.values.databaseName)",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "additional_fields": {}
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/getTFModel/incoming_webhooks/getTFModelWH/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getTFModelWH",
3 | "run_as_authed_user": false,
4 | "run_as_user_id": "",
5 | "run_as_user_id_script_source": "",
6 | "options": {
7 | "httpMethod": "POST",
8 | "validationMethod": "NO_VALIDATION"
9 | },
10 | "respond_result": true,
11 | "fetch_custom_user_data": false,
12 | "create_user_on_auth": false
13 | }
14 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.codes.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "codes",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.sales.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "sales",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.FuelSales.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "FuelSales",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.kafka_sink.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "kafka_sink",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.location.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "location",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/Receive-IOT-Data/incoming_webhooks/IOT-WH/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "IOT-WH",
3 | "run_as_authed_user": false,
4 | "run_as_user_id": "",
5 | "run_as_user_id_script_source": "",
6 | "can_evaluate": {},
7 | "options": {
8 | "httpMethod": "POST",
9 | "validationMethod": "NO_VALIDATION"
10 | },
11 | "respond_result": true,
12 | "fetch_custom_user_data": false,
13 | "create_user_on_auth": false
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.HousingData.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "HousingData",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.locationData.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "locationData",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.transactions.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "transactions",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.inventory_hist.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "inventory_hist",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.inventory_last.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "inventory_last",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Assets.xcassets/errorColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0.251",
9 | "green" : "0.251",
10 | "red" : "0.753"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Assets.xcassets/messageColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0.290",
9 | "green" : "0.290",
10 | "red" : "0.290"
11 | }
12 | },
13 | "idiom" : "universal"
14 | }
15 | ],
16 | "info" : {
17 | "author" : "xcode",
18 | "version" : 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.transaction_hist.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "transaction_hist",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.transaction_updates.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "transaction_updates",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "write": true,
9 | "insert": true,
10 | "delete": true,
11 | "search": true,
12 | "additional_fields": {}
13 | }
14 | ],
15 | "schema": {}
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/saveTFModel/incoming_webhooks/SaveTFModelWH/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SaveTFModelWH",
3 | "run_as_authed_user": false,
4 | "run_as_user_id": "",
5 | "run_as_user_id_script_source": "",
6 | "options": {
7 | "httpMethod": "POST",
8 | "validationMethod": "NO_VALIDATION"
9 | },
10 | "respond_result": true,
11 | "disable_arg_logs": true,
12 | "fetch_custom_user_data": false,
13 | "create_user_on_auth": false
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/addStoreItemService/incoming_webhooks/addStoreItemWH/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "addStoreItemWH",
3 | "run_as_authed_user": false,
4 | "run_as_user_id": "",
5 | "run_as_user_id_script_source": "",
6 | "options": {
7 | "httpMethod": "POST",
8 | "validationMethod": "NO_VALIDATION"
9 | },
10 | "respond_result": true,
11 | "disable_arg_logs": true,
12 | "fetch_custom_user_data": false,
13 | "create_user_on_auth": false
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/findStoreItemsService/incoming_webhooks/findStoreItemsWH/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "findStoreItemsWH",
3 | "run_as_authed_user": false,
4 | "run_as_user_id": "",
5 | "run_as_user_id_script_source": "",
6 | "options": {
7 | "httpMethod": "POST",
8 | "validationMethod": "NO_VALIDATION"
9 | },
10 | "respond_result": true,
11 | "disable_arg_logs": true,
12 | "fetch_custom_user_data": false,
13 | "create_user_on_auth": false
14 | }
15 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/menu/activity_inventory_menu.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/Model/Constants.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Constants.swift
3 | // InventoryDemo
4 | //
5 | // Created by Paolo Manna on 14/08/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import RealmSwift
11 |
12 | struct Constants {
13 | // Set this to your Realm App ID found in the Realm UI.
14 | static let REALM_APP_ID = "inventorysync-xxxxx"
15 | }
16 |
17 | let app = App(id: Constants.REALM_APP_ID)
18 | var store = "101"
19 |
20 | var cleanDatabase = false
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_IOT_HISTORY.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_IOT_HISTORY",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "INSERT"
7 | ],
8 | "database": "InventoryDemo",
9 | "collection": "IOT_DATA",
10 | "service_name": "mongodb-atlas",
11 | "match": {},
12 | "project": {},
13 | "full_document": true,
14 | "unordered": false
15 | },
16 | "function_name": "fnc_IOT_HIST",
17 | "disabled": false
18 | }
19 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_restockInventory.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_restockInventory",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "UPDATE"
7 | ],
8 | "database": "InventoryDemo",
9 | "collection": "transactions",
10 | "service_name": "mongodb-atlas",
11 | "match": {},
12 | "project": {},
13 | "full_document": true,
14 | "unordered": false
15 | },
16 | "function_name": "fnc_restockInventory",
17 | "disabled": false
18 | }
19 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_sales.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_sales",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "INSERT",
7 | "UPDATE",
8 | "REPLACE"
9 | ],
10 | "database": "InventoryDemo",
11 | "collection": "InventoryItem",
12 | "service_name": "mongodb-atlas",
13 | "match": {},
14 | "project": {},
15 | "full_document": true,
16 | "unordered": false
17 | },
18 | "function_name": "fnc_sales",
19 | "disabled": false
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_kafkaSink.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_kafkaSink",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "INSERT",
7 | "UPDATE",
8 | "REPLACE"
9 | ],
10 | "database": "InventoryDemo",
11 | "collection": "kafka_sink",
12 | "service_name": "mongodb-atlas",
13 | "match": {},
14 | "project": {},
15 | "full_document": true,
16 | "unordered": false
17 | },
18 | "function_name": "fnc_kafkaSync",
19 | "disabled": false
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_tfModel.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_tfModel",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "INSERT",
7 | "UPDATE",
8 | "REPLACE"
9 | ],
10 | "database": "InventoryDemo",
11 | "collection": "tfModel",
12 | "service_name": "mongodb-atlas",
13 | "match": {},
14 | "project": {},
15 | "full_document": true,
16 | "unordered": false
17 | },
18 | "function_name": "fnc_modelHistory",
19 | "disabled": false
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/covid.timeseries.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "timeseries",
3 | "database": "covid",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "fields": {
9 | "price": {}
10 | },
11 | "insert": true,
12 | "delete": true,
13 | "search": true,
14 | "additional_fields": {
15 | "write": true,
16 | "read": true
17 | }
18 | }
19 | ],
20 | "schema": {}
21 | }
22 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/drawable/ic_plus_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/Settings+Application.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Settings+Application.swift
3 | // InventoryDemo
4 | //
5 | // Created by Paolo Manna on 14/08/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension Settings {
12 | var userName: String? {
13 | get { return value(forKey: "UserName") as? String }
14 | set { setValue(newValue, forKey: "UserName") }
15 | }
16 |
17 | var storeName: String? {
18 | get { return value(forKey: "StoreName") as? String }
19 | set { setValue(newValue, forKey: "StoreName") }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Utils/File.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // InventoryDemo
4 | //
5 | // Created by Diego Freniche Brito on 25/5/21.
6 | //
7 |
8 | import Foundation
9 |
10 | func readFile(named fileName: String) -> (success: Bool, contents: String) {
11 | guard let path = Bundle.main.path(forResource: fileName, ofType: nil),
12 | let text = try? NSString(contentsOfFile: path, encoding: String.Encoding.utf8.rawValue)
13 | else { return (success: false, "") }
14 |
15 | return (success: true, contents: (text as String).trimmingCharacters(in: .newlines))
16 | }
17 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_TransactionHistory.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_TransactionHistory",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "INSERT",
7 | "UPDATE",
8 | "REPLACE"
9 | ],
10 | "database": "InventoryDemo",
11 | "collection": "transactions",
12 | "service_name": "mongodb-atlas",
13 | "match": {},
14 | "project": {},
15 | "full_document": true,
16 | "unordered": false
17 | },
18 | "function_name": "fnc_transactionHistory",
19 | "disabled": false
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/triggers/trg_inventoryTransaction.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trg_inventoryTransaction",
3 | "type": "DATABASE",
4 | "config": {
5 | "operation_types": [
6 | "INSERT",
7 | "UPDATE",
8 | "REPLACE"
9 | ],
10 | "database": "InventoryDemo",
11 | "collection": "InventoryItem",
12 | "service_name": "mongodb-atlas",
13 | "match": {},
14 | "project": {},
15 | "full_document": true,
16 | "unordered": false
17 | },
18 | "function_name": "fnc_transactions",
19 | "disabled": false
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | .DS_Store
6 |
7 | ## User settings
8 | xcuserdata/
9 |
10 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
11 | *.xcscmblueprint
12 | *.xccheckout
13 |
14 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
15 | build/
16 | DerivedData/
17 | *.moved-aside
18 | *.pbxuser
19 | !default.pbxuser
20 | *.mode1v3
21 | !default.mode1v3
22 | *.mode2v3
23 | !default.mode2v3
24 | *.perspectivev3
25 | !default.perspectivev3
26 |
27 | output/
28 |
29 | ## Gcc Patch
30 | /*.gcno
--------------------------------------------------------------------------------
/inventory/export/sync/auth/providers.json:
--------------------------------------------------------------------------------
1 | {
2 | "api-key": {
3 | "name": "api-key",
4 | "type": "api-key",
5 | "disabled": true
6 | },
7 | "local-userpass": {
8 | "name": "local-userpass",
9 | "type": "local-userpass",
10 | "config": {
11 | "autoConfirm": true,
12 | "resetFunctionName": "resetFunc",
13 | "resetPasswordSubject": "You can not reset your password",
14 | "resetPasswordUrl": "https://notgonnareset.com",
15 | "runConfirmationFunction": false,
16 | "runResetFunction": true
17 | },
18 | "disabled": false
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_modelHistory/source.js:
--------------------------------------------------------------------------------
1 | exports = function(changeEvent) {
2 | const history = context.services.get("mongodb-atlas").db("InventoryDemo").collection("tfModel_hist");
3 | const fullDocument = changeEvent.fullDocument;
4 |
5 | //Take the object_id and make it the parent_id
6 | //Remove the object_id for a new one in the history collection
7 | var fullCopy = fullDocument;
8 | fullCopy.parent_id = fullDocument._id;
9 | delete fullCopy._id;
10 |
11 | // add a date saved to this model in the history collection
12 | var nDate = new Date();
13 | fullCopy.date = nDate;
14 |
15 | history.insertOne(fullCopy);
16 |
17 | };
18 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Inventory Manager
3 | Email
4 | Password
5 | Create account
6 | Login
7 | \u22EE
8 | Add Item:
9 | Log Out
10 | Item Name
11 | Item Quantity
12 | Item Price
13 | Store
14 |
15 |
--------------------------------------------------------------------------------
/inventory/export/sync/data_sources/mongodb-atlas/InventoryDemo/InventoryItem/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "bsonType": "object",
3 | "properties": {
4 | "_id": {
5 | "bsonType": "objectId"
6 | },
7 | "_partition": {
8 | "bsonType": "string"
9 | },
10 | "name": {
11 | "bsonType": "string"
12 | },
13 | "price": {
14 | "bsonType": "double"
15 | },
16 | "quantity": {
17 | "bsonType": "long"
18 | }
19 | },
20 | "required": [
21 | "_id",
22 | "_partition",
23 | "name",
24 | "price",
25 | "quantity"
26 | ],
27 | "title": "InventoryItem"
28 | }
29 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/Model/Models.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Models.swift
3 | // InventoryDemo
4 | //
5 | // Created by MongoDB on 2020-05-07.
6 | // Copyright © 2020 MongoDB, Inc. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import RealmSwift
11 |
12 | class InventoryItem: Object {
13 | @objc dynamic var _id = ObjectId.generate()
14 | @objc dynamic var _partition: String = store
15 | @objc dynamic var name: String = ""
16 | @objc dynamic var price: Double = 0.0
17 | @objc dynamic var quantity: Int = 0
18 |
19 | override static func primaryKey() -> String? {
20 | return "_id"
21 | }
22 |
23 | convenience init(name: String) {
24 | self.init()
25 |
26 | _partition = store
27 | self.name = name
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "Realm",
6 | "repositoryURL": "https://github.com/realm/realm-cocoa",
7 | "state": {
8 | "branch": null,
9 | "revision": "ae8e646590396dfc13c1abbf8aa2e48c43766dce",
10 | "version": "10.7.2"
11 | }
12 | },
13 | {
14 | "package": "RealmDatabase",
15 | "repositoryURL": "https://github.com/realm/realm-core",
16 | "state": {
17 | "branch": null,
18 | "revision": "bab46acdca91c417a0d4849b8f4992a3c17e29a5",
19 | "version": "10.5.5"
20 | }
21 | }
22 | ]
23 | },
24 | "version": 1
25 | }
26 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/java/com/mongodb/inventorymanager/model/InventoryItem.kt:
--------------------------------------------------------------------------------
1 | package com.mongodb.inventorymanager.model
2 |
3 | import io.realm.MutableRealmInteger
4 | import io.realm.RealmObject
5 | import io.realm.annotations.PrimaryKey
6 | import io.realm.annotations.Required
7 | import org.bson.types.ObjectId
8 |
9 | open class InventoryItem(_name: String = "Task", _quantity: Long = 0, _price: Double = Double.NaN, store: String = "All Stores") : RealmObject() {
10 | @PrimaryKey var _id: ObjectId = ObjectId()
11 | var _partition: String = store
12 | var name: String = _name
13 | var price: Double = _price
14 | @Required
15 | val quantity: MutableRealmInteger = MutableRealmInteger.valueOf(_quantity)
16 |
17 | val quantityValue: Long
18 | get() = this.quantity.get()!!.toLong()
19 | }
20 |
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemoApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryDemoApp.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 | import RealmSwift
10 |
11 | // Important: you must create a text file in the root folder of this project (where the InventoryDemo.xcproject is)
12 | // called "realm-app-id.txt" and put inside a line with the realm app id you've created
13 | // that id will look like myappsync-xxxxx
14 | let (success, filecontent) = readFile(named: "realm-app-id.txt")
15 |
16 | let app = RealmSwift.App(id: success ? filecontent: "Couldn't read secrets file. Is there?" )
17 | var store = "101"
18 |
19 | @main
20 | struct InventoryDemoApp: SwiftUI.App {
21 | var body: some Scene {
22 | WindowGroup {
23 | ContentView()
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/inventory/clients/ios/.swiftformat:
--------------------------------------------------------------------------------
1 | --allman false
2 | --binarygrouping none
3 | --closingparen balanced
4 | --commas inline
5 | --comments indent
6 | --decimalgrouping none
7 | --elseposition same-line
8 | --empty void
9 | --exponentcase lowercase
10 | --exponentgrouping disabled
11 | --fractiongrouping disabled
12 | --header ignore
13 | --hexgrouping none
14 | --hexliteralcase uppercase
15 | --ifdef outdent
16 | --importgrouping alphabetized
17 | --indent tabs
18 | --indentcase false
19 | --linebreaks lf
20 | --octalgrouping none
21 | --operatorfunc spaced
22 | --patternlet hoist
23 | --ranges spaced
24 | --self remove
25 | --semicolons inline
26 | --stripunusedargs closure-only
27 | --tabwidth 4
28 | --trimwhitespace nonblank-lines
29 | --wraparguments after-first
30 | --wrapcollections preserve
31 |
32 | --disable consecutiveSpaces
33 | --enable isEmpty
34 |
35 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #1C233F
5 | #9A9BA5
6 | #b1b3bf
7 | #EBEBF2
8 |
9 |
10 | #39477F
11 | #59569E
12 | #9A59A5
13 | #D34CA3
14 | #F25192
15 | #F77C88
16 | #FC9F95
17 | #FCC397
18 |
19 |
20 | #d64881
21 | #dadada
22 |
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 1.8
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/Components/CaptionLabel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CaptionLabel.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct CaptionLabel: View {
11 | let title: String
12 |
13 | private let lineLimit = 5
14 |
15 | var body: some View {
16 | HStack {
17 | Text(LocalizedStringKey(title))
18 | .font(.caption)
19 | .lineLimit(lineLimit)
20 | .multilineTextAlignment(.leading)
21 | .foregroundColor(.secondary)
22 | Spacer()
23 | }
24 | }
25 | }
26 |
27 | struct CaptionLabel_Previews: PreviewProvider {
28 | static var previews: some View {
29 | CaptionLabel(title: "Title")
30 | .previewLayout(.sizeThatFits)
31 | .padding()
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Models/InventoryItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryItem.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import RealmSwift
9 |
10 | @objcMembers class InventoryItem: Object, ObjectKeyIdentifiable {
11 | dynamic var _id = ObjectId.generate()
12 | dynamic var _partition: String = store
13 | dynamic var name = ""
14 | dynamic var price = 0.0
15 | dynamic var quantity = 0
16 |
17 | override static func primaryKey() -> String? {
18 | return "_id"
19 | }
20 |
21 | convenience init(_ name: String) {
22 | self.init()
23 | self.name = name
24 | }
25 | }
26 |
27 | extension InventoryItem {
28 | static var sample: InventoryItem {
29 | let sample = InventoryItem("Widget")
30 | sample.price = 9.99
31 | sample.quantity = 66
32 | return sample
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContentView: View {
11 | @State private var username = ""
12 |
13 | var body: some View {
14 | NavigationView {
15 | Group {
16 | if app.currentUser == nil {
17 | LoginView(username: $username)
18 | } else {
19 | InventoryView(username: $username)
20 | .environment(\.realmConfiguration, app.currentUser!.configuration(partitionValue: store))
21 | }
22 | }
23 | .navigationBarTitle(username, displayMode: .inline)
24 | }
25 | }
26 | }
27 |
28 |
29 |
30 | struct ContentView_Previews: PreviewProvider {
31 | static var previews: some View {
32 | ContentView()
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Utils/Storyboarded.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Storyboarded.swift
3 | // see: https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps
4 | //
5 |
6 | import UIKit
7 |
8 | protocol Storyboarded {
9 | static func instantiate(storyboardName: String) -> Self
10 | }
11 |
12 | extension Storyboarded where Self: UIViewController {
13 | static func instantiate(storyboardName: String = "Main") -> Self {
14 | // this pulls out "MyApp.MyViewController"
15 | let fullName = NSStringFromClass(self)
16 |
17 | // this splits by the dot and uses everything after, giving "MyViewController"
18 | let className = fullName.components(separatedBy: ".")[1]
19 |
20 | // load our storyboard
21 | let storyboard = UIStoryboard(name: storyboardName, bundle: Bundle.main)
22 |
23 | // instantiate a view controller with that identifier, and force cast as the type that was requested
24 | return storyboard.instantiateViewController(withIdentifier: className) as! Self
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/Components/CheckBox.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CheckBox.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct CheckBox: View {
11 | var title: String
12 | @Binding var isChecked: Bool
13 |
14 | var body: some View {
15 | Button(action: { self.isChecked.toggle() }) {
16 | HStack {
17 | Image(systemName: isChecked ? "checkmark.square": "square")
18 | Text(title)
19 | }
20 | .foregroundColor(isChecked ? .primary : .secondary)
21 | }
22 | }
23 | }
24 |
25 | struct CheckBox_Previews: PreviewProvider {
26 | static var previews: some View {
27 | VStack {
28 | CheckBox(title: "Test checkbox", isChecked: .constant(true))
29 | CheckBox(title: "Test checkbox", isChecked: .constant(false))
30 | }
31 | .padding()
32 | .previewLayout(.sizeThatFits)
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/Components/CountStepper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CountStepper.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct CountStepper: View {
11 | let label: String
12 | @Binding var value: Int
13 |
14 | var body: some View {
15 | VStack {
16 | HStack {
17 | Spacer()
18 | Text("\(label): \(value)")
19 | .foregroundColor(.secondary)
20 | }
21 | Stepper(value: $value, in: 0...10000) {}
22 | }
23 | }
24 | }
25 |
26 | struct BindingView: View {
27 | @State var value: Int
28 |
29 | var body: some View {
30 | CountStepper(label: "Qty", value: $value)
31 | }
32 | }
33 |
34 | struct CountStepper_Previews: PreviewProvider {
35 | static var previews: some View {
36 | BindingView(value: 7)
37 | .previewLayout(.sizeThatFits)
38 | .padding()
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/inventory/clients/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.72'
5 | repositories {
6 | google()
7 | jcenter()
8 | maven {
9 | url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
10 | }
11 | }
12 | dependencies {
13 | classpath 'com.android.tools.build:gradle:3.6.3'
14 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15 | classpath "io.realm:realm-gradle-plugin:10.0.0-BETA.4"
16 | }
17 | }
18 |
19 | // Don't cache SNAPSHOT (changing) dependencies.
20 | configurations.all {
21 | resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
22 | }
23 |
24 | allprojects {
25 | repositories {
26 | google()
27 | jcenter()
28 | maven {
29 | url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
30 | }
31 | }
32 | }
33 |
34 | task clean(type: Delete) {
35 | delete rootProject.buildDir
36 | }
37 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemoTests/InventoryDemoTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryDemoTests.swift
3 | // InventoryDemoTests
4 | //
5 | // Created by Paolo Manna on 14/08/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | @testable import InventoryDemo
10 | import XCTest
11 |
12 | class InventoryDemoTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "Realm",
6 | "repositoryURL": "https://github.com/realm/realm-cocoa",
7 | "state": {
8 | "branch": null,
9 | "revision": "7e5c77fd7fbb30259e8e6e6a41f32289f72e0812",
10 | "version": "10.7.6"
11 | }
12 | },
13 | {
14 | "package": "RealmDatabase",
15 | "repositoryURL": "https://github.com/realm/realm-core",
16 | "state": {
17 | "branch": null,
18 | "revision": "018adb3469c2882904febca251778129ef4a9b70",
19 | "version": "10.7.2"
20 | }
21 | },
22 | {
23 | "package": "ViewInspector",
24 | "repositoryURL": "https://github.com/nalexn/ViewInspector",
25 | "state": {
26 | "branch": null,
27 | "revision": "0da31abb9fcc3ab347fdd79f8f0937732323891c",
28 | "version": "0.7.5"
29 | }
30 | }
31 | ]
32 | },
33 | "version": 1
34 | }
35 |
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/services/mongodb-atlas/rules/sample_mflix.opinions.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "5e4ea47cb0df2312812401d8",
3 | "database": "sample_mflix",
4 | "collection": "opinions",
5 | "roles": [
6 | {
7 | "name": "owner",
8 | "apply_when": {
9 | "owner": "%%user.id"
10 | },
11 | "read": true,
12 | "write": true,
13 | "insert": true,
14 | "delete": true,
15 | "additional_fields": {}
16 | }
17 | ],
18 | "schema": {
19 | "title": "opinions",
20 | "properties": {
21 | "_id": {
22 | "bsonType": "objectId"
23 | },
24 | "owner": {
25 | "bsonType": "string"
26 | },
27 | "opinion": {
28 | "bsonType": "string"
29 | },
30 | "rated": {
31 | "bsonType": "double"
32 | },
33 | "title": {
34 | "bsonType": "string"
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_notifySpoilage/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(argItemDoc){
2 | /*
3 | Accessing application's values:
4 | var x = context.values.get("value_name");
5 |
6 | Accessing a mongodb service:
7 | var collection = context.services.get("mongodb-atlas").db("dbname").collection("coll_name");
8 | var doc = collection.findOne({owner_id: context.user.id});
9 |
10 | To call other named functions:
11 | var result = context.functions.execute("function_name", arg1, arg2);
12 |
13 | Try running in the console below.
14 | */
15 | console.log("fnc_notifySpoilage argItemDoc: " + JSON.stringify(argItemDoc));
16 |
17 | const twilio = context.services.get("SupplierService");
18 | const ourNumber = context.values.get("ourNumber");
19 | var recipient = argItemDoc.supplier;
20 | if (recipient) {
21 | twilio.send({
22 | from: ourNumber,
23 | to: recipient,
24 | body: `This is an alert that ${argItemDoc.name} has spoiled due to high temperature in ${argItemDoc._partition}. Please check the back office application.`
25 | });
26 | }
27 | return storeDoc;
28 | };
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.IOT_DATA.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "IOT_DATA",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "insert": true,
9 | "delete": true,
10 | "search": true,
11 | "additional_fields": {}
12 | }
13 | ],
14 | "schema": {
15 | "properties": {
16 | "_id": {
17 | "bsonType": "objectId"
18 | },
19 | "date_transmitted": {
20 | "bsonType": "date"
21 | },
22 | "humidity": {
23 | "bsonType": "double"
24 | },
25 | "parent_id": {
26 | "bsonType": "objectId"
27 | },
28 | "sensorDate": {
29 | "bsonType": "string"
30 | },
31 | "sensorId": {
32 | "bsonType": "string"
33 | },
34 | "temperature": {
35 | "bsonType": "double"
36 | }
37 | },
38 | "title": "IOT_DATA_HIST"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/Receive-IOT-Data/incoming_webhooks/IOT-WH/source.js:
--------------------------------------------------------------------------------
1 | // This function is the webhook's request handler.
2 | exports = async function(payload) {
3 | /*===============================================================
4 | - Date: Author: Version: Notes:
5 | -----------------------------------------------------------------
6 | - 2020-11-11 Britton LaRoche 1.0 Initial Release
7 | -
8 | ===============================================================*/
9 | // Data can be extracted from the request as follows:
10 | console.log(JSON.stringify("IOT-WH called ... executing..." ));
11 | var iotData = context.services.get("mongodb-atlas").db("InventoryDemo").collection("IOT_DATA");
12 | var body = {};
13 | var result = {};
14 | if (payload.body) {
15 | console.log(JSON.stringify(payload.body));
16 | body = EJSON.parse(payload.body.text());
17 | console.log(JSON.stringify(body));
18 | result = iotData.insertMany(body);
19 | console.log(JSON.stringify("return document" ));
20 | console.log(JSON.stringify(result));
21 | }
22 | return result;
23 | };
--------------------------------------------------------------------------------
/inventory/export/backOffice/hosting/files/slides.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_IOT_HIST/source.js:
--------------------------------------------------------------------------------
1 | exports = function(changeEvent) {
2 | console.log("fnc_IOT_HIST called");
3 | const history = context.services.get("mongodb-atlas").db("InventoryDemo").collection("IOT_DATA_HIST");
4 | const item = context.services.get("mongodb-atlas").db("InventoryDemo").collection("InventoryItem");
5 | const fullDocument = changeEvent.fullDocument;
6 |
7 | //Take the object_id and make it the parent_id
8 | //Remove the object_id for a new one in the history collection
9 | var fullCopy = fullDocument;
10 | fullCopy.parent_id = fullDocument._id;
11 | delete fullCopy._id;
12 |
13 | // add a date saved to this model in the history collection
14 | var nDate = new Date();
15 | fullCopy.date_transmitted = nDate;
16 |
17 | history.insertOne(fullCopy);
18 | console.log(JSON.stringify(fullCopy));
19 | //now lets update the inventory items with the temperature for all items with a matching sensorId
20 |
21 | item.updateMany(
22 | { "sensorId": fullCopy.sensorId },
23 | { $set:
24 | {
25 | "temp": fullCopy.temperature
26 | }
27 | }
28 | );
29 |
30 |
31 | };
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/layout/activity_task.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_clean_IOT_data/source.js:
--------------------------------------------------------------------------------
1 | exports = function() {
2 | /*
3 | A Scheduled Trigger will always call a function without arguments.
4 | Documentation on Triggers: https://docs.mongodb.com/realm/triggers/overview/
5 |
6 | Functions run by Triggers are run as System users and have full access to Services, Functions, and MongoDB Data.
7 |
8 | Access a mongodb service:
9 | const collection = context.services.get().db("").collection("");
10 | const doc = collection.findOne({ name: "mongodb" });
11 |
12 | Note: In Atlas Triggers, the service name is defaulted to the cluster name.
13 |
14 | Call other named functions if they are defined in your application:
15 | const result = context.functions.execute("function_name", arg1, arg2);
16 |
17 | Access the default http client and execute a GET request:
18 | const response = context.http.get({ url: })
19 |
20 | Learn more about http client here: https://docs.mongodb.com/realm/functions/context/#context-http
21 | */
22 | const iotData = context.services.get("mongodb-atlas").db("InventoryDemo").collection("IOT_DATA");
23 | iotData.deleteMany({});
24 | };
25 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/addStoreItemService/incoming_webhooks/addStoreItemWH/source.js:
--------------------------------------------------------------------------------
1 | // This function is the webhook's request handler.
2 | exports = async function(payload) {
3 | /*===============================================================
4 | - Date: Author: Version: Notes:
5 | -----------------------------------------------------------------
6 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
7 | -
8 | ===============================================================*/
9 | // Data can be extracted from the request as follows:
10 | console.log(JSON.stringify("findStoreItemsWH called ... executing..." ));
11 | var inventory = context.services.get("mongodb-atlas").db("InventoryDemo").collection("InventoryItem");
12 | var body = {};
13 | var result = {};
14 | if (payload.body) {
15 | console.log(JSON.stringify(payload.body));
16 | body = EJSON.parse(payload.body.text());
17 | console.log(JSON.stringify(body));
18 | result = inventory.insertOne(body);
19 | console.log(JSON.stringify("return document" ));
20 | console.log(JSON.stringify(result));
21 | }
22 | return result;
23 | };
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/findStoreItemsService/incoming_webhooks/findStoreItemsWH/source.js:
--------------------------------------------------------------------------------
1 | // This function is the webhook's request handler.
2 | exports = async function(payload) {
3 | /*===============================================================
4 | - Date: Author: Version: Notes:
5 | -----------------------------------------------------------------
6 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
7 | -
8 | ===============================================================*/
9 | // Data can be extracted from the request as follows:
10 | console.log(JSON.stringify("findStoreItemsWH called ... executing..." ));
11 | var customer = context.services.get("mongodb-atlas").db("InventoryDemo").collection("InventoryItem");
12 | var body = {};
13 | var result = {};
14 | if (payload.body) {
15 | console.log(JSON.stringify(payload.body));
16 | body = EJSON.parse(payload.body.text());
17 | console.log(JSON.stringify(body));
18 | result = customer.findOne(body);
19 | console.log(JSON.stringify("return document" ));
20 | console.log(JSON.stringify(result));
21 | }
22 | return result;
23 | };
--------------------------------------------------------------------------------
/inventory/clients/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
22 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/java/com/mongodb/inventorymanager/InventoryManager.kt:
--------------------------------------------------------------------------------
1 | package com.mongodb.inventorymanager
2 |
3 | import android.app.Application
4 |
5 | import io.realm.Realm
6 | import io.realm.log.LogLevel
7 | import io.realm.log.RealmLog
8 | import io.realm.mongodb.App
9 | import io.realm.mongodb.AppConfiguration
10 |
11 | lateinit var inventoryApp: App
12 |
13 | // global Kotlin extension that resolves to the short version
14 | // of the name of the current class. Used for labelling logs.
15 | inline fun T.TAG(): String = T::class.java.simpleName
16 |
17 | /*
18 | * TaskTracker: Sets up the taskApp Realm App and enables Realm-specific logging in debug mode.
19 | */
20 | class InventoryManager : Application() {
21 |
22 | override fun onCreate() {
23 | super.onCreate()
24 | Realm.init(this)
25 | inventoryApp = App(AppConfiguration.Builder(BuildConfig.MONGODB_REALM_APP_ID)
26 | .baseUrl(BuildConfig.MONGODB_REALM_URL)
27 | .appName(BuildConfig.VERSION_NAME)
28 | .appVersion(BuildConfig.VERSION_CODE.toString())
29 | .build())
30 |
31 | // Enable more logging in debug mode
32 | if (BuildConfig.DEBUG) {
33 | RealmLog.setLevel(LogLevel.ALL)
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_reprimandSupplier/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(recipient) {
2 | /*===============================================================
3 | - Date: Author: Version: Notes:
4 | -----------------------------------------------------------------
5 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
6 | -
7 | ===============================================================*/
8 | const twilio = context.services.get("SupplierService");
9 | const ourNumber = context.values.get("ourNumber");
10 | var codes = context.services.get("mongodb-atlas").db("InventoryDemo").collection("codes");
11 | var vcompanyName = await context.functions.execute("fnc_getCompanyName");
12 | var vcompanyLogo = await context.functions.execute("fnc_getCompanyLogo");
13 |
14 | console.log(JSON.stringify("fnc_reprimandSupplier called with arguments: " + recipient));
15 | console.log("COMPANY_NAME: "+ vcompanyName);
16 |
17 | twilio.send({
18 | from: ourNumber,
19 | to: recipient,
20 | body: `Hello from ${vcompanyName}. Use 0 if you can not deliver. Last reponse was interprited as 0. Use only numbers, no commas or letters symbols or spaces.`,
21 | mediaUrl: 'https://inventory-rccnj.mongodbstitch.com/logo.png'
22 | });
23 | };
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/PriceInput.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PriceInput.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct PriceInput: View {
11 | @Environment(\.presentationMode) var presentationMode
12 |
13 | @Binding var price: Double
14 |
15 | @State private var buffer = "0.00"
16 |
17 | var body: some View {
18 | NavigationView {
19 | InputField(title: "Price", text: $buffer, keyboardType: .decimalPad)
20 | .navigationBarTitle("Edit Price", displayMode: .inline)
21 | .navigationBarItems(trailing: Button(action: saveAndClose) {
22 | Text("Save")
23 | })
24 | .onAppear() { buffer = String(price) }
25 | .padding()
26 | }
27 | }
28 |
29 | private func saveAndClose() {
30 | price = Double(buffer) ?? price
31 | presentationMode.wrappedValue.dismiss()
32 | }
33 | }
34 |
35 | struct PriceBindingView: View {
36 | @State var value: Double
37 |
38 | var body: some View {
39 | PriceInput(price: $value)
40 | }
41 | }
42 |
43 | struct PricePriceInput_Previews: PreviewProvider {
44 | static var previews: some View {
45 | PriceBindingView(value: 4.99)
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemoTests/ContentViewTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentViewTests.swift
3 | // InventoryDemoTests
4 | //
5 | // Created by Diego Freniche Brito on 19/5/21.
6 | //
7 |
8 | import XCTest
9 | import ViewInspector
10 | import SwiftUI
11 | @testable import InventoryDemo
12 |
13 | class ContentViewTests: XCTestCase {
14 |
15 | func testContentView() throws {
16 | // Given a ContentView
17 | let contentView = ContentView()
18 |
19 | // We check its structure
20 | // Then it should have a Navigation
21 | let navView = try contentView.inspect().navigationView()
22 | XCTAssertNotNil(navView)
23 |
24 | // Then that Navigation should contain a Group
25 | let group = try? navView.group(0)
26 | XCTAssertNotNil(group)
27 |
28 | // Then that Group should have a LoginView
29 | let login = try? group?.view(LoginView.self, 0)
30 | XCTAssertNotNil(login)
31 |
32 | // Then that Group shouldn't have an InventoryView
33 | let inventoryView = try? group?.view(InventoryView.self, 0)
34 | XCTAssertNil(inventoryView)
35 | }
36 | }
37 |
38 | // Needed to inspect SwiftUI view hierarchy
39 | extension ContentView: Inspectable {}
40 | extension InventoryView: Inspectable {}
41 | extension LoginView: Inspectable {}
42 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/SupplierService/incoming_webhooks/TwilioWH/source.js:
--------------------------------------------------------------------------------
1 | /*
2 | See https://www.twilio.com/docs/api/twiml/sms/twilio_request for
3 | an example of a payload that Twilio would send.
4 |
5 | Try running in the console below.
6 | */
7 | /*===============================================================
8 | - Date: Author: Version: Notes:
9 | -----------------------------------------------------------------
10 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
11 | -
12 | ===============================================================*/
13 |
14 | exports = async function(payload) {
15 | //return payload.FromCity === 'New York';
16 |
17 | //exports = function(args) {
18 |
19 | const db = context.services.get("mongodb-atlas").db("InventoryDemo");
20 | const transactions = db.collection("transactions");
21 |
22 | console.log("twiliowebhook: " + payload.Body);
23 |
24 | var fromPhone = payload.From;
25 | var response = payload.Body.trim();
26 | var trimedPhone = fromPhone.substring(1, fromPhone.length);
27 |
28 | console.log("mobile_phone: " + fromPhone + ", response: " + response);
29 | console.log("trimmedPhone: " + trimedPhone);
30 | console.log("trimmeResponse: " + response);
31 |
32 | var result = await context.functions.execute("fnc_updateTransaction", trimedPhone, response);
33 |
34 | };
--------------------------------------------------------------------------------
/inventory/clients/android/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemoTests/RealmUtil.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RealmUtil.swift
3 | // InventoryDemoTests
4 | //
5 | // Created by Diego Freniche Brito on 20/02/2021.
6 | //
7 |
8 | import Foundation
9 | import RealmSwift
10 |
11 | enum RealmUtil {
12 | static let realm: Realm? = initRealm()
13 |
14 | // returns an in-memory Realm, not connected to sync (local), for testing purposes
15 | static func initRealm() -> Realm? {
16 | do {
17 | let configuration = Realm.Configuration(fileURL: nil,
18 | inMemoryIdentifier: "test-realm",
19 | syncConfiguration: nil,
20 | encryptionKey: nil,
21 | readOnly: false,
22 | schemaVersion: 0,
23 | migrationBlock: nil,
24 | deleteRealmIfMigrationNeeded: true,
25 | shouldCompactOnLaunch: nil,
26 | objectTypes: nil)
27 | let realm = try Realm(configuration: configuration)
28 | return realm
29 | } catch {
30 | fatalError("Something bad happened while creating the Realm: \(error)")
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/AddItemView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AddItemView.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 | import RealmSwift
10 |
11 | struct AddItemView: View {
12 | @Environment(\.presentationMode) var presentationMode
13 |
14 | @ObservedResults(InventoryItem.self) var items
15 |
16 | @State var item = InventoryItem()
17 | @State private var priceBuffer = "0.00"
18 | @State private var quantityBuffer = "0"
19 |
20 | var body: some View {
21 | VStack {
22 | InputField(title: "New Product Name", text: $item.name)
23 | InputField(title: "Price", text: $priceBuffer, keyboardType: .decimalPad)
24 | InputField(title: "Quantity", text: $quantityBuffer, keyboardType: .numberPad)
25 | }
26 | .padding()
27 | .navigationBarTitle("New Inventory Item", displayMode: .inline)
28 | .navigationBarItems(trailing: Button(action: save) { Text("Save") })
29 | }
30 |
31 | private func save() {
32 | item.price = Double(priceBuffer) ?? 0.00
33 | item.quantity = Int(quantityBuffer) ?? 0
34 | $items.append(item)
35 | self.presentationMode.wrappedValue.dismiss()
36 | }
37 | }
38 |
39 | struct AddItemView_Previews: PreviewProvider {
40 | static var previews: some View {
41 | NavigationView {
42 | AddItemView()
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/View/InventoryItemTableCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryItemTableCell.swift
3 | // InventoryDemo
4 | //
5 | // Created by Paolo Manna on 07/10/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | import Realm
10 | import RealmSwift
11 | import UIKit
12 |
13 | class InventoryItemTableCell: UITableViewCell {
14 | @IBOutlet var titleLabel: UILabel!
15 | @IBOutlet var priceLabel: UILabel!
16 | @IBOutlet var qtyLabel: UILabel!
17 | @IBOutlet var qtyStepper: UIStepper!
18 |
19 | weak var controller: InventoryViewController?
20 |
21 | var item: InventoryItem? {
22 | didSet {
23 | if item != nil {
24 | titleLabel.text = item!.name
25 | priceLabel.text = String(format: "Price: %.2f", item!.price)
26 | qtyLabel.text = String(format: "Qty: %d", item!.quantity)
27 | qtyStepper.isEnabled = true
28 | qtyStepper.value = Double(item!.quantity)
29 | } else {
30 | titleLabel.text = nil
31 | priceLabel.text = nil
32 | qtyLabel.text = nil
33 | qtyStepper.isEnabled = false
34 | qtyStepper.value = 0.0
35 | }
36 | }
37 | }
38 |
39 | // MARK: - Actions
40 |
41 | @IBAction func changeQuantity(_ stepper: UIStepper) {
42 | guard item != nil else { return }
43 |
44 | controller?.changeItemQuantity(quantity: Int(stepper.value), for: item!)
45 | }
46 |
47 | @IBAction func changePrice(_ button: UIButton) {
48 | guard item != nil else { return }
49 |
50 | controller?.changeItemPrice(for: item!)
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_updateTransaction/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(aPhone, aResponse){
2 | /*
3 | Accessing application's values:
4 | var x = context.values.get("value_name");
5 |
6 | Accessing a mongodb service:
7 | var collection = context.services.get("mongodb-atlas").db("dbname").collection("coll_name");
8 | var doc = collection.findOne({owner_id: context.user.id});
9 |
10 | To call other named functions:
11 | var result = context.functions.execute("function_name", arg1, arg2);
12 |
13 | Try running in the console below.
14 | */
15 | /*===============================================================
16 | - Date: Author: Version: Notes:
17 | -----------------------------------------------------------------
18 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
19 | -
20 | ===============================================================*/
21 | var transactions = context.services.get("mongodb-atlas").db("InventoryDemo").collection("transactions");
22 | var vDate = new Date();
23 | console.log("inside fnc_updateTransaction");
24 | console.log("Phone: " + aPhone);
25 | console.log("aResponse: " + aResponse);
26 |
27 | var result = transactions.updateOne(
28 | {"supplier": aPhone, "ack": "No Response"},
29 | {$set: {
30 | "ack": aResponse,
31 | "response_date": vDate
32 | }
33 | }
34 | );
35 |
36 | console.log("result: " + JSON.stringify(result));
37 | return result;
38 | };
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/layout/dialog_create_new_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
16 |
26 |
36 |
37 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/ItemView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ItemView.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 | import RealmSwift
10 |
11 | struct ItemView: View {
12 | @ObservedRealmObject var item: InventoryItem
13 |
14 | @State private var showingPriceEditor = false
15 |
16 | var body: some View {
17 | VStack {
18 | HStack {
19 | VStack {
20 | HStack {
21 | Text("\(item.name)")
22 | .fontWeight(.bold)
23 | Spacer()
24 | }
25 | HStack {
26 | // TODO: Need to be able to edit the price
27 | Text("Price: \(item.price, specifier: "%.2f")")
28 | Spacer()
29 | Button(action : { showingPriceEditor.toggle() }) {
30 | Image(systemName: "pencil")
31 | }
32 | }
33 | .foregroundColor(.secondary)
34 | }
35 | CountStepper(label: "Qty", value: $item.quantity)
36 | }
37 | Divider()
38 | }
39 | .sheet(isPresented: $showingPriceEditor) {
40 | PriceInput(price: $item.price)
41 | }
42 | }
43 | }
44 |
45 | struct ItemView_Previews: PreviewProvider {
46 | static var previews: some View {
47 | ItemView(item: .sample)
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Utils/Settings.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Settings.swift
3 | //
4 |
5 | import UIKit
6 |
7 | @objc class Settings: NSObject {
8 | // Not used for simple types, avoids Codable decoding
9 | // for more complex objects that are accessed frequently
10 | var userDefaults: UserDefaults
11 | var cachedSettings = [String: Codable]()
12 |
13 | init(with defaults: UserDefaults = UserDefaults.standard) {
14 | userDefaults = defaults
15 | }
16 |
17 | override func value(forKey key: String) -> Any? {
18 | return userDefaults.object(forKey: key)
19 | }
20 |
21 | override func setValue(_ value: Any?, forKey key: String) {
22 | if value == nil {
23 | userDefaults.removeObject(forKey: key)
24 | } else {
25 | userDefaults.set(value!, forKey: key)
26 | }
27 | }
28 | }
29 |
30 | let settings = Settings()
31 |
32 | @objc class SharedSettings: Settings {
33 | init() {
34 | if let infoDict = Bundle.main.infoDictionary, let appGroup = infoDict["AppGroup"] as? String {
35 | super.init(with: UserDefaults(suiteName: appGroup)!)
36 | } else {
37 | super.init()
38 | }
39 | }
40 | }
41 |
42 | let sharedSettings = SharedSettings()
43 |
44 | /*
45 | * Usage within an app:
46 | *
47 | extension Settings {
48 | var firstStartupCompleted: Bool {
49 | get { return value(forKey: "FirstStartupCompleted") as? Bool ?? false }
50 | set { setValue(newValue, forKey: "FirstStartupCompleted") }
51 | }
52 |
53 | var userName: String? {
54 | get { return value(forKey: "UserName") as? String }
55 | set { setValue(newValue, forKey: "UserName") }
56 | }
57 | }
58 | */
59 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/Navigation/InventoryLoginViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryLoginViewController.swift
3 | // InventoryDemo
4 | //
5 | // Created by Paolo Manna on 07/10/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | import RealmSwift
10 | import UIKit
11 |
12 | class InventoryLoginViewController: LoginViewController {
13 | @IBOutlet var storeNameField: AKFloatingLabelTextField!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | storeNameField.delegate = self
19 | }
20 |
21 | override func viewWillAppear(_ animated: Bool) {
22 | super.viewWillAppear(animated)
23 |
24 | storeNameField.text = settings.storeName ?? store
25 | }
26 |
27 | override func setLoading(_ loading: Bool) {
28 | super.setLoading(loading)
29 |
30 | storeNameField.isEnabled = !loading
31 | }
32 |
33 | override func completeSignIn(type: AuthType, user: User?, error: Error?) {
34 | if error == nil, let storeName = storeNameField.text, !storeName.isEmpty {
35 | settings.storeName = storeName
36 | store = storeName
37 | }
38 |
39 | super.completeSignIn(type: type, user: user, error: error)
40 | }
41 |
42 | // MARK: - UITextFieldDelegate
43 |
44 | override func textFieldShouldReturn(_ textField: UITextField) -> Bool {
45 | if textField === usernameField {
46 | passwordField.becomeFirstResponder()
47 | } else if textField === passwordField {
48 | storeNameField.becomeFirstResponder()
49 | } else if textField === storeNameField {
50 | view.endEditing(true)
51 | }
52 |
53 | return false
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/getTFModel/incoming_webhooks/getTFModelWH/source.js:
--------------------------------------------------------------------------------
1 | // This function is the webhook's request handler.
2 | exports = async function(payload, response) {
3 | /*===============================================================
4 | - Date: Author: Version: Notes:
5 | -----------------------------------------------------------------
6 | - 2020-10-15 Britton LaRoche 1.0 Initial Release
7 | -
8 | ===============================================================*/
9 | // Data can be extracted from the request as follows:
10 | console.log(JSON.stringify("getTFModelWH called ... executing..." ));
11 | var model = context.services.get("mongodb-atlas").db("InventoryDemo").collection("tfModel");
12 | var body = {};
13 | var result = {};
14 | if (payload.body) {
15 | console.log(JSON.stringify(payload.body));
16 | body = EJSON.parse(payload.body.text());
17 | console.log("body: " + JSON.stringify(body));
18 | var bodyDoc = JSON.parse(body);
19 | console.log("bodyDoc: " + JSON.stringify(bodyDoc));
20 | var myFileName = bodyDoc.fileName;
21 | if (myFileName) {
22 | console.log("fileName: " + myFileName);
23 | } else {
24 | return {"error":"unable to retrieve tensorflow model without fileName"};
25 | }
26 | result = await model.findOne({"fileName": myFileName});
27 | console.log(JSON.stringify("return document" ));
28 | console.log(JSON.stringify(result));
29 | } else {
30 | console.log(JSON.stringify("No payload body." ));
31 | }
32 | return result;
33 | };
34 |
35 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/saveTFModel/incoming_webhooks/SaveTFModelWH/source.js:
--------------------------------------------------------------------------------
1 | // This function is the webhook's request handler.
2 | exports = async function(payload, response) {
3 | /*===============================================================
4 | - Date: Author: Version: Notes:
5 | -----------------------------------------------------------------
6 | - 2020-10-15 Britton LaRoche 1.0 Initial Release
7 | -
8 | ===============================================================*/
9 | // Data can be extracted from the request as follows:
10 | console.log(JSON.stringify("SaveTFModelWH called ... executing..." ));
11 | var model = context.services.get("mongodb-atlas").db("InventoryDemo").collection("tfModel");
12 | var body = {};
13 | var result = {};
14 | if (payload.body) {
15 | console.log(JSON.stringify(payload.body));
16 | body = EJSON.parse(payload.body.text());
17 | console.log("body: " + JSON.stringify(body));
18 | var myFileName = body.fileName;
19 | if (myFileName) {
20 | //remove the old model data
21 | await model.deleteMany({"fileName":myFileName});
22 | } else {
23 | return {"error":"unable to store tensorflow model without fileName"};
24 | }
25 | result = await model.insertOne(body);
26 | console.log(JSON.stringify("return document" ));
27 | console.log(JSON.stringify(result));
28 | } else {
29 | console.log(JSON.stringify("No payload body." ));
30 | const payloadText = JSON.stringify(payload);
31 | model.insertOne({"payload": payloadText});
32 | }
33 | return result;
34 | };
35 |
36 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/Components/CallToActionButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CallToActionButton.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct CallToActionButton: View {
11 | let title: String
12 | var showingArrow = false
13 | let action: () -> Void
14 |
15 | private enum Dimensions {
16 | static let labelSpacing: CGFloat = 14
17 | static let lineLimit = 1
18 | static let radius: CGFloat = 50.0
19 | }
20 |
21 | var body: some View {
22 | Button(action: action) {
23 | HStack {
24 | Spacer(minLength: Dimensions.labelSpacing)
25 | Text(LocalizedStringKey(title))
26 | .padding(.vertical, Dimensions.labelSpacing)
27 | .lineLimit(Dimensions.lineLimit)
28 | .font(Font.body.weight(.semibold))
29 | if showingArrow {
30 | Image(systemName: "arrow.right")
31 | .font(Font.caption2.weight(.bold))
32 | }
33 | Spacer(minLength: Dimensions.labelSpacing)
34 | }
35 | .foregroundColor(.white)
36 | .background(Color.blue)
37 | .cornerRadius(Dimensions.radius)
38 | }
39 | }
40 | }
41 |
42 | struct CallToActionButton_Previews: PreviewProvider {
43 | static var previews: some View {
44 | Group {
45 | CallToActionButton(title: "Button", showingArrow: false, action: {})
46 | }
47 | .previewLayout(.sizeThatFits)
48 | .padding()
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // InventoryDemo
4 | //
5 | // Created by Paolo Manna on 14/08/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 |
32 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
33 | // Is this ever called?
34 | return true
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Notice: Repository Deprecation
2 | This repository is deprecated and no longer actively maintained. It contains outdated code examples or practices that do not align with current MongoDB best practices. While the repository remains accessible for reference purposes, we strongly discourage its use in production environments.
3 | Users should be aware that this repository will not receive any further updates, bug fixes, or security patches. This code may expose you to security vulnerabilities, compatibility issues with current MongoDB versions, and potential performance problems. Any implementation based on this repository is at the user's own risk.
4 | For up-to-date resources, please refer to the [MongoDB Developer Center](https://mongodb.com/developer).
5 |
6 |
7 | # Welcome to the Realm Demos
8 |
9 | This repo contains MongoDB Realm demos. The following is a list of new features that differ from the [original repo](https://github.com/mongodb-university/realm-demos):
10 | - SwiftUI version of the Inventory Demo App
11 | - CI/CD pipeline implemented using GitHub Actions
12 |
13 | For more information on the Inventory Demo, visit __Inventory Demo__.
14 |
15 | For more information on the CI/CD pipeline that was implemented using GitHub Actions, check out the following resources:
16 | - [Article: How to Build CI/CD Pipelines for MongoDB Realm Apps Using GitHub Actions](https://developer.mongodb.com/how-to/build-ci-cd-pipelines-realm-apps-github-actions/)
17 | - [MongoDB.live 2021 Recording: Building CI/CD Pipelines for MongoDB Realm Apps](https://youtu.be/-JcEa1snwVQ)
18 |
19 | # Questions?
20 |
21 | Ask in the [MongoDB Community](https://community.mongodb.com).
22 |
23 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/InventoryView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryView.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 | import RealmSwift
10 |
11 | struct InventoryView: View {
12 | @ObservedResults(InventoryItem.self, sortDescriptor: SortDescriptor(keyPath: "name", ascending: true)) var items
13 | @Binding var username: String
14 |
15 | @State var showingNewItem = false
16 |
17 | var body: some View {
18 | VStack {
19 | ScrollView(.vertical) {
20 | ForEach(items) { item in
21 | ItemView(item: item)
22 | }
23 | }
24 | .padding()
25 | if let user = app.currentUser {
26 | NavigationLink(
27 | destination: AddItemView()
28 | .environment(\.realmConfiguration, user.configuration(partitionValue: store)),
29 | isActive: $showingNewItem) {}
30 | }
31 | }
32 | .navigationBarTitle("Store \(store) Inventory", displayMode: .inline)
33 | .navigationBarItems(leading: Button(action: logout) { Text("Logout") },
34 | trailing: Button(action: { showingNewItem.toggle() }) { Image(systemName: "plus") })
35 | }
36 | private func logout() {
37 | app.currentUser?.logOut() {_ in
38 | username = ""
39 | }
40 | }
41 | }
42 |
43 | struct InventoryView_Previews: PreviewProvider {
44 | static var previews: some View {
45 | NavigationView {
46 | InventoryView(username: .constant("Billy"))
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Classes/Navigation/MainCoordinator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MainCoordinator.swift
3 | // InventoryDemo
4 | //
5 | // Created by Paolo Manna on 14/08/2020.
6 | // Copyright © 2020 MongoDB. All rights reserved.
7 | //
8 |
9 | import RealmSwift
10 | import UIKit
11 |
12 | class MainCoordinator: NSObject, Coordinator {
13 | var childCoordinators = [Coordinator]()
14 | var navigationController: NavigationControllerWithError
15 |
16 | init(navigationController: NavigationControllerWithError) {
17 | self.navigationController = navigationController
18 | }
19 |
20 | func start() {
21 | app.syncManager.logLevel = .info
22 |
23 | if let doCleanStr = ProcessInfo.processInfo.environment["CLEAN_REALM"], let doClean = Bool(doCleanStr) {
24 | cleanDatabase = doClean
25 | }
26 |
27 | let vc = InventoryViewController.instantiate()
28 |
29 | vc.coordinator = self
30 |
31 | navigationController.pushViewController(vc, animated: false)
32 |
33 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
34 | self?.showLoginWindow()
35 | }
36 | }
37 |
38 | @IBAction func loginCompleted() {
39 | if let vc = navigationController.topViewController as? InventoryViewController {
40 | vc.loadFromDB()
41 | }
42 | }
43 |
44 | @IBAction func showLoginWindow() {
45 | let vc = LoginViewController.instantiate()
46 |
47 | vc.coordinator = self
48 |
49 | navigationController.present(vc, animated: true) {
50 | // Something
51 | }
52 | }
53 |
54 | @IBAction func signOut() {
55 | let vc = LoginViewController.instantiate()
56 |
57 | vc.coordinator = self
58 | vc.signOut()
59 |
60 | navigationController.present(vc, animated: true) {
61 | // Something
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 |
28 | UIApplicationSupportsIndirectInputEvents
29 |
30 | UILaunchScreen
31 |
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/Components/InputField.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InputField.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct InputField: View {
11 |
12 | let title: String
13 | @Binding private(set) var text: String
14 | var showingSecureField = false
15 | var keyboardType: UIKeyboardType = .default
16 |
17 | private enum Dimensions {
18 | static let noSpacing: CGFloat = 0
19 | static let bottomPadding: CGFloat = 16
20 | static let iconSize: CGFloat = 20
21 | }
22 |
23 | var body: some View {
24 | VStack(spacing: Dimensions.noSpacing) {
25 | CaptionLabel(title: title)
26 | HStack(spacing: Dimensions.noSpacing) {
27 | if showingSecureField {
28 | SecureField("", text: $text)
29 | .keyboardType(keyboardType)
30 | .padding(.bottom, Dimensions.bottomPadding)
31 | .foregroundColor(.primary)
32 | .font(.body)
33 | } else {
34 | TextField("", text: $text)
35 | .keyboardType(keyboardType)
36 | .padding(.bottom, Dimensions.bottomPadding)
37 | .foregroundColor(.primary)
38 | .font(.body)
39 | }
40 | }
41 | }
42 | }
43 | }
44 |
45 | struct InputField_Previews: PreviewProvider {
46 | static var previews: some View {
47 | Group {
48 | InputField(title: "Input", text: .constant("Data"))
49 | InputField(title: "Input secure", text: .constant("Data"), showingSecureField: true)
50 | }
51 | .previewLayout(.sizeThatFits)
52 | .padding()
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_loadCSV/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(arg_fileLocation, arg_database, arg_collection){
2 | // Example
3 | // exports("https://raw.githubusercontent.com/brittonlaroche/realm-tensorflow/main/data/fuel_sales_price.csv","ItemDemo","FuelSales")
4 | var sUrl = arg_fileLocation;
5 | var stage = context.services.get("mongodb-atlas").db(arg_database).collection(arg_collection);
6 | var count = 0;
7 | var recordsProcessed = 0;
8 | console.log(sUrl);
9 |
10 | await context.http.get({
11 | url: sUrl,
12 | encodeBodyAsJSON: true
13 | })
14 | .then(response => {
15 | // The response body is encoded as raw BSON.Binary. Parse it to JSON.
16 | const ejson_body = response.body.text();
17 | count = parseCSV(ejson_body, stage);
18 | console.log("number of docs processed: "+ count);
19 | })
20 | //remove the count for the header record
21 | recordsProcessed = parseFloat(count -1);
22 | return count;
23 | };
24 | async function parseCSV(csv, stage){
25 | //remove quotes and phrases
26 | csv = csv.replace(/"/g,"");
27 | var nDate = new Date();
28 | var lines=csv.split("\n");
29 |
30 | //delete previous data
31 | stage.deleteMany({});
32 | var result = [];
33 | var headers=lines[0].split(",");
34 | var locDoc = {}
35 | //console.log( "headers: " + JSON.stringify(headers));
36 |
37 | //Stage all data
38 | var parsed = ""
39 | for(var i=1;i
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GettingStarted (Playground) 1.xcscheme
8 |
9 | isShown
10 |
11 | orderHint
12 | 3
13 |
14 | GettingStarted (Playground) 2.xcscheme
15 |
16 | isShown
17 |
18 | orderHint
19 | 4
20 |
21 | GettingStarted (Playground) 3.xcscheme
22 |
23 | isShown
24 |
25 | orderHint
26 | 5
27 |
28 | GettingStarted (Playground) 4.xcscheme
29 |
30 | isShown
31 |
32 | orderHint
33 | 6
34 |
35 | GettingStarted (Playground) 5.xcscheme
36 |
37 | isShown
38 |
39 | orderHint
40 | 7
41 |
42 | GettingStarted (Playground).xcscheme
43 |
44 | isShown
45 |
46 | orderHint
47 | 2
48 |
49 | InventoryDemo.xcscheme_^#shared#^_
50 |
51 | orderHint
52 | 0
53 |
54 | ci.xcscheme_^#shared#^_
55 |
56 | orderHint
57 | 1
58 |
59 |
60 | SuppressBuildableAutocreation
61 |
62 | 0A2F0CC12630125D00CEC71B
63 |
64 | primary
65 |
66 |
67 | 0A2F0CD22630126000CEC71B
68 |
69 | primary
70 |
71 |
72 | 0A2F0CDD2630126000CEC71B
73 |
74 | primary
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_verifyRestock/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(recipient, aStoreId, aItemName, aQuantity, aMinQuantity) {
2 | /*===============================================================
3 | - Date: Author: Version: Notes:
4 | -----------------------------------------------------------------
5 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
6 | -
7 | ===============================================================*/
8 |
9 | const twilio = context.services.get("SupplierService");
10 | const ourNumber = context.values.get("ourNumber");
11 | var codes = context.services.get("mongodb-atlas").db("InventoryDemo").collection("codes");
12 | var vcompanyName = await context.functions.execute("fnc_getCompanyName",aStoreId);
13 | var vcompanyLogo = await context.functions.execute("fnc_getCompanyLogo",aStoreId);
14 |
15 | console.log(JSON.stringify("fnc_verifyRestock called with arguments: " + recipient + ", " + aStoreId + ", " + aItemName + ", " + aQuantity));
16 | console.log("COMPANY_NAME: "+ vcompanyName);
17 |
18 | /*
19 | //Zebra
20 | twilio.send({
21 | from: ourNumber,
22 | to: recipient,
23 | body: `Hello from ${vcompanyName}. We have a configuration number of ${aQuantity} for ${aItemName} for store ${aStoreId}, we need a minimum configuration of ${aMinQuantity}. Please update your device, or respond with 1 to apply the next configuration.`
24 | });
25 | */
26 |
27 | //Normal
28 | twilio.send({
29 | from: ourNumber,
30 | to: recipient,
31 | body: `Hello from ${vcompanyName}. We have ${aQuantity} units of ${aItemName} for store ${aStoreId}, we need a minimum of ${aMinQuantity}. Please reply with the number of units you can deliver. 0 if you can not deliver.`
32 | });
33 |
34 |
35 | /*
36 | twilio.send({
37 | from: ourNumber,
38 | to: recipient,
39 | body: `Hello from ${vcompanyName}. We have ${aQuantity} units of ${aItemName} for store ${aStoreId}, we need a minimum of ${aMinQuantity}. Please reply with the number of units you can deliver. 0 if you can not deliver.`,
40 | mediaUrl: vcompanyLogo
41 | });
42 | */
43 |
44 | };
--------------------------------------------------------------------------------
/inventory/clients/android/app/src/main/res/layout/item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
27 |
28 |
35 |
36 |
43 |
44 |
45 |
46 |
47 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_getCompanyLogo/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(aStoreId){
2 | /*
3 | Accessing application's values:
4 | var x = context.values.get("value_LOGO");
5 |
6 | Accessing a mongodb service:
7 | var collection = context.services.get("mongodb-atlas").db("dbname").collection("coll_name");
8 | var doc = collection.findOne({owner_id: context.user.id});
9 |
10 | To call other named functions:
11 | var result = context.functions.execute("function_name", arg1, arg2);
12 |
13 | Try running in the console below.
14 | */
15 | /*===============================================================
16 | - Date: Author: Version: Notes:
17 | -----------------------------------------------------------------
18 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
19 | -
20 | ===============================================================*/
21 |
22 | var collection = context.services.get("mongodb-atlas").db("InventoryDemo").collection("codes");
23 | var vcompanyLOGO = "";
24 | var storeIDLength = aStoreId.length;
25 | var storeIDLengthTrimmed = storeIDLength -1;
26 | console.log("Inside fnc_getCompanyLOGO looking for store_id: " + aStoreId);
27 |
28 | var doc = await collection.findOne({STORE_ID: aStoreId});
29 |
30 | if(doc) {
31 | if(doc.COMPANY_LOGO){
32 | vcompanyLOGO = doc.COMPANY_LOGO;
33 | console.log("Company LOGO: " + vcompanyLOGO);
34 | }
35 | }
36 |
37 | if (vcompanyLOGO === ""){
38 | // we didn't get the company LOGO so we might have a default of 161
39 | // and they are using store 162
40 | // lets look for a regex starting with 16
41 | var fisrtPartOfSToreID = "^" + aStoreId.substring(0,storeIDLengthTrimmed );
42 | console.log("Inside fnc_getCompanyLOGO fisrtPartOfSToreID: " + fisrtPartOfSToreID);
43 |
44 | var searchDoc = {"STORE_ID": { "$regex": BSON.BSONRegExp(fisrtPartOfSToreID) }}
45 | console.log("searchDoc: " + JSON.stringify(searchDoc));
46 | doc = await collection.findOne(searchDoc);
47 | vcompanyLOGO = doc.COMPANY_LOGO;
48 | console.log("Company LOGO: " + vcompanyLOGO);
49 | }
50 |
51 | return vcompanyLOGO;
52 | };
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemoUITests/InventoryDemoUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InventoryDemoUITests.swift
3 | // InventoryDemoUITests
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import XCTest
9 |
10 | class InventoryDemoUITests: XCTestCase {
11 |
12 | override func setUpWithError() throws {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDownWithError() throws {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testClickLoginButton() throws {
26 | // start the app in Simulator
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // search for a button with title "Log In"
31 | let startButton = app.buttons["Log In"]
32 |
33 | // should be on screen, and enabled
34 | XCTAssertTrue(startButton.waitForExistence(timeout: 1))
35 | XCTAssertTrue(startButton.isEnabled)
36 |
37 | // tap the button!
38 | startButton.tap()
39 | }
40 |
41 | func testAddEmail() throws {
42 | // start the app in Simulator
43 | let app = XCUIApplication()
44 | app.launch()
45 |
46 | // search for a text field with accessible identifier "email_input"
47 | let emailText = app.textFields["email_input"]
48 |
49 | // should be on screen
50 | XCTAssertTrue(emailText.waitForExistence(timeout: 1))
51 |
52 | // we tap on it, fill in some text
53 | emailText.tap()
54 | emailText.typeText("testemail@realm.com")
55 |
56 | // text should be there!
57 | XCTAssertEqual(emailText.value as! String, "testemail@realm.com")
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_getCompanyName/source.js:
--------------------------------------------------------------------------------
1 | exports = async function(aStoreId){
2 | /*
3 | Accessing application's values:
4 | var x = context.values.get("value_name");
5 |
6 | Accessing a mongodb service:
7 | var collection = context.services.get("mongodb-atlas").db("dbname").collection("coll_name");
8 | var doc = collection.findOne({owner_id: context.user.id});
9 |
10 | To call other named functions:
11 | var result = context.functions.execute("function_name", arg1, arg2);
12 |
13 | Try running in the console below.
14 | */
15 | /*===============================================================
16 | - Date: Author: Version: Notes:
17 | -----------------------------------------------------------------
18 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
19 | -
20 | ===============================================================*/
21 |
22 | var collection = context.services.get("mongodb-atlas").db("InventoryDemo").collection("codes");
23 | var vcompanyName = "";
24 | var storeIDLength = aStoreId.length;
25 | var storeIDLengthTrimmed = storeIDLength -1;
26 | console.log("Inside fnc_getCompanyName looking for store_id: " + aStoreId);
27 |
28 | var doc = await collection.findOne({STORE_ID: aStoreId});
29 |
30 | if(doc) {
31 | if(doc.COMPANY_NAME){
32 | vcompanyName = doc.COMPANY_NAME;
33 | console.log("Company Name: " + vcompanyName);
34 | }
35 | }
36 |
37 | if (vcompanyName === ""){
38 | // we didn't get the company name so we might have a default of 161
39 | // and they are using store 162
40 | // lets look for a regex starting with 16
41 | var fisrtPartOfSToreID = "^" + aStoreId.substring(0,storeIDLengthTrimmed );
42 | console.log("Inside fnc_getCompanyName fisrtPartOfSToreID: " + fisrtPartOfSToreID);
43 |
44 | var searchDoc = {"STORE_ID": { "$regex": BSON.BSONRegExp(fisrtPartOfSToreID) }}
45 | console.log("searchDoc: " + JSON.stringify(searchDoc));
46 | doc = await collection.findOne(searchDoc);
47 | vcompanyName = doc.COMPANY_NAME;
48 | console.log("Company Name: " + vcompanyName);
49 | }
50 |
51 | return vcompanyName;
52 |
53 |
54 | };
--------------------------------------------------------------------------------
/inventory/clients/web-graphql/Stitch-Export/functions/reset/source.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | This function will be run when the client SDK 'callResetPasswordFunction' and is called with an object parameter
4 | which contains four keys: 'token', 'tokenId', 'username', and 'password', and additional parameters
5 | for each parameter passed in as part of the argument list from the SDK.
6 |
7 | The return object must contain a 'status' key which can be empty or one of three string values:
8 | 'success', 'pending', or 'fail'
9 |
10 | 'success': the user's password is set to the passed in 'password' parameter.
11 |
12 | 'pending': the user's password is not reset and the UserPasswordAuthProviderClient 'resetPassword' function would
13 | need to be called with the token, tokenId, and new password via an SDK. (see below)
14 |
15 | const emailPassClient = Stitch.defaultAppClient.auth
16 | .getProviderClient(UserPasswordAuthProviderClient.factory);
17 |
18 | emailPassClient.resetPassword(token, tokenId, newPassword)
19 |
20 | 'fail': the user's password is not reset and will not be able to log in with that password.
21 |
22 | If an error is thrown within the function the result is the same as 'fail'.
23 |
24 | Example below:
25 |
26 | exports = ({ token, tokenId, username, password }, sendEmail, securityQuestionAnswer) => {
27 | // process the reset token, tokenId, username and password
28 | if (sendEmail) {
29 | context.functions.execute('sendResetPasswordEmail', username, token, tokenId);
30 | // will wait for SDK resetPassword to be called with the token and tokenId
31 | return { status: 'pending' };
32 | } else if (context.functions.execute('validateSecurityQuestionAnswer', username, securityQuestionAnswer)) {
33 | // will set the users password to the password parameter
34 | return { status: 'success' };
35 | }
36 |
37 | // will not reset the password
38 | return { status: 'fail' };
39 | };
40 |
41 | The uncommented function below is just a placeholder and will result in failure.
42 | */
43 |
44 | exports = ({ token, tokenId, username, password }) => {
45 | // will not reset the password
46 | return { status: 'fail' };
47 | };
48 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/services/mongodb-atlas/rules/InventoryDemo.InventoryItem.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "InventoryItem",
3 | "database": "InventoryDemo",
4 | "roles": [
5 | {
6 | "name": "default",
7 | "apply_when": {},
8 | "fields": {
9 | "_id": {
10 | "write": true
11 | },
12 | "_partition": {
13 | "write": true
14 | },
15 | "coordinates": {
16 | "write": true
17 | },
18 | "max_temp": {
19 | "write": true
20 | },
21 | "min_quantity": {
22 | "write": true
23 | },
24 | "name": {
25 | "write": true
26 | },
27 | "price": {
28 | "write": true
29 | },
30 | "quantity": {
31 | "write": true
32 | },
33 | "sensorId": {
34 | "write": true
35 | },
36 | "spoiled": {
37 | "write": true
38 | },
39 | "supplier": {
40 | "write": true
41 | },
42 | "temp": {
43 | "write": true
44 | }
45 | },
46 | "insert": true,
47 | "delete": true,
48 | "search": true,
49 | "additional_fields": {}
50 | }
51 | ],
52 | "schema": {
53 | "properties": {
54 | "_id": {
55 | "bsonType": "objectId"
56 | },
57 | "_partition": {
58 | "bsonType": "string"
59 | },
60 | "min_quantity": {
61 | "bsonType": "int"
62 | },
63 | "name": {
64 | "bsonType": "string"
65 | },
66 | "price": {
67 | "bsonType": "double"
68 | },
69 | "quantity": {
70 | "bsonType": "int"
71 | },
72 | "supplier": {
73 | "bsonType": "string"
74 | }
75 | },
76 | "title": "InventoryItem"
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/InventoryDemo/InventoryDemo/Views/LoginView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LoginView.swift
3 | // InventoryDemo
4 | //
5 | // Created by Andrew Morgan on 21/04/2021.
6 | //
7 |
8 | import SwiftUI
9 | import RealmSwift
10 |
11 | struct LoginView: View {
12 | @Binding var username: String
13 |
14 | @State private var email = ""
15 | @State private var password = ""
16 | @State private var userStore = store
17 | @State private var newUser = false
18 |
19 | var body: some View {
20 | VStack {
21 | Spacer()
22 | InputField(title: "Email", text: $email)
23 | .accessibility(identifier: "email_input")
24 | InputField(title: "Password", text: $password, showingSecureField: true)
25 | InputField(title: "Store", text: $userStore)
26 | CallToActionButton(
27 | title: newUser ? "Register User" : "Log In",
28 | action: userAction
29 | )
30 | Button(action: { newUser.toggle() }) {
31 | HStack {
32 | CheckBox(title: "Create Account", isChecked: $newUser)
33 | Spacer()
34 | }
35 | }
36 | Spacer()
37 | }
38 | .padding()
39 | .navigationBarTitle("Login", displayMode: .inline)
40 | .navigationBarItems(leading: EmptyView(), trailing: EmptyView())
41 | }
42 |
43 | func userAction() {
44 | if newUser {
45 | signup()
46 | } else {
47 | login()
48 | }
49 | }
50 |
51 | private func signup() {
52 | app.emailPasswordAuth.registerUser(email: email, password: password) { error in
53 | if let error = error {
54 | print("\(error.localizedDescription)")
55 | } else {
56 | login()
57 | }
58 | }
59 | }
60 |
61 | private func login() {
62 | app.login(credentials: .emailPassword(email: email, password: password)) { _ in
63 | DispatchQueue.main.async {
64 | username = email
65 | store = userStore
66 | }
67 | }
68 | }
69 | }
70 |
71 | struct LoginView_Previews: PreviewProvider {
72 | static var previews: some View {
73 | LoginView(username: .constant("Billy"))
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/inventory/export/sync/functions/resetFunc.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | This function will be run when the client SDK 'callResetPasswordFunction' and is called with an object parameter
4 | which contains four keys: 'token', 'tokenId', 'username', and 'password', and additional parameters
5 | for each parameter passed in as part of the argument list from the SDK.
6 |
7 | The return object must contain a 'status' key which can be empty or one of three string values:
8 | 'success', 'pending', or 'fail'
9 |
10 | 'success': the user's password is set to the passed in 'password' parameter.
11 |
12 | 'pending': the user's password is not reset and the UserPasswordAuthProviderClient 'resetPassword' function would
13 | need to be called with the token, tokenId, and new password via an SDK. (see below)
14 |
15 | const Realm = require("realm");
16 | const appConfig = {
17 | id: "my-app-id",
18 | timeout: 1000,
19 | app: {
20 | name: "my-app-name",
21 | version: "1"
22 | }
23 | };
24 | let app = new Realm.App(appConfig);
25 | let client = app.auth.emailPassword;
26 | await client.resetPassword(token, tokenId, newPassword);
27 |
28 | 'fail': the user's password is not reset and will not be able to log in with that password.
29 |
30 | If an error is thrown within the function the result is the same as 'fail'.
31 |
32 | Example below:
33 |
34 | exports = ({ token, tokenId, username, password }, sendEmail, securityQuestionAnswer) => {
35 | // process the reset token, tokenId, username and password
36 | if (sendEmail) {
37 | context.functions.execute('sendResetPasswordEmail', username, token, tokenId);
38 | // will wait for SDK resetPassword to be called with the token and tokenId
39 | return { status: 'pending' };
40 | } else if (context.functions.execute('validateSecurityQuestionAnswer', username, securityQuestionAnswer)) {
41 | // will set the users password to the password parameter
42 | return { status: 'success' };
43 | }
44 |
45 | // will not reset the password
46 | return { status: 'fail' };
47 | };
48 |
49 | The uncommented function below is just a placeholder and will result in failure.
50 | */
51 |
52 | exports = ({ token, tokenId, username, password }) => {
53 | // will not reset the password
54 | return { status: 'fail' };
55 | };
56 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/resetFunc/source.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | This function will be run when the client SDK 'callResetPasswordFunction' and is called with an object parameter
4 | which contains four keys: 'token', 'tokenId', 'username', and 'password', and additional parameters
5 | for each parameter passed in as part of the argument list from the SDK.
6 |
7 | The return object must contain a 'status' key which can be empty or one of three string values:
8 | 'success', 'pending', or 'fail'
9 |
10 | 'success': the user's password is set to the passed in 'password' parameter.
11 |
12 | 'pending': the user's password is not reset and the UserPasswordAuthProviderClient 'resetPassword' function would
13 | need to be called with the token, tokenId, and new password via an SDK. (see below)
14 |
15 | const Realm = require("realm");
16 | const appConfig = {
17 | id: "my-app-id",
18 | timeout: 1000,
19 | app: {
20 | name: "my-app-name",
21 | version: "1"
22 | }
23 | };
24 | let app = new Realm.App(appConfig);
25 | let client = app.auth.emailPassword;
26 | await client.resetPassword(token, tokenId, newPassword);
27 |
28 | 'fail': the user's password is not reset and will not be able to log in with that password.
29 |
30 | If an error is thrown within the function the result is the same as 'fail'.
31 |
32 | Example below:
33 |
34 | exports = ({ token, tokenId, username, password }, sendEmail, securityQuestionAnswer) => {
35 | // process the reset token, tokenId, username and password
36 | if (sendEmail) {
37 | context.functions.execute('sendResetPasswordEmail', username, token, tokenId);
38 | // will wait for SDK resetPassword to be called with the token and tokenId
39 | return { status: 'pending' };
40 | } else if (context.functions.execute('validateSecurityQuestionAnswer', username, securityQuestionAnswer)) {
41 | // will set the users password to the password parameter
42 | return { status: 'success' };
43 | }
44 |
45 | // will not reset the password
46 | return { status: 'fail' };
47 | };
48 |
49 | The uncommented function below is just a placeholder and will result in failure.
50 | */
51 |
52 | exports = ({ token, tokenId, username, password }) => {
53 | // will not reset the password
54 | return { status: 'fail' };
55 | };
56 |
--------------------------------------------------------------------------------
/inventory/clients/ios-swiftui/README.md:
--------------------------------------------------------------------------------
1 | # Inventory Demo - SwiftUI
2 |
3 | | Login | Inventory List | Adding an item |
4 | | :-------------: | :----------: | :-----------: |
5 | |  |  |  |
6 |
7 | ## About
8 |
9 | This is the SwiftUI version of the Inventory demo app. There are [other versions too](https://github.com/mongodb-developer/realm-demos/tree/main/inventory#mobile-clients).
10 |
11 | ## How to build
12 |
13 | 1. You need to clone this repo `git clone https://github.com/mongodb-developer/realm-demos/`
14 | 1. Go to the `ios-swiftui` folder: `cd inventory/clients/ios-swiftui/InventoryDemo`
15 | 1. Open the project file with Xcode: `InventoryDemo.xcodeproj`
16 | 1. Let Swift Package Manager resolve and download all dependencies
17 | 1. Select `InventoryDemo` [Scheme](#Schemes)
18 | 1. Before running, [change the Realm ID in `realm-app-id.txt`](#changing-the-realm-app-id)
19 | 1. Build and Run
20 |
21 | ## Schemes
22 |
23 | 
24 |
25 | This project has two Schemes:
26 | - CI: used for Continuous Integration. In this case, a GitHub action is used to build the app. You can check the [workflow here](https://github.com/mongodb-developer/realm-demos/actions/workflows/build.yml)
27 | - InventoryDemo: scheme used to run the app locally in Simulator, Device, etc.
28 |
29 | ## Changing the Realm App Id
30 |
31 | This SwiftUI client uses Realm Sync to store data in the cloud. To do this, the client needs to know the Realm App ID. [Follow the instructions here to set up Realm Sync and get the Realm App ID.](https://github.com/mongodb-developer/realm-demos/tree/main/inventory#-create-an-atlas-cluster)
32 |
33 | To set the Realm App ID in the mobile app code, create a new file named `realm-app-id.txt` in `realm-demos/inventory/clients/ios-swiftui/InventoryDemo`. Paste the Realm App ID in the file and save it.
34 |
35 | ## Tests
36 |
37 | There are a few tests:
38 | - Unit Tests
39 | - Tests of SwiftUI
40 | - UI Automation Tests
41 |
42 | To run the tests from Xcode: ⌘ + U
43 |
44 | ### Running tests from the Command Line
45 |
46 | If tests were working then something like this should work. You have to run from the directory that has the `InventoryDemo.xcodeproj` file. If you cloned this repo it's `inventory/clients/ios-swiftui/InventoryDemo`
47 |
48 | ```
49 | xcodebuild -project InventoryDemo.xcodeproj -scheme "ci" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro Max' -derivedDataPath './output' test
50 | ```
51 |
--------------------------------------------------------------------------------
/inventory/clients/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/inventory/export/backOffice/functions/fnc_transactionHistory/source.js:
--------------------------------------------------------------------------------
1 | exports = function(changeEvent) {
2 | /*
3 | A Database Trigger will always call a function with a changeEvent.
4 | Documentation on ChangeEvents: https://docs.mongodb.com/manual/reference/change-events/
5 |
6 | Access the _id of the changed document:
7 | const docId = changeEvent.documentKey._id;
8 |
9 | Access the latest version of the changed document
10 | (with Full Document enabled for Insert, Update, and Replace operations):
11 | const fullDocument = changeEvent.fullDocument;
12 |
13 | const updateDescription = changeEvent.updateDescription;
14 |
15 | See which fields were changed (if any):
16 | if (updateDescription) {
17 | const updatedFields = updateDescription.updatedFields; // A document containing updated fields
18 | }
19 |
20 | See which fields were removed (if any):
21 | if (updateDescription) {
22 | const removedFields = updateDescription.removedFields; // An array of removed fields
23 | }
24 |
25 | Functions run by Triggers are run as System users and have full access to Services, Functions, and MongoDB Data.
26 |
27 | Access a mongodb service:
28 | const collection = context.services.get().db("db_name").collection("coll_name");
29 | const doc = collection.findOne({ name: "mongodb" });
30 |
31 | Note: In Atlas Triggers, the service name is defaulted to the cluster name.
32 |
33 | Call other named functions if they are defined in your application:
34 | const result = context.functions.execute("function_name", arg1, arg2);
35 |
36 | Access the default http client and execute a GET request:
37 | const response = context.http.get({ url: })
38 |
39 | Learn more about http client here: https://docs.mongodb.com/realm/functions/context/#context-http
40 | */
41 | /*===============================================================
42 | - Date: Author: Version: Notes:
43 | -----------------------------------------------------------------
44 | - 2020-06-24 Britton LaRoche 1.0 Initial Release
45 | -
46 | ===============================================================*/
47 | const history = context.services.get("mongodb-atlas").db("InventoryDemo").collection("transaction_hist");
48 | const transactions = context.services.get("mongodb-atlas").db("InventoryDemo").collection("transactions");
49 | const fullDocument = changeEvent.fullDocument;
50 |
51 | var fullCopy = fullDocument;
52 | fullCopy.parent_id = fullDocument._id;
53 | delete fullCopy._id;
54 |
55 | history.insertOne(fullCopy);
56 |
57 | };
58 |
--------------------------------------------------------------------------------
/inventory/clients/ios/InventoryDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleURLTypes
20 |
21 |
22 | CFBundleTypeRole
23 | Editor
24 | CFBundleURLSchemes
25 |
26 | com.googleusercontent.apps.997951006654-olgel1qkb3urvklg4hjqg93ufal4cdu1
27 |
28 |
29 |
30 | CFBundleVersion
31 | 1
32 | LSRequiresIPhoneOS
33 |
34 | UIApplicationSceneManifest
35 |
36 | UIApplicationSupportsMultipleScenes
37 |
38 | UISceneConfigurations
39 |
40 | UIWindowSceneSessionRoleApplication
41 |
42 |
43 | UISceneConfigurationName
44 | Default Configuration
45 | UISceneDelegateClassName
46 | $(PRODUCT_MODULE_NAME).SceneDelegate
47 |
48 |
49 |
50 |
51 | UILaunchStoryboardName
52 | LaunchScreen
53 | UIRequiredDeviceCapabilities
54 |
55 | armv7
56 |
57 | UIStatusBarTintParameters
58 |
59 | UINavigationBar
60 |
61 | Style
62 | UIBarStyleDefault
63 | Translucent
64 |
65 |
66 |
67 | UISupportedInterfaceOrientations
68 |
69 | UIInterfaceOrientationPortrait
70 | UIInterfaceOrientationLandscapeLeft
71 | UIInterfaceOrientationLandscapeRight
72 |
73 | UISupportedInterfaceOrientations~ipad
74 |
75 | UIInterfaceOrientationPortrait
76 | UIInterfaceOrientationPortraitUpsideDown
77 | UIInterfaceOrientationLandscapeLeft
78 | UIInterfaceOrientationLandscapeRight
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------