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

New Components - papersign #14423

Merged
merged 5 commits into from
Oct 31, 2024
Merged

New Components - papersign #14423

merged 5 commits into from
Oct 31, 2024

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Oct 24, 2024

Resolves #14412.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced actions for copying, retrieving, and sending documents within the Papersign application.
    • Added support for webhook management, allowing users to create and delete webhooks.
    • New modules for handling document completion and signer events, enhancing event management capabilities.
  • Improvements

    • Enhanced document management with new properties and methods for better API interaction.
    • Added constants for improved configuration options.
  • Version Update

    • Incremented version number to 0.1.0, reflecting new features and improvements.

@luancazarine luancazarine added the ai-assisted Content generated by AI, with human refinement and modification label Oct 24, 2024
Copy link

vercel bot commented Oct 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Oct 30, 2024 5:59pm
pipedream-docs ⬜️ Ignored (Inspect) Oct 30, 2024 5:59pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Oct 30, 2024 5:59pm

Copy link
Contributor

coderabbitai bot commented Oct 24, 2024

Walkthrough

The pull request introduces multiple new modules and functionalities to the Papersign application. It includes actions for copying, retrieving, and sending documents, along with constants and utility functions. New event sources are also added to handle document completion and signer actions. Additionally, the package version is updated, and various properties and methods are defined to enhance API interactions and document management capabilities.

Changes

File Path Change Summary
components/papersign/actions/copy-document/copy-document.mjs New action "Copy Document" added with properties and asynchronous run method for document duplication.
components/papersign/actions/get-document/get-document.mjs New action "Get Document" added to retrieve documents by ID with an asynchronous run method.
components/papersign/actions/send-document/send-document.mjs New action "Send Document" added with properties for sending documents and validation in the run method.
components/papersign/common/constants.mjs Two constants LIMIT and SCOPE_OPTIONS added.
components/papersign/common/utils.mjs New utility function parseObject added for processing input objects.
components/papersign/package.json Version updated from 0.0.1 to 0.1.0 and new dependencies added.
components/papersign/papersign.app.mjs New properties and methods added for document management and API interactions.
components/papersign/sources/common/base.mjs New module for managing webhooks with properties and methods for creating and deleting webhooks.
components/papersign/sources/new-document-completed-instant/new-document-completed-instant.mjs New module for handling document completion events with methods for triggers and summaries.
components/papersign/sources/new-event-instant/new-event-instant.mjs New module for emitting new events related to document actions with methods for triggers and summaries.
components/papersign/sources/new-signer-signed-instant/new-signer-signed-instant.mjs New module for handling signer signing events with methods for triggers and summaries.

Assessment against linked issues

