@pageproof/sdk-pr 626.0.1761859278746 → 627.0.1761187227370

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,10 @@
1
- /**
2
- * Get a workflow-specific error message with pluralization support
3
- * @param {number} code - The error code
4
- * @param {number} count - The number of items that failed (for pluralization)
5
- * @returns {string} User-friendly error message
6
- */
7
- export function getWorkflowErrorMessage(code: number, count?: number): string;
8
1
  /**
9
2
  * Get a user-friendly error message for an error code
10
3
  * @param {number} code - The error code
11
4
  * @param {string} fallbackMessage - Fallback message if code is not mapped
12
- * @param {object} responseData - Optional response data object (for workflow errors with Count)
13
5
  * @returns {string} User-friendly error message
14
6
  */
15
- export function getErrorMessage(code: number, fallbackMessage: string, responseData: any): string;
7
+ export function getErrorMessage(code: number, fallbackMessage: string): string;
16
8
  export default ERROR_MESSAGES;
17
9
  /**
18
10
  * Error code to user-friendly message mapping
@@ -81,4 +73,8 @@ declare const ERROR_MESSAGES: {
81
73
  122: string;
82
74
  123: string;
83
75
  7000: string;
76
+ 8001: string;
77
+ 8002: string;
78
+ 8003: string;
79
+ 8004: string;
84
80
  };
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;exports.getWorkflowErrorMessage=getWorkflowErrorMessage;exports.getErrorMessage=getErrorMessage;var ERROR_MESSAGES={400:"Bad request: The request contains invalid data.",401:"Unauthorized: Please log in to access this resource.",404:"Not found: The requested resource does not exist.",406:"Authentication failed.",407:"Authentication failed.",1010:"Authentication failed.",1011:"Authentication failed.",1012:"Operation failed. Please contact support.",1013:"Invalid format.",1014:"Too many requests. Please try again later.",1015:"Access unavailable. Please contact support.",1016:"System error. Please contact support.",1017:"Authentication failed.",1018:"Invalid or expired code.",1019:"Invalid or expired code.",1020:"System error. Please contact support.",1021:"Access denied. Please contact support.",1022:"Invalid or expired code.",1023:"Invalid or expired code.",1024:"System error. Please contact support.",4001:"File upload failed: Unable to queue file for processing.",4002:"File upload failed: Queueing process failed.",4005:"File upload failed: Invalid filename. Please use only letters, numbers, and standard characters.",4006:"File upload failed: This file is already attached to another proof.",4007:"File upload failed: File is missing a file extension. Please ensure your file has a proper extension (e.g., .pdf, .jpg).",4008:"File upload failed: Unsupported file type. Please check the supported file formats.",100:"Access denied. Please contact support if you believe this is an error.",101:"Access denied. Please contact support if you believe this is an error.",102:"Resource temporarily unavailable. Please try again later.",124:"Access denied. Please contact support if you believe this is an error.",125:"Access denied. Please contact support if you believe this is an error.",126:"Access denied. Please contact support if you believe this is an error.",402:"Access denied. Please contact support if you believe this is an error.",403:"Operation not supported.",1e3:"Resource not found.",1001:"Failed to create resource.",1002:"Failed to update resource.",1003:"Failed to delete resource.",1004:"Resource already exists.",1005:"System configuration error. Please contact support.",2010:"Invalid format.",2011:"Invalid request.",3e3:"Account upgrade required. Please contact support.",6005:"Feature not available. Please contact support.",3001:"Group workflow has already been started.",3002:"A group with this name already exists.",3003:"Cannot delete group: active proofs exist.",3004:"No proofs found for this group.",5e3:"Resource already exists.",6e3:"Invalid format. Please check your input.",6001:"Verification failed. Please contact support.",6002:"Invalid format. Please check your input.",6003:"Required information missing. Please contact support.",6004:"Resource unavailable. Please try a different option.",6500:"Prerequisites not met. Please contact support.",106:"System error. Please try again later.",110:"System error. Please try again later.",120:"System error. Please try again later.",121:"System error. Please try again later.",122:"Operation failed. Please try again.",123:"Operation failed. Please try again.",7e3:"Internal server error. Please try again later."};var WORKFLOW_ERROR_TEMPLATES={8001:{singular:"User not found.",plural:"Users not found."},8002:{singular:"User already exists in this workflow step.",plural:"Users already exist in this workflow step."},8003:{singular:"Invalid user data - userId or email required."},8004:{singular:"Cannot add Mandatory or Gatekeeper role to a completed workflow step.",plural:"Cannot add Mandatory or Gatekeeper roles to a completed workflow step."},8005:{singular:"User is not in this workflow step.",plural:"Users are not in this workflow step."}};function getWorkflowErrorMessage(code){var count=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var template=WORKFLOW_ERROR_TEMPLATES[code];if(!template){return ERROR_MESSAGES[code]||"Unknown error (Code: "+code+")"}var plural=count>1;return plural&&template.plural?template.plural:template.singular}function getErrorMessage(code,fallbackMessage,responseData){var isWorkflowError=code>=8001&&code<=8005;if(isWorkflowError&&responseData&&responseData.Count){return getWorkflowErrorMessage(code,responseData.Count)}if(isWorkflowError){return getWorkflowErrorMessage(code,1)}return ERROR_MESSAGES[code]||fallbackMessage||"Unknown error occurred (Code: "+code+"). Please contact support."}exports.default=ERROR_MESSAGES;
1
+ "use strict";exports.__esModule=true;exports.getErrorMessage=getErrorMessage;var ERROR_MESSAGES={400:"Bad request: The request contains invalid data.",401:"Unauthorized: Please log in to access this resource.",404:"Not found: The requested resource does not exist.",406:"Authentication failed.",407:"Authentication failed.",1010:"Authentication failed.",1011:"Authentication failed.",1012:"Operation failed. Please contact support.",1013:"Invalid format.",1014:"Too many requests. Please try again later.",1015:"Access unavailable. Please contact support.",1016:"System error. Please contact support.",1017:"Authentication failed.",1018:"Invalid or expired code.",1019:"Invalid or expired code.",1020:"System error. Please contact support.",1021:"Access denied. Please contact support.",1022:"Invalid or expired code.",1023:"Invalid or expired code.",1024:"System error. Please contact support.",4001:"File upload failed: Unable to queue file for processing.",4002:"File upload failed: Queueing process failed.",4005:"File upload failed: Invalid filename. Please use only letters, numbers, and standard characters.",4006:"File upload failed: This file is already attached to another proof.",4007:"File upload failed: File is missing a file extension. Please ensure your file has a proper extension (e.g., .pdf, .jpg).",4008:"File upload failed: Unsupported file type. Please check the supported file formats.",100:"Access denied. Please contact support if you believe this is an error.",101:"Access denied. Please contact support if you believe this is an error.",102:"Resource temporarily unavailable. Please try again later.",124:"Access denied. Please contact support if you believe this is an error.",125:"Access denied. Please contact support if you believe this is an error.",126:"Access denied. Please contact support if you believe this is an error.",402:"Access denied. Please contact support if you believe this is an error.",403:"Operation not supported.",1e3:"Resource not found.",1001:"Failed to create resource.",1002:"Failed to update resource.",1003:"Failed to delete resource.",1004:"Resource already exists.",1005:"System configuration error. Please contact support.",2010:"Invalid format.",2011:"Invalid request.",3e3:"Account upgrade required. Please contact support.",6005:"Feature not available. Please contact support.",3001:"Group workflow has already been started.",3002:"A group with this name already exists.",3003:"Cannot delete group: active proofs exist.",3004:"No proofs found for this group.",5e3:"Resource already exists.",6e3:"Invalid format. Please check your input.",6001:"Verification failed. Please contact support.",6002:"Invalid format. Please check your input.",6003:"Required information missing. Please contact support.",6004:"Resource unavailable. Please try a different option.",6500:"Prerequisites not met. Please contact support.",106:"System error. Please try again later.",110:"System error. Please try again later.",120:"System error. Please try again later.",121:"System error. Please try again later.",122:"Operation failed. Please try again.",123:"Operation failed. Please try again.",7e3:"Internal server error. Please try again later.",8001:"User not found.",8002:"User already exists in this workflow step.",8003:"Invalid user data - userId or email required.",8004:"Cannot add Mandatory or Gatekeeper role to a completed workflow step."};function getErrorMessage(code,fallbackMessage){return ERROR_MESSAGES[code]||fallbackMessage||"Unknown error occurred (Code: "+code+"). Please contact support."}exports.default=ERROR_MESSAGES;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pageproof/sdk-pr",
3
3
  "description": "The official PageProof SDK",
4
- "version": "626.0.1761859278746",
4
+ "version": "627.0.1761187227370",
5
5
  "main": "lib/index.js",
6
6
  "browser": "lib/pageproof.js",
7
7
  "dependencies": {