-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Components] trestle #13430 #16162
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
[Components] trestle #13430 #16162
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import app from "../../trestle.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "trestle-phone-validation", | ||
| name: "Phone Validation", | ||
| description: "Validates phone numbers and provides phone metadata. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Phone-Validation-API#operation/getPhoneValidation)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| phone: { | ||
| propDefinition: [ | ||
| app, | ||
| "phone", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.phoneValidation({ | ||
| $, | ||
| params: { | ||
| phone: this.phone, | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully executed phone validation"); | ||
| return response; | ||
| }, | ||
| }; | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import app from "../../trestle.app.mjs"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export default { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| key: "trestle-phone-valitadion", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: "Phone Valitadion", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| key: "trestle-phone-valitadion", | |
| name: "Phone Valitadion", | |
| key: "trestle-phone-validation", | |
| name: "Phone Validation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix spelling errors in component name and file path.
There's a consistent spelling error: "valitadion" should be "validation". This affects both the file/directory names and the component key, which could cause confusion for users.
Recommendations:
- Rename the directory from
phone-valitadiontophone-validation - Rename the file from
phone-valitadion.mjstophone-validation.mjs - Update the component key:
- key: "trestle-phone-valitadion",
+ key: "trestle-phone-validation",- name: "Phone Valitadion",
+ name: "Phone Validation",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import app from "../../trestle.app.mjs"; | |
| export default { | |
| key: "trestle-phone-valitadion", | |
| name: "Phone Valitadion", | |
| description: "Validates phone numbers and provides phone metadata. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Phone-Validation-API#operation/getPhoneValidation)", | |
| version: "0.0.1", | |
| type: "action", | |
| props: { | |
| app, | |
| phone: { | |
| propDefinition: [ | |
| app, | |
| "phone", | |
| ], | |
| }, | |
| }, | |
| async run({ $ }) { | |
| const response = await this.app.phoneValidation({ | |
| $, | |
| params: { | |
| phone: this.phone, | |
| }, | |
| }); | |
| $.export("$summary", "Successfully executed phone validation"); | |
| return response; | |
| }, | |
| }; | |
| import app from "../../trestle.app.mjs"; | |
| export default { | |
| key: "trestle-phone-validation", | |
| name: "Phone Validation", | |
| description: "Validates phone numbers and provides phone metadata. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Phone-Validation-API#operation/getPhoneValidation)", | |
| version: "0.0.1", | |
| type: "action", | |
| props: { | |
| app, | |
| phone: { | |
| propDefinition: [ | |
| app, | |
| "phone", | |
| ], | |
| }, | |
| }, | |
| async run({ $ }) { | |
| const response = await this.app.phoneValidation({ | |
| $, | |
| params: { | |
| phone: this.phone, | |
| }, | |
| }); | |
| $.export("$summary", "Successfully executed phone validation"); | |
| return response; | |
| }, | |
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| import app from "../../trestle.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "trestle-real-contact", | ||
| name: "Real Contact", | ||
| description: "Verifies and grades phone numbers, emails, and addresses. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Real-Contact-API#operation/realContact)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| phone: { | ||
| propDefinition: [ | ||
| app, | ||
| "phone", | ||
| ], | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| }, | ||
| email: { | ||
| propDefinition: [ | ||
| app, | ||
| "email", | ||
| ], | ||
| }, | ||
| ipAddress: { | ||
| propDefinition: [ | ||
| app, | ||
| "ipAddress", | ||
| ], | ||
| }, | ||
| street: { | ||
| propDefinition: [ | ||
| app, | ||
| "street", | ||
| ], | ||
| }, | ||
| city: { | ||
| propDefinition: [ | ||
| app, | ||
| "city", | ||
| ], | ||
| }, | ||
| stateCode: { | ||
| propDefinition: [ | ||
| app, | ||
| "stateCode", | ||
| ], | ||
| }, | ||
| postalCode: { | ||
| propDefinition: [ | ||
| app, | ||
| "postalCode", | ||
| ], | ||
| }, | ||
| countryCode: { | ||
| propDefinition: [ | ||
| app, | ||
| "countryCode", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.realContact({ | ||
| $, | ||
| params: { | ||
| phone: this.phone, | ||
| name: this.name, | ||
| email: this.email, | ||
| ip_address: this.ipAddress, | ||
| address: { | ||
| street_line_1: this.street, | ||
| city: this.city, | ||
| state_code: this.stateCode, | ||
| postal_code: this.postalCode, | ||
| country_code: this.countryCode, | ||
| }, | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully executed contact lookup"); | ||
| return response; | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import app from "../../trestle.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "trestle-reverse-phone", | ||
| name: "Reverse Phone", | ||
| description: "Offers comprehensive verification and enrichment of phone numbers. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Reverse-Phone-API#operation/getPhone)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| phone: { | ||
| propDefinition: [ | ||
| app, | ||
| "phone", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.reversePhone({ | ||
| $, | ||
| params: { | ||
| phone: this.phone, | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully executed reverse phone lookup"); | ||
| return response; | ||
| }, | ||
| }; |
Uh oh!
There was an error while loading. Please reload this page.