@r2u/javascript-ar-sdk 6.6.8-rc → 6.7.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
@@ -2,67 +2,6 @@
2
2
 
3
3
  JavaScript SDK for Augmented Reality on the web.
4
4
 
5
- ### Methods
5
+ ## Integration
6
6
 
7
- Defines a global `R2U` variable with the following methods
8
-
9
- ```typescript
10
- interface R2U {
11
- init: (params: {
12
- customerId: string
13
- analyticsParams?: {
14
- dataLayerIntegration?: boolean
15
- sessionDurationMinutes?: number
16
- }
17
- }) => Promise<void>
18
- sku: {
19
- isActive: (sku: string) => Promise<boolean>
20
- }
21
- ar: {
22
- attach: (params: {
23
- element: HTMLElement
24
- sku: string
25
- event?: string
26
- resize?: boolean
27
- showInstructions?: 'once' | 'always' | 'never'
28
- fallbackOptions?: {
29
- alertMessage?: string
30
- fallback?: 'viewer' | 'full'
31
- }
32
- }) => Promise<void>
33
- getLink: (sku: string) => Promise<string>
34
- }
35
- viewer: {
36
- create: (params: {
37
- element: HTMLElement
38
- sku: string
39
- name?: string
40
- popup?: boolean
41
- progressBarPosition?: 'top' | 'middle' | 'bottom'
42
- poster?: string
43
- }) => Promise<void>
44
- }
45
- analytics: {
46
- send: (event: Record<string, string | number>) => Promise<void>
47
- }
48
- customizer: {
49
- isActive: (sku: string) => Promise<boolean>
50
- create: (params: {
51
- element: HTMLElement
52
- onConfirm: (productCustomization: ProductCustomization) => void
53
- resultContainer?: HTMLElement
54
- }) => Promise<void>
55
- }
56
- qrCode: {
57
- create: (params: {
58
- element: HTMLElement
59
- sku: string
60
- showInstructions?: 'once' | 'always' | 'never'
61
- }) => Promise<void>
62
- }
63
- }
64
- ```
65
-
66
- ### Integration
67
-
68
- Please refer to the [`documentation`](https://github.com/r2u-io/documentation) repository for more information.
7
+ Please refer to the [`R2U documentation`](https://docs.r2u.io) for more information.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ProductCustomization } from '@r2u/customizer/dist/services/types';
2
+ import type { CallToAction } from '@r2u/react-ar-components';
2
3
  import init from './methods/init';
3
4
  import sku from './methods/sku';
4
5
  import ar from './methods/ar';
@@ -33,8 +34,10 @@ export default interface R2U {
33
34
  attach: (params: {
34
35
  element: HTMLElement;
35
36
  sku: string;
37
+ price?: string;
36
38
  eventType?: string;
37
39
  resize?: boolean;
40
+ callToAction?: CallToAction;
38
41
  showInstructions?: 'once' | 'always' | 'never';
39
42
  showFeedback?: boolean;
40
43
  fallbackOptions?: {