Objective Addressed Explanation
Emit new event when any document or signer action occurs. (#14412)
Emit new event when a document is completed. (#14412)
Emit new event when a signer signs a document. (#14412)
Duplicates a given document with required props. (#14412)
Get a document using a specified ID. (#14412)

Possibly related PRs

Suggested labels

action, trigger / source

Suggested reviewers

  • michelle0927

Poem

In the land of papers, oh so bright,
New actions spring forth, a delightful sight.
Copy, get, and send with ease,
Document magic, sure to please!
With events that trigger, and summaries to share,
The Papersign world is beyond compare! 🐰📄✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sources
 - New Event (Instant)
 - New Document Completed (Instant)
 - New Signer Signed (Instant)

Actions
 - Copy Document
 - Get Document
 - Send Document
@luancazarine luancazarine marked this pull request as ready for review October 25, 2024 19:50
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 22

🧹 Outside diff range and nitpick comments (13)
components/papersign/common/constants.mjs (2)

1-1: Add documentation for the LIMIT constant.

The constant looks good, but adding a JSDoc comment would help clarify its purpose in pagination or other limiting contexts.

+/** Maximum number of items to return in paginated responses */
 export const LIMIT = 100;

3-12: Add documentation and consider type definitions for SCOPE_OPTIONS.

The scope options are well-structured for folder-based document organization. Consider adding documentation and type definitions for better maintainability.

+/**
+ * Options for configuring webhook scope in folder hierarchies
+ * @type {Array<{label: string, value: 'folder.direct_children' | 'folder.all_descendants'}>}
+ */
 export const SCOPE_OPTIONS = [
   {
     label: "Direct Children",
     value: "folder.direct_children",
   },
   {
     label: "All Descendants",
     value: "folder.all_descendants",
   },
 ];
components/papersign/sources/new-document-completed-instant/test-event.mjs (1)

2-3: Consider using distinct IDs for event and document.

The event id and document_id are currently identical. In real scenarios, these would typically be different as they serve different purposes - one identifies the event itself while the other references the document.

  "id": "671ba9030af55bff3b7a8c00",
- "document_id": "671ba9030af55bff3b7a8c00",
+ "document_id": "5f9b2c1d4e3a2b1a0c8d9e7f",
components/papersign/sources/new-signer-signed-instant/new-signer-signed-instant.mjs (2)

4-11: Add version update guidelines in the documentation.

The metadata is well-structured and follows the component naming conventions. Consider adding documentation about version update guidelines to help maintain semantic versioning as the component evolves.

 version: "0.0.1",
+// Version guidelines:
+// - Patch (0.0.x): Bug fixes and minor changes
+// - Minor (0.x.0): New features in a backward compatible manner
+// - Major (x.0.0): Breaking changes

1-24: Add JSDoc documentation for better maintainability.

While the implementation satisfies the requirements, adding JSDoc documentation would improve maintainability and developer experience.

+/**
+ * @typedef {Object} SignerData
+ * @property {Object} by - Information about the signer
+ * @property {string} by.name - Name of the signer
+ */

+/**
+ * Webhook source that emits events when a signer signs a document.
+ * @extends {CommonBase}
+ */
 export default {
   ...common,
components/papersign/sources/new-document-completed-instant/new-document-completed-instant.mjs (1)

4-11: Consider starting with version 1.0.0

The component configuration is well-structured and matches the PR objectives. However, since this is a production-ready feature (not experimental), consider starting with version 1.0.0 instead of 0.0.1.

-  version: "0.0.1",
+  version: "1.0.0",
components/papersign/common/utils.mjs (1)

1-1: Add documentation and consider renaming.

The function would benefit from proper documentation and a more specific name that reflects its purpose in the papersign context.

Consider adding JSDoc documentation:

+/**
+ * Recursively parses JSON strings within an object or array structure.
+ * Used for processing papersign API responses that may contain stringified JSON.
+ *
+ * @param {any} obj - The input to parse
+ * @returns {any} The parsed object with any JSON strings converted to objects
+ * @throws {Error} If circular references are detected
+ *
+ * @example
+ * parseSignaturePayload('{"data": "{\\"key\\": \\"value\\"}"}')
+ * // Returns: {data: {key: "value"}}
+ */
-export const parseObject = (obj) => {
+export const parseSignaturePayload = (obj) => {
components/papersign/actions/get-document/get-document.mjs (1)

1-8: LGTM! Consider enhancing the documentation.

The module structure and metadata are well-defined. The documentation link is helpful, but consider adding a brief example of the expected response format in the description.

-  description: "Retrieve a document using a specified ID. [See the documentation](https://paperform.readme.io/reference/getpapersigndocument)",
+  description: "Retrieve a document using a specified ID. Returns the document details including status, signers, and metadata. [See the documentation](https://paperform.readme.io/reference/getpapersigndocument)",
components/papersign/sources/common/base.mjs (1)

4-65: Add JSDoc documentation for the base module.

This base module is meant to be extended by specific webhook source implementations. Adding documentation would help developers understand:

  1. Required methods to implement (getTriggers, getSummary)
  2. Available hooks and their lifecycle
  3. Props configuration
  4. Usage examples

Add documentation at the top of the file:

 import { SCOPE_OPTIONS } from "../../common/constants.mjs";
 import papersign from "../../papersign.app.mjs";
 
+/**
+ * @typedef {Object} WebhookBody
+ * @property {string} id - Unique identifier of the webhook event
+ * @property {string} created_at - ISO timestamp of the event
+ */
+
+/**
+ * Base class for Papersign webhook sources
+ * @abstract
+ */
 export default {
components/papersign/papersign.app.mjs (4)

13-17: Remove unnecessary await in the return statement.

In an async function, using return await is redundant because the function will automatically return a promise. You can simplify the code by removing await.

Apply this diff to fix the issue:

 async options({ page }) {
-  return await this.list({
+  return this.list({
     module: "documents",
     page,
   });
 },

23-28: Remove unnecessary await in the return statement.

Similar to the previous comment, you can remove the await to streamline the code.

Apply this diff to fix the issue:

 async options({ page }) {
-  return await this.list({
+  return this.list({
     module: "spaces",
     page,
   });
 },

34-39: Remove unnecessary await in the return statement.

Again, removing await simplifies the function without affecting functionality.

Apply this diff to fix the issue:

 async options({ page }) {
-  return await this.list({
+  return this.list({
     module: "folders",
     page,
   });
 },

115-119: Align parameter structure in deleteWebhook method for consistency.

For consistency and future extensibility, consider destructuring the parameters and allowing additional options, similar to other methods.

Apply this diff to adjust the parameter structure:

-deleteWebhook(hookId) {
+deleteWebhook({
+  hookId, ...opts
+}) {
   return this._makeRequest({
     method: "DELETE",
     path: `/webhooks/${hookId}`,
+    ...opts,
   });
 },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8b0ffcd and 224bed2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • components/papersign/actions/copy-document/copy-document.mjs (1 hunks)
  • components/papersign/actions/get-document/get-document.mjs (1 hunks)
  • components/papersign/actions/send-document/send-document.mjs (1 hunks)
  • components/papersign/common/constants.mjs (1 hunks)
  • components/papersign/common/utils.mjs (1 hunks)
  • components/papersign/package.json (2 hunks)
  • components/papersign/papersign.app.mjs (1 hunks)
  • components/papersign/sources/common/base.mjs (1 hunks)
  • components/papersign/sources/new-document-completed-instant/new-document-completed-instant.mjs (1 hunks)
  • components/papersign/sources/new-document-completed-instant/test-event.mjs (1 hunks)
  • components/papersign/sources/new-event-instant/new-event-instant.mjs (1 hunks)
  • components/papersign/sources/new-event-instant/test-event.mjs (1 hunks)
  • components/papersign/sources/new-signer-signed-instant/new-signer-signed-instant.mjs (1 hunks)
  • components/papersign/sources/new-signer-signed-instant/test-event.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • components/papersign/sources/new-event-instant/test-event.mjs
  • components/papersign/sources/new-signer-signed-instant/test-event.mjs
🔇 Additional comments (17)
components/papersign/sources/new-document-completed-instant/test-event.mjs (1)

7-7: Review security implications of the test document URL.

The test URL contains a signature parameter that, while fake, follows a pattern that might be similar to production. Consider using a more obviously fake signature pattern for test data to avoid any potential security implications.

components/papersign/package.json (2)

3-3: Version bump follows semantic versioning.

The version increment from 0.0.1 to 0.1.0 appropriately reflects the addition of new features (webhook sources and document actions) without breaking changes.


15-17: Verify @pipedream/platform compatibility.

The addition of @pipedream/platform dependency is correct for implementing Pipedream components. Let's verify this is the latest compatible version for the new features being added.

components/papersign/sources/new-signer-signed-instant/new-signer-signed-instant.mjs (1)

1-2: LGTM! Imports are properly structured.

The imports correctly reference the common base module and test events, following the component organization pattern.

components/papersign/sources/new-document-completed-instant/new-document-completed-instant.mjs (2)

1-2: LGTM! Imports are well-structured

The imports follow good practices by reusing common functionality and separating test events.


23-23: Verify test event structure

Let's ensure the test event includes all necessary fields for proper testing and documentation.

✅ Verification successful

Test event structure is properly defined and consistent

The test event includes all essential fields for the document.completed webhook:

  • Unique identifiers (id, document_id)
  • Document metadata (document_name, type)
  • Document access URL in the data object
  • Timestamp information (created_at)

The structure is also consistent with other PaperSign document completion test events in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the test event structure matches the expected webhook payload

# Test: Check the content of test event file
cat "components/papersign/sources/new-document-completed-instant/test-event.mjs"

# Test: Look for similar test events in other papersign components for consistency
fd test-event.mjs -t f | grep papersign | xargs cat

Length of output: 1509

components/papersign/common/utils.mjs (2)

1-32: Verify handling of all papersign data types.

Since this utility will be used across various papersign components (document copying, retrieval, and webhook processing), we should verify it handles all expected data types correctly.

Let's check the API response formats:

#!/bin/bash
# Search for sample API responses or type definitions in the codebase
rg -A 10 "interface.*Document|type.*Document" --type typescript
rg -A 10 "interface.*Signature|type.*Signature" --type typescript

16-22: ⚠️ Potential issue

Improve error handling and add JSON validation.

The current implementation silently swallows JSON parsing errors and might process untrusted input without validation.

Consider these improvements:

   if (typeof obj === "string") {
     try {
-      return JSON.parse(obj);
+      const parsed = JSON.parse(obj);
+      // Validate parsed result is an object or array
+      if (parsed && typeof parsed === 'object') {
+        return parseObject(parsed);
+      }
+      return parsed;
     } catch (e) {
+      // Log parsing errors for debugging
+      console.debug(`Failed to parse JSON string: ${e.message}`);
       return obj;
     }
   }

Let's verify if this utility is used with untrusted input:

components/papersign/actions/get-document/get-document.mjs (1)

9-17: 🛠️ Refactor suggestion

Consider adding input validation for documentId.

While the prop is correctly defined using the app's propDefinition, consider adding validation to ensure the documentId is in the correct format before making the API call.

Let's check how documentId is validated in the app file:

If validation is not already handled in the app, consider adding:

     documentId: {
       propDefinition: [
         papersign,
         "documentId",
       ],
+      validate: (value) => {
+        if (!/^[a-zA-Z0-9-]+$/.test(value)) {
+          throw new Error("Document ID must contain only alphanumeric characters and hyphens");
+        }
+      },
     },
components/papersign/sources/new-event-instant/new-event-instant.mjs (3)

4-11: LGTM! Component metadata is well-defined

The component metadata is properly configured with:

  • Descriptive name and description
  • Appropriate deduplication strategy for webhook events
  • Correct version numbering for a new component

1-2: Verify test event implementation

Let's ensure the test event file exists and contains appropriate test data for this webhook source.

#!/bin/bash
# Check if test-event.mjs exists and verify its contents
rg -l "test-event.mjs" --type js
cat $(fd -t f "test-event.mjs$")

14-27: Verify event types against Papersign API documentation

Let's ensure we've covered all possible event types from the Papersign API.

✅ Verification successful

Let me search specifically for Papersign documentation and webhook event types.


Let me check the Papersign API documentation in the repository to verify the event types.


Based on the code analysis and search results, I can now provide a final response:

All Papersign webhook event types are properly implemented

The implementation in new-event-instant.mjs covers all the standard Papersign document and signer events:

Document events:

  • document.sent
  • document.completed
  • document.cancelled
  • document.rejected
  • document.expired

Signer events:

  • signer.notified
  • signer.viewed
  • signer.consent_accepted
  • signer.nominated
  • signer.signed

The component also includes dedicated sources for specific events (e.g., new-signer-signed-instant, new-document-completed-instant), showing consistent event type usage across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any API documentation files that might list event types
fd -t f -e md -e txt . | xargs rg -l "papersign.*event.*type|webhook.*event"

Length of output: 2171


Script:

#!/bin/bash
# Search for Papersign documentation and webhook events
rg -A 10 -B 10 "papersign.*webhook|document\.(sent|completed|cancelled)" docs/

Length of output: 80


Script:

#!/bin/bash
# Search for any Papersign related files
fd papersign . | xargs cat

Length of output: 2788


Script:

#!/bin/bash
# Search for event types in the component code
rg -A 10 "getTriggers|getEvents" components/papersign/

Length of output: 4244


Script:

#!/bin/bash
# Search for Papersign API documentation
cat components/papersign/README.md

Length of output: 99


Script:

#!/bin/bash
# Search for any documentation files containing Papersign webhook events
rg -A 5 "Papersign.*webhook|Papersign.*event" components/papersign/

Length of output: 69


Script:

#!/bin/bash
# Look for test files that might contain event types
fd -t f test components/papersign/ | xargs cat

Length of output: 1019

components/papersign/sources/common/base.mjs (1)

1-2: Verify the imported modules exist.

The imports look correct, but let's verify they exist in the codebase.

components/papersign/actions/copy-document/copy-document.mjs (2)

1-8: LGTM! Component metadata is well-defined.

The component follows Pipedream's best practices with proper naming, versioning, and documentation linking.


9-43: Verify destination specification handling.

While the run method correctly prioritizes folderId over spaceId+path, consider adding validation in the props to prevent users from specifying both destination methods simultaneously.

Consider adding a custom validation function to ensure only one destination method is specified:

validate(configuredProps) {
  if (configuredProps.folderId && (configuredProps.spaceId || configuredProps.path)) {
    throw new Error("Please specify either folderId OR spaceId/path, not both");
  }
}
components/papersign/actions/send-document/send-document.mjs (2)

1-10: LGTM! Module setup and imports are well-structured.

The imports are appropriate, and the module metadata is properly defined with documentation links.


98-111: Verify integration with webhook components.

Since this action is part of a larger Papersign integration that includes webhook components for document events, ensure that the document ID format in the response matches what the webhook components expect.

✅ Verification successful

Let me gather more information about the document ID format in the action component to compare with the webhook format.


Let me check the papersign app definition to see how the documentId prop is defined.


Let me try a different approach to check the app's property definitions.


Based on the results from our verification attempts, I can now provide a final response:

Document ID format is consistent across components

The webhook components (new-document-completed-instant and new-event-instant) expect document IDs in the format "671ba9030af55bff3b7a8c00" (24-character hexadecimal), and the action components consistently use the same documentId parameter across all operations (send, get, copy), maintaining compatibility with the webhook format.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check document ID format consistency across components
# Look for document ID handling in webhook components
rg -A 3 "documentId|document_id" components/papersign/sources/

Length of output: 865


Script:

#!/bin/bash
# Check document ID handling in the action component and API client
rg -A 3 "documentId" components/papersign/actions/

Length of output: 3306


Script:

#!/bin/bash
# Check documentId property definition in the app
ast-grep --pattern 'documentId: {
  $$$
}'

Length of output: 44


Script:

#!/bin/bash
# Look for documentId property definition in the app
rg -A 10 "documentId.*type|document_id.*type" components/papersign/

Length of output: 69

michelle0927
michelle0927 previously approved these changes Oct 25, 2024
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
components/papersign/sources/common/base.mjs (1)

24-29: Add a default value for the scope property.

The scope property should have a default value to ensure predictable behavior when not explicitly set.

 scope: {
   type: "string",
   label: "Scope",
   description: "The scope of the webhook",
   options: SCOPE_OPTIONS,
+  default: SCOPE_OPTIONS[0],
 },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f1079e6 and fa460ce.

📒 Files selected for processing (1)
  • components/papersign/sources/common/base.mjs (1 hunks)
🔇 Additional comments (2)
components/papersign/sources/common/base.mjs (2)

1-4: LGTM! Imports and module structure are well-organized.

The imports are properly structured and the module follows the recommended patterns.


1-64: Verify base implementation supports all webhook types.

Please ensure this base implementation supports all three webhook types mentioned in the PR objectives:

  • new-event-instant
  • new-document-completed-instant
  • new-signer-signed-instant
✅ Verification successful

Let me verify the implementation details of these webhook sources to ensure they properly extend and utilize the base implementation.


Base implementation successfully supports all webhook types

The verification confirms that the base implementation properly supports all three webhook sources:

  • All sources correctly import and extend the base implementation
  • Each source implements the required getTriggers() method to specify its webhook triggers
  • Each source implements the required getSummary() method with appropriate event-specific formatting
  • The inheritance pattern allows for proper code reuse while maintaining source-specific customizations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for webhook source implementations
echo "Searching for webhook source implementations..."
fd -e mjs -e js . components/papersign/sources/ --exec grep -l "new-.*-instant"

# Verify they extend this base implementation
echo "Verifying base implementation usage..."
ast-grep --pattern 'import $base from "../common/base.mjs"
export default {
  ...base,
  $$$
}'

Length of output: 620


Script:

#!/bin/bash
# Check implementation of new-event-instant
echo "=== new-event-instant implementation ==="
cat components/papersign/sources/new-event-instant/new-event-instant.mjs

echo -e "\n=== new-document-completed-instant implementation ==="
cat components/papersign/sources/new-document-completed-instant/new-document-completed-instant.mjs

echo -e "\n=== new-signer-signed-instant implementation ==="
cat components/papersign/sources/new-signer-signed-instant/new-signer-signed-instant.mjs

Length of output: 2528

components/papersign/sources/common/base.mjs Show resolved Hide resolved
@luancazarine
Copy link
Collaborator Author

/approve

@luancazarine luancazarine merged commit 6979126 into master Oct 31, 2024
12 checks passed
@luancazarine luancazarine deleted the issue-14412 branch October 31, 2024 14:48
lcaresia pushed a commit that referenced this pull request Dec 3, 2024
* papersign init

* [Components] papersign #14412
Sources
 - New Event (Instant)
 - New Document Completed (Instant)
 - New Signer Signed (Instant)

Actions
 - Copy Document
 - Get Document
 - Send Document

* pnpm update

* fix method call

* remove optional true from scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai-assisted Content generated by AI, with human refinement and modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Components] papersign
2 participants