![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@trayio/connector-utils
Advanced tools
Common utility functions used in connectors.
TODO: add usage guide
Error
Class representing the base error for all connector errors
GenericError
Class representing a UserInputError
GenericError
Class representing a ConnectorError
GenericError
Class representing a ConnectorError
GenericError
Class representing a ConnectorError
GenericError
Class representing a ConnectorError
Takes value paths as mustached values and returns correct DDL outputs. A custom flag is in place to allow for keeping integer types for the value key if required, as mustaching will convert an integer to string.
Takes value paths as explicit strings and returns correct DDL outputs.
Maps object keys and formats according to specified casing.
Return a User Input Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Return a Connector Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Return a API Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Return a oAuth Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Return a No Trigger Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Generates a lookup object for DDL operations.
Recursively removes empty objects, arrays and strings from a collection. It's important to note that this method will remove objects if they become empty as a result of the nested key/value containing an empty object (the same goes for arrays).
Error
Class representing the base error for all connector errors
Kind: global class
Extends: Error
GenericError
Class representing a UserInputError
Kind: global class
Extends: GenericError
Custom error to throw for issues concerning User Input.
Param | Type | Description |
---|---|---|
message | String | Custom error message to return. |
...errorArgs | any | Error args allowing for extra parameters native to the normal Error class. |
GenericError
Class representing a ConnectorError
Kind: global class
Extends: GenericError
Custom error to throw for issues concerning the Connector.
Param | Type | Description |
---|---|---|
message | String | Custom error message to return. |
...errorArgs | any | Error args allowing for extra parameters native to the normal Error class. |
GenericError
Class representing a ConnectorError
Kind: global class
Extends: GenericError
Custom error to throw for issues concerning the Api;;.
Param | Type | Description |
---|---|---|
message | String | Custom error message to return. |
...errorArgs | any | Error args allowing for extra parameters native to the normal Error class. |
GenericError
Class representing a ConnectorError
Kind: global class
Extends: GenericError
Custom error to throw when an oAuth token has expired.
Param | Type | Description |
---|---|---|
message | String | Custom error message to return. |
...errorArgs | any | Error args allowing for extra parameters native to the normal Error class. |
GenericError
Class representing a ConnectorError
Kind: global class
Extends: GenericError
Custom error to throw for issues when a trigger request is ignored.
Param | Type | Description |
---|---|---|
message | String | Custom error message to return. |
...errorArgs | any | Error args allowing for extra parameters native to the normal Error class. |
Takes value paths as mustached values and returns correct DDL outputs. A custom flag is in place to allow for keeping integer types for the value key if required, as mustaching will convert an integer to string.
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
object | Object | The collection with keys to iterate over and format. | |
text | String | The path for the required text value. | |
value | String | The path for the required value, value. | |
isInteger | Boolean | false | Flag for whether or not the value field needs to an integer rather than a string. |
Takes value paths as explicit strings and returns correct DDL outputs.
Kind: global function
Param | Type | Description |
---|---|---|
object | Object | The collection with keys to iterate over and format. |
textPath | String | The path for the required text value. |
valuePath | String | The path fot the required value, value. |
Maps object keys and formats according to specified casing.
Kind: global function
Param | Type | Description |
---|---|---|
collection | Object | The collection with keys to iterate over and format. |
iteratee | function | The format function used to format keys IE Lodash _.camelCase('some_string'). |
Return a User Input Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Kind: global function
Param | Type | Description |
---|---|---|
message | String | The error message to be returned. |
body | any | Custom body to be returned when providing more error context. |
Return a Connector Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Kind: global function
Param | Type | Description |
---|---|---|
message | String | The error message to be returned. |
body | any | Custom body to be returned when providing more error context. |
Return a API Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Kind: global function
Param | Type | Description |
---|---|---|
message | String | The error message to be returned. |
body | any | Custom body to be returned when providing more error context. |
Return a oAuth Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Kind: global function
Param | Type | Description |
---|---|---|
message | String | The error message to be returned. |
body | any | Custom body to be returned when providing more error context. |
Return a No Trigger Error with option to pass a body argument. The use case for this over the custom Error class is to pass a body to provide error context.
Kind: global function
Param | Type | Description |
---|---|---|
message | String | The error message to be returned. |
body | any | Custom body to be returned when providing more error context. |
Generates a lookup object for DDL operations.
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
message | String | The DDL operation that is run when the lookup is executed. | |
[step_settings] | Object | {} | The custom step settings for the lookup. |
Recursively removes empty objects, arrays and strings from a collection. It's important to note that this method will remove objects if they become empty as a result of the nested key/value containing an empty object (the same goes for arrays).
Kind: global function
Param | Type | Description |
---|---|---|
collection | Object | The collection from which to remove empty objects. |
FAQs
Common utility functions used in connectors.
The npm package @trayio/connector-utils receives a total of 0 weekly downloads. As such, @trayio/connector-utils popularity was classified as not popular.
We found that @trayio/connector-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.