Closed carlbrugger closed 2 months ago
This update primarily focuses on refining import statements and enhancing event handling and error management across various modules in a TypeScript-based application. The modifications aim to streamline types and improve integration processes within the Flatfile system, ensuring more robust and efficient data handling and job processing.
File Path | Change Summary |
---|---|
.../add-data-transformation.mdx |
Updated TypeScript import statements to use type for FlatfileRecord . |
.../meet-the-workbook.mdx |
Enhanced event handling logic and added environmentId in API calls. |
.../submit-action.mdx |
Modified import statements to use import type for FlatfileListener and FlatfileEvent . |
.../export/webhook.mdx |
Renamed webhookUrl to url and updated NPM package versions. |
.../utils/response-rejection.mdx |
Updated responseRejectionHandler function to return JobCompleteDetails and improved error handling. |
apps/custom/add-data-transformation.mdx (22)
Near line 11: Possible spelling mistake found. Context: ...with event data inside a listener easy, Flatfile provides a suite of Plugins.... --- Near line 19: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ... Plugin fires whenever a row of data (a Record) is added or modified, allowing us to t... --- Near line 21: Possible spelling mistake found. Context: ... custom transformation. ### Import the recordHook plugin ```js javascript i... --- Near line 38: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...that modifies the first name value of a Record, converting it to lowercase: As you can see, the `recordHook` has been configured to run on any Shee... --- Near line 42: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...Hook` has been configured to run on any Sheet matching the slug "contacts". The secon... --- Near line 43: Possible spelling mistake found. Context: ..."contacts". The second parameter to the recordHook is a callback function where a Record, ... --- Near line 43: Did you mean the possessive pronoun “its”? Context: ... function where a Record, complete with it's own get and set methods, is the incomin... --- Near line 49: Possible spelling mistake found. Context: ...our listener still running? If not, run `npx flatfile@latest develop` again. Now, i... --- Near line 51: ‘new Record’ might be wordy. Consider a shorter alternative. Context: ...p` again. Now, in your Workbook, add a new Record. Enter a capitalized value in the First... --- Near line 51: Possible spelling mistake found. Context: ...he First Name field, then click away so Flatfile knows you've finished your current edit... --- Near line 53: Possible spelling mistake found. Context: ...me field, an Event will trigger and the `recordHook` will run the lowercase transformation ... --- Near line 57: Possible spelling mistake found. Context: ...ur first validation You can also use a `recordHook` to help validate data. For example, w... --- Near line 63: Possible spelling mistake found. Context: ...et file="quickstart/block2.mdx" /> ### Addl examples You can use any npm pack... --- Near line 65: Possible spelling mistake found. Context: ...### Addl examples You can use any npm package in a plugin. The possibl... --- Near line 67: Possible spelling mistake found. Context: ...he possible customizations are endless. Flatfile has a constantly expanding library of [... --- Near line 73: Possible spelling mistake found. Context: ...start/block3.mdx" /> Remember that the recordHook plugin fires once per modified record, ... --- Near line 73: Possible spelling mistake found. Context: ...ons you want on that Record in the same `recordHook`. ## Watch your data validate Check y... --- Near line 77: Possible spelling mistake found. Context: ... listener is still running. If not, run `npx flatfile@latest develop` again. Now, i... --- Near line 79: Possible spelling mistake found. Context: ...ate a Record. Enter a number inside the firstName field, or an invalid email address in t... --- Near line 79: Possible spelling mistake found. Context: ... in the email field, then click away so Flatfile knows you've finished your current edit... --- Near line 87: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...s the cleaned data: [Configure a submit Action](../custom/submit-action).apps/custom/meet-the-workbook.mdx (6)
Near line 8: Possible spelling mistake found. Context: ...Snippet file="shared/dxpbanner.mdx" /> Flatfile Spaces are micro-applications, each hav... --- Near line 9: Possible spelling mistake found. Context: ...ations, each having their own database, filestore, and auth. A Space is comprised of Work... --- Near line 9: Did you mean “comprises” or “consists of” or “is composed of”? Context: ... database, filestore, and auth. A Space is comprised of Workbooks, Files and Users. It can also... --- Near line 17: Possible spelling mistake found. Context: ...orming a POST request to the endpoint [/api/v1/spaces](https://reference.flatfile.c... --- Near line 288: Possible spelling mistake found. Context: ...ace So what did that just do? In your Flatfile account you should now be able to see y... --- Near line 304: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...to a cell. Typing in a cell (editing a Record) triggers an Event! ```ssh console ▶ ...apps/custom/submit-action.mdx (13)
Near line 11: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...alidation code is already responding to Record level Events, but a listener can respon... --- Near line 18: Possible spelling mistake found. Context: ...Action, defined in our Blueprint as the `submitAction`. ## Adding behavior to the action Th... --- Near line 22: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...ing behavior to the action The primary Action button is located in the upper right co... --- Near line 22: Consider adding a hyphen. Context: ...primary Action button is located in the upper right corner of your Workbook.plugins-docs/export/webhook.mdx (2)
Near line 41: Possible spelling mistake found. Context: ....com/package/node-fetch) ## Usage The `webhookEgress` plugin creates an action that will exp... --- Near line 43: Possible spelling mistake found. Context: ...t will initiate the egress. The webhook url can either be passed in as a parameter ...plugins-docs/utils/response-rejection.mdx (21)
Near line 21: Possible spelling mistake found. Context: ... rejected during an egress process. The `responseRejectionHandler` function is designed to consume a set ... --- Near line 24: Possible spelling mistake found. Context: ...were rejected. If the response value of `deleteSubmitted` is `true`, the successfully submitted ... --- Near line 25: Possible spelling mistake found. Context: ...lues will be deleted from the Sheet. If `deleteSubmitted` is false or not provided, a `Submissio... --- Near line 26: This phrasing could be wordy, consider using a more concise alternative. Context: ...et to either "Submitted" or "Rejected". In the end, it returns a `JobCompleteDetails` obje... --- Near line 27: Possible spelling mistake found. Context: ...or "Rejected". In the end, it returns a `JobCompleteDetails` object which can be used to complete t... --- Near line 27: Possible typo: you repeated a word Context: ...s` object which can be used to complete the the Flatfile Job. ```bash install npm i @f... --- Near line 27: Possible spelling mistake found. Context: ...t which can be used to complete the the Flatfile Job. ```bash install npm i @flatfile/u... --- Near line 35: Possible spelling mistake found. Context: ...nse Rejection Handler Function** - The `responseRejectionHandler` function is the main entry point of th... --- Near line 36: Possible spelling mistake found. Context: ...is object's structure is defined by the `RejectionResponse` interface. - The `responseRejectionHan... --- Near line 37: Possible spelling mistake found. Context: ...he `RejectionResponse` interface. - The `responseRejectionHandler` function returns a `Promise` that reso... --- Near line 112: Possible spelling mistake found. Context: ... ); } } ); } ``` ### **RejectionResponse Interface** The `RejectionResponse` in... --- Near line 114: Possible spelling mistake found. Context: ...## **RejectionResponse Interface** The `RejectionResponse` interface defines the structure of the... --- Near line 114: Possible spelling mistake found. Context: ... interface defines the structure of the `responseRejection` parameter object that is passed into t... --- Near line 114: Possible spelling mistake found. Context: ...arameter object that is passed into the `responseRejectionHandler` function. This `RejectionResponse`'s s... --- Near line 114: Possible spelling mistake found. Context: ...esponseRejectionHandler` function. This `RejectionResponse`'s structure is as follows: ```ts { //... --- Near line 143: Possible spelling mistake found. Context: ...bmission or a rejection submission. The `deleteSubmitted` property is optional. If true, the suc... --- Near line 147: Possible spelling mistake found. Context: ...des a helper functions to assist in the Flatfile Sheet update process: - `updateSheet`... --- Near line 148: Possible spelling mistake found. Context: ...e process: - `updateSheet`: Updates a Flatfile Sheet by adding the returned rejection ... --- Near line 152: Possible spelling mistake found. Context: ...* - The code defines three interfaces: `RejectionResponse`, `SheetRejections` and `RecordRejectio... --- Near line 152: Possible spelling mistake found. Context: ... three interfaces: `RejectionResponse`, `SheetRejections` and `RecordRejections`. These interfac... --- Near line 152: Possible spelling mistake found. Context: ...jectionResponse`, `SheetRejections` and `RecordRejections`. These interfaces represent the struct...
plugins-docs/export/webhook.mdx (4)
`26-27`: Parameter Renaming: Ensure all references to `webhookUrl` are updated to `url`. --- `32-37`: Updated NPM package versions: Verify that these versions are compatible with the rest of the project dependencies. --- `46-46`: Installation command update: Confirm that the installation command includes all necessary packages. --- `70-74`: TypeScript import: Good use of `import type` for better type safety.apps/custom/submit-action.mdx (1)
`45-45`: TypeScript import: Correct use of `import type` for `FlatfileListener` and `FlatfileEvent` to ensure type safety.apps/custom/add-data-transformation.mdx (1)
`30-31`: TypeScript import: Proper separation of type imports using `import type` for `FlatfileRecord`.plugins-docs/utils/response-rejection.mdx (3)
`27-27`: Ensure the `JobCompleteDetails` object correctly integrates with the job completion logic. --- `40-44`: TypeScript imports: Correct use of `import type` for better type safety. --- `46-109`: Updated `responseRejectionHandler` function: Verify the error handling and job completion logic.apps/custom/meet-the-workbook.mdx (2)
`42-60`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [45-137] Updated event handling logic: Ensure the new `environmentId` parameter is correctly used in API calls. --- `133-180`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [150-257] TypeScript version of the event handler: Confirm consistency with the JavaScript version and correct usage of types.
Summary by CodeRabbit
New Features
Refactor
Documentation