Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial upload #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/.project.json
**/.project.json
**/.typings
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ interface IClientAPI {
*/
isDemoMode(): Boolean;
/**
* This method is to get AppId used for application in Mobile Services on SAP Cloud Platform.
* This method is to get AppId used for application in SAP Mobile Services.
*/
getMobileServiceAppId(): string;
/**
Expand All @@ -186,7 +186,7 @@ interface IClientAPI {
*/
getMobileServiceEndpointUrl(): string;
/**
* This method is to send a request to application's mobile service on SAP Cloud Platform.
* This method is to send a request to application's SAP Mobile Services.
*
* * Example of the `params` parameter: <br/>
* ```json
Expand All @@ -200,7 +200,7 @@ interface IClientAPI {
* }
* ```
*
* @param path Relative path of request via application's mobile services on SAP Cloud Platform.
* @param path Relative path of request via application's SAP Mobile Services.
* @param params Optional. An object consists of `method`, `header`, and `body` of request.<br/>
* Note: If params is not given, request is set as GET method by default. See description above for the example.<br/>
* <li> `method` is string representing the HTTP Method to use. Supported value for methods are:
Expand All @@ -210,7 +210,7 @@ interface IClientAPI {
*/
sendRequest(path: string, params?: any): Promise<any>;
/**
* Send a request to application's mobile service on SAP Cloud Platform
* Send a request to application's SAP Mobile Services
* @deprecated - use the new sendRequest API
*/
sendMobileServiceRequest(path: string, params?: any): Promise<any>;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"DismissModal": "Action.Type.ClosePage.Canceled",
"CancelPendingActions": true,
"_Type": "Action.Type.ClosePage"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"DismissModal": "Action.Type.ClosePage.Completed",
"CancelPendingActions": false,
"_Type": "Action.Type.ClosePage"
}
3 changes: 3 additions & 0 deletions Showcase_Apps/PartialUploadDemo/Actions/ClosePage.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"_Type": "Action.Type.ClosePage"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Message": "Create entity failure - {#ActionResults:create/error}",
"Duration": 7,
"Animated": true,
"_Type": "Action.Type.BannerMessage"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Animated": true,
"Duration": 2,
"Message": "Entity created",
"IsIconHidden": true,
"OnSuccess": "/PartialUpload/Actions/CloseModalPage_Complete.action",
"_Type": "Action.Type.ToastMessage"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Animated": true,
"CompletionMessage": "Upload Complete",
"CompletionTimeout": 5,
"Message": "Customer Upload in Progres...",
"OnSuccess": "/PartialUpload/Actions/Customers/UploadCustomerOnly.action",
"_Type": "Action.Type.ProgressBanner"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"ActionResult": {
"_Name": "create"
},
"OnFailure": "/PartialUpload/Actions/CreateEntityFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/CreateEntitySuccessMessage.action",
"Properties": {
"City": "#Control:City/#Value",
"Country": "#Control:Country/#Value",
"CustomerId": "#Control:CustomerId/#Value",
"DateOfBirth": "#Control:DateOfBirth/#Value",
"EmailAddress": "#Control:EmailAddress/#Value",
"FirstName": "#Control:FirstName/#Value",
"HouseNumber": "#Control:HouseNumber/#Value",
"LastName": "#Control:LastName/#Value",
"PhoneNumber": "#Control:PhoneNumber/#Value",
"PostalCode": "#Control:PostalCode/#Value",
"Street": "#Control:Street/#Value"
},
"RequestOptions": {
"UploadCategory": "Customer"
},
"Target": {
"EntitySet": "Customers",
"Service": "/PartialUpload/Services/Sample.service"
},
"_Type": "Action.Type.ODataService.CreateEntity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ActionResult": {
"_Name": "delete"
},
"OnFailure": "/PartialUpload/Actions/DeleteEntityFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/DeleteEntitySuccessMessage.action",
"RequestOptions": {
"UploadCategory": "Customer"
},
"Target": {
"EntitySet": "Customers",
"ReadLink": "{@odata.readLink}",
"Service": "/PartialUpload/Services/Sample.service"
},
"_Type": "Action.Type.ODataService.DeleteEntity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"ActionResult": {
"_Name": "update"
},
"OnFailure": "/PartialUpload/Actions/UpdateEntityFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/UpdateEntitySuccessMessage.action",
"Properties": {
"City": "#Control:City/#Value",
"Country": "#Control:Country/#Value",
"DateOfBirth": "#Control:DateOfBirth/#Value",
"EmailAddress": "#Control:EmailAddress/#Value",
"FirstName": "#Control:FirstName/#Value",
"HouseNumber": "#Control:HouseNumber/#Value",
"LastName": "#Control:LastName/#Value",
"PhoneNumber": "#Control:PhoneNumber/#Value",
"PostalCode": "#Control:PostalCode/#Value",
"Street": "#Control:Street/#Value"
},
"RequestOptions": {
"UploadCategory": "Customer"
},
"Target": {
"EntitySet": "Customers",
"ReadLink": "{@odata.readLink}",
"Service": "/PartialUpload/Services/Sample.service"
},
"_Type": "Action.Type.ODataService.UpdateEntity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ModalPageFullscreen": false,
"ModalPage": true,
"PageToOpen": "/PartialUpload/Pages/Customers/Customers_Create.page",
"_Type": "Action.Type.Navigation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_Type": "Action.Type.Navigation",
"PageToOpen": "/PartialUpload/Pages/Customers/Customers_Detail.page"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ModalPageFullscreen": false,
"ModalPage": true,
"PageToOpen": "/PartialUpload/Pages/Customers/Customers_Edit.page",
"_Type": "Action.Type.Navigation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_Type": "Action.Type.Navigation",
"PageToOpen": "/PartialUpload/Pages/Customers/Customers_List.page"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ActionResult": {
"_Name": "sync"
},
"OnFailure": "/PartialUpload/Actions/Service/SyncFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/Service/SyncSuccessMessage.action",
"Service": "/PartialUpload/Services/Sample.service",
"UploadCategories": [
"Customer"
],
"_Type": "Action.Type.OfflineOData.Upload"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Message": "Delete entity failure - {#ActionResults:delete/error}",
"Duration": 7,
"Animated": true,
"_Type": "Action.Type.BannerMessage"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Animated": true,
"Duration": 2,
"Message": "Entity deleted",
"Icon": "",
"IsIconHidden": false,
"NumberOfLines": 2,
"OnSuccess": "/PartialUpload/Actions/CloseModalPage_Complete.action",
"_Type": "Action.Type.ToastMessage"
}
3 changes: 3 additions & 0 deletions Showcase_Apps/PartialUploadDemo/Actions/Logout.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"_Type": "Action.Type.Logout"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ModalPageFullscreen": false,
"ModalPage": true,
"PageToOpen": "/PartialUpload/Pages/Products/Products_Create.page",
"_Type": "Action.Type.Navigation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_Type": "Action.Type.Navigation",
"PageToOpen": "/PartialUpload/Pages/Products/Products_Detail.page"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ModalPageFullscreen": false,
"ModalPage": true,
"PageToOpen": "/PartialUpload/Pages/Products/Products_Edit.page",
"_Type": "Action.Type.Navigation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_Type": "Action.Type.Navigation",
"PageToOpen": "/PartialUpload/Pages/Products/Products_List.page"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Animated": true,
"CompletionMessage": "Upload Complete",
"CompletionTimeout": 5,
"Message": "Product Upload in Progress...",
"OnSuccess": "/PartialUpload/Actions/Products/UploadProductOnly.action",
"_Type": "Action.Type.ProgressBanner"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"CreateLinks": [],
"OnFailure": "/PartialUpload/Actions/CreateEntityFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/CreateEntitySuccessMessage.action",
"Properties": {
"Category": "#Control:Category/#Value",
"CategoryName": "#Control:CategoryName/#Value",
"CurrencyCode": "#Control:CurrencyCode/#Value",
"DimensionDepth": "#Control:DimensionDepth/#Value",
"DimensionHeight": "#Control:DimensionHeight/#Value",
"DimensionUnit": "#Control:DimensionUnit/#Value",
"DimensionWidth": "#Control:DimensionWidth/#Value",
"LongDescription": "#Control:LongDescription/#Value",
"Name": "#Control:Name/#Value",
"PictureUrl": "#Control:PictureUrl/#Value",
"Price": "#Control:Price/#Value",
"ProductId": "#Control:ProductId/#Value",
"QuantityUnit": "#Control:QuantityUnit/#Value",
"ShortDescription": "#Control:ShortDescription/#Value",
"SupplierId": "#Control:SupplierId/#Value",
"UpdatedTimestamp": "#Control:UpdatedTimestamp/#Value",
"Weight": "#Control:Weight/#Value",
"WeightUnit": "#Control:WeightUnit/#Value"
},
"Target": {
"EntitySet": "Products",
"Service": "/PartialUpload/Services/Sample.service"
},
"ActionResult": {
"_Name": "create"
},
"_Type": "Action.Type.ODataService.CreateEntity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"Target": {
"EntitySet": "Products",
"Service": "/PartialUpload/Services/Sample.service",
"ReadLink": "{@odata.readLink}"
},
"OnSuccess": "/PartialUpload/Actions/DeleteEntitySuccessMessage.action",
"OnFailure": "/PartialUpload/Actions/DeleteEntityFailureMessage.action",
"ActionResult": {
"_Name": "delete"
},
"_Type": "Action.Type.ODataService.DeleteEntity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"ActionResult": {
"_Name": "update"
},
"OnFailure": "/PartialUpload/Actions/UpdateEntityFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/UpdateEntitySuccessMessage.action",
"Properties": {
"CategoryName": "",
"CurrencyCode": "#Control:CurrencyCode/#Value",
"DimensionDepth": "#Control:DimensionDepth/#Value",
"DimensionHeight": "#Control:DimensionHeight/#Value",
"DimensionUnit": "#Control:DimensionUnit/#Value",
"DimensionWidth": "#Control:DimensionWidth/#Value",
"LongDescription": "#Control:LongDescription/#Value",
"Name": "#Control:Name/#Value",
"Price": "#Control:Price/#Value",
"QuantityUnit": "#Control:QuantityUnit/#Value",
"ShortDescription": "#Control:ShortDescription/#Value",
"Weight": "#Control:Weight/#Value",
"WeightUnit": "#Control:WeightUnit/#Value"
},
"RequestOptions": {
"UploadCategory": "Product"
},
"Target": {
"EntitySet": "Products",
"ReadLink": "{@odata.readLink}",
"Service": "/PartialUpload/Services/Sample.service"
},
"_Type": "Action.Type.ODataService.UpdateEntity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ActionResult": {
"_Name": "sync"
},
"OnFailure": "/PartialUpload/Actions/Service/SyncFailureMessage.action",
"OnSuccess": "/PartialUpload/Actions/Service/SyncSuccessMessage.action",
"Service": "/PartialUpload/Services/Sample.service",
"UploadCategories": [
"Product"
],
"_Type": "Action.Type.OfflineOData.Upload"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"_Type": "Action.Type.OfflineOData.Close",
"Service": "/PartialUpload/Services/Sample.service",
"Force": true,
"ActionResult": {
"_Name": "close"
},
"OnSuccess": "/PartialUpload/Actions/Service/CloseOfflineSuccessMessage.action",
"OnFailure": "/PartialUpload/Actions/Service/CloseOfflineFailureMessage.action"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Message": "Failure closing data service - {#ActionResults:close/error}",
"NumberOfLines": 1,
"Duration": 3,
"Animated": true,
"IsIconHidden": true,
"_Type": "Action.Type.ToastMessage"
}
Loading