@openlettermarketing/olc-react-sdk 2.0.2 → 2.0.3

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.
package/README.md CHANGED
@@ -91,11 +91,20 @@ key props:
91
91
  | `onReturnAndNavigate` | _function_ | An event which triggers when a user navigates away. | ⤫ | `onReturnAndNavigate () { ... }` |
92
92
  | `onGetOneTemplate` | _function_ | An event which triggers when fetching a specific template. | ⤫ | `onGetOneTemplate ( payload ) { ... }` |
93
93
  | `onGetTemplates` | _function_ | An event which triggers when fetching all templates. | ⤫ | `onGetTemplates ( payload ) { ... }` |
94
- | `onGetCustomFields` | _function_ | An event which triggers when fetching custom fields for templates. | ⤫ | `onGetCustomFields () { ... }` |
95
- | `onSubmit` | _function_ | An event which triggers upon template submission. | ⤫ | `onSubmit () { ... }` |
94
+ | `onGetCustomFields` | _function_ | An event which triggers when fetching custom fields for templates. | ⤫ | `onGetCustomFields () { ... }` |
95
+ `onCreateCustomTemplateQuery` | `function` | A callback function that is triggered after a custom template query is successfully created. This is typically used when you allow users to request a custom-designed template from within the template builder. | ⤫ | `async onCreateCustomTemplateQuery(payload) { ... }` |
96
+ | `onDuplicateTemplate` | `function` | Callback triggered when duplicating an existing template. Should return a Promise resolving the newly created duplicated template name. | ⤫ | `async onDuplicateTemplate(payload) { ... }` |
97
+ | `allowedTemplateSections` | `string[]` | Array of section keys that control which sections are visible in the template gallery. | ⤫ | `['my_templates', 'team_templates']` |
98
+ | `restrictedProducts` | `number[]` | Array of product IDs to restrict product selection. | ⤫ | `[9, 11, 13]` |
99
+ | `disallowedProducts` | `string[]` | Specifies products that should be excluded entirely by their keys/IDs. Useful when you want to hide certain products regardless of what other filters allow. | ⤫ | `['postcard_4x6', 'letter_8.5x11']` |
100
+ | `propertyOfferCost` | `number` | Dynamic cost value for property offers shown in the builder. | ⤫ | `10` |
101
+ | `customPropertyOfferCost` | `number` | Custom cost value that overrides `propertyOfferCost` when needed (e.g., user-specific discounts). | ⤫ | `7.5` |
102
+ | `gsvCost` | `number` | Cost value associated with adding a Google Street View image to a template. | ⤫ | `1.25` |
103
+ `onSubmit` | _function_ | An event which triggers upon template submission. | ⤫ | `onSubmit () { ... }` |
96
104
  | `destroy` | _function_ | An event that destroys the template builder instance and cleans up all associated components and cache. Call this function when unmounting the template builder component to ensure proper cleanup and avoid memory leaks. | ⤫ | `templateBuilderInstance.destroy()` |
97
105
  | `styles` | _object_ | An object of [JSS](https://reactjs.org/docs/faq-styling.html) props for customize styling of template builder. | ⤫ | `{ root: { ... } }` |
98
106
 
107
+
99
108
  ### 4. API Integration
100
109
 
101
110
  To integrate the SDK’s API, ensure that your backend securely communicates with