@opens/gateways 1.17.5 → 1.17.7
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/dist/_identification-rule-C7mcbjha.d.mts +64 -0
- package/dist/_identification-rule-C7mcbjha.d.ts +64 -0
- package/dist/chat-config/builders/index.d.mts +107 -3
- package/dist/chat-config/builders/index.d.ts +107 -3
- package/dist/chat-config/builders/index.js +369 -4
- package/dist/chat-config/builders/index.js.map +1 -1
- package/dist/chat-config/builders/index.mjs +366 -3
- package/dist/chat-config/builders/index.mjs.map +1 -1
- package/dist/chat-config/contracts/index.d.mts +19 -4
- package/dist/chat-config/contracts/index.d.ts +19 -4
- package/dist/chat-config/value-objects/index.d.mts +46 -2
- package/dist/chat-config/value-objects/index.d.ts +46 -2
- package/dist/chat-config/value-objects/index.js +84 -2
- package/dist/chat-config/value-objects/index.js.map +1 -1
- package/dist/chat-config/value-objects/index.mjs +81 -1
- package/dist/chat-config/value-objects/index.mjs.map +1 -1
- package/dist/customer-service/contracts/index.d.mts +26 -1
- package/dist/customer-service/contracts/index.d.ts +26 -1
- package/dist/customer-service/contracts/index.js.map +1 -1
- package/dist/index.d.mts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/_screen-rule-FlIJzVXA.d.mts +0 -20
- package/dist/_screen-rule-FlIJzVXA.d.ts +0 -20
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Chrome content rendered in the widget header (the bar with the close action). */
|
|
2
|
+
interface ScreenRuleHeaderComponent {
|
|
3
|
+
logo?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Page content rendered in the widget body. */
|
|
8
|
+
interface ScreenRuleBodyComponent {
|
|
9
|
+
logo?: string;
|
|
10
|
+
eyebrow?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Payload used to create a screen rule. */
|
|
15
|
+
interface CreateScreenRuleDTO {
|
|
16
|
+
name: string;
|
|
17
|
+
action: 'screen';
|
|
18
|
+
settings: {
|
|
19
|
+
body?: ScreenRuleBodyComponent;
|
|
20
|
+
header?: ScreenRuleHeaderComponent;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Attendance channel controlled by a service rule. */
|
|
25
|
+
type ServiceRuleBehavior = 'chat' | 'voice';
|
|
26
|
+
/** Feature flags available on a service rule. */
|
|
27
|
+
interface ServiceRuleFeatures {
|
|
28
|
+
sendMessage?: boolean;
|
|
29
|
+
sendAttachment?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Payload used to create a service rule. */
|
|
32
|
+
interface CreateServiceRuleDTO {
|
|
33
|
+
name: string;
|
|
34
|
+
action: 'service';
|
|
35
|
+
settings: {
|
|
36
|
+
header?: ScreenRuleHeaderComponent;
|
|
37
|
+
body?: ScreenRuleBodyComponent;
|
|
38
|
+
features?: ServiceRuleFeatures;
|
|
39
|
+
behavior?: ServiceRuleBehavior;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Field content rendered by an identification rule form. */
|
|
44
|
+
interface IdentificationRuleFieldComponent {
|
|
45
|
+
name: string;
|
|
46
|
+
alias: string;
|
|
47
|
+
required: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Form content rendered by an identification rule. */
|
|
50
|
+
interface IdentificationRuleFormComponent {
|
|
51
|
+
fields?: IdentificationRuleFieldComponent[];
|
|
52
|
+
}
|
|
53
|
+
/** Payload used to create an identification rule. */
|
|
54
|
+
interface CreateIdentificationRuleDTO {
|
|
55
|
+
name: string;
|
|
56
|
+
action: 'identification';
|
|
57
|
+
settings: {
|
|
58
|
+
header?: ScreenRuleHeaderComponent;
|
|
59
|
+
body?: ScreenRuleBodyComponent;
|
|
60
|
+
form: IdentificationRuleFormComponent;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type { CreateScreenRuleDTO as C, IdentificationRuleFormComponent as I, ScreenRuleHeaderComponent as S, ScreenRuleBodyComponent as a, CreateServiceRuleDTO as b, ServiceRuleFeatures as c, ServiceRuleBehavior as d, CreateIdentificationRuleDTO as e, IdentificationRuleFieldComponent as f };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Chrome content rendered in the widget header (the bar with the close action). */
|
|
2
|
+
interface ScreenRuleHeaderComponent {
|
|
3
|
+
logo?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Page content rendered in the widget body. */
|
|
8
|
+
interface ScreenRuleBodyComponent {
|
|
9
|
+
logo?: string;
|
|
10
|
+
eyebrow?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Payload used to create a screen rule. */
|
|
15
|
+
interface CreateScreenRuleDTO {
|
|
16
|
+
name: string;
|
|
17
|
+
action: 'screen';
|
|
18
|
+
settings: {
|
|
19
|
+
body?: ScreenRuleBodyComponent;
|
|
20
|
+
header?: ScreenRuleHeaderComponent;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Attendance channel controlled by a service rule. */
|
|
25
|
+
type ServiceRuleBehavior = 'chat' | 'voice';
|
|
26
|
+
/** Feature flags available on a service rule. */
|
|
27
|
+
interface ServiceRuleFeatures {
|
|
28
|
+
sendMessage?: boolean;
|
|
29
|
+
sendAttachment?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Payload used to create a service rule. */
|
|
32
|
+
interface CreateServiceRuleDTO {
|
|
33
|
+
name: string;
|
|
34
|
+
action: 'service';
|
|
35
|
+
settings: {
|
|
36
|
+
header?: ScreenRuleHeaderComponent;
|
|
37
|
+
body?: ScreenRuleBodyComponent;
|
|
38
|
+
features?: ServiceRuleFeatures;
|
|
39
|
+
behavior?: ServiceRuleBehavior;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Field content rendered by an identification rule form. */
|
|
44
|
+
interface IdentificationRuleFieldComponent {
|
|
45
|
+
name: string;
|
|
46
|
+
alias: string;
|
|
47
|
+
required: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Form content rendered by an identification rule. */
|
|
50
|
+
interface IdentificationRuleFormComponent {
|
|
51
|
+
fields?: IdentificationRuleFieldComponent[];
|
|
52
|
+
}
|
|
53
|
+
/** Payload used to create an identification rule. */
|
|
54
|
+
interface CreateIdentificationRuleDTO {
|
|
55
|
+
name: string;
|
|
56
|
+
action: 'identification';
|
|
57
|
+
settings: {
|
|
58
|
+
header?: ScreenRuleHeaderComponent;
|
|
59
|
+
body?: ScreenRuleBodyComponent;
|
|
60
|
+
form: IdentificationRuleFormComponent;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type { CreateScreenRuleDTO as C, IdentificationRuleFormComponent as I, ScreenRuleHeaderComponent as S, ScreenRuleBodyComponent as a, CreateServiceRuleDTO as b, ServiceRuleFeatures as c, ServiceRuleBehavior as d, CreateIdentificationRuleDTO as e, IdentificationRuleFieldComponent as f };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreateScreenRuleDTO, S as ScreenRuleHeaderComponent, a as ScreenRuleBodyComponent } from '../../
|
|
2
|
-
import { ScreenRuleVO } from '../value-objects/index.mjs';
|
|
1
|
+
import { C as CreateScreenRuleDTO, S as ScreenRuleHeaderComponent, a as ScreenRuleBodyComponent, b as CreateServiceRuleDTO, c as ServiceRuleFeatures, d as ServiceRuleBehavior, e as CreateIdentificationRuleDTO, I as IdentificationRuleFormComponent } from '../../_identification-rule-C7mcbjha.mjs';
|
|
2
|
+
import { ScreenRuleVO, ServiceRuleVO, IdentificationRuleVO } from '../value-objects/index.mjs';
|
|
3
3
|
|
|
4
4
|
/** Fluent builder for creating validated screen-rule value objects. */
|
|
5
5
|
declare class ScreenRuleBuilder {
|
|
@@ -44,4 +44,108 @@ declare class ScreenRuleBuilder {
|
|
|
44
44
|
private assertValidPayload;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
/** Fluent builder for creating validated service-rule value objects. */
|
|
48
|
+
declare class ServiceRuleBuilder {
|
|
49
|
+
private payload;
|
|
50
|
+
private constructor();
|
|
51
|
+
/**
|
|
52
|
+
* Creates a service-rule builder.
|
|
53
|
+
* @param payload - Optional initial service-rule values.
|
|
54
|
+
* @returns A new service-rule builder.
|
|
55
|
+
*/
|
|
56
|
+
static create(payload?: Partial<CreateServiceRuleDTO>): ServiceRuleBuilder;
|
|
57
|
+
/**
|
|
58
|
+
* Merges partial service-rule values into the builder.
|
|
59
|
+
* @param payload - Service-rule values to merge.
|
|
60
|
+
* @returns This builder instance.
|
|
61
|
+
*/
|
|
62
|
+
withRule(payload: Partial<CreateServiceRuleDTO>): this;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the service-rule name.
|
|
65
|
+
* @param name - The service-rule name.
|
|
66
|
+
* @returns This builder instance.
|
|
67
|
+
*/
|
|
68
|
+
withName(name: string): this;
|
|
69
|
+
/**
|
|
70
|
+
* Sets the service-rule header.
|
|
71
|
+
* @param header - The header component.
|
|
72
|
+
* @returns This builder instance.
|
|
73
|
+
*/
|
|
74
|
+
withHeader(header: ScreenRuleHeaderComponent): this;
|
|
75
|
+
/**
|
|
76
|
+
* Sets the service-rule body.
|
|
77
|
+
* @param body - The body component.
|
|
78
|
+
* @returns This builder instance.
|
|
79
|
+
*/
|
|
80
|
+
withBody(body: ScreenRuleBodyComponent): this;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the feature flags available during the service attendance.
|
|
83
|
+
* @param features - The service feature flags.
|
|
84
|
+
* @returns This builder instance.
|
|
85
|
+
*/
|
|
86
|
+
withFeatures(features: ServiceRuleFeatures): this;
|
|
87
|
+
/**
|
|
88
|
+
* Sets whether the service attendance is chat or voice.
|
|
89
|
+
* @param behavior - The attendance behavior.
|
|
90
|
+
* @returns This builder instance.
|
|
91
|
+
*/
|
|
92
|
+
withBehavior(behavior: ServiceRuleBehavior): this;
|
|
93
|
+
/**
|
|
94
|
+
* Builds a validated service-rule value object.
|
|
95
|
+
* @returns The completed service-rule value object.
|
|
96
|
+
* @throws {Error} If required service-rule fields are missing or invalid.
|
|
97
|
+
*/
|
|
98
|
+
build(): ServiceRuleVO;
|
|
99
|
+
private assertValidPayload;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Fluent builder for creating validated identification-rule value objects. */
|
|
103
|
+
declare class IdentificationRuleBuilder {
|
|
104
|
+
private payload;
|
|
105
|
+
private constructor();
|
|
106
|
+
/**
|
|
107
|
+
* Creates an identification-rule builder.
|
|
108
|
+
* @param payload - Optional initial identification-rule values.
|
|
109
|
+
* @returns A new identification-rule builder.
|
|
110
|
+
*/
|
|
111
|
+
static create(payload?: Partial<CreateIdentificationRuleDTO>): IdentificationRuleBuilder;
|
|
112
|
+
/**
|
|
113
|
+
* Merges partial identification-rule values into the builder.
|
|
114
|
+
* @param payload - Identification-rule values to merge.
|
|
115
|
+
* @returns This builder instance.
|
|
116
|
+
*/
|
|
117
|
+
withRule(payload: Partial<CreateIdentificationRuleDTO>): this;
|
|
118
|
+
/**
|
|
119
|
+
* Sets the identification-rule name.
|
|
120
|
+
* @param name - The identification-rule name.
|
|
121
|
+
* @returns This builder instance.
|
|
122
|
+
*/
|
|
123
|
+
withName(name: string): this;
|
|
124
|
+
/**
|
|
125
|
+
* Sets the identification-rule header.
|
|
126
|
+
* @param header - The header component.
|
|
127
|
+
* @returns This builder instance.
|
|
128
|
+
*/
|
|
129
|
+
withHeader(header: ScreenRuleHeaderComponent): this;
|
|
130
|
+
/**
|
|
131
|
+
* Sets the identification-rule body.
|
|
132
|
+
* @param body - The body component.
|
|
133
|
+
* @returns This builder instance.
|
|
134
|
+
*/
|
|
135
|
+
withBody(body: ScreenRuleBodyComponent): this;
|
|
136
|
+
/**
|
|
137
|
+
* Sets the identification-rule form component.
|
|
138
|
+
* @param form - The form component.
|
|
139
|
+
* @returns This builder instance.
|
|
140
|
+
*/
|
|
141
|
+
withForm(form: IdentificationRuleFormComponent): this;
|
|
142
|
+
/**
|
|
143
|
+
* Builds a validated identification-rule value object.
|
|
144
|
+
* @returns The completed identification-rule value object.
|
|
145
|
+
* @throws {Error} If required identification-rule fields are missing or invalid.
|
|
146
|
+
*/
|
|
147
|
+
build(): IdentificationRuleVO;
|
|
148
|
+
private assertValidPayload;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { IdentificationRuleBuilder, ScreenRuleBuilder, ServiceRuleBuilder };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreateScreenRuleDTO, S as ScreenRuleHeaderComponent, a as ScreenRuleBodyComponent } from '../../
|
|
2
|
-
import { ScreenRuleVO } from '../value-objects/index.js';
|
|
1
|
+
import { C as CreateScreenRuleDTO, S as ScreenRuleHeaderComponent, a as ScreenRuleBodyComponent, b as CreateServiceRuleDTO, c as ServiceRuleFeatures, d as ServiceRuleBehavior, e as CreateIdentificationRuleDTO, I as IdentificationRuleFormComponent } from '../../_identification-rule-C7mcbjha.js';
|
|
2
|
+
import { ScreenRuleVO, ServiceRuleVO, IdentificationRuleVO } from '../value-objects/index.js';
|
|
3
3
|
|
|
4
4
|
/** Fluent builder for creating validated screen-rule value objects. */
|
|
5
5
|
declare class ScreenRuleBuilder {
|
|
@@ -44,4 +44,108 @@ declare class ScreenRuleBuilder {
|
|
|
44
44
|
private assertValidPayload;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
/** Fluent builder for creating validated service-rule value objects. */
|
|
48
|
+
declare class ServiceRuleBuilder {
|
|
49
|
+
private payload;
|
|
50
|
+
private constructor();
|
|
51
|
+
/**
|
|
52
|
+
* Creates a service-rule builder.
|
|
53
|
+
* @param payload - Optional initial service-rule values.
|
|
54
|
+
* @returns A new service-rule builder.
|
|
55
|
+
*/
|
|
56
|
+
static create(payload?: Partial<CreateServiceRuleDTO>): ServiceRuleBuilder;
|
|
57
|
+
/**
|
|
58
|
+
* Merges partial service-rule values into the builder.
|
|
59
|
+
* @param payload - Service-rule values to merge.
|
|
60
|
+
* @returns This builder instance.
|
|
61
|
+
*/
|
|
62
|
+
withRule(payload: Partial<CreateServiceRuleDTO>): this;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the service-rule name.
|
|
65
|
+
* @param name - The service-rule name.
|
|
66
|
+
* @returns This builder instance.
|
|
67
|
+
*/
|
|
68
|
+
withName(name: string): this;
|
|
69
|
+
/**
|
|
70
|
+
* Sets the service-rule header.
|
|
71
|
+
* @param header - The header component.
|
|
72
|
+
* @returns This builder instance.
|
|
73
|
+
*/
|
|
74
|
+
withHeader(header: ScreenRuleHeaderComponent): this;
|
|
75
|
+
/**
|
|
76
|
+
* Sets the service-rule body.
|
|
77
|
+
* @param body - The body component.
|
|
78
|
+
* @returns This builder instance.
|
|
79
|
+
*/
|
|
80
|
+
withBody(body: ScreenRuleBodyComponent): this;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the feature flags available during the service attendance.
|
|
83
|
+
* @param features - The service feature flags.
|
|
84
|
+
* @returns This builder instance.
|
|
85
|
+
*/
|
|
86
|
+
withFeatures(features: ServiceRuleFeatures): this;
|
|
87
|
+
/**
|
|
88
|
+
* Sets whether the service attendance is chat or voice.
|
|
89
|
+
* @param behavior - The attendance behavior.
|
|
90
|
+
* @returns This builder instance.
|
|
91
|
+
*/
|
|
92
|
+
withBehavior(behavior: ServiceRuleBehavior): this;
|
|
93
|
+
/**
|
|
94
|
+
* Builds a validated service-rule value object.
|
|
95
|
+
* @returns The completed service-rule value object.
|
|
96
|
+
* @throws {Error} If required service-rule fields are missing or invalid.
|
|
97
|
+
*/
|
|
98
|
+
build(): ServiceRuleVO;
|
|
99
|
+
private assertValidPayload;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Fluent builder for creating validated identification-rule value objects. */
|
|
103
|
+
declare class IdentificationRuleBuilder {
|
|
104
|
+
private payload;
|
|
105
|
+
private constructor();
|
|
106
|
+
/**
|
|
107
|
+
* Creates an identification-rule builder.
|
|
108
|
+
* @param payload - Optional initial identification-rule values.
|
|
109
|
+
* @returns A new identification-rule builder.
|
|
110
|
+
*/
|
|
111
|
+
static create(payload?: Partial<CreateIdentificationRuleDTO>): IdentificationRuleBuilder;
|
|
112
|
+
/**
|
|
113
|
+
* Merges partial identification-rule values into the builder.
|
|
114
|
+
* @param payload - Identification-rule values to merge.
|
|
115
|
+
* @returns This builder instance.
|
|
116
|
+
*/
|
|
117
|
+
withRule(payload: Partial<CreateIdentificationRuleDTO>): this;
|
|
118
|
+
/**
|
|
119
|
+
* Sets the identification-rule name.
|
|
120
|
+
* @param name - The identification-rule name.
|
|
121
|
+
* @returns This builder instance.
|
|
122
|
+
*/
|
|
123
|
+
withName(name: string): this;
|
|
124
|
+
/**
|
|
125
|
+
* Sets the identification-rule header.
|
|
126
|
+
* @param header - The header component.
|
|
127
|
+
* @returns This builder instance.
|
|
128
|
+
*/
|
|
129
|
+
withHeader(header: ScreenRuleHeaderComponent): this;
|
|
130
|
+
/**
|
|
131
|
+
* Sets the identification-rule body.
|
|
132
|
+
* @param body - The body component.
|
|
133
|
+
* @returns This builder instance.
|
|
134
|
+
*/
|
|
135
|
+
withBody(body: ScreenRuleBodyComponent): this;
|
|
136
|
+
/**
|
|
137
|
+
* Sets the identification-rule form component.
|
|
138
|
+
* @param form - The form component.
|
|
139
|
+
* @returns This builder instance.
|
|
140
|
+
*/
|
|
141
|
+
withForm(form: IdentificationRuleFormComponent): this;
|
|
142
|
+
/**
|
|
143
|
+
* Builds a validated identification-rule value object.
|
|
144
|
+
* @returns The completed identification-rule value object.
|
|
145
|
+
* @throws {Error} If required identification-rule fields are missing or invalid.
|
|
146
|
+
*/
|
|
147
|
+
build(): IdentificationRuleVO;
|
|
148
|
+
private assertValidPayload;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { IdentificationRuleBuilder, ScreenRuleBuilder, ServiceRuleBuilder };
|