-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[Components] remote_retrieval #12998 #13716
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4175f31
Added actions
lcaresia de7e522
Update components/remote_retrieval/actions/get-new-orders/get-new-ord…
lcaresia ea6be31
Merge branch 'master' into issue-12998
lcaresia 5f8b0c0
Requested changes done
lcaresia 9b029bf
Merge branch 'master' into issue-12998
lcaresia d3f634d
Update package.json
lcaresia 339d4f5
Requested changes done
lcaresia b9276cf
Fixed requested changes
lcaresia 2723091
pnpm
lcaresia a2eabaf
pnpm
lcaresia e758e3a
pnpm
lcaresia c6d0022
Update create-order.mjs
lcaresia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
177 changes: 177 additions & 0 deletions
177
components/remote_retrieval/actions/create-order/create-order.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,177 @@ | ||
| import app from "../../remote_retrieval.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "remote_retrieval-create-order", | ||
| name: "Create Order", | ||
| description: "Create order in Remote Retrieval. [See the documentation](https://www.remoteretrieval.com/api-documentation/#create-order)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| typeOfEquipment: { | ||
| propDefinition: [ | ||
| app, | ||
| "typeOfEquipment", | ||
| ], | ||
| }, | ||
| orderType: { | ||
| propDefinition: [ | ||
| app, | ||
| "orderType", | ||
| ], | ||
| }, | ||
| email: { | ||
| propDefinition: [ | ||
| app, | ||
| "email", | ||
| ], | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| }, | ||
| addressLine1: { | ||
| propDefinition: [ | ||
| app, | ||
| "addressLine1", | ||
| ], | ||
| }, | ||
| addressLine2: { | ||
| propDefinition: [ | ||
| app, | ||
| "addressLine2", | ||
| ], | ||
| }, | ||
| addressCity: { | ||
| propDefinition: [ | ||
| app, | ||
| "addressCity", | ||
| ], | ||
| }, | ||
| addressState: { | ||
| propDefinition: [ | ||
| app, | ||
| "addressState", | ||
| ], | ||
| }, | ||
| addressCountry: { | ||
| propDefinition: [ | ||
| app, | ||
| "addressCountry", | ||
| ], | ||
| }, | ||
| addressZip: { | ||
| propDefinition: [ | ||
| app, | ||
| "addressZip", | ||
| ], | ||
| }, | ||
| phone: { | ||
| propDefinition: [ | ||
| app, | ||
| "phone", | ||
| ], | ||
| }, | ||
| returnPersonName: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnPersonName", | ||
| ], | ||
| }, | ||
| returnCompanyName: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnCompanyName", | ||
| ], | ||
| }, | ||
| returnAddressLine1: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnAddressLine1", | ||
| ], | ||
| }, | ||
| returnAddressLine2: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnAddressLine2", | ||
| ], | ||
| }, | ||
| returnAddressCity: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnAddressCity", | ||
| ], | ||
| }, | ||
| returnAddressState: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnAddressState", | ||
| ], | ||
| }, | ||
| returnAddressCountry: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnAddressCountry", | ||
| ], | ||
| }, | ||
| returnAddressZip: { | ||
| propDefinition: [ | ||
| app, | ||
| "returnAddressZip", | ||
| ], | ||
| }, | ||
| companyEmail: { | ||
| propDefinition: [ | ||
| app, | ||
| "companyEmail", | ||
| ], | ||
| }, | ||
| companyPhone: { | ||
| propDefinition: [ | ||
| app, | ||
| "companyPhone", | ||
| ], | ||
| }, | ||
| }, | ||
|
|
||
| async run({ $ }) { | ||
| const response = await this.app.createOrder({ | ||
| $, | ||
| data: { | ||
| orders: [ | ||
| { | ||
| type_of_equipment: this.typeOfEquipment, | ||
| order_type: this.orderType, | ||
| employee_info: { | ||
| email: this.email, | ||
| name: this.name, | ||
| address_line_1: this.addressLine1, | ||
| address_line_2: this.addressLine2, | ||
| address_city: this.addressCity, | ||
| address_state: this.addressState, | ||
| address_country: this.addressCountry, | ||
| address_zip: this.addressZip, | ||
| phone: this.phone, | ||
| }, | ||
| company_info: { | ||
| return_person_name: this.returnPersonName, | ||
| return_company_name: this.returnCompanyName, | ||
| return_address_line_1: this.returnAddressLine1, | ||
| return_address_line_2: this.returnAddressLine2, | ||
| return_address_city: this.returnAddressCity, | ||
| return_address_state: this.returnAddressState, | ||
| return_address_country: this.returnAddressCountry, | ||
| return_address_zip: this.returnAddressZip, | ||
| email: this.companyEmail, | ||
| phone: this.companyPhone, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully created order"); | ||
| return response; | ||
| }, | ||
| }; |
28 changes: 28 additions & 0 deletions
28
components/remote_retrieval/actions/get-completed-orders/get-completed-orders.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import app from "../../remote_retrieval.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "remote_retrieval-get-completed-orders", | ||
| name: "Get Completed Orders", | ||
| description: "Get a list of orders where payment has already been completed. [See the documentation](https://www.remoteretrieval.com/api-documentation/#completed-orders)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| page: { | ||
| propDefinition: [ | ||
| app, | ||
| "page", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.getCompletedOrders({ | ||
| $, | ||
| params: { | ||
| page: this.page, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Successfully sent request. Response: '${response.message}'`); | ||
| return response; | ||
| }, | ||
| }; |
28 changes: 28 additions & 0 deletions
28
components/remote_retrieval/actions/get-new-orders/get-new-orders.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import app from "../../remote_retrieval.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "remote_retrieval-get-new-orders", | ||
| name: "Get New Orders", | ||
| description: "Get a list of orders where payment has already been completed. [See the documentation](https://www.remoteretrieval.com/api-documentation/#new-orders)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| page: { | ||
| propDefinition: [ | ||
| app, | ||
| "page", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.getNewOrders({ | ||
| $, | ||
| params: { | ||
| page: this.page, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Successfully sent request. Response: '${response.message}'`); | ||
| return response; | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| const BASE_URL = "https://remoteretrieval.com/RR-enterprise/remoteretrieval/public/index.php"; | ||
| const VERSION_PATH = "/api/v1"; | ||
| const DEFAULT_MAX = 600; | ||
|
|
||
| export default { | ||
| BASE_URL, | ||
| VERSION_PATH, | ||
| DEFAULT_MAX, | ||
| export default { | ||
| EQUIPMENT_TYPES: [ | ||
| "Laptop", | ||
| "Monitor", | ||
| ], | ||
| ORDER_TYPES: [ | ||
| "Return To Company", | ||
| "Sell this Equipment", | ||
| ], | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,6 @@ | |
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.0.0" | ||
| "@pipedream/platform": "^3.0.1" | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.