@susilkumar006/widgets-test 1.0.0

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.
Files changed (107) hide show
  1. package/README.md +445 -0
  2. package/dist/api/FacePeApiClient.d.cts +74 -0
  3. package/dist/api/FacePeApiClient.d.ts +74 -0
  4. package/dist/api/FacePeApiContext.d.cts +8 -0
  5. package/dist/api/FacePeApiContext.d.ts +8 -0
  6. package/dist/api/decoders.d.cts +48 -0
  7. package/dist/api/decoders.d.ts +48 -0
  8. package/dist/api/index.d.cts +8 -0
  9. package/dist/api/index.d.ts +8 -0
  10. package/dist/api/json.d.cts +5 -0
  11. package/dist/api/json.d.ts +5 -0
  12. package/dist/api/useFacePeResource.d.cts +21 -0
  13. package/dist/api/useFacePeResource.d.ts +21 -0
  14. package/dist/components/Avatar/FacePeAvatar.d.cts +23 -0
  15. package/dist/components/Avatar/FacePeAvatar.d.ts +23 -0
  16. package/dist/components/Avatar/engines.d.cts +30 -0
  17. package/dist/components/Avatar/engines.d.ts +30 -0
  18. package/dist/components/Avatar/index.d.cts +1 -0
  19. package/dist/components/Avatar/index.d.ts +1 -0
  20. package/dist/components/Form/FacePeForm.d.cts +19 -0
  21. package/dist/components/Form/FacePeForm.d.ts +19 -0
  22. package/dist/components/Form/index.d.cts +1 -0
  23. package/dist/components/Form/index.d.ts +1 -0
  24. package/dist/components/Picker/FacePePicker.d.cts +22 -0
  25. package/dist/components/Picker/FacePePicker.d.ts +22 -0
  26. package/dist/components/Picker/index.d.cts +1 -0
  27. package/dist/components/Picker/index.d.ts +1 -0
  28. package/dist/components/Placement/FacePeOverlay.d.cts +13 -0
  29. package/dist/components/Placement/FacePeOverlay.d.ts +13 -0
  30. package/dist/components/Placement/FacePePage.d.cts +10 -0
  31. package/dist/components/Placement/FacePePage.d.ts +10 -0
  32. package/dist/components/Placement/index.d.cts +2 -0
  33. package/dist/components/Placement/index.d.ts +2 -0
  34. package/dist/components/Timeline/FacePeTimeline.d.cts +23 -0
  35. package/dist/components/Timeline/FacePeTimeline.d.ts +23 -0
  36. package/dist/components/Timeline/index.d.cts +1 -0
  37. package/dist/components/Timeline/index.d.ts +1 -0
  38. package/dist/components/shared/FacePeErrorBoundary.d.cts +28 -0
  39. package/dist/components/shared/FacePeErrorBoundary.d.ts +28 -0
  40. package/dist/components/shared/surface.d.cts +6 -0
  41. package/dist/components/shared/surface.d.ts +6 -0
  42. package/dist/context/FacePeContext.d.cts +22 -0
  43. package/dist/context/FacePeContext.d.ts +22 -0
  44. package/dist/context/avatar.d.cts +6 -0
  45. package/dist/context/avatar.d.ts +6 -0
  46. package/dist/context/index.d.cts +5 -0
  47. package/dist/context/index.d.ts +5 -0
  48. package/dist/context/navigation.d.cts +10 -0
  49. package/dist/context/navigation.d.ts +10 -0
  50. package/dist/events/FacePeEventEmitter.d.cts +59 -0
  51. package/dist/events/FacePeEventEmitter.d.ts +59 -0
  52. package/dist/events/createCorrelationId.d.cts +9 -0
  53. package/dist/events/createCorrelationId.d.ts +9 -0
  54. package/dist/events/index.d.cts +8 -0
  55. package/dist/events/index.d.ts +8 -0
  56. package/dist/events/telemetry.d.cts +11 -0
  57. package/dist/events/telemetry.d.ts +11 -0
  58. package/dist/events/useFacePeEmitter.d.cts +15 -0
  59. package/dist/events/useFacePeEmitter.d.ts +15 -0
  60. package/dist/index.cjs +1925 -0
  61. package/dist/index.cjs.map +1 -0
  62. package/dist/index.d.cts +26 -0
  63. package/dist/index.d.ts +26 -0
  64. package/dist/index.js +1903 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/schemas/FacePeCustomerPayload.schema.json +31 -0
  67. package/dist/schemas/FacePeError.schema.json +63 -0
  68. package/dist/schemas/FacePeEventMeta.schema.json +53 -0
  69. package/dist/schemas/FacePeFormValues.schema.json +27 -0
  70. package/dist/schemas/FacePeNavigationRequest.schema.json +33 -0
  71. package/dist/schemas/FacePePickerOption.schema.json +34 -0
  72. package/dist/schemas/FacePePickerOptionsPayload.schema.json +49 -0
  73. package/dist/schemas/FacePeTelemetryEvent.schema.json +66 -0
  74. package/dist/schemas/FacePeTimelineItem.schema.json +91 -0
  75. package/dist/schemas/FacePeTimelinePayload.schema.json +109 -0
  76. package/dist/styles.css +887 -0
  77. package/dist/types/api.d.cts +60 -0
  78. package/dist/types/api.d.ts +60 -0
  79. package/dist/types/avatar.d.cts +102 -0
  80. package/dist/types/avatar.d.ts +102 -0
  81. package/dist/types/common.d.cts +42 -0
  82. package/dist/types/common.d.ts +42 -0
  83. package/dist/types/components.d.cts +53 -0
  84. package/dist/types/components.d.ts +53 -0
  85. package/dist/types/config.d.cts +27 -0
  86. package/dist/types/config.d.ts +27 -0
  87. package/dist/types/events.d.cts +85 -0
  88. package/dist/types/events.d.ts +85 -0
  89. package/dist/types/form.d.cts +83 -0
  90. package/dist/types/form.d.ts +83 -0
  91. package/dist/types/index.d.cts +18 -0
  92. package/dist/types/index.d.ts +18 -0
  93. package/dist/types/picker.d.cts +82 -0
  94. package/dist/types/picker.d.ts +82 -0
  95. package/dist/types/placement.d.cts +69 -0
  96. package/dist/types/placement.d.ts +69 -0
  97. package/dist/types/provider.d.cts +75 -0
  98. package/dist/types/provider.d.ts +75 -0
  99. package/dist/types/results.d.cts +28 -0
  100. package/dist/types/results.d.ts +28 -0
  101. package/dist/types/telemetry.d.cts +38 -0
  102. package/dist/types/telemetry.d.ts +38 -0
  103. package/dist/types/timeline.d.cts +103 -0
  104. package/dist/types/timeline.d.ts +103 -0
  105. package/dist/version.d.cts +2 -0
  106. package/dist/version.d.ts +2 -0
  107. package/package.json +71 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "urn:facepe:widgets:1.0.0:FacePeNavigationRequest",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/FacePeNavigationRequest",
5
+ "definitions": {
6
+ "FacePeNavigationRequest": {
7
+ "type": "object",
8
+ "properties": {
9
+ "to": {
10
+ "type": "string",
11
+ "description": "Destination, as the host's routing understands it (a route name, path or deep link)."
12
+ },
13
+ "params": {
14
+ "type": "object",
15
+ "additionalProperties": {
16
+ "type": "string"
17
+ },
18
+ "description": "Route parameters.",
19
+ "default": "none"
20
+ },
21
+ "replace": {
22
+ "type": "boolean",
23
+ "description": "Replace the current history entry instead of pushing one.",
24
+ "default": false
25
+ }
26
+ },
27
+ "required": [
28
+ "to"
29
+ ],
30
+ "description": "A request to navigate, raised by a component and carried out by the host's router (the SDK never changes the URL itself)."
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$id": "urn:facepe:widgets:1.0.0:FacePePickerOption",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/FacePePickerOption",
5
+ "definitions": {
6
+ "FacePePickerOption": {
7
+ "type": "object",
8
+ "properties": {
9
+ "value": {
10
+ "type": "string",
11
+ "description": "Unique within the picker; what `select` reports."
12
+ },
13
+ "label": {
14
+ "type": "string",
15
+ "description": "Text shown to the user."
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "description": "Secondary text, shown when the `picker.descriptions` feature flag is on."
20
+ },
21
+ "disabled": {
22
+ "type": "boolean",
23
+ "description": "Shown but not selectable.",
24
+ "default": false
25
+ }
26
+ },
27
+ "required": [
28
+ "value",
29
+ "label"
30
+ ],
31
+ "description": "One choice in the picker."
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$id": "urn:facepe:widgets:1.0.0:FacePePickerOptionsPayload",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/FacePePickerOptionsPayload",
5
+ "definitions": {
6
+ "FacePePickerOptionsPayload": {
7
+ "type": "object",
8
+ "properties": {
9
+ "options": {
10
+ "type": "array",
11
+ "items": {
12
+ "$ref": "#/definitions/FacePePickerOption"
13
+ }
14
+ }
15
+ },
16
+ "required": [
17
+ "options"
18
+ ],
19
+ "description": "`GET /locations/:id/categories` — the menu categories offered at a location."
20
+ },
21
+ "FacePePickerOption": {
22
+ "type": "object",
23
+ "properties": {
24
+ "value": {
25
+ "type": "string",
26
+ "description": "Unique within the picker; what `select` reports."
27
+ },
28
+ "label": {
29
+ "type": "string",
30
+ "description": "Text shown to the user."
31
+ },
32
+ "description": {
33
+ "type": "string",
34
+ "description": "Secondary text, shown when the `picker.descriptions` feature flag is on."
35
+ },
36
+ "disabled": {
37
+ "type": "boolean",
38
+ "description": "Shown but not selectable.",
39
+ "default": false
40
+ }
41
+ },
42
+ "required": [
43
+ "value",
44
+ "label"
45
+ ],
46
+ "description": "One choice in the picker."
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$id": "urn:facepe:widgets:1.0.0:FacePeTelemetryEvent",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/FacePeTelemetryEvent",
5
+ "definitions": {
6
+ "FacePeTelemetryEvent": {
7
+ "type": "object",
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "The event type (`'ready'`, `'select'`, …) or `'api.request'`."
12
+ },
13
+ "source": {
14
+ "type": "string",
15
+ "description": "Who produced it: a component name, or `'FacePeProvider'`."
16
+ },
17
+ "correlationId": {
18
+ "$ref": "#/definitions/CorrelationId",
19
+ "description": "The same id as the event's `meta.correlationId` / the request's `X-Request-Id`."
20
+ },
21
+ "timestamp": {
22
+ "type": "string",
23
+ "description": "ISO 8601."
24
+ },
25
+ "sdkVersion": {
26
+ "type": "string",
27
+ "description": "The package version, stamped on every record."
28
+ },
29
+ "entityId": {
30
+ "$ref": "#/definitions/EntityId"
31
+ },
32
+ "attributes": {
33
+ "$ref": "#/definitions/FacePeTelemetryAttributes",
34
+ "description": "`api.request`: `method`, `path`, `status` (when a response came back), `outcome` (`'success'` or the failure code) and `durationMs`. `error` events: the error `code`. Otherwise absent."
35
+ }
36
+ },
37
+ "required": [
38
+ "name",
39
+ "source",
40
+ "correlationId",
41
+ "timestamp",
42
+ "sdkVersion"
43
+ ],
44
+ "description": "One telemetry record. Every component event produces one (named after the event, e.g. `'submit'`), and so does every API call (`'api.request'`). Event payloads are never included: they can hold what the user typed."
45
+ },
46
+ "CorrelationId": {
47
+ "type": "string",
48
+ "description": "Identifier that ties an event or result back to the request that caused it."
49
+ },
50
+ "EntityId": {
51
+ "type": "string",
52
+ "description": "Identifier of an entity the component fetches itself (never the entity's data)."
53
+ },
54
+ "FacePeTelemetryAttributes": {
55
+ "type": "object",
56
+ "additionalProperties": {
57
+ "type": [
58
+ "string",
59
+ "number",
60
+ "boolean"
61
+ ]
62
+ },
63
+ "description": "Extra facts about an event. Primitive values only; never user-entered data."
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$id": "urn:facepe:widgets:1.0.0:FacePeTimelineItem",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/FacePeTimelineItem",
5
+ "definitions": {
6
+ "FacePeTimelineItem": {
7
+ "type": "object",
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "description": "Unique within the timeline."
12
+ },
13
+ "title": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "timestamp": {
20
+ "type": "string",
21
+ "description": "When it happened, as an ISO 8601 date-time, e.g. \"2026-09-29T10:30:00+05:30\". Shown in the viewer's time zone and the configured locale."
22
+ },
23
+ "status": {
24
+ "$ref": "#/definitions/FacePeTimelineItemStatus"
25
+ },
26
+ "metadata": {
27
+ "$ref": "#/definitions/FacePeTimelineMetadata"
28
+ },
29
+ "link": {
30
+ "$ref": "#/definitions/FacePeNavigationRequest",
31
+ "description": "Where \"View details\" leads. Raised as a `navigate` event for the host's router; the timeline never changes the URL.",
32
+ "default": "none (no link shown)"
33
+ }
34
+ },
35
+ "required": [
36
+ "id",
37
+ "title",
38
+ "timestamp",
39
+ "status"
40
+ ],
41
+ "description": "One entry on the timeline."
42
+ },
43
+ "FacePeTimelineItemStatus": {
44
+ "type": "string",
45
+ "enum": [
46
+ "completed",
47
+ "current",
48
+ "pending",
49
+ "error"
50
+ ],
51
+ "description": "Where an item stands. Each status is shown by a distinct marker shape and a text label, never by colour alone."
52
+ },
53
+ "FacePeTimelineMetadata": {
54
+ "type": "object",
55
+ "additionalProperties": {
56
+ "type": [
57
+ "string",
58
+ "number",
59
+ "boolean"
60
+ ]
61
+ },
62
+ "description": "Extra facts shown under an item as label/value pairs, in the object's key order."
63
+ },
64
+ "FacePeNavigationRequest": {
65
+ "type": "object",
66
+ "properties": {
67
+ "to": {
68
+ "type": "string",
69
+ "description": "Destination, as the host's routing understands it (a route name, path or deep link)."
70
+ },
71
+ "params": {
72
+ "type": "object",
73
+ "additionalProperties": {
74
+ "type": "string"
75
+ },
76
+ "description": "Route parameters.",
77
+ "default": "none"
78
+ },
79
+ "replace": {
80
+ "type": "boolean",
81
+ "description": "Replace the current history entry instead of pushing one.",
82
+ "default": false
83
+ }
84
+ },
85
+ "required": [
86
+ "to"
87
+ ],
88
+ "description": "A request to navigate, raised by a component and carried out by the host's router (the SDK never changes the URL itself)."
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "$id": "urn:facepe:widgets:1.0.0:FacePeTimelinePayload",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/FacePeTimelinePayload",
5
+ "definitions": {
6
+ "FacePeTimelinePayload": {
7
+ "type": "object",
8
+ "properties": {
9
+ "items": {
10
+ "type": "array",
11
+ "items": {
12
+ "$ref": "#/definitions/FacePeTimelineItem"
13
+ }
14
+ },
15
+ "orderNumber": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": [
20
+ "items"
21
+ ],
22
+ "description": "`GET /orders/:id/timeline` — an order's status history, oldest first."
23
+ },
24
+ "FacePeTimelineItem": {
25
+ "type": "object",
26
+ "properties": {
27
+ "id": {
28
+ "type": "string",
29
+ "description": "Unique within the timeline."
30
+ },
31
+ "title": {
32
+ "type": "string"
33
+ },
34
+ "description": {
35
+ "type": "string"
36
+ },
37
+ "timestamp": {
38
+ "type": "string",
39
+ "description": "When it happened, as an ISO 8601 date-time, e.g. \"2026-09-29T10:30:00+05:30\". Shown in the viewer's time zone and the configured locale."
40
+ },
41
+ "status": {
42
+ "$ref": "#/definitions/FacePeTimelineItemStatus"
43
+ },
44
+ "metadata": {
45
+ "$ref": "#/definitions/FacePeTimelineMetadata"
46
+ },
47
+ "link": {
48
+ "$ref": "#/definitions/FacePeNavigationRequest",
49
+ "description": "Where \"View details\" leads. Raised as a `navigate` event for the host's router; the timeline never changes the URL.",
50
+ "default": "none (no link shown)"
51
+ }
52
+ },
53
+ "required": [
54
+ "id",
55
+ "title",
56
+ "timestamp",
57
+ "status"
58
+ ],
59
+ "description": "One entry on the timeline."
60
+ },
61
+ "FacePeTimelineItemStatus": {
62
+ "type": "string",
63
+ "enum": [
64
+ "completed",
65
+ "current",
66
+ "pending",
67
+ "error"
68
+ ],
69
+ "description": "Where an item stands. Each status is shown by a distinct marker shape and a text label, never by colour alone."
70
+ },
71
+ "FacePeTimelineMetadata": {
72
+ "type": "object",
73
+ "additionalProperties": {
74
+ "type": [
75
+ "string",
76
+ "number",
77
+ "boolean"
78
+ ]
79
+ },
80
+ "description": "Extra facts shown under an item as label/value pairs, in the object's key order."
81
+ },
82
+ "FacePeNavigationRequest": {
83
+ "type": "object",
84
+ "properties": {
85
+ "to": {
86
+ "type": "string",
87
+ "description": "Destination, as the host's routing understands it (a route name, path or deep link)."
88
+ },
89
+ "params": {
90
+ "type": "object",
91
+ "additionalProperties": {
92
+ "type": "string"
93
+ },
94
+ "description": "Route parameters.",
95
+ "default": "none"
96
+ },
97
+ "replace": {
98
+ "type": "boolean",
99
+ "description": "Replace the current history entry instead of pushing one.",
100
+ "default": false
101
+ }
102
+ },
103
+ "required": [
104
+ "to"
105
+ ],
106
+ "description": "A request to navigate, raised by a component and carried out by the host's router (the SDK never changes the URL itself)."
107
+ }
108
+ }
109
+ }