Compare commits
2 Commits
develop
...
feature/Mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7781c5532 | ||
|
|
a88a83e3ec |
@ -46,6 +46,20 @@
|
||||
EA7E676C27582F2200ABF773 /* MVMCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676927582F2200ABF773 /* MVMCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
EA7E676D27582F2200ABF773 /* MVMCoreUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */; };
|
||||
EA7E676E27582F2200ABF773 /* MVMCoreUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
EA85888F27C696AB00D44BAC /* WebViewBridgeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85887C27C696AB00D44BAC /* WebViewBridgeProtocol.swift */; };
|
||||
EA85889027C696AB00D44BAC /* WebViewBridgeErrorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85887D27C696AB00D44BAC /* WebViewBridgeErrorModel.swift */; };
|
||||
EA85889127C696AB00D44BAC /* WebViewBridgeResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85887E27C696AB00D44BAC /* WebViewBridgeResponseModel.swift */; };
|
||||
EA85889227C696AB00D44BAC /* WebviewBridgeModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85887F27C696AB00D44BAC /* WebviewBridgeModelProtocol.swift */; };
|
||||
EA85889427C696AB00D44BAC /* WebViewBridgeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888127C696AB00D44BAC /* WebViewBridgeError.swift */; };
|
||||
EA85889527C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888327C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGet.swift */; };
|
||||
EA85889627C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGetModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888427C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGetModel.swift */; };
|
||||
EA85889727C696AB00D44BAC /* WebViewBridgeTrialFraudUserGet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888527C696AB00D44BAC /* WebViewBridgeTrialFraudUserGet.swift */; };
|
||||
EA85889827C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888627C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSet.swift */; };
|
||||
EA85889927C696AB00D44BAC /* WebViewBridgeTrialFraudUserSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888727C696AB00D44BAC /* WebViewBridgeTrialFraudUserSet.swift */; };
|
||||
EA85889A27C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSetModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888827C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSetModel.swift */; };
|
||||
EA85889C27C696AB00D44BAC /* WebViewBridgeTrialFraudUserSetModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888A27C696AB00D44BAC /* WebViewBridgeTrialFraudUserSetModel.swift */; };
|
||||
EA8588A027C696AB00D44BAC /* WebViewBridgeTrialFraudUserGetModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA85888E27C696AB00D44BAC /* WebViewBridgeTrialFraudUserGetModel.swift */; };
|
||||
EA8588A227C6A67500D44BAC /* WebViewBridgeHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8588A127C6A67500D44BAC /* WebViewBridgeHandler.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@ -91,6 +105,22 @@
|
||||
D2FC4FAC25897ACB00061EA4 /* OrderTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderTracker.swift; sourceTree = "<group>"; };
|
||||
EA7E676927582F2200ABF773 /* MVMCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCoreUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA85887C27C696AB00D44BAC /* WebViewBridgeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeProtocol.swift; sourceTree = "<group>"; };
|
||||
EA85887D27C696AB00D44BAC /* WebViewBridgeErrorModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeErrorModel.swift; sourceTree = "<group>"; };
|
||||
EA85887E27C696AB00D44BAC /* WebViewBridgeResponseModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeResponseModel.swift; sourceTree = "<group>"; };
|
||||
EA85887F27C696AB00D44BAC /* WebviewBridgeModelProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebviewBridgeModelProtocol.swift; sourceTree = "<group>"; };
|
||||
EA85888127C696AB00D44BAC /* WebViewBridgeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeError.swift; sourceTree = "<group>"; };
|
||||
EA85888327C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudDeviceCheckGet.swift; sourceTree = "<group>"; };
|
||||
EA85888427C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGetModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudDeviceCheckGetModel.swift; sourceTree = "<group>"; };
|
||||
EA85888527C696AB00D44BAC /* WebViewBridgeTrialFraudUserGet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudUserGet.swift; sourceTree = "<group>"; };
|
||||
EA85888627C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudDeviceCheckSet.swift; sourceTree = "<group>"; };
|
||||
EA85888727C696AB00D44BAC /* WebViewBridgeTrialFraudUserSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudUserSet.swift; sourceTree = "<group>"; };
|
||||
EA85888827C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSetModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudDeviceCheckSetModel.swift; sourceTree = "<group>"; };
|
||||
EA85888A27C696AB00D44BAC /* WebViewBridgeTrialFraudUserSetModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudUserSetModel.swift; sourceTree = "<group>"; };
|
||||
EA85888E27C696AB00D44BAC /* WebViewBridgeTrialFraudUserGetModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewBridgeTrialFraudUserGetModel.swift; sourceTree = "<group>"; };
|
||||
EA8588A127C6A67500D44BAC /* WebViewBridgeHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewBridgeHandler.swift; sourceTree = "<group>"; };
|
||||
EA8588BE27C827E000D44BAC /* Lottie.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Lottie.xcframework; path = ../SharedFrameworks/Lottie.xcframework; sourceTree = "<group>"; };
|
||||
EA8588BF27C827E000D44BAC /* UnifiedSplashScreen.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = UnifiedSplashScreen.xcframework; path = ../SharedFrameworks/UnifiedSplashScreen.xcframework; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -137,6 +167,7 @@
|
||||
D2B1E3F122F4A68F0065F95C /* JSONCreator */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA5FFBED27B2EA2C008A1B82 /* NativeBridge */,
|
||||
D288D69B26CAE26900A5C365 /* MF */,
|
||||
D2B1E40922F4C9F00065F95C /* JSON */,
|
||||
D2B1E3F222F4A68F0065F95C /* AppDelegate.swift */,
|
||||
@ -153,6 +184,8 @@
|
||||
D2B1E42A22F9D0D90065F95C /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA8588BE27C827E000D44BAC /* Lottie.xcframework */,
|
||||
EA8588BF27C827E000D44BAC /* UnifiedSplashScreen.xcframework */,
|
||||
EA7E676927582F2200ABF773 /* MVMCore.framework */,
|
||||
EA7E676A27582F2200ABF773 /* MVMCoreUI.framework */,
|
||||
D2B1E51C22FA0DF50065F95C /* MVMCore.framework */,
|
||||
@ -179,6 +212,43 @@
|
||||
path = "Order Tracker";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA5FFBED27B2EA2C008A1B82 /* NativeBridge */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA85887B27C696AB00D44BAC /* Core */,
|
||||
EA85888227C696AB00D44BAC /* Trial */,
|
||||
);
|
||||
path = NativeBridge;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA85887B27C696AB00D44BAC /* Core */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA85888127C696AB00D44BAC /* WebViewBridgeError.swift */,
|
||||
EA85887D27C696AB00D44BAC /* WebViewBridgeErrorModel.swift */,
|
||||
EA8588A127C6A67500D44BAC /* WebViewBridgeHandler.swift */,
|
||||
EA85887F27C696AB00D44BAC /* WebviewBridgeModelProtocol.swift */,
|
||||
EA85887C27C696AB00D44BAC /* WebViewBridgeProtocol.swift */,
|
||||
EA85887E27C696AB00D44BAC /* WebViewBridgeResponseModel.swift */,
|
||||
);
|
||||
path = Core;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA85888227C696AB00D44BAC /* Trial */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA85888327C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGet.swift */,
|
||||
EA85888427C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGetModel.swift */,
|
||||
EA85888627C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSet.swift */,
|
||||
EA85888827C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSetModel.swift */,
|
||||
EA85888527C696AB00D44BAC /* WebViewBridgeTrialFraudUserGet.swift */,
|
||||
EA85888E27C696AB00D44BAC /* WebViewBridgeTrialFraudUserGetModel.swift */,
|
||||
EA85888727C696AB00D44BAC /* WebViewBridgeTrialFraudUserSet.swift */,
|
||||
EA85888A27C696AB00D44BAC /* WebViewBridgeTrialFraudUserSetModel.swift */,
|
||||
);
|
||||
path = Trial;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -212,6 +282,7 @@
|
||||
TargetAttributes = {
|
||||
D2B1E3EE22F4A68F0065F95C = {
|
||||
CreatedOnToolsVersion = 10.3;
|
||||
LastSwiftMigration = 1320;
|
||||
};
|
||||
D2B1E43722F9F84E0065F95C = {
|
||||
CreatedOnToolsVersion = 10.3;
|
||||
@ -279,19 +350,33 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2B1E3F722F4A68F0065F95C /* DetailViewController.swift in Sources */,
|
||||
EA85889827C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSet.swift in Sources */,
|
||||
D27564CA25939E91003CA713 /* LinksModel.swift in Sources */,
|
||||
EA85889727C696AB00D44BAC /* WebViewBridgeTrialFraudUserGet.swift in Sources */,
|
||||
D2B1E3F522F4A68F0065F95C /* MasterViewController.swift in Sources */,
|
||||
EA8588A227C6A67500D44BAC /* WebViewBridgeHandler.swift in Sources */,
|
||||
D27564B62590FADB003CA713 /* ListDeviceRightVariableCaretModel.swift in Sources */,
|
||||
D27564B72590FADB003CA713 /* ListDeviceRightVariableCaret.swift in Sources */,
|
||||
EA85889427C696AB00D44BAC /* WebViewBridgeError.swift in Sources */,
|
||||
EA85889627C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGetModel.swift in Sources */,
|
||||
EA85889227C696AB00D44BAC /* WebviewBridgeModelProtocol.swift in Sources */,
|
||||
D2431DEB25E93A4F001C7AAC /* buttimag.swift in Sources */,
|
||||
D27564C825939E91003CA713 /* LinkCollectionViewCell.swift in Sources */,
|
||||
D2FC4FB025897ACB00061EA4 /* OrderTracker.swift in Sources */,
|
||||
D27564C925939E91003CA713 /* Links.swift in Sources */,
|
||||
EA85889527C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckGet.swift in Sources */,
|
||||
D2FC4FAE25897ACB00061EA4 /* OrderTrackerModel.swift in Sources */,
|
||||
D21B3A27259B93ED001483DC /* SelfSizingCollectionView.swift in Sources */,
|
||||
EA85889A27C696AB00D44BAC /* WebViewBridgeTrialFraudDeviceCheckSetModel.swift in Sources */,
|
||||
D2B1E3F322F4A68F0065F95C /* AppDelegate.swift in Sources */,
|
||||
EA85889127C696AB00D44BAC /* WebViewBridgeResponseModel.swift in Sources */,
|
||||
EA8588A027C696AB00D44BAC /* WebViewBridgeTrialFraudUserGetModel.swift in Sources */,
|
||||
EA85889927C696AB00D44BAC /* WebViewBridgeTrialFraudUserSet.swift in Sources */,
|
||||
EA85889027C696AB00D44BAC /* WebViewBridgeErrorModel.swift in Sources */,
|
||||
EA85889C27C696AB00D44BAC /* WebViewBridgeTrialFraudUserSetModel.swift in Sources */,
|
||||
D29C557825BF1F340082E7D6 /* JSONCreatorActionHandler.swift in Sources */,
|
||||
D2FC4FAD25897ACB00061EA4 /* StepModel.swift in Sources */,
|
||||
EA85888F27C696AB00D44BAC /* WebViewBridgeProtocol.swift in Sources */,
|
||||
D2FC4FAF25897ACB00061EA4 /* Step.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -438,6 +523,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = FCMA4QKS77;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@ -445,13 +531,14 @@
|
||||
"$(PROJECT_DIR)/../SharedFrameworks",
|
||||
);
|
||||
INFOPLIST_FILE = JSONCreator/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.JSONCreator;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_WORKSPACE = NO;
|
||||
@ -462,6 +549,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = FCMA4QKS77;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@ -469,7 +557,7 @@
|
||||
"$(PROJECT_DIR)/../SharedFrameworks",
|
||||
);
|
||||
INFOPLIST_FILE = JSONCreator/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
||||
@ -7,7 +7,20 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCoreUI
|
||||
import CoreTelephony
|
||||
|
||||
extension Decodable {
|
||||
static func map(JSONString:String) -> Self? {
|
||||
do {
|
||||
let decoder = JSONDecoder()
|
||||
decoder.keyDecodingStrategy = .convertFromSnakeCase
|
||||
return try decoder.decode(Self.self, from: Data(JSONString.utf8))
|
||||
} catch let error {
|
||||
print(error)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
|
||||
@ -23,13 +36,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
CoreUIObject.sharedInstance()?.defaultInitialSetup()
|
||||
CoreUIObject.sharedInstance()?.globalTopAlertDelegate = self
|
||||
|
||||
// MVMCoreCache.shared()?.addPage(toCache: [KeyPageType:"videotest","template":"stack","header":[KeyMoleculeName:"header","molecule":["moleculeName":"twoButtonView","primaryButton":["moleculeName":"button","title":"back","action":[KeyActionType:KeyActionTypeBack]],"secondaryButton":["moleculeName":"button","title":"open","action":[KeyActionType:KeyActionTypeOpen,KeyPageType:"planSelectionPageType"]]]],"stack":[KeyMoleculeName:"stack","molecules":[]]], pageType: "videotest")
|
||||
//
|
||||
// let path = Bundle.main.path(forResource: "Testing3", ofType: "json")!
|
||||
// let string = try! String(contentsOfFile: path, encoding: .utf8)
|
||||
// let dict: [AnyHashable: Any] = try! JSONSerialization.jsonObject(with: string.data(using: .utf8)!, options: .fragmentsAllowed) as! [AnyHashable: Any]
|
||||
// let page: [AnyHashable: Any] = dict[KeyPage] as! [AnyHashable: Any]
|
||||
// MVMCoreCache.shared()?.addPage(toCache: page, pageType: page[KeyPageType]! as! String)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@ -61,9 +68,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
}
|
||||
}
|
||||
self.register()
|
||||
//getCT()
|
||||
let json = ["actionType" : WebViewBridgeTrialFraudUserGetModel.identifier]
|
||||
self.testBridge(json: json)
|
||||
return true
|
||||
}
|
||||
|
||||
// func getCT() {
|
||||
// let info: CTTelephonyNetworkInfo = CTTelephonyNetworkInfo()
|
||||
// if #available(iOS 12.0, *) {
|
||||
// for (service, carrier) in info.serviceSubscriberCellularProviders ?? [:] {
|
||||
// print("\(service), \(carrier)")
|
||||
// print(carrier.carrierName!)
|
||||
// print(carrier.mobileCountryCode!)
|
||||
// print(carrier.mobileNetworkCode!)
|
||||
// print(carrier.isoCountryCode!)
|
||||
// print(carrier.allowsVOIP)
|
||||
// }
|
||||
// } else {
|
||||
// // Fallback on earlier versions
|
||||
// }
|
||||
// }
|
||||
|
||||
@objc func jsonPasteAndGo(_ sender: UILongPressGestureRecognizer) {
|
||||
if sender.state == .ended {
|
||||
(dvc as? DetailViewController)?.textView.text = UIPasteboard.general.string
|
||||
@ -127,9 +153,177 @@ extension AppDelegate: MVMCoreGlobalTopAlertDelegateProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
extension Result{
|
||||
public func get() throws -> Success {
|
||||
switch self {
|
||||
case .success(let value):
|
||||
return value
|
||||
case .failure(let error):
|
||||
throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AppDelegate {
|
||||
func register(){
|
||||
ModelRegistry.register(handler: WebViewBridgeTrialFraudDeviceCheckGet.self, for: WebViewBridgeTrialFraudDeviceCheckGetModel.self)
|
||||
//ModelRegistry.register(handler: WebViewBridgeTrialFraudUserSet.self, for: WebViewBridgeTrialFraudUserSetModel.self)
|
||||
ModelRegistry.register(handler: WebViewBridgeTrialFraudUserGet.self, for: WebViewBridgeTrialFraudUserGetModel.self)
|
||||
ModelRegistry.register(handler: EmailVerifyField.self, for: EmailVerifyModel.self)
|
||||
ModelRegistry.register(handler: PillLabel.self, for: PillLabelModel.self)
|
||||
ModelRegistry.register(handler: SampleWebViewBridge.self, for: SampleWebViewBridgeModel.self)
|
||||
}
|
||||
|
||||
func testBridge(json: [String: Any]){
|
||||
do {
|
||||
let bridgeModel = try ModelRegistry.getBridgeModelForJSON(json)
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "Webview bridge JSON: \(String(describing: bridgeModel.toJSONString()))")
|
||||
let bridgeType = try ModelRegistry.getHandler(bridgeModel) as! WebViewBridgeProtocol.Type
|
||||
let bridge = try bridgeType.init(baseModel: bridgeModel,
|
||||
requestId: UUID().uuidString,
|
||||
viewController: nil)
|
||||
|
||||
let anyHandler = bridge.eraseToAnyHandler()
|
||||
MVMCoreDispatchUtility.performBlock(inBackground: {
|
||||
print("Thread isMain: \(Thread.isMainThread)")
|
||||
anyHandler.perform(then: { result in
|
||||
print("Thread isMain: \(Thread.isMainThread)")
|
||||
switch result{
|
||||
case .success(let value):
|
||||
if let value = value {
|
||||
print(value)
|
||||
} else {
|
||||
print("empty dictionary")
|
||||
}
|
||||
case .failure(_):
|
||||
print("error")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
} catch {
|
||||
print(error.localizedDescription)
|
||||
}
|
||||
}
|
||||
|
||||
func testJSONValue(){
|
||||
// let json = """
|
||||
// {
|
||||
// "name" : "Matt",
|
||||
// "params": {
|
||||
// "stringKey": "Blah",
|
||||
// "doubleKey": 1.02,
|
||||
// "intKey": 105,
|
||||
// "boolKey": true,
|
||||
// "arrayKey": ["val1","val2", "val3"],
|
||||
// "objectKey": { "foo": "fooName" }
|
||||
// }
|
||||
// }
|
||||
// """
|
||||
//
|
||||
// struct Test: Decodable {
|
||||
// var name: String
|
||||
// var params: JSONValueDictionary
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if let test = Test.map(JSONString: json) {
|
||||
//
|
||||
// func debug(key: String, value: Any?){
|
||||
// print("\(key): \(value!) type:\(type(of: value!))")
|
||||
// }
|
||||
// do {
|
||||
// let stringKey: String = try test.params["stringKey"]!.value()
|
||||
// let doubleKey: Double = try test.params["doubleKey"]!.value()
|
||||
// let intKey: Int = try test.params["intKey"]!.value()
|
||||
// let boolKey: Bool = try test.params["boolKey"]!.value()
|
||||
// let arrayKey: [String] = try test.params["arrayKey"]!.value()
|
||||
// let objectKey: [String: Any] = try test.params["objectKey"]!.value()
|
||||
//
|
||||
// print("Using Value")
|
||||
// debug(key: "stringKey", value: stringKey)
|
||||
// debug(key: "doubleKey", value: doubleKey)
|
||||
// debug(key: "intKey", value: intKey)
|
||||
// debug(key: "boolKey", value: boolKey)
|
||||
// debug(key: "arrayKey", value: arrayKey)
|
||||
// debug(key: "objectKey", value: objectKey)
|
||||
// print("")
|
||||
//
|
||||
// print("Using baseValue")
|
||||
// let bstringKey = test.params["stringKey"]?.base as? String
|
||||
// let bdoubleKey = test.params["doubleKey"]?.base as? Double
|
||||
// let bintKey = test.params["intKey"]?.base as? Int
|
||||
// let bboolKey = test.params["boolKey"]?.base as? Bool
|
||||
// let barrayKey = test.params["arrayKey"]?.base as? [String]
|
||||
// let bobjectKey = test.params["objectKey"]?.base as? [String: Any]
|
||||
// debug(key: "stringKey", value: bstringKey)
|
||||
// debug(key: "doubleKey", value: bdoubleKey)
|
||||
// debug(key: "intKey", value: bintKey)
|
||||
// debug(key: "boolKey", value: bboolKey)
|
||||
// debug(key: "arrayKey", value: barrayKey)
|
||||
// debug(key: "objectKey", value: bobjectKey)
|
||||
// print("")
|
||||
//
|
||||
// print("Using toMethod")
|
||||
// let cstringKey = try test.params["stringKey"]?.toString()
|
||||
// let cdoubleKey = try test.params["doubleKey"]?.toDouble()
|
||||
// let cintKey = try test.params["intKey"]?.toInt()
|
||||
// let cboolKey = try test.params["boolKey"]?.toBool()
|
||||
// let carrayKey = try test.params["arrayKey"]?.toArray(of: String.self)
|
||||
// let cobjectKey = try test.params["objectKey"]?.toObject(of: [String: Any].self)
|
||||
// debug(key: "stringKey", value: cstringKey)
|
||||
// debug(key: "doubleKey", value: cdoubleKey)
|
||||
// debug(key: "intKey", value: cintKey)
|
||||
// debug(key: "boolKey", value: cboolKey)
|
||||
// debug(key: "arrayKey", value: carrayKey)
|
||||
// debug(key: "objectKey", value: cobjectKey)
|
||||
// print("")
|
||||
// } catch {
|
||||
// print(error)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
final public class SampleWebViewBridgeModel: MoleculeModelProtocol{
|
||||
public var backgroundColor: Color?
|
||||
public static var identifier: String = "sampleWebViewBridge"
|
||||
public var moleculeName: String = SampleWebViewBridgeModel.identifier
|
||||
}
|
||||
|
||||
import WebKit
|
||||
|
||||
final public class SampleWebViewBridge: WebView{
|
||||
func getNonBridgeActions() -> [String: [String: Any]] {
|
||||
let openPage: [String: Any] = [
|
||||
"actionType": "openPage",
|
||||
"pageType": "feedsAuthenticatedWebview",
|
||||
"extraParameters": [
|
||||
"browserUrl" : "www.verizon.com"
|
||||
]
|
||||
]
|
||||
|
||||
let passMVAData: [String: Any] = [
|
||||
"actionType": "passMVAData",
|
||||
"data": [
|
||||
"backIgnoresWebHistory": true
|
||||
]
|
||||
]
|
||||
|
||||
let hideBackButton: [String: Any] = [
|
||||
"actionType": "updateNavigation",
|
||||
"navigationBar":[
|
||||
"moleculeName": "navigationBar",
|
||||
"alwaysShowBackButton": false,
|
||||
"title":"Page title"
|
||||
]
|
||||
]
|
||||
|
||||
return [
|
||||
"openPage": openPage,
|
||||
"passMVAData": passMVAData,
|
||||
"hideBackButton": hideBackButton
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,3 +429,129 @@ extension AppDelegate {
|
||||
bottomView.isHidden = isBottomViewHidden
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers public class PillLabelModel: MoleculeModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public static var identifier: String = "pillLabel"
|
||||
public var backgroundColor: Color? = Color(uiColor: .mvmRed)
|
||||
public var text: String
|
||||
public var accessibilityText: String?
|
||||
public var textColor: Color = Color(uiColor: .mvmWhite)
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case text
|
||||
case accessibilityText
|
||||
case textColor
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - codec
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
|
||||
if let backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) {
|
||||
self.backgroundColor = backgroundColor
|
||||
}
|
||||
|
||||
text = try typeContainer.decode(String.self, forKey: .text)
|
||||
accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText)
|
||||
|
||||
if let textColor = try typeContainer.decodeIfPresent(Color.self, forKey: .textColor) {
|
||||
self.textColor = textColor
|
||||
}
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(text, forKey: .text)
|
||||
try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText)
|
||||
try container.encode(textColor, forKey: .textColor)
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers open class PillLabel: View {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
//--------------------------------------------------
|
||||
|
||||
public let label = Label(fontStyle: .BoldMicro)
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
//--------------------------------------------------
|
||||
|
||||
override open func setupView() {
|
||||
super.setupView()
|
||||
|
||||
label.textAlignment = .center
|
||||
label.textColor = .mvmWhite
|
||||
backgroundColor = .mvmRed
|
||||
addSubview(label)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
label.topAnchor.constraint(equalTo: topAnchor, constant: 2),
|
||||
label.leadingAnchor.constraint(equalTo: leadingAnchor, constant: Padding.Three),
|
||||
trailingAnchor.constraint(equalTo: label.trailingAnchor, constant: Padding.Three),
|
||||
bottomAnchor.constraint(equalTo: label.bottomAnchor, constant: 2)
|
||||
])
|
||||
}
|
||||
|
||||
@objc override open func updateView(_ size: CGFloat) {
|
||||
super.updateView(size)
|
||||
label.updateView(size)
|
||||
}
|
||||
|
||||
open override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
layer.cornerRadius = bounds.height / 2
|
||||
}
|
||||
|
||||
open override func reset() {
|
||||
super.reset()
|
||||
|
||||
label.text = ""
|
||||
label.accessibilityLabel = ""
|
||||
label.textColor = .white
|
||||
backgroundColor = .mvmRed
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Atomic
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
|
||||
guard let model = model as? PillLabelModel else { return }
|
||||
|
||||
label.text = model.text
|
||||
|
||||
if let accessibilityText = model.accessibilityText {
|
||||
label.accessibilityLabel = accessibilityText
|
||||
}
|
||||
|
||||
label.textColor = model.textColor.uiColor
|
||||
}
|
||||
|
||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 20
|
||||
}
|
||||
}
|
||||
|
||||
extension PillLabel: MVMCoreUIViewConstrainingProtocol {
|
||||
public func horizontalAlignment() -> UIStackView.Alignment {
|
||||
return .leading
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,195 @@
|
||||
{
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"server": "10-74-170-83.ebiz.verizon.com-mf_prepayss01",
|
||||
"code": "00000",
|
||||
"hideNotificationLogo": false,
|
||||
"message": "0",
|
||||
"buildNumber": "6698",
|
||||
"type": "Success",
|
||||
"requestId": "dbb1ee17-69fe-464e-8a82-9563b83422ab",
|
||||
"topAlertTime": 0
|
||||
},
|
||||
"Page": {
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Account security"
|
||||
},
|
||||
"pageType": "tbd",
|
||||
"cache": false,
|
||||
"screenHeading": "Account security",
|
||||
"template": "stack",
|
||||
"header": {
|
||||
"moleculeName": "header",
|
||||
"molecule": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Next up, let's secure this account."
|
||||
},
|
||||
"body": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"topPadding": 30,
|
||||
"length": 19,
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"analyticsData": {
|
||||
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify",
|
||||
"vzdl.page.linkName": "Verify"
|
||||
},
|
||||
"pageType": "whyWeAskingAEMPR"
|
||||
},
|
||||
"location": 113,
|
||||
"type": "action"
|
||||
}
|
||||
],
|
||||
"text": "We'll use this PIN and security question for verification and help accessing the account. Make sure the PIN meets these requirements."
|
||||
}
|
||||
}
|
||||
},
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"horizontalAlignment": "leading",
|
||||
"molecule": {
|
||||
"moleculeName": "digitTextField",
|
||||
"editable": true,
|
||||
"title": "Account security PIN",
|
||||
"digits": 4,
|
||||
"fieldKey": "securityPIN"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"horizontalAlignment": "leading",
|
||||
"molecule": {
|
||||
"moleculeName": "digitTextField",
|
||||
"editable": true,
|
||||
"title": "Confirm account security PIN",
|
||||
"type": "secure",
|
||||
"digits": 4,
|
||||
"fieldKey": "confirmSecurityPIN"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "dropDown",
|
||||
"fieldKey": "securityQuestion",
|
||||
"title": "Security question",
|
||||
"options": [
|
||||
"What was the first live concert you attended?",
|
||||
"Where did you and your spouse first meet?",
|
||||
"What was your favorite place to visit as a child?",
|
||||
"What was the first name of your first roommate?",
|
||||
"What is the name of a memorable place?",
|
||||
"What is the first name of your best friend?",
|
||||
"What was your favorite restaurant in college?"
|
||||
],
|
||||
"selectedIndex": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"title": "Security answer",
|
||||
"type": "text",
|
||||
"fieldKey": "securityAnswer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Be sure to remember these details. They'll be needed to access the account later."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"footer": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"groupName": "default",
|
||||
"moleculeName": "button",
|
||||
"title": "Next",
|
||||
"action": {
|
||||
"analyticsData": {
|
||||
"vzdl.page.linkName": "Legal Disclosure"
|
||||
},
|
||||
"fieldKey": "next",
|
||||
"actionType": "openPage",
|
||||
"extraParameters": {
|
||||
"from": "none"
|
||||
},
|
||||
"presentationStyle": "push",
|
||||
"pageType": "legalDisclosurePR"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"formRules": [
|
||||
{
|
||||
"groupName": "default",
|
||||
"rules": [
|
||||
{
|
||||
"regex": "^(?!.*0123|.*1234|.*2345|.*3456|.*4567|.*5678|.*6789|.*3210|.*4321|.*5432|.*6543|.*7654|.*8765|.*9876|.*0000|.*1111|.*2222|.*3333|.*4444|.*5555|.*6666|.*7777|.*8888|.*9999).*$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"securityPIN"
|
||||
],
|
||||
"errorMessage": {
|
||||
"securityPIN": "Your PIN can't have numbers in order or repeating."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "equals",
|
||||
"fields": [
|
||||
"securityPIN",
|
||||
"confirmSecurityPIN"
|
||||
],
|
||||
"errorMessage": {
|
||||
"confirmSecurityPIN": "Your account PIN entries don't match. Try again."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "regex",
|
||||
"regex": "^[A-Za-z0-9 ]{3,10}$",
|
||||
"fields": [
|
||||
"securityAnswer"
|
||||
],
|
||||
"errorMessage": {
|
||||
"securityAnswer": "Your security answer can only letters, numbers, spaces, and periods."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "regex",
|
||||
"regex": "^.{3,10}$",
|
||||
"fields": [
|
||||
"securityAnswer"
|
||||
],
|
||||
"errorMessage": {
|
||||
"securityAnswer": "Your answer must be between 3-10 characters."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"fields": [
|
||||
"securityPIN",
|
||||
"confirmSecurityPIN",
|
||||
"securityAnswer"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,133 @@
|
||||
{
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"server": "10-74-170-83.ebiz.verizon.com-mf_prepayss01",
|
||||
"code": "00000",
|
||||
"hideNotificationLogo": false,
|
||||
"message": "0",
|
||||
"buildNumber": "6698",
|
||||
"type": "Success",
|
||||
"requestId": "dbb1ee17-69fe-464e-8a82-9563b83422ab",
|
||||
"topAlertTime": 0
|
||||
},
|
||||
"Page": {
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Account security"
|
||||
},
|
||||
"pageType": "tbd",
|
||||
"cache": false,
|
||||
"screenHeading": "Account security",
|
||||
"template": "stack",
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"horizontalAlignment": "leading",
|
||||
"molecule": {
|
||||
"moleculeName": "digitTextField",
|
||||
"editable": true,
|
||||
"title": "Account security PIN",
|
||||
"digits": 4,
|
||||
"fieldKey": "securityPIN"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"horizontalAlignment": "leading",
|
||||
"molecule": {
|
||||
"moleculeName": "digitTextField",
|
||||
"editable": true,
|
||||
"title": "Confirm account security PIN",
|
||||
"type": "text",
|
||||
"digits": 4,
|
||||
"fieldKey": "confirmSecurityPIN"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredFirstName",
|
||||
"type": "text",
|
||||
"text": "",
|
||||
"errorMessage": "Please enter a valid first name.",
|
||||
"title": "Preferred First Name",
|
||||
"feedback": "This will replace greeting name if you have one.",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"footer": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"groupName": "default",
|
||||
"moleculeName": "button",
|
||||
"title": "Next",
|
||||
"action": {
|
||||
"analyticsData": {
|
||||
"vzdl.page.linkName": "Legal Disclosure"
|
||||
},
|
||||
"fieldKey": "next",
|
||||
"actionType": "openPage",
|
||||
"extraParameters": {
|
||||
"from": "none"
|
||||
},
|
||||
"presentationStyle": "push",
|
||||
"pageType": "legalDisclosurePR"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"formRules": [
|
||||
{
|
||||
"groupName": "default",
|
||||
"rules": [
|
||||
{
|
||||
"regex": "^[0-6]{0,4}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"securityPIN"
|
||||
],
|
||||
"errorMessage": {
|
||||
"securityPIN": "Your PIN can't have numbers in order or repeating."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "equals",
|
||||
"fields": [
|
||||
"securityPIN",
|
||||
"confirmSecurityPIN"
|
||||
],
|
||||
"errorMessage": {
|
||||
"confirmSecurityPIN": "Your account PIN entries don't match. Try again."
|
||||
}
|
||||
},
|
||||
{
|
||||
"regex": "^[0-9a-zA-Z@\\.\\-\\’_?]{0,25}$",
|
||||
"ruleId": "anyAlphaNumeric",
|
||||
"errorMessage": {
|
||||
"preferredFirstName": "Only use for First Name"
|
||||
},
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"fields": [
|
||||
"securityPIN",
|
||||
"confirmSecurityPIN"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
197
JSONCreator_iOS/JSONCreator/JSON/Samples/DropDownListHidden.json
Normal file
197
JSONCreator_iOS/JSONCreator/JSON/Samples/DropDownListHidden.json
Normal file
@ -0,0 +1,197 @@
|
||||
{
|
||||
"ResponseInfo" : {
|
||||
"locale" : "EN",
|
||||
"server" : "loghost-mf_postpayss01",
|
||||
"userMessage" : "0",
|
||||
"code" : "00000",
|
||||
"appSessionExtended" : true,
|
||||
"message" : "0",
|
||||
"mdn" : "7165723410",
|
||||
"buildNumber" : "61",
|
||||
"type" : "Success",
|
||||
"requestId" : "12321a81-a48b-4023-94d9-7bd42af6d65a",
|
||||
"topAlertTime" : 0
|
||||
},
|
||||
"Page" : {
|
||||
"pageStatNames" : [
|
||||
"\/mf\/retail\/appt\/flow",
|
||||
"\/mf\/retail\/appt\/reasons"
|
||||
],
|
||||
"template" : "list",
|
||||
"footer" : {
|
||||
"moleculeName" : "footer",
|
||||
"molecule" : {
|
||||
"moleculeName" : "twoButtonView",
|
||||
"primaryButton" : {
|
||||
"groupName" : "default",
|
||||
"moleculeName" : "button",
|
||||
"title" : "Continue",
|
||||
"action" : {
|
||||
"analyticsData" : {
|
||||
"vzdl.page.linkName" : "Continue"
|
||||
},
|
||||
"extraParameters" : {
|
||||
"destPageType" : "rtlApptsStoreLocator",
|
||||
"FromStoreDetails" : "N"
|
||||
},
|
||||
"actionType" : "openPage",
|
||||
"title" : "Confirm",
|
||||
"presentationStyle" : "push",
|
||||
"pageType" : "launchApp"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"molecules" : [
|
||||
{
|
||||
"dropDown" : {
|
||||
"moleculeName" : "dropDown",
|
||||
"action" : {
|
||||
"actionType" : "noop"
|
||||
},
|
||||
"placeholder" : "Select a reason for visit",
|
||||
"title" : "What can we help you with?",
|
||||
"fieldKey" : "reason",
|
||||
"type" : "text",
|
||||
"options" : [
|
||||
"Account Support",
|
||||
"Shop",
|
||||
"Device Setup\/Troubleshooting",
|
||||
"Other"
|
||||
]
|
||||
},
|
||||
"line" : {
|
||||
"moleculeName" : "line",
|
||||
"type" : "none"
|
||||
},
|
||||
"moleculeName" : "dropDownListItem",
|
||||
"molecules" : [
|
||||
[
|
||||
{
|
||||
"line" : {
|
||||
"moleculeName" : "line",
|
||||
"type" : "none"
|
||||
},
|
||||
"topPadding" : 0,
|
||||
"moleculeName" : "listItem",
|
||||
"molecule" : {
|
||||
"title" : "Relating to",
|
||||
"fieldKey" : "subReason",
|
||||
"moleculeName" : "dropDown",
|
||||
"options" : [
|
||||
"Autopay question or issue",
|
||||
"Billing issue",
|
||||
"Misleading promise or information inquiry",
|
||||
"Disconnect line",
|
||||
"Payment arrangements",
|
||||
"Promised promotion or offer",
|
||||
"Other"
|
||||
],
|
||||
"type" : "text",
|
||||
"action" : {
|
||||
"actionType" : "noop"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
|
||||
],
|
||||
[
|
||||
|
||||
],
|
||||
[
|
||||
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"cache" : false,
|
||||
"header" : {
|
||||
"moleculeName" : "header",
|
||||
"molecule" : {
|
||||
"moleculeName" : "headlineBody",
|
||||
"headline" : {
|
||||
"moleculeName" : "label",
|
||||
"text" : "Make an appointment to see a representative."
|
||||
},
|
||||
"body" : {
|
||||
"moleculeName" : "label",
|
||||
"text" : "We currently have limited staffing. For your safety and the safety of our employees, we are only scheduling appointments to provide one-on-one support for account maintenance or device troubleshooting.",
|
||||
"fontStyle" : "BoldBodySmall"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tab" : [
|
||||
{
|
||||
"appContext" : "mobileFirstSS",
|
||||
"title" : "Schedule",
|
||||
"actionType" : "openPage",
|
||||
"moleculeName" : "label",
|
||||
"presentationStyle" : "root",
|
||||
"pageType" : "rtlReasonAndSubReasons"
|
||||
},
|
||||
{
|
||||
"appContext" : "mobileFirstSS",
|
||||
"title" : "My Appointments",
|
||||
"actionType" : "openPage",
|
||||
"moleculeName" : "label",
|
||||
"presentationStyle" : "root",
|
||||
"pageType" : "rtlViewAllScheduledAppts"
|
||||
}
|
||||
],
|
||||
"pageType" : "rtlReasonAndSubReasons",
|
||||
"suppressPostLaunchRequests" : false,
|
||||
"formRules" : [
|
||||
{
|
||||
"groupName": "default",
|
||||
"rules": [
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "allRequired",
|
||||
"fields": [
|
||||
"reason",
|
||||
"subReason"
|
||||
]
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "subReason",
|
||||
"activatedRuleIds": ["allRequired"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"regex": "^Account Support$",
|
||||
"fields": [
|
||||
"reason"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "subReason",
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"regex": "^Account Support$",
|
||||
"fields": [
|
||||
"reason"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"navigationBar" : {
|
||||
"moleculeName" : "navigationBar",
|
||||
"title" : "Make Appointment"
|
||||
},
|
||||
"tabBarHidden" : true,
|
||||
"isAtomicTabs" : true
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,15 +22,14 @@
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"moleculeName": "textView",
|
||||
"fieldKey": "firstName",
|
||||
"type": "text",
|
||||
"errorMessage": "Please enter a valid first name.",
|
||||
"placeholder": "John A",
|
||||
"titleLabel": {
|
||||
"moleculeName": "label",
|
||||
"text": "First Name"
|
||||
}
|
||||
"text": "John A",
|
||||
"title": "First Name",
|
||||
"enabled": false,
|
||||
"readOnly": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -100,43 +99,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"formRules": [
|
||||
{
|
||||
"groupName": "default",
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"emailID"
|
||||
],
|
||||
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$"
|
||||
},
|
||||
{
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"zipcode"
|
||||
],
|
||||
"regex": "^\\d{5}(?:[-\\s]\\d{4})?$"
|
||||
},
|
||||
{
|
||||
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"phoneNumber"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"fields": [
|
||||
"emailID",
|
||||
"firstName",
|
||||
"lastName"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,28 @@
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"text": "",
|
||||
"fieldKey": "password",
|
||||
"moleculeName": "textField",
|
||||
"type": "text",
|
||||
"title": "Password",
|
||||
"errorMessage": "Please enter a valid password"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"text": "",
|
||||
"fieldKey": "passwordCompare",
|
||||
"moleculeName": "textField",
|
||||
"errorMessage": "Must match password",
|
||||
"type": "text",
|
||||
"title": "Retype Password"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
@ -15,7 +37,7 @@
|
||||
"fieldKey": "preferredFirstName",
|
||||
"moleculeName": "textField",
|
||||
"type": "text",
|
||||
"title": "Preferred First Name Optional",
|
||||
"title": "Preferred First Name",
|
||||
"errorMessage": "Please enter a valid first name."
|
||||
}
|
||||
},
|
||||
@ -26,7 +48,8 @@
|
||||
"fieldKey": "preferredLastName",
|
||||
"moleculeName": "textField",
|
||||
"type": "text",
|
||||
"title": "Preferred Last Name Optional",
|
||||
"required": false,
|
||||
"title": "Preferred Last Name",
|
||||
"errorMessage": "Please enter a valid last name."
|
||||
}
|
||||
},
|
||||
@ -60,6 +83,7 @@
|
||||
"moleculeName": "textField",
|
||||
"type": "email",
|
||||
"title": "Email",
|
||||
"required": false,
|
||||
"errorMessage": "Please enter a valid email address."
|
||||
}
|
||||
}
|
||||
@ -133,14 +157,16 @@
|
||||
"ruleId": "lettersOnly",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
"preferredFirstName",
|
||||
"password"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"type": "equalsIgnoreCase",
|
||||
"ruleId": "passwordsEqual",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
"password",
|
||||
"passwordCompare"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@ -61,24 +61,11 @@
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredFirstName",
|
||||
"type": "text",
|
||||
"text": "",
|
||||
"errorMessage": "Please enter a valid first name.",
|
||||
"titleLabel": {
|
||||
"moleculeName": "label",
|
||||
"text": "Preferred First Name Optional",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "color",
|
||||
"location": 21,
|
||||
"length": 8,
|
||||
"textColor": "#747676"
|
||||
}
|
||||
]
|
||||
},
|
||||
"feedbackLabel": {
|
||||
"moleculeName": "label",
|
||||
"text": "This will replace greeting name if you have one.",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
"title": "Preferred First Name",
|
||||
"feedback": "This will replace greeting name if you have one.",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -89,18 +76,9 @@
|
||||
"type": "text",
|
||||
"text": "",
|
||||
"errorMessage": "Please enter a valid last name.",
|
||||
"titleLabel": {
|
||||
"moleculeName": "label",
|
||||
"text": "Preferred Last Name Optional",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "color",
|
||||
"location": 20,
|
||||
"length": 8,
|
||||
"textColor": "#747676"
|
||||
}
|
||||
]
|
||||
}
|
||||
"title": "Preferred Last Name",
|
||||
"feedback": "If blank, no last name will display.",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -116,19 +94,8 @@
|
||||
"They, Them, Theirs",
|
||||
"None of these"
|
||||
],
|
||||
"titleLabel": {
|
||||
"moleculeName": "label",
|
||||
"text": "Pronouns Optional",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "color",
|
||||
"location": 9,
|
||||
"length": 8,
|
||||
"textColor": "#747676"
|
||||
}
|
||||
]
|
||||
}
|
||||
,
|
||||
"title": "Pronouns",
|
||||
"required": false,
|
||||
"errorMessage": "Please select a pronoun"
|
||||
}
|
||||
},
|
||||
@ -140,6 +107,7 @@
|
||||
"type": "text",
|
||||
"text": "",
|
||||
"title": "Greeting name",
|
||||
"required": false,
|
||||
"errorMessage": "Please enter a valid greeting name."
|
||||
}
|
||||
},
|
||||
@ -225,6 +193,7 @@
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"ruleId": "emailRegex",
|
||||
"fields": [
|
||||
"emailID"
|
||||
],
|
||||
@ -233,15 +202,30 @@
|
||||
{
|
||||
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
|
||||
"type": "regex",
|
||||
"ruleId": "alternateNoRegex",
|
||||
"fields": [
|
||||
"alternateNo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"regex": "^[0-9a-zA-Z@\\.\\-\\’_?]{0,25}$",
|
||||
"ruleId": "anyAlphaNumeric",
|
||||
"errorMessage": {
|
||||
"preferredFirstName": "Only use for First Name",
|
||||
"preferredLastName": "Only use for Last Name",
|
||||
"greetingName": "Only use for Greeting Name"
|
||||
},
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName",
|
||||
"preferredLastName",
|
||||
"greetingName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "allRequired",
|
||||
"fields": [
|
||||
"greetingName",
|
||||
"emailID",
|
||||
"alternateNo"
|
||||
]
|
||||
@ -251,6 +235,7 @@
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "preferredLastName",
|
||||
"activatedRuleIds": ["anyAlphaNumeric"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
@ -259,6 +244,45 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "clearFormFieldEffect",
|
||||
"fieldKey": "preferredLastName",
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"regex": "^$",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "clearFormFieldEffect",
|
||||
"fieldKey": "greetingName",
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "greetingName",
|
||||
"activatedRuleIds": ["anyAlphaNumeric"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"regex": "^$",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,88 +1,417 @@
|
||||
{
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"type": "Success",
|
||||
"server": "Local",
|
||||
"requestId": "32d5bbc6-965d-4493-9e96-d8855c3f9386",
|
||||
"topAlertTime": 0,
|
||||
"hideNotificationLogo": false,
|
||||
"code": "00000",
|
||||
"message": "0",
|
||||
"userMessage": "0"
|
||||
},
|
||||
"Page": {
|
||||
"template": "stack",
|
||||
"pageType": "moleculeStack",
|
||||
"screenHeading": "Manage Profile",
|
||||
"hideFabOverlay": true,
|
||||
"suppressPostLaunchRequests": false,
|
||||
"tabBarHidden": true,
|
||||
"analyticsData": {
|
||||
"vzdl.events.flowinitiated": "1",
|
||||
"vzdl.page.sourceChannel": "MVA",
|
||||
"vzdl.target.engagement.intent": " ",
|
||||
"vzdl.page.channel": " ",
|
||||
"vzdl.page.displayChannel": "MVA",
|
||||
"vzdl.page.id": "moleculeStack",
|
||||
"vzdl.page.siteSection": " ",
|
||||
"contentSquarePageName": "Manage Profile",
|
||||
"vzdl.page.name": "moleculeStack"
|
||||
},
|
||||
"chaticon": {
|
||||
"moleculeName": "chatIcon",
|
||||
"hideFabOverlay": true
|
||||
},
|
||||
"pageStatNames": [
|
||||
"/mf/get/email/verify/indicator",
|
||||
"/vision/customer/profile",
|
||||
"/mf/cntrlr/mngpfl"
|
||||
],
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Manage Profile"
|
||||
},
|
||||
"header": {
|
||||
"moleculeName": "headerH2Link",
|
||||
"headlineBody": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Tell us about yourself."
|
||||
},
|
||||
"body": {
|
||||
"moleculeName": "label",
|
||||
"text": "We'll use your preferred name and pronouns online, in print, on the phone and in person to refer to you and your account."
|
||||
}
|
||||
},
|
||||
"link": {
|
||||
"moleculeName": "caretLink",
|
||||
"title": "Why are we asking?",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "learnMorePronouns"
|
||||
}
|
||||
}
|
||||
"pageName": "/mf/account/settings/basic info/manage profile"
|
||||
},
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"spacing": 30,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Account information",
|
||||
"fontStyle": "BoldBodyLarge"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 30,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"enabled" : false,
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredFirstName",
|
||||
"fieldKey": "preferredGreetingName",
|
||||
"text": "Lebowski",
|
||||
"type": "text",
|
||||
"errorMessage": "Please enter a valid first name.",
|
||||
"titleLabel": {
|
||||
"title": "Greeting name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "emailID",
|
||||
"errorMessage": "enter a valid email",
|
||||
"text": "herman.munster@verizon.com",
|
||||
"type": "text",
|
||||
"title": "Email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "alternateContactNumber",
|
||||
"text": "8923749823",
|
||||
"type": "text",
|
||||
"title": "Alternate contact number",
|
||||
"errorMessage": "Please enter valid contact number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "line",
|
||||
"type": "standard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 30,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "headlineBody",
|
||||
"body": {
|
||||
"moleculeName": "label",
|
||||
"text": "Preferred First Name Optional",
|
||||
"fontStyle": "RegularMicro",
|
||||
"textColor": "#000000",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "color",
|
||||
"location": 21,
|
||||
"length": 8,
|
||||
"topPadding": 30,
|
||||
"length": 18,
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"analyticsData": {
|
||||
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify",
|
||||
"vzdl.page.linkName": "Verify"
|
||||
},
|
||||
"pageType": "verifyEmail"
|
||||
},
|
||||
"location": 95,
|
||||
"type": "action"
|
||||
}
|
||||
],
|
||||
"text": "We'll use these online, in print, on the phone and in person to refer to you and your account.\n\nWhy are we asking?"
|
||||
},
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Preferred names and pronouns",
|
||||
"fontStyle": "BoldBodyLarge"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 30,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"location": 20,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Preferred first name Optional"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredFirstName",
|
||||
"errorMessage": "There was an issue with this name.",
|
||||
"text": "",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 10,
|
||||
"location": 49,
|
||||
"type": "color",
|
||||
"textColor": "#000000"
|
||||
},
|
||||
{
|
||||
"length": 10,
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"analyticsData": {
|
||||
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify",
|
||||
"vzdl.page.linkName": "Verify"
|
||||
},
|
||||
"pageType": "verifyEmail"
|
||||
},
|
||||
"location": 49,
|
||||
"type": "action"
|
||||
}
|
||||
],
|
||||
"text": "This will replace greeting name if you have one. Contact us",
|
||||
"fontStyle": "RegularBodySmall",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
]
|
||||
},
|
||||
"feedbackLabel": {
|
||||
"moleculeName": "label",
|
||||
"fontStyle": "RegularMicro",
|
||||
"text": "This will replace greeting name if you have one.",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"location": 19,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Preferred last name Optional"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredLastName",
|
||||
"errorMessage": "There was an issue with this name.",
|
||||
"text": "",
|
||||
"type": "text",
|
||||
"errorTextColor": "#ED7000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"style": "RegularBodySmall",
|
||||
"text": "If blank, no last name will display",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"location": 8,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Pronouns Optional"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "dropDown",
|
||||
"fieldKey": "pronouns",
|
||||
"options": [
|
||||
"",
|
||||
"He, Him, His",
|
||||
"She, Her, Hers",
|
||||
"They, Them, Theirs",
|
||||
"None of these"
|
||||
],
|
||||
"selectedIndex": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "line",
|
||||
"type": "standard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 30,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Address",
|
||||
"fontStyle": "BoldBodyLarge"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"style": "none",
|
||||
"molecule": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"spacing": 16,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "billingAddress",
|
||||
"text": "10200 BOULDER LN APT 102",
|
||||
"placeholder": "",
|
||||
"title": "Billing address",
|
||||
"errorMessage": "Please enter your shipping address."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"style": "none",
|
||||
"molecule": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"spacing": 16,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "billingAddress2",
|
||||
"text": "",
|
||||
"placeholder": "",
|
||||
"title": "Billing address 2(optional)",
|
||||
"errorMessage": "Some is wrong with the Billing address"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"style": "none",
|
||||
"molecule": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"spacing": 16,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "city",
|
||||
"text": "AUSTIN",
|
||||
"placeholder": "Enter text here",
|
||||
"title": "City",
|
||||
"errorMessage": "Please enter city"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 16,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"horizontalAlignment": "fill",
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"horizontalAlignment": "fill",
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "dropDown",
|
||||
"fieldKey": "state",
|
||||
"options": [
|
||||
"AK",
|
||||
"AL",
|
||||
"AR",
|
||||
"AZ",
|
||||
"CA",
|
||||
"CO",
|
||||
"CT",
|
||||
"DC",
|
||||
"DE",
|
||||
"FL",
|
||||
"GA",
|
||||
"HI",
|
||||
"IA",
|
||||
"ID",
|
||||
"IL",
|
||||
"IN",
|
||||
"KS",
|
||||
"KY",
|
||||
"LA",
|
||||
"MA",
|
||||
"MD",
|
||||
"ME",
|
||||
"MI",
|
||||
"MN",
|
||||
"MO",
|
||||
"MS",
|
||||
"MT",
|
||||
"NC",
|
||||
"ND",
|
||||
"NE",
|
||||
"NH",
|
||||
"NJ",
|
||||
"NM",
|
||||
"NV",
|
||||
"NY",
|
||||
"OH",
|
||||
"OK",
|
||||
"OR",
|
||||
"PA",
|
||||
"RI",
|
||||
"SC",
|
||||
"SD",
|
||||
"TN",
|
||||
"TX",
|
||||
"UT",
|
||||
"VA",
|
||||
"VT",
|
||||
"WA",
|
||||
"WI",
|
||||
"WV",
|
||||
"WY"
|
||||
],
|
||||
"title": "State",
|
||||
"selectedIndex": 43
|
||||
},
|
||||
"percent": 50
|
||||
},
|
||||
{
|
||||
"horizontalAlignment": "fill",
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "zipcode",
|
||||
"text": "78726",
|
||||
"placeholder": "Enter text here",
|
||||
"title": "ZIP Code",
|
||||
"errorMessage": "Please enter zipcode"
|
||||
},
|
||||
"percent": 50
|
||||
}
|
||||
],
|
||||
"axis": "horizontal"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -90,66 +419,55 @@
|
||||
"footer": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"moleculeName": "button",
|
||||
"title": "Update",
|
||||
"groupName": "default",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "updateProfile",
|
||||
"extraParameters": {
|
||||
"from": "none"
|
||||
},
|
||||
"presentationStyle": "push"
|
||||
}
|
||||
},
|
||||
"secondaryButton": {
|
||||
"moleculeName": "button",
|
||||
"title": "Cancel",
|
||||
"action": {
|
||||
"actionType": "back",
|
||||
"presentationStyle": "push",
|
||||
"pageType": "backButton"
|
||||
}
|
||||
"analyticsData": {
|
||||
"vzwi.mvmapp.LinkName": "Basic Info"
|
||||
},
|
||||
"pageType": "backButton",
|
||||
"presentationStyle": "push"
|
||||
},
|
||||
"title": "Cancel"
|
||||
},
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"groupName": "default",
|
||||
"moleculeName": "button",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"analyticsData": {
|
||||
"vzwi.mvmapp.LinkName": "Legal Disclosure"
|
||||
},
|
||||
"pageType": "legalDisclosurePR",
|
||||
"presentationStyle": "modal",
|
||||
"fieldKey": "update",
|
||||
"extraParameters": {
|
||||
"from": "none"
|
||||
}
|
||||
},
|
||||
"title": "Update"
|
||||
}
|
||||
}
|
||||
},
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Manage Profile"
|
||||
},
|
||||
"pageType": "moleculeStack",
|
||||
"suppressPostLaunchRequests": false,
|
||||
"tabBarHidden": true,
|
||||
"hideFabOverlay": true,
|
||||
"formRules": [
|
||||
{
|
||||
"groupName": "default",
|
||||
"rules": [
|
||||
{
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"emailID"
|
||||
],
|
||||
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$"
|
||||
},
|
||||
{
|
||||
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"alternateNo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"fields": [
|
||||
"greetingName",
|
||||
"emailID",
|
||||
"alternateNo"
|
||||
]
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"type": "enableFormFieldEffect",
|
||||
"fieldKey": "preferredLastName",
|
||||
"activatedRuleIds": [
|
||||
"requiredRule"
|
||||
"anyValueChanged", "textOnlyRegEx"
|
||||
],
|
||||
"fieldKey": "preferredLastName",
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
@ -157,10 +475,215 @@
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "enableFormFieldEffect"
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "preferredGreetingName",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"preferredGreetingName"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "emailID",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"emailID"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "alternateContactNumber",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"alternateContactNumber"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "billingAddress",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"billingAddress"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "billingAddress2",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"billingAddress2"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "city",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"city"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "zipcode",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"zipcode"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "pronouns",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"pronouns"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dynamicRuleFormFieldEffect",
|
||||
"fieldKey": "state",
|
||||
"activatedRuleIds": ["anyValueChanged"],
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"state"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"regex": "^.{1,10}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredGreetingName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^$|^[a-zA-Z]{0,25}$",
|
||||
"ruleId": "textOnlyRegEx",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName",
|
||||
"preferredLastName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"emailID"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"alternateContactNumber"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^.{1,30}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"billingAddress",
|
||||
"city"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^.{1,8}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"zipcode"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"fields": [
|
||||
"preferredGreetingName",
|
||||
"emailID",
|
||||
"alternateContactNumber",
|
||||
"billingAddress",
|
||||
"city",
|
||||
"state",
|
||||
"zipcode"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ruleId": "anyValueChanged",
|
||||
"type": "anyValueChanged",
|
||||
"fields": [
|
||||
"preferredGreetingName",
|
||||
"emailID",
|
||||
"alternateContactNumber",
|
||||
"billingAddress",
|
||||
"city",
|
||||
"state",
|
||||
"zipcode",
|
||||
"pronouns",
|
||||
"billingAddress2",
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"screenHeading": "Manage Profile",
|
||||
"header": {
|
||||
"moleculeName": "header",
|
||||
"molecule": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Tell us a bit about yourself."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
551
JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/Testing.json
Normal file
551
JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/Testing.json
Normal file
@ -0,0 +1,551 @@
|
||||
{
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"type": "Success",
|
||||
"server": "loghost-mf_postpayss01",
|
||||
"buildNumber": "48",
|
||||
"requestId": "21ab5a2c-412a-4731-adc5-3c304adb51e4",
|
||||
"mdn": "8123224668",
|
||||
"appSessionExtended": true,
|
||||
"code": "00000",
|
||||
"message": "0",
|
||||
"userMessage": "0",
|
||||
"topAlertTime": 0
|
||||
},
|
||||
"SystemParams": {
|
||||
"fidoMap": {
|
||||
"fidoGuid": "d6058b95-65b8-40f9-b446-def20ff4b0e1",
|
||||
"accessToken": "i4PeG76efWUEcfk3QpZVD5XO9VrFzlcHELDtMt8NgB3aRxkVgRGLtgOpgF6t2Mr4Mouc2yKz013msQmttwBXAfpKNFLFi0rcbJjF"
|
||||
},
|
||||
"deviceToken": "lwkEcchuqRuzDNbVLvjnNTURlvbnshgjwzvRW3eg/ibl/EwET8LqUqbT5l8p1rq8"
|
||||
},
|
||||
"Page": {
|
||||
"suppressPostLaunchRequests": false,
|
||||
"template": "stack",
|
||||
"analyticsData": {
|
||||
"vzdl.page.displayChannel": "MVA",
|
||||
"vzdl.env.businessUnit": "wireless",
|
||||
"vzdl.page.id": "moleculeStack",
|
||||
"vzdl.page.channel": " ",
|
||||
"vzdl.page.siteSection": " ",
|
||||
"vzdl.events.flowinitiated": "1",
|
||||
"contentSquarePageName": "Manage Profile",
|
||||
"vzdl.page.sourceChannel": "MVA",
|
||||
"vzdl.page.name": "moleculeStack",
|
||||
"vzdl.target.engagement.intent": " "
|
||||
},
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"style": "RegularBodySmall",
|
||||
"location": 20,
|
||||
"type": "font"
|
||||
},
|
||||
{
|
||||
"length": 9,
|
||||
"location": 20,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Preferred first name Optional",
|
||||
"fontStyle": "BoldBodySmall"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredFirstName",
|
||||
"errorMessage": "Please enter a valid first name.",
|
||||
"text": "",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "This will replace greeting name if you have one.",
|
||||
"fontStyle": "RegularBodySmall",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"style": "RegularBodySmall",
|
||||
"location": 19,
|
||||
"type": "font"
|
||||
},
|
||||
{
|
||||
"length": 9,
|
||||
"location": 19,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Preferred last name Optional",
|
||||
"fontStyle": "BoldBodySmall"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "preferredLastName",
|
||||
"text": "",
|
||||
"type": "text",
|
||||
"errorTextColor": "#ED7000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"style": "RegularBodySmall",
|
||||
"text": "If blank, no last name will display",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"style": "RegularBodySmall",
|
||||
"location": 8,
|
||||
"type": "font"
|
||||
},
|
||||
{
|
||||
"length": 9,
|
||||
"location": 8,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Pronouns Optional",
|
||||
"fontStyle": "BoldBodySmall"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "dropDown",
|
||||
"fieldKey": "pronouns",
|
||||
"options": [
|
||||
"-- Select --",
|
||||
"He, Him, His",
|
||||
"She, Her, Hers",
|
||||
"They, Them, Theirs",
|
||||
"None of these"
|
||||
],
|
||||
"selectedIndex": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"spacing": 2,
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 9,
|
||||
"style": "RegularBodySmall",
|
||||
"location": 13,
|
||||
"type": "font"
|
||||
},
|
||||
{
|
||||
"length": 9,
|
||||
"location": 13,
|
||||
"type": "color",
|
||||
"textColor": "#747676"
|
||||
}
|
||||
],
|
||||
"text": "Greeting name Optional",
|
||||
"fontStyle": "BoldBodySmall",
|
||||
"fieldKey": "greetingName"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "greetingName",
|
||||
"errorMessage": "Please enter a valid greeting name.",
|
||||
"text": "",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "emailVerifyField",
|
||||
"bottomMolecule": {
|
||||
"moleculeName": "label",
|
||||
"attributes": [
|
||||
{
|
||||
"length": 6,
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"analyticsData": {
|
||||
"vzdl.page.pageLinkName": "/mf/Manage Profile|Email Verify",
|
||||
"vzdl.page.linkName": "Verify"
|
||||
},
|
||||
"pageType": "verifyEmail"
|
||||
},
|
||||
"location": 0,
|
||||
"type": "action"
|
||||
}
|
||||
],
|
||||
"text": "Verify"
|
||||
},
|
||||
"emailField": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "emailID",
|
||||
"errorMessage": "Please enter a valid email address.",
|
||||
"text": "HERMAN.MUNSTER@VERIZON.COM",
|
||||
"type": "email",
|
||||
"title": "Email"
|
||||
},
|
||||
"email": "HERMAN.MUNSTER@VERIZON.COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "alternateNo",
|
||||
"errorMessage": "Please enter a valid phone number.",
|
||||
"text": "999.999.9999",
|
||||
"type": "phone",
|
||||
"title": "Alternate contact number"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"footer": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"secondaryButton": {
|
||||
"moleculeName": "button",
|
||||
"action": {
|
||||
"actionType": "back",
|
||||
"pageType": "backButton",
|
||||
"presentationStyle": "push"
|
||||
},
|
||||
"title": "Cancel"
|
||||
},
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"groupName": "default",
|
||||
"moleculeName": "button",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "updateProfile",
|
||||
"presentationStyle": "push",
|
||||
"extraParameters": {
|
||||
"from": "none"
|
||||
}
|
||||
},
|
||||
"title": "Save"
|
||||
}
|
||||
}
|
||||
},
|
||||
"customUserAgent": "MY_VZW_APP;Android;11;Android SDK built for x86;MF_APP_VERSION:7.6;accept-language:EN",
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "Manage Profile"
|
||||
},
|
||||
"pageType": "moleculeStack",
|
||||
"oidcPunchOut": true,
|
||||
"suppressPostLaunchRequests": false,
|
||||
"tabBarHidden": true,
|
||||
"chaticon": {
|
||||
"hideFabOverlay": true,
|
||||
"moleculeName": "chatIcon"
|
||||
},
|
||||
"hideFabOverlay": true,
|
||||
"headersForCookies": [
|
||||
{
|
||||
"Set-Cookie": "IDToken=eyAidHlwIjogIkpXVCIsICJraWQiOiAiNTVHbXJ1bUh0UnhOYXQ5TWF4Y3hSVXA5aEpjPSIsICJhbGciOiAiUlMyNTYiIH0.eyAiYXRfaGFzaCI6ICJLeHRGMFlZVm54NzdGMTdVWWdYVWx3IiwgImZpZG9ndWlkIjogImQ2MDU4Yjk1LTY1YjgtNDBmOS1iNDQ2LWRlZjIwZmY0YjBlMSIsICJzdWIiOiAiNjc3ODA0YzAtMzM4MC00NjJlLThjMTQtMDIyMzg1NGMyYmRhIiwgInJvbGUiOiAiYWNjb3VudEhvbGRlciIsICJhdWRpdFRyYWNraW5nSWQiOiAiMDkyNzc3MTItZGEwMC00NTI1LTk0ODMtODI1MGVkZjI4MGM0LTMzNjYyOSIsICJpc3MiOiAiaHR0cDovL2FjY2Vzc21ncnFhMy52ZXJpem9ud2lyZWxlc3MuY29tOjgwL3Z6YXV0aC9vYXV0aDIiLCAidG9rZW5OYW1lIjogImlkX3Rva2VuIiwgInFpZCI6ICIzMyIsICJhY3IiOiAiYWFsLTIiLCAidWlkIjogIjgxMjMyMjQ2NjhyZWdUb29sIiwgImF6cCI6ICJNVk1BZ2VudCIsICJhdXRoX3RpbWUiOiAxNjQxNDQ3MTM3LCAiZXhwIjogMTY0MTQ0ODk0MywgImlhdCI6IDE2NDE0NDcxNDMsICJhY2NvdW50bnVtYmVyIjogIjAyODA3NTc3NDMwMDAwMSIsICJtdG4iOiAiODEyMzIyNDY2OCIsICJvcGVuaWQiOiAiIiwgImF1ZCI6ICJNVk1BZ2VudCIsICJjX2hhc2giOiAiQy10bUJDN0JoS0l4MVc5QWdIaUNMQSIsICJuYW1lIjogIkxlYm93c2tpMyIsICJyZWFsbSI6ICIvdnp3IiwgInRva2VuVHlwZSI6ICJKV1RUb2tlbiIsICJsb2IiOiAidnp3IiB9.PZNyVGCs45hFt4kpTWzPwTKTsZ_78lt8H4aj9fGZ3hAQPv95gNV_i9ansP_vFKxCRvD5AGMKIXYgDNUZkZFpnp7B_XgIQbqmcrgrY9Yqt1i8FH6vtih6c-PLZTjV8wntsXo8ExMV77LsTqRUKEVPi5RgnrS2Q2FZqhrzfVflg70awrWlI5gh7nYy2ZhpcQaLES2HPjhV1uOkza92p75RZBDGkr5Fp2DleC_dNW-hwgc7hhZOmWgVgPF2hxDR2wqqPUa149g53uC0I_IrwFL5ZIm8mxWypvrMRhUP-bly1SmoiSBKfMjjvFiLB4ng_jLHeDNlUvuhmoKMHiPrhemLNg;Domain=.vzw.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://vzw.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "soeSessionID=null;Domain=.vzw.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://vzw.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "amID=0Mt3x-xv90MvqVF0qrRlS-U_j3Y3mVAlOhgNTUF7wFeIkk9J7-5;Domain=.vzw.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://vzw.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "punchOutFlow=L2;Domain=.vzw.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://vzw.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "channelID=VZW;Domain=.vzw.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://vzw.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "ostype=Android;Domain=.vzw.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://vzw.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "IDToken=eyAidHlwIjogIkpXVCIsICJraWQiOiAiNTVHbXJ1bUh0UnhOYXQ5TWF4Y3hSVXA5aEpjPSIsICJhbGciOiAiUlMyNTYiIH0.eyAiYXRfaGFzaCI6ICJLeHRGMFlZVm54NzdGMTdVWWdYVWx3IiwgImZpZG9ndWlkIjogImQ2MDU4Yjk1LTY1YjgtNDBmOS1iNDQ2LWRlZjIwZmY0YjBlMSIsICJzdWIiOiAiNjc3ODA0YzAtMzM4MC00NjJlLThjMTQtMDIyMzg1NGMyYmRhIiwgInJvbGUiOiAiYWNjb3VudEhvbGRlciIsICJhdWRpdFRyYWNraW5nSWQiOiAiMDkyNzc3MTItZGEwMC00NTI1LTk0ODMtODI1MGVkZjI4MGM0LTMzNjYyOSIsICJpc3MiOiAiaHR0cDovL2FjY2Vzc21ncnFhMy52ZXJpem9ud2lyZWxlc3MuY29tOjgwL3Z6YXV0aC9vYXV0aDIiLCAidG9rZW5OYW1lIjogImlkX3Rva2VuIiwgInFpZCI6ICIzMyIsICJhY3IiOiAiYWFsLTIiLCAidWlkIjogIjgxMjMyMjQ2NjhyZWdUb29sIiwgImF6cCI6ICJNVk1BZ2VudCIsICJhdXRoX3RpbWUiOiAxNjQxNDQ3MTM3LCAiZXhwIjogMTY0MTQ0ODk0MywgImlhdCI6IDE2NDE0NDcxNDMsICJhY2NvdW50bnVtYmVyIjogIjAyODA3NTc3NDMwMDAwMSIsICJtdG4iOiAiODEyMzIyNDY2OCIsICJvcGVuaWQiOiAiIiwgImF1ZCI6ICJNVk1BZ2VudCIsICJjX2hhc2giOiAiQy10bUJDN0JoS0l4MVc5QWdIaUNMQSIsICJuYW1lIjogIkxlYm93c2tpMyIsICJyZWFsbSI6ICIvdnp3IiwgInRva2VuVHlwZSI6ICJKV1RUb2tlbiIsICJsb2IiOiAidnp3IiB9.PZNyVGCs45hFt4kpTWzPwTKTsZ_78lt8H4aj9fGZ3hAQPv95gNV_i9ansP_vFKxCRvD5AGMKIXYgDNUZkZFpnp7B_XgIQbqmcrgrY9Yqt1i8FH6vtih6c-PLZTjV8wntsXo8ExMV77LsTqRUKEVPi5RgnrS2Q2FZqhrzfVflg70awrWlI5gh7nYy2ZhpcQaLES2HPjhV1uOkza92p75RZBDGkr5Fp2DleC_dNW-hwgc7hhZOmWgVgPF2hxDR2wqqPUa149g53uC0I_IrwFL5ZIm8mxWypvrMRhUP-bly1SmoiSBKfMjjvFiLB4ng_jLHeDNlUvuhmoKMHiPrhemLNg;Domain=.verizon.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://verizon.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "soeSessionID=null;Domain=.verizon.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://verizon.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "amID=0Mt3x-xv90MvqVF0qrRlS-U_j3Y3mVAlOhgNTUF7wFeIkk9J7-5;Domain=.verizon.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://verizon.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "punchOutFlow=L2;Domain=.verizon.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://verizon.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "channelID=VZW;Domain=.verizon.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://verizon.com"
|
||||
},
|
||||
{
|
||||
"Set-Cookie": "ostype=Android;Domain=.verizon.com;Expiry=300000;Path=/ ;Secure; HttpOnly",
|
||||
"URL": "https://verizon.com"
|
||||
}
|
||||
],
|
||||
"formRules": [
|
||||
{
|
||||
"groupName": "default",
|
||||
"effects": [
|
||||
{
|
||||
"fieldKey": "preferredLastName",
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "enableFormFieldEffect"
|
||||
},
|
||||
{
|
||||
"fieldKey": "greetingName",
|
||||
"rules": [
|
||||
{
|
||||
"type": "anyRequired",
|
||||
"fields": [
|
||||
"preferredFirstName"
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "disableFormFieldEffect"
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"regex": "^[a-zA-Z0-9](\\.?\\_?\\-?[a-zA-Z0-9]){0,}@[a-zA-Z0-9-_]+\\.([a-zA-Z0-9-_]{1,}\\.){0,}[a-zA-Z]{2,}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"emailID"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^(\\d{3})[\\s.-]{0,1}(\\d{3})[\\s.-]{0,1}(\\d{4})$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"alternateNo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex": "^[0-9a-zA-Z@\\.\\-\\’_?]{0,25}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"preferredFirstName",
|
||||
"preferredLastName",
|
||||
"greetingName"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"doNotClearCookies": true,
|
||||
"screenHeading": "Manage Profile",
|
||||
"header": {
|
||||
"moleculeName": "header",
|
||||
"molecule": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "headlineBody",
|
||||
"body": {
|
||||
"moleculeName": "label",
|
||||
"text": "We'll use your preferred name and pronouns online, in print, on the phone and in person to refer to you and your account."
|
||||
},
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Tell us about yourself."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "link",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "preferredNameWhyWeAreAsking"
|
||||
},
|
||||
"title": "Why are we asking?"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"pageStatNames": [
|
||||
"/vision/customer/profile",
|
||||
"/mf/get/email/verify/indicator",
|
||||
"/mf/cntrlr/mngpfl"
|
||||
]
|
||||
},
|
||||
"ModuleMap": {
|
||||
"requestCookies": {
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"type": "Success",
|
||||
"appSessionExtended": true,
|
||||
"code": "00000",
|
||||
"message": "0",
|
||||
"userMessage": "0",
|
||||
"topAlertTime": 0
|
||||
},
|
||||
"cookies": [
|
||||
{
|
||||
"name": "IDToken",
|
||||
"value": "eyAidHlwIjogIkpXVCIsICJraWQiOiAiNTVHbXJ1bUh0UnhOYXQ5TWF4Y3hSVXA5aEpjPSIsICJhbGciOiAiUlMyNTYiIH0.eyAiYXRfaGFzaCI6ICJLeHRGMFlZVm54NzdGMTdVWWdYVWx3IiwgImZpZG9ndWlkIjogImQ2MDU4Yjk1LTY1YjgtNDBmOS1iNDQ2LWRlZjIwZmY0YjBlMSIsICJzdWIiOiAiNjc3ODA0YzAtMzM4MC00NjJlLThjMTQtMDIyMzg1NGMyYmRhIiwgInJvbGUiOiAiYWNjb3VudEhvbGRlciIsICJhdWRpdFRyYWNraW5nSWQiOiAiMDkyNzc3MTItZGEwMC00NTI1LTk0ODMtODI1MGVkZjI4MGM0LTMzNjYyOSIsICJpc3MiOiAiaHR0cDovL2FjY2Vzc21ncnFhMy52ZXJpem9ud2lyZWxlc3MuY29tOjgwL3Z6YXV0aC9vYXV0aDIiLCAidG9rZW5OYW1lIjogImlkX3Rva2VuIiwgInFpZCI6ICIzMyIsICJhY3IiOiAiYWFsLTIiLCAidWlkIjogIjgxMjMyMjQ2NjhyZWdUb29sIiwgImF6cCI6ICJNVk1BZ2VudCIsICJhdXRoX3RpbWUiOiAxNjQxNDQ3MTM3LCAiZXhwIjogMTY0MTQ0ODk0MywgImlhdCI6IDE2NDE0NDcxNDMsICJhY2NvdW50bnVtYmVyIjogIjAyODA3NTc3NDMwMDAwMSIsICJtdG4iOiAiODEyMzIyNDY2OCIsICJvcGVuaWQiOiAiIiwgImF1ZCI6ICJNVk1BZ2VudCIsICJjX2hhc2giOiAiQy10bUJDN0JoS0l4MVc5QWdIaUNMQSIsICJuYW1lIjogIkxlYm93c2tpMyIsICJyZWFsbSI6ICIvdnp3IiwgInRva2VuVHlwZSI6ICJKV1RUb2tlbiIsICJsb2IiOiAidnp3IiB9.PZNyVGCs45hFt4kpTWzPwTKTsZ_78lt8H4aj9fGZ3hAQPv95gNV_i9ansP_vFKxCRvD5AGMKIXYgDNUZkZFpnp7B_XgIQbqmcrgrY9Yqt1i8FH6vtih6c-PLZTjV8wntsXo8ExMV77LsTqRUKEVPi5RgnrS2Q2FZqhrzfVflg70awrWlI5gh7nYy2ZhpcQaLES2HPjhV1uOkza92p75RZBDGkr5Fp2DleC_dNW-hwgc7hhZOmWgVgPF2hxDR2wqqPUa149g53uC0I_IrwFL5ZIm8mxWypvrMRhUP-bly1SmoiSBKfMjjvFiLB4ng_jLHeDNlUvuhmoKMHiPrhemLNg",
|
||||
"domain": ".vzw.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "soeSessionID",
|
||||
"domain": ".vzw.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "amID",
|
||||
"value": "0Mt3x-xv90MvqVF0qrRlS-U_j3Y3mVAlOhgNTUF7wFeIkk9J7-5",
|
||||
"domain": ".vzw.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "punchOutFlow",
|
||||
"value": "L2",
|
||||
"domain": ".vzw.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "channelID",
|
||||
"value": "VZW",
|
||||
"domain": ".vzw.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "ostype",
|
||||
"value": "Android",
|
||||
"domain": ".vzw.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "IDToken",
|
||||
"value": "eyAidHlwIjogIkpXVCIsICJraWQiOiAiNTVHbXJ1bUh0UnhOYXQ5TWF4Y3hSVXA5aEpjPSIsICJhbGciOiAiUlMyNTYiIH0.eyAiYXRfaGFzaCI6ICJLeHRGMFlZVm54NzdGMTdVWWdYVWx3IiwgImZpZG9ndWlkIjogImQ2MDU4Yjk1LTY1YjgtNDBmOS1iNDQ2LWRlZjIwZmY0YjBlMSIsICJzdWIiOiAiNjc3ODA0YzAtMzM4MC00NjJlLThjMTQtMDIyMzg1NGMyYmRhIiwgInJvbGUiOiAiYWNjb3VudEhvbGRlciIsICJhdWRpdFRyYWNraW5nSWQiOiAiMDkyNzc3MTItZGEwMC00NTI1LTk0ODMtODI1MGVkZjI4MGM0LTMzNjYyOSIsICJpc3MiOiAiaHR0cDovL2FjY2Vzc21ncnFhMy52ZXJpem9ud2lyZWxlc3MuY29tOjgwL3Z6YXV0aC9vYXV0aDIiLCAidG9rZW5OYW1lIjogImlkX3Rva2VuIiwgInFpZCI6ICIzMyIsICJhY3IiOiAiYWFsLTIiLCAidWlkIjogIjgxMjMyMjQ2NjhyZWdUb29sIiwgImF6cCI6ICJNVk1BZ2VudCIsICJhdXRoX3RpbWUiOiAxNjQxNDQ3MTM3LCAiZXhwIjogMTY0MTQ0ODk0MywgImlhdCI6IDE2NDE0NDcxNDMsICJhY2NvdW50bnVtYmVyIjogIjAyODA3NTc3NDMwMDAwMSIsICJtdG4iOiAiODEyMzIyNDY2OCIsICJvcGVuaWQiOiAiIiwgImF1ZCI6ICJNVk1BZ2VudCIsICJjX2hhc2giOiAiQy10bUJDN0JoS0l4MVc5QWdIaUNMQSIsICJuYW1lIjogIkxlYm93c2tpMyIsICJyZWFsbSI6ICIvdnp3IiwgInRva2VuVHlwZSI6ICJKV1RUb2tlbiIsICJsb2IiOiAidnp3IiB9.PZNyVGCs45hFt4kpTWzPwTKTsZ_78lt8H4aj9fGZ3hAQPv95gNV_i9ansP_vFKxCRvD5AGMKIXYgDNUZkZFpnp7B_XgIQbqmcrgrY9Yqt1i8FH6vtih6c-PLZTjV8wntsXo8ExMV77LsTqRUKEVPi5RgnrS2Q2FZqhrzfVflg70awrWlI5gh7nYy2ZhpcQaLES2HPjhV1uOkza92p75RZBDGkr5Fp2DleC_dNW-hwgc7hhZOmWgVgPF2hxDR2wqqPUa149g53uC0I_IrwFL5ZIm8mxWypvrMRhUP-bly1SmoiSBKfMjjvFiLB4ng_jLHeDNlUvuhmoKMHiPrhemLNg",
|
||||
"domain": ".verizon.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "soeSessionID",
|
||||
"domain": ".verizon.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "amID",
|
||||
"value": "0Mt3x-xv90MvqVF0qrRlS-U_j3Y3mVAlOhgNTUF7wFeIkk9J7-5",
|
||||
"domain": ".verizon.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "punchOutFlow",
|
||||
"value": "L2",
|
||||
"domain": ".verizon.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "channelID",
|
||||
"value": "VZW",
|
||||
"domain": ".verizon.com",
|
||||
"expiry": 300000
|
||||
},
|
||||
{
|
||||
"name": "ostype",
|
||||
"value": "Android",
|
||||
"domain": ".verizon.com",
|
||||
"expiry": 300000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,142 @@
|
||||
{
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"server": "10-74-165-96.ebiz.verizon.com-mf_prepayss01",
|
||||
"userMessage": "0",
|
||||
"code": "00000",
|
||||
"hideNotificationLogo": false,
|
||||
"message": "0",
|
||||
"buildNumber": "124",
|
||||
"type": "Success",
|
||||
"requestId": "2094e7b7-0325-4ca5-93a0-6462b99eb4fa",
|
||||
"topAlertTime": 0
|
||||
},
|
||||
"Page": {
|
||||
"analyticsData": {
|
||||
"vzdl.page.flow": "account",
|
||||
"vzwi.mvmapp.pageType": "planDetailsAEMPR",
|
||||
"vzdl.page.subFlow": "plan details",
|
||||
"vzdl.page.name": "/mf/account/prepaid plans/explore plans/plan details"
|
||||
},
|
||||
"footer": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName": "twoButtonView",
|
||||
"primaryButton": {
|
||||
"moleculeName": "button",
|
||||
"action": {
|
||||
"appContext": "mfPrepaySS",
|
||||
"analyticsData": {
|
||||
"vzdl.page.linkName": "Next"
|
||||
},
|
||||
"actionType": "openPage",
|
||||
"presentationStyle": "push",
|
||||
"pageType": "tbd"
|
||||
},
|
||||
"title": "Next",
|
||||
"groupName": "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"stack": {
|
||||
"moleculeName": "stack",
|
||||
"molecules": [
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "First name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 0,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "Firstname",
|
||||
"text": "",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "Last name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacing": 0,
|
||||
"moleculeName": "stackItem",
|
||||
"molecule": {
|
||||
"moleculeName": "textField",
|
||||
"fieldKey": "Lastname",
|
||||
"text": "",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"formRules": [
|
||||
{
|
||||
"groupName": "default",
|
||||
"rules": [
|
||||
{
|
||||
"regex": "^[a-zA-Z0-9._ ]{0,10}$",
|
||||
"type": "regex",
|
||||
"fields": [
|
||||
"Firstname",
|
||||
"Lastname"
|
||||
],
|
||||
"errorMessage": {
|
||||
"Firstname": "Your first name can only letters, numbers, spaces, and periods.",
|
||||
"Lastname": "Your last name can only letters, numbers, spaces, and periods."
|
||||
}
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
"Firstname",
|
||||
"Lastname"
|
||||
],
|
||||
"type": "regex",
|
||||
"regex": "^.{3,10}$",
|
||||
"errorMessage": {
|
||||
"Firstname":"Your first name must be between 3-10 characters.",
|
||||
"Lastname": "Your last name must be between 3-10 characters."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "allRequired",
|
||||
"ruleId": "requiredRule",
|
||||
"fields": [
|
||||
"Firstname",
|
||||
"Lastname"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"pageType": "tbd",
|
||||
"cache": false,
|
||||
"screenHeading": "New device Profile",
|
||||
"header": {
|
||||
"moleculeName": "header",
|
||||
"molecule": {
|
||||
"moleculeName": "headlineBody",
|
||||
"headline": {
|
||||
"moleculeName": "label",
|
||||
"text": "Who will be using this device?"
|
||||
},
|
||||
"body": {
|
||||
"moleculeName": "label",
|
||||
"text": "We'll use these details to set up this account."
|
||||
}
|
||||
}
|
||||
},
|
||||
"template": "stack",
|
||||
"navigationBar": {
|
||||
"moleculeName": "navigationBar",
|
||||
"title": "New device Profile"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"ResponseInfo" : {
|
||||
"type" : "Success",
|
||||
"code" : "00000"
|
||||
},
|
||||
"Page" : {
|
||||
"molecules" : [{
|
||||
"moleculeName" : "listItem",
|
||||
"molecule" : {
|
||||
"moleculeName" : "sampleWebViewBridge"
|
||||
}
|
||||
}
|
||||
],
|
||||
"footer" : {},
|
||||
"header" : {
|
||||
"moleculeName" : "header",
|
||||
"molecule" : {
|
||||
"moleculeName" : "headlineBody",
|
||||
"headline" : {
|
||||
"moleculeName" : "label",
|
||||
"text" : "Sample WebView Native Bridge"
|
||||
},
|
||||
"body" : {
|
||||
"moleculeName" : "label",
|
||||
"text" : "Below are the available bridges"
|
||||
}
|
||||
}
|
||||
},
|
||||
"template" : "list",
|
||||
"pageType" : ""
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,235 +0,0 @@
|
||||
{
|
||||
"ResponseInfo": {},
|
||||
"Page": {
|
||||
"pageType": "contactUs",
|
||||
"screenHeading": "Select an international plan",
|
||||
"template": "list",
|
||||
"molecules": [{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\ndafsdssfafs"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\n\nadsfa\nadfs"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafafttttt"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "bgVideoImageContainer",
|
||||
"video": {
|
||||
"moleculeName": "video",
|
||||
"showControls": false,
|
||||
"autoPlay": true,
|
||||
"alwaysReset":true,
|
||||
"video": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8"
|
||||
},
|
||||
"image": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://mobile.vzw.com/hybridClient/is/image/VerizonWireless/mva-pib-activation"
|
||||
},
|
||||
"molecule": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName":"twoButtonView",
|
||||
"primaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"6",
|
||||
"fillColor": "white",
|
||||
"textColor": "black",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "rtlVisitUs"
|
||||
}
|
||||
},
|
||||
"secondaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"y",
|
||||
"borderColor": "white",
|
||||
"textColor": "white",
|
||||
"action": {
|
||||
"actionType": "back"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\n\nadsfa\nadfs"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafafttttt"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "bgVideoImageContainer",
|
||||
"video": {
|
||||
"moleculeName": "video",
|
||||
"showControls": false,
|
||||
"autoPlay": true,
|
||||
"alwaysReset":true,
|
||||
"video": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8"
|
||||
},
|
||||
"image": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://mobile.vzw.com/hybridClient/is/image/VerizonWireless/mva-pib-activation"
|
||||
},
|
||||
"molecule": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName":"twoButtonView",
|
||||
"primaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"9",
|
||||
"fillColor": "white",
|
||||
"textColor": "black",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "rtlVisitUs"
|
||||
}
|
||||
},
|
||||
"secondaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"y",
|
||||
"borderColor": "white",
|
||||
"textColor": "white",
|
||||
"action": {
|
||||
"actionType": "back"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafaf\n\nadsfa\nadfs"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "label",
|
||||
"text": "afa\ndasfdsa\nadfadfda\nasadfsafa\nafsafsa\nafsadfas\nadffafafttttt"
|
||||
}
|
||||
},{
|
||||
"moleculeName":"listItem",
|
||||
"molecule": {
|
||||
"moleculeName": "bgVideoImageContainer",
|
||||
"video": {
|
||||
"moleculeName": "video",
|
||||
"showControls": false,
|
||||
"autoPlay": true,
|
||||
"alwaysReset":true,
|
||||
"video": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8"
|
||||
},
|
||||
"image": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://mobile.vzw.com/hybridClient/is/image/VerizonWireless/mva-pib-activation"
|
||||
},
|
||||
"molecule": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName":"twoButtonView",
|
||||
"primaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"12",
|
||||
"fillColor": "white",
|
||||
"textColor": "black",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "rtlVisitUs"
|
||||
}
|
||||
},
|
||||
"secondaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"y",
|
||||
"borderColor": "white",
|
||||
"textColor": "white",
|
||||
"action": {
|
||||
"actionType": "back"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}],
|
||||
"middle": {
|
||||
"moleculeName": "bgVideoImageContainer",
|
||||
"verticalAlignment": "trailing",
|
||||
"video": {
|
||||
"moleculeName": "video",
|
||||
"showControls": false,
|
||||
"autoPlay": true,
|
||||
"video": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8"
|
||||
},
|
||||
"image": {
|
||||
"moleculeName": "image",
|
||||
"image": "https://mobile.vzw.com/hybridClient/is/image/VerizonWireless/mva-pib-activation"
|
||||
},
|
||||
"molecule": {
|
||||
"moleculeName": "footer",
|
||||
"molecule": {
|
||||
"moleculeName":"twoButtonView",
|
||||
"primaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"x",
|
||||
"fillColor": "white",
|
||||
"textColor": "black",
|
||||
"action": {
|
||||
"actionType": "openPage",
|
||||
"pageType": "rtlVisitUs"
|
||||
}
|
||||
},
|
||||
"secondaryButton":{
|
||||
"moleculeName": "button",
|
||||
"title":"y",
|
||||
"borderColor": "white",
|
||||
"textColor": "white",
|
||||
"action": {
|
||||
"actionType": "back"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
168
JSONCreator_iOS/JSONCreator/JSON/Samples/Zenkey-editprofile.json
Normal file
168
JSONCreator_iOS/JSONCreator/JSON/Samples/Zenkey-editprofile.json
Normal file
@ -0,0 +1,168 @@
|
||||
{
|
||||
"ResponseInfo" : {
|
||||
"locale" : "EN",
|
||||
"server" : "twswcvfszwo21.tdc.vzwcorp.com-srv01_nmobilefirst01",
|
||||
"userMessage" : "0",
|
||||
"code" : "00000",
|
||||
"appSessionExtended" : true,
|
||||
"message" : "0",
|
||||
"mdn" : "9088003521",
|
||||
"buildNumber" : "145",
|
||||
"type" : "Success",
|
||||
"requestId" : "c83f2f43-8a99-4ff5-9ef6-f2ab39c5f01f",
|
||||
"topAlertTime" : 0
|
||||
},
|
||||
"Page" : {
|
||||
"stack" : {
|
||||
"moleculeName" : "stack",
|
||||
"molecules" : [
|
||||
{
|
||||
"moleculeName" : "stackItem",
|
||||
"molecule" : {
|
||||
"text" : "Jarrod",
|
||||
"fieldKey" : "firstName",
|
||||
"moleculeName" : "textField",
|
||||
"type" : "text",
|
||||
"title" : "First Name",
|
||||
"errorMessage" : "Enter valid first name."
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName" : "stackItem",
|
||||
"molecule" : {
|
||||
"text" : "Courtney",
|
||||
"fieldKey" : "lastName",
|
||||
"moleculeName" : "textField",
|
||||
"type" : "text",
|
||||
"title" : "Last Name",
|
||||
"errorMessage" : "Enter valid last name."
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName" : "stackItem",
|
||||
"molecule" : {
|
||||
"moleculeName" : "textField",
|
||||
"locked" : true,
|
||||
"errorMessage" : "Enter valid phone number.",
|
||||
"title" : "Contact Phone Number",
|
||||
"text" : "9088003521",
|
||||
"fieldKey" : "phone",
|
||||
"type" : "phone"
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName" : "stackItem",
|
||||
"molecule" : {
|
||||
"text" : "jarrod.courtney@verizon.com",
|
||||
"fieldKey" : "emailID",
|
||||
"moleculeName" : "textField",
|
||||
"type" : "text",
|
||||
"title" : "Email",
|
||||
"errorMessage" : "Enter valid email."
|
||||
}
|
||||
},
|
||||
{
|
||||
"moleculeName" : "stackItem",
|
||||
"molecule" : {
|
||||
"text" : "75038",
|
||||
"fieldKey" : "zipcode",
|
||||
"moleculeName" : "textField",
|
||||
"type" : "number",
|
||||
"title" : "Zip Code",
|
||||
"errorMessage" : "Enter valid zip code."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"template" : "stack",
|
||||
"footer" : {
|
||||
"moleculeName" : "footer",
|
||||
"molecule" : {
|
||||
"moleculeName" : "twoButtonView",
|
||||
"primaryButton" : {
|
||||
"groupName" : "default",
|
||||
"moleculeName" : "button",
|
||||
"title" : "Save",
|
||||
"action" : {
|
||||
"extraParameters" : {
|
||||
"id" : "userInfoID"
|
||||
},
|
||||
"actionType" : "openPage",
|
||||
"presentationStyle" : "push",
|
||||
"pageType" : "zenkeySaveProfile"
|
||||
}
|
||||
},
|
||||
"secondaryButton" : {
|
||||
"moleculeName" : "button",
|
||||
"action" : {
|
||||
"title" : "Delete Profile",
|
||||
"actionType" : "openPage",
|
||||
"pageType" : "zenkeyDeleteProfile"
|
||||
},
|
||||
"title" : "Delete Profile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"screenHeading" : "Personal Info",
|
||||
"hideFabOverlay" : true,
|
||||
"title" : "Personal Info",
|
||||
"header" : {
|
||||
"moleculeName" : "header",
|
||||
"molecule" : {
|
||||
"moleculeName" : "image",
|
||||
"image" : "zenkey_logo",
|
||||
"width" : 115,
|
||||
"height" : 16
|
||||
},
|
||||
"horizontalAlignment" : "leading"
|
||||
},
|
||||
"pageType" : "zenkeyEditProfile",
|
||||
"suppressPostLaunchRequests" : false,
|
||||
"formRules" : [
|
||||
{
|
||||
"groupName" : "default",
|
||||
"rules" : [
|
||||
{
|
||||
"type" : "allRequired",
|
||||
"fields" : [
|
||||
"emailID",
|
||||
"firstName",
|
||||
"lastName",
|
||||
"zipcode",
|
||||
"phone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex" : "^([A-Za-z]+[ -])+[A-Za-z]{1,32}$|^[A-Za-z]{1,32}$",
|
||||
"type" : "regex",
|
||||
"fields" : [
|
||||
"lastName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex" : "^([A-Za-z]+[ -])+[A-Za-z]{1,32}$|^[A-Za-z]{1,32}$",
|
||||
"type" : "regex",
|
||||
"fields" : [
|
||||
"firstName"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex" : "[A-Z0-9a-z._%+-]*[^. ]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}",
|
||||
"type" : "regex",
|
||||
"fields" : [
|
||||
"emailID"
|
||||
]
|
||||
},
|
||||
{
|
||||
"regex" : "^\\d{5}(?:[-\\s]\\d{4})?$",
|
||||
"type" : "regex",
|
||||
"fields" : [
|
||||
"zipcode"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tabBarHidden" : true
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
//
|
||||
// WebViewBridgeError.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/11/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MVMCore
|
||||
|
||||
//Reserved errors codes are 100-149
|
||||
public enum WebViewBridgeError: Error {
|
||||
case coreError(error: MVMCoreErrorObject)
|
||||
case other(code: Int, message: String)
|
||||
|
||||
//hard coded
|
||||
static var modelParse = Self.other(code: 100, message: "model_parse_error")
|
||||
static var unknown = Self.other(code: 101, message: "unknown_error")
|
||||
static var mismatchedModel = Self.other(code: 102, message: "bridge_models_do_not_match")
|
||||
static var mismatchedViewController = Self.other(code: 103, message: "viewControllers_do_not_match")
|
||||
}
|
||||
|
||||
extension WebViewBridgeError {
|
||||
public func toModel() -> WebViewBridgeErrorModel {
|
||||
|
||||
switch self{
|
||||
case .other(let errorCode, let message):
|
||||
return WebViewBridgeErrorModel(code: errorCode, message: message)
|
||||
|
||||
case .coreError(let error):
|
||||
return WebViewBridgeErrorModel(code: error.code, message: error.messageToLog ?? "no error message")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
//
|
||||
// WebViewBridgeErrorModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/11/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct WebViewBridgeErrorModel: Encodable {
|
||||
var code: Int
|
||||
var message: String
|
||||
|
||||
public init(code: Int, message: String) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
//
|
||||
// WebViewBridgeHandlerProtocol.swift
|
||||
// JSONCreator
|
||||
//
|
||||
// Created by Matt Bruce on 2/23/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MVMCore
|
||||
|
||||
public typealias CoreViewControllerable = UIViewController & MVMCoreViewControllerProtocol
|
||||
|
||||
open class WebViewBridgeHandler<Model: WebviewBridgeModelProtocol, ViewController: CoreViewControllerable>: ModelHandler<Model,[String: Any]?>, WebViewBridgeProtocol {
|
||||
|
||||
public var requestId: String = "123"
|
||||
public var viewController: ViewController?
|
||||
|
||||
public required init(baseModel: ModelProtocol, requestId: String, viewController: CoreViewControllerable?) throws {
|
||||
if let viewController = viewController {
|
||||
guard let castedViewController = viewController as? ViewController else {
|
||||
throw WebViewBridgeError.mismatchedViewController
|
||||
}
|
||||
self.viewController = castedViewController
|
||||
}
|
||||
self.requestId = requestId
|
||||
try super.init(baseModel: baseModel, additionalData: nil, delegateObject: nil)
|
||||
}
|
||||
|
||||
public required init(baseModel: ModelProtocol, additionalData: [AnyHashable : Any]?, delegateObject: DelegateObject?) throws {
|
||||
try super.init(baseModel: baseModel, additionalData: additionalData, delegateObject: delegateObject)
|
||||
}
|
||||
|
||||
//type erased object
|
||||
public func eraseToAnyHandler() -> AnyHandler<[String : Any]?, Error> {
|
||||
return AnyHandler(wrappedRequest: self)
|
||||
}
|
||||
|
||||
//type erasure method
|
||||
public func perform(completionHandler:@escaping ([String: Any]?) -> ()) {
|
||||
MVMCoreDispatchUtility.performBlock(inBackground: {
|
||||
self.perform(then: { result in
|
||||
switch result{
|
||||
case .success(let value):
|
||||
completionHandler(value)
|
||||
case .failure(_):
|
||||
completionHandler(["error": "blah"])
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
extension WebViewBridgeHandler {
|
||||
|
||||
/// Sends the JSON to the completionHandler
|
||||
/// - Parameter json: json sent to the completionHandler
|
||||
public func send(json: [String: Any]? = nil) {
|
||||
MVMCoreDispatchUtility.performBlock(onMainThread: {
|
||||
self.handler?(.success(json))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/// Takes the response and encodes to JSON
|
||||
/// - Parameter response: response that you want to send
|
||||
fileprivate func send(response: WebViewBridgeResponseModel){
|
||||
do{
|
||||
let json = try response.toJSONAny()
|
||||
send(json: json)
|
||||
} catch {
|
||||
if let errorObject = MVMCoreErrorObject.createErrorObject(for: error, location: #function) {
|
||||
MVMCoreLoggingHandler.addError(toLog: errorObject)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Sends the Error JSON to the completionHandler
|
||||
/// - Parameter error: typed WebViewBridgeError
|
||||
public func sendError(for error: WebViewBridgeError) {
|
||||
send(response: WebViewBridgeResponseModel(actionType: self.model.actionType, error: error.toModel(), data: nil))
|
||||
}
|
||||
|
||||
/// Sends the Success JSON to the completionHandler
|
||||
/// - Parameter object: Encodable Object to send
|
||||
public func sendSuccess<T:Encodable>(for object: T) {
|
||||
sendSuccess(for: object.toJSON())
|
||||
}
|
||||
|
||||
/// Sends the Success JSON to the completionHandler
|
||||
/// - Parameter json: JSON Dictionary to append t
|
||||
public func sendSuccess(for json: JSONDictionary? = nil) {
|
||||
var data: JSONValueDictionary?
|
||||
|
||||
//convert the JSONDictionary to JSONValueDictionary
|
||||
if let json = json {
|
||||
do{
|
||||
data = try json.toJSONValue()
|
||||
} catch {
|
||||
if let errorObject = MVMCoreErrorObject.createErrorObject(for: error, location: #function) {
|
||||
MVMCoreLoggingHandler.addError(toLog: errorObject)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//send the response
|
||||
send(response: WebViewBridgeResponseModel(actionType: self.model.actionType, error: nil, data: data))
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
//
|
||||
// MFWebBridge.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Bansal, Tapan on 26/05/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MVMCore
|
||||
|
||||
public protocol WebViewBridgeProtocol: MVMCoreHandlerProtocol {
|
||||
init(baseModel: ModelProtocol,
|
||||
requestId: String,
|
||||
viewController: CoreViewControllerable?) throws
|
||||
|
||||
func perform(completionHandler:@escaping ([String: Any]?) -> ())
|
||||
|
||||
func eraseToAnyHandler() -> AnyHandler<[String: Any]?, Swift.Error>
|
||||
}
|
||||
|
||||
extension WebViewBridgeProtocol {
|
||||
/// Handle encoding and errors
|
||||
public func getJSON(with bridgeModel: WebviewBridgeModelProtocol?) -> JSONDictionary? {
|
||||
guard let dataModel = bridgeModel,
|
||||
let json = dataModel.toJSON() else {
|
||||
// JSON parsing failed
|
||||
if let errorObject = MVMCoreErrorObject(title: MVMCoreGetterUtility.hardcodedString(withKey: HardcodedErrorTitle), message: MVMCoreGetterUtility.hardcodedString(withKey: HardcodedErrorUnableToProcess), messageToLog: MVMCoreGetterUtility.hardcodedString(withKey: HardcodedErrorUnableToProcess), code: ErrorCode.parsingJSON.rawValue, domain: ErrorDomainNative, location: String(describing: bridgeModel?.actionType)) {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return json
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
//
|
||||
// WebViewBridgeResponseModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/11/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MVMCore
|
||||
|
||||
/// Object that will be encoded and returned as JSON to the JSCallback
|
||||
public struct WebViewBridgeResponseModel: Encodable {
|
||||
//var requestId: String
|
||||
var actionType: String
|
||||
var error: WebViewBridgeErrorModel?
|
||||
var data: JSONValueDictionary?
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
//
|
||||
// WebviewBridgeModelProtocol.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Suresh, Kamlesh on 6/15/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MVMCore
|
||||
|
||||
public protocol WebviewBridgeModelProtocol: ModelProtocol {
|
||||
var actionType: String { get }
|
||||
var jsCallback: String? { get set }
|
||||
}
|
||||
|
||||
public extension WebviewBridgeModelProtocol {
|
||||
|
||||
var actionType: String { Self.identifier }
|
||||
|
||||
static var categoryCodingKey: String { "WebviewBridge" }
|
||||
|
||||
static var categoryName: String { "\(WebviewBridgeModelProtocol.self)" }
|
||||
}
|
||||
|
||||
public extension ModelRegistry {
|
||||
static func getBridgeModelForJSON(_ json: [String: Any]) throws -> WebviewBridgeModelProtocol {
|
||||
guard let actionName = json.optionalStringForKey(KeyActionType) else {
|
||||
throw ModelRegistry.Error.other(message: "actionType missing")
|
||||
}
|
||||
guard let type = ModelRegistry.getType(for: actionName, with: WebviewBridgeModelProtocol.self) else {
|
||||
throw ModelRegistry.Error.decoderErrorModelNotMapped(identifer: actionName)
|
||||
}
|
||||
guard let model = try type.decode(jsonDict: json) as? WebviewBridgeModelProtocol else {
|
||||
throw ModelRegistry.Error.decoderError
|
||||
}
|
||||
return model
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
//
|
||||
// WebviewBridgeTrialFraudDeviceCheckGet.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/1/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import DeviceCheck
|
||||
import MVMCore
|
||||
|
||||
extension WebViewBridgeError {
|
||||
static var deviceCheckNotSupported = Self.other(code: 150, message: "devicecheck_not_supported")
|
||||
static var deviceCheckGenerateToken = Self.other(code: 151, message: "devicecheck_generate_token")
|
||||
}
|
||||
|
||||
final class WebViewBridgeTrialFraudDeviceCheckGet: WebViewBridgeHandler<WebViewBridgeTrialFraudDeviceCheckGetModel, CoreViewControllerable> {
|
||||
|
||||
public override func perform() {
|
||||
|
||||
guard DCDevice.current.isSupported else {
|
||||
sendError(for: .deviceCheckNotSupported)
|
||||
return
|
||||
}
|
||||
|
||||
//get the device token and check for an error
|
||||
DCDevice.current.generateToken { (data, error) in
|
||||
|
||||
guard let data = data, error == nil else {
|
||||
self.sendError(for: .deviceCheckGenerateToken)
|
||||
return
|
||||
}
|
||||
|
||||
//create the string version of the token
|
||||
let deviceToken = data.base64EncodedString()
|
||||
|
||||
//call the api to get a result
|
||||
let params:JSONValueDictionary = [
|
||||
"deviceToken": JSONValue.init(stringLiteral: deviceToken)
|
||||
]
|
||||
|
||||
//build/launch from Action
|
||||
if let requestParameters = MVMCoreRequestParameters(pageType: "getTrialFraudDeviceCheck", extraParameters: params),
|
||||
let loadHandler = MVMCoreLoadHandler.sharedGlobal() {
|
||||
//execute the request
|
||||
loadHandler.sendRequest(requestParameters,
|
||||
locationForError: "WebViewBridgeTrialFraudDeviceCheckGet",
|
||||
requestFinished: { (json, error) in
|
||||
|
||||
//look for an error
|
||||
if let error = error {
|
||||
self.sendError(for: .coreError(error: error))
|
||||
|
||||
} //look for the data
|
||||
else if let json = json as? JSONDictionary,
|
||||
let page = json["Page"] as? JSONDictionary,
|
||||
let data = page["data"] as? JSONDictionary,
|
||||
let isSet = data["bit0"] as? Bool,
|
||||
let lastUpdateTime = data["last_update_time"] as? String {
|
||||
|
||||
//send the values we want
|
||||
self.sendSuccess(for: ["isSet": isSet, "last_update_time": lastUpdateTime])
|
||||
|
||||
}//nothing set yet
|
||||
else {
|
||||
self.sendSuccess(for: ["isSet": false])
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
//
|
||||
// WebviewBridgeTrialFraudDeviceCheckGetModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/1/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MVMCoreUI
|
||||
|
||||
class WebViewBridgeTrialFraudDeviceCheckGetModel: WebviewBridgeModelProtocol {
|
||||
|
||||
static var identifier: String = "trialFraudDeviceCheckGet"
|
||||
var jsCallback: String?
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
////
|
||||
//// WebviewBridgeTrialFraudDeviceCheckSet.swift
|
||||
//// MobileFirstFramework
|
||||
////
|
||||
//// Created by Matt Bruce on 2/1/22.
|
||||
//// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
////
|
||||
//
|
||||
//
|
||||
//import Foundation
|
||||
//import DeviceCheck
|
||||
//import MVMCore
|
||||
//
|
||||
//final class WebViewBridgeTrialFraudDeviceCheckSet: WebViewBridgeHandlerProtocol {
|
||||
//
|
||||
// typealias Model = WebViewBridgeTrialFraudDeviceCheckSetModel
|
||||
// typealias ViewController = CoreViewControllerable
|
||||
//
|
||||
// //properties
|
||||
// public var bridgeModel: Model!
|
||||
// public var completionHandler: (([String : Any]?) -> Void)!
|
||||
// public weak var viewController: ViewController?
|
||||
//
|
||||
// func runBridgeAction() {
|
||||
//
|
||||
// guard DCDevice.current.isSupported else {
|
||||
// sendError(for: .deviceCheckNotSupported)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// //get the device token and check for an error
|
||||
// DCDevice.current.generateToken { (data, error) in
|
||||
//
|
||||
// guard let data = data, error == nil else {
|
||||
// self.sendError(for: .deviceCheckGenerateToken)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// //create the string version of the token
|
||||
// let deviceToken = data.base64EncodedString()
|
||||
//
|
||||
// //call the api to get a result
|
||||
// let params:JSONValueDictionary = [
|
||||
// "deviceToken": JSONValue.init(stringLiteral: deviceToken),
|
||||
// "bit0": JSONValue.init(booleanLiteral: self.bridgeModel.value)
|
||||
// ]
|
||||
//
|
||||
// //build/launch from Action
|
||||
// if let requestParameters = MVMCoreRequestParameters(pageType: "setTrialFraudDeviceCheck", extraParameters: params),
|
||||
// let loadHandler = MVMCoreLoadHandler.sharedGlobal() {
|
||||
//
|
||||
// loadHandler.sendRequest(requestParameters,
|
||||
// locationForError: "WebViewBridgeTrialFraudDeviceCheckSet",
|
||||
// requestFinished: { (json, error) in
|
||||
//
|
||||
// //look for an error
|
||||
// if let error = error {
|
||||
// self.sendError(for: .coreError(error: error))
|
||||
//
|
||||
// } //look for the data
|
||||
// else if let json = json as? JSONDictionary,
|
||||
// let page = json["Page"] as? JSONDictionary,
|
||||
// let data = page["data"] as? JSONDictionary,
|
||||
// let statusCode = data["statusCode"] as? Int {
|
||||
//
|
||||
// if let error = data["error"] as? String, statusCode != 200{
|
||||
// //send the error for non 200 response
|
||||
// self.sendError(for: .other(code: statusCode, message: error))
|
||||
// } else if statusCode == 200 {
|
||||
// //send the error for non 200 response
|
||||
// self.sendSuccess()
|
||||
// } else {
|
||||
// //send the error for non 200 response
|
||||
// self.sendError(for: .other(code: statusCode, message: "none"))
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// else {
|
||||
// //send the error for non 200 response
|
||||
// self.sendError(for: .unknown)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@ -0,0 +1,16 @@
|
||||
////
|
||||
//// WebviewBridgeTrialFraudDeviceCheckSetModel.swift
|
||||
//// MobileFirstFramework
|
||||
////
|
||||
//// Created by Matt Bruce on 2/1/22.
|
||||
//// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
////
|
||||
//
|
||||
//import Foundation
|
||||
//
|
||||
//class WebViewBridgeTrialFraudDeviceCheckSetModel: WebviewBridgeModelProtocol {
|
||||
//
|
||||
// static var identifier: String = "trialFraudDeviceCheckSet"
|
||||
// var value: Bool
|
||||
// var jsCallback: String?
|
||||
//}
|
||||
@ -0,0 +1,67 @@
|
||||
//
|
||||
// WebviewBridgeTrialFraudUserGet.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/1/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MVMCore
|
||||
|
||||
extension WebViewBridgeError {
|
||||
static var userCheckICloudNotAvailable = Self.other(code: 150, message: "usercheck_icloud_not_available")
|
||||
static var userCheckUserDecode = Self.other(code: 151, message: "usercheck_data_decode")
|
||||
static var userCheckUserEncode = Self.other(code: 152, message: "usercheck_data_encode")
|
||||
static var userCheckUserSynchronization = Self.other(code: 153, message: "usercheck_data_synchronize")
|
||||
}
|
||||
|
||||
final class WebViewBridgeTrialFraudUserGet: WebViewBridgeHandler<WebViewBridgeTrialFraudUserGetModel, CoreViewControllerable> {
|
||||
|
||||
override func perform() {
|
||||
|
||||
//current user state, default is iCloud not available
|
||||
//therefore if bridgeModel.isICloudAvaiable() == false
|
||||
//then this state is sent back in the "sendSuccess" and
|
||||
//this method will NEVER do a "sendError" unless the baseClass throws one
|
||||
var state: TrialFraudUserState = .notAvail
|
||||
|
||||
//return dictionary
|
||||
var result: JSONDictionary = [:]
|
||||
|
||||
//ensure that iCloud is available for current user
|
||||
if model.isICloudAvaiable() {
|
||||
|
||||
//keyValueStore hooked up to the user's iCloud account
|
||||
let keyValStore = NSUbiquitousKeyValueStore()
|
||||
|
||||
//see if there is an existing object set for this user's iCloud account
|
||||
if let fraudUserData = keyValStore.data(forKey: TrialFraudUser.key) {
|
||||
|
||||
//decode the data into a object
|
||||
guard let fraudUser: TrialFraudUser = try? fraudUserData.decode() else {
|
||||
sendError(for: .userCheckUserDecode)
|
||||
return
|
||||
}
|
||||
|
||||
//current user state is "Set" since there is an existing value
|
||||
//and the user does have iCloud available
|
||||
state = .set
|
||||
//get the saved identifier out of the object within iCloud
|
||||
result["userIdentifier"] = fraudUser.identifier
|
||||
|
||||
} else {
|
||||
|
||||
//current user state is "Not Set" since there is NOT an existing value
|
||||
//and the user does have iCloud available
|
||||
state = .notSet
|
||||
}
|
||||
}
|
||||
|
||||
//set the state string value
|
||||
result["state"] = state.rawValue
|
||||
|
||||
//execute the completionHandler on the main thread
|
||||
sendSuccess(for: result)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
//
|
||||
// WebviewBridgeTrialFraudUserGetModel.swift
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Matt Bruce on 2/1/22.
|
||||
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct TrialFraudUser: Codable {
|
||||
static var key: String { return "trialFraudUser" }
|
||||
let identifier: String
|
||||
let date: Date
|
||||
}
|
||||
|
||||
enum TrialFraudUserState: String, Encodable {
|
||||
case notAvail = "Not Available"
|
||||
case notSet = "Not Set"
|
||||
case set = "Set"
|
||||
}
|
||||
|
||||
protocol TrialFraudUserModelProtocol {}
|
||||
|
||||
extension TrialFraudUserModelProtocol {
|
||||
func isICloudAvaiable() -> Bool {
|
||||
guard let _ = FileManager.default.ubiquityIdentityToken else {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
class WebViewBridgeTrialFraudUserGetModel: WebviewBridgeModelProtocol, TrialFraudUserModelProtocol {
|
||||
|
||||
static var identifier: String = "trialFraudUserCheckGet"
|
||||
var jsCallback: String?
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
////
|
||||
//// WebviewBridgeTrialFraudUserSet.swift
|
||||
//// MobileFirstFramework
|
||||
////
|
||||
//// Created by Matt Bruce on 2/1/22.
|
||||
//// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
////
|
||||
//
|
||||
//import Foundation
|
||||
//import MVMCore
|
||||
//
|
||||
//final class WebViewBridgeTrialFraudUserSetHandler: NSObject, WebViewBridgeProtocol {
|
||||
// private var handler = WebViewBridgeTrialFraudUserSet()
|
||||
// public func performBridgeAction(with bridgeModel: WebviewBridgeModelProtocol?, viewController: UIViewController & MVMCoreViewControllerProtocol, completionHandler: @escaping ([String : Any]?) -> ()) {
|
||||
// handler.performBridgeAction(with: bridgeModel, viewController: viewController, completionHandler: completionHandler)
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//final class WebViewBridgeTrialFraudUserSet: WebViewBridgeHandlerProtocol {
|
||||
//
|
||||
// typealias Model = WebViewBridgeTrialFraudUserSetModel
|
||||
// typealias ViewController = CoreViewControllerable
|
||||
//
|
||||
// //properties
|
||||
// public var bridgeModel: Model!
|
||||
// public var completionHandler: (([String : Any]?) -> Void)!
|
||||
// public weak var viewController: ViewController?
|
||||
//
|
||||
// func runBridgeAction() {
|
||||
//
|
||||
// guard bridgeModel.isICloudAvaiable() else {
|
||||
// sendError(for: .userCheckICloudNotAvailable)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// //see if there is an existing object set for this user's iCloud account
|
||||
// guard let data = try? TrialFraudUser(identifier: bridgeModel.userIdentifier, date: Date()).encode() else {
|
||||
// sendError(for: .userCheckUserEncode)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// //keyValueStore hooked up to the user's iCloud account
|
||||
// let keyValStore = NSUbiquitousKeyValueStore()
|
||||
//
|
||||
// //set the data
|
||||
// keyValStore.set(data, forKey: TrialFraudUser.key)
|
||||
//
|
||||
// //push the values
|
||||
// guard keyValStore.synchronize() else {
|
||||
// sendError(for: .userCheckUserSynchronization)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// sendSuccess(for: nil)
|
||||
//
|
||||
// }
|
||||
//}
|
||||
@ -0,0 +1,16 @@
|
||||
////
|
||||
//// WebviewBridgeTrialFraudUserSetModel.swift
|
||||
//// MobileFirstFramework
|
||||
////
|
||||
//// Created by Matt Bruce on 2/1/22.
|
||||
//// Copyright © 2022 Verizon Wireless. All rights reserved.
|
||||
////
|
||||
//
|
||||
//import Foundation
|
||||
//
|
||||
//class WebViewBridgeTrialFraudUserSetModel: WebviewBridgeModelProtocol, TrialFraudUserModelProtocol {
|
||||
//
|
||||
// static var identifier: String = "trialFraudUserCheckSet"
|
||||
// var userIdentifier: String
|
||||
// var jsCallback: String?
|
||||
//}
|
||||
Loading…
Reference in New Issue
Block a user