@giosg/types 6.2.2
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/CHANGELOG.md +218 -0
- package/README.md +16 -0
- package/lib/.teams.d.ts.swp +0 -0
- package/lib/actions.d.ts +72 -0
- package/lib/actions.d.ts.map +1 -0
- package/lib/actions.js +60 -0
- package/lib/apps.d.ts +99 -0
- package/lib/apps.d.ts.map +1 -0
- package/lib/apps.js +1 -0
- package/lib/assets.d.ts +144 -0
- package/lib/assets.d.ts.map +1 -0
- package/lib/assets.js +1 -0
- package/lib/brands.d.ts +41 -0
- package/lib/brands.d.ts.map +1 -0
- package/lib/brands.js +1 -0
- package/lib/canned_answers.d.ts +26 -0
- package/lib/canned_answers.d.ts.map +1 -0
- package/lib/canned_answers.js +1 -0
- package/lib/chat.d.ts +1069 -0
- package/lib/chat.d.ts.map +1 -0
- package/lib/chat.js +1 -0
- package/lib/common.d.ts +7 -0
- package/lib/common.d.ts.map +1 -0
- package/lib/common.js +625 -0
- package/lib/conditions.d.ts +98 -0
- package/lib/conditions.d.ts.map +1 -0
- package/lib/conditions.js +77 -0
- package/lib/customer.d.ts +519 -0
- package/lib/customer.d.ts.map +1 -0
- package/lib/customer.js +1 -0
- package/lib/customership.d.ts +79 -0
- package/lib/customership.d.ts.map +1 -0
- package/lib/customership.js +1 -0
- package/lib/email.d.ts +47 -0
- package/lib/email.d.ts.map +1 -0
- package/lib/email.js +1 -0
- package/lib/experiments.d.ts +168 -0
- package/lib/experiments.d.ts.map +1 -0
- package/lib/experiments.js +1 -0
- package/lib/goals.d.ts +126 -0
- package/lib/goals.d.ts.map +1 -0
- package/lib/goals.js +1 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/leadforms.d.ts +30 -0
- package/lib/leadforms.d.ts.map +1 -0
- package/lib/leadforms.js +1 -0
- package/lib/linkpreview.d.ts +16 -0
- package/lib/linkpreview.d.ts.map +1 -0
- package/lib/linkpreview.js +1 -0
- package/lib/oath.d.ts +75 -0
- package/lib/oath.d.ts.map +1 -0
- package/lib/oath.js +22 -0
- package/lib/partnerships.d.ts +54 -0
- package/lib/partnerships.d.ts.map +1 -0
- package/lib/partnerships.js +1 -0
- package/lib/permissions.d.ts +26 -0
- package/lib/permissions.d.ts.map +1 -0
- package/lib/permissions.js +1 -0
- package/lib/public.d.ts +387 -0
- package/lib/public.d.ts.map +1 -0
- package/lib/public.js +9 -0
- package/lib/rooms.d.ts +199 -0
- package/lib/rooms.d.ts.map +1 -0
- package/lib/rooms.js +1 -0
- package/lib/routers.d.ts +76 -0
- package/lib/routers.d.ts.map +1 -0
- package/lib/routers.js +1 -0
- package/lib/rules.d.ts +229 -0
- package/lib/rules.d.ts.map +1 -0
- package/lib/rules.js +1 -0
- package/lib/sharing.d.ts +111 -0
- package/lib/sharing.d.ts.map +1 -0
- package/lib/sharing.js +1 -0
- package/lib/shoppingcarts.d.ts +33 -0
- package/lib/shoppingcarts.d.ts.map +1 -0
- package/lib/shoppingcarts.js +1 -0
- package/lib/system.d.ts +21 -0
- package/lib/system.d.ts.map +1 -0
- package/lib/system.js +1 -0
- package/lib/target.d.ts +105 -0
- package/lib/target.d.ts.map +1 -0
- package/lib/target.js +1 -0
- package/lib/teams.d.ts +78 -0
- package/lib/teams.d.ts.map +1 -0
- package/lib/teams.js +1 -0
- package/lib/types.d.ts +223 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +26 -0
- package/lib/uploads.d.ts +55 -0
- package/lib/uploads.d.ts.map +1 -0
- package/lib/uploads.js +1 -0
- package/lib/userclients.d.ts +79 -0
- package/lib/userclients.d.ts.map +1 -0
- package/lib/userclients.js +1 -0
- package/lib/variables.d.ts +41 -0
- package/lib/variables.d.ts.map +1 -0
- package/lib/variables.js +1 -0
- package/lib/visitor.d.ts +210 -0
- package/lib/visitor.d.ts.map +1 -0
- package/lib/visitor.js +1 -0
- package/lib/webhooks.d.ts +61 -0
- package/lib/webhooks.d.ts.map +1 -0
- package/lib/webhooks.js +1 -0
- package/package.json +23 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Hint: use `git diff <commithash>..HEAD src/` to see changes
|
|
4
|
+
|
|
5
|
+
## x.x.x (Not published yet)
|
|
6
|
+
|
|
7
|
+
## 6.2.2
|
|
8
|
+
- Fixed type of `brand` field in `PublicRoom` types
|
|
9
|
+
- Chat button asset fields added to the `Brand` interface
|
|
10
|
+
|
|
11
|
+
## 6.2.1
|
|
12
|
+
|
|
13
|
+
- Changed typescript `module` option from `commonjs` to `es2015` to allow treeshaking
|
|
14
|
+
|
|
15
|
+
## 6.2.0
|
|
16
|
+
|
|
17
|
+
- Added `client_type` field to `UserClientPayload`
|
|
18
|
+
|
|
19
|
+
## 6.1.2
|
|
20
|
+
|
|
21
|
+
- Added `client_type` field to `UserClient`
|
|
22
|
+
|
|
23
|
+
## 6.1.1
|
|
24
|
+
|
|
25
|
+
- Changed Typescript version to `^4.0.3`.
|
|
26
|
+
|
|
27
|
+
## 6.0.1
|
|
28
|
+
|
|
29
|
+
- Added field `index` to `RuleActionPayload`
|
|
30
|
+
|
|
31
|
+
## 6.0.0
|
|
32
|
+
|
|
33
|
+
- Updated `WebhookRequestLogEntry` field `status` type with actual status choices instead of `string`.
|
|
34
|
+
|
|
35
|
+
## 5.0.0
|
|
36
|
+
|
|
37
|
+
- Rename `VISITOR_BELONGS_TO_AN_TARGET_EXPERIMENT_GROUP` to `VISITOR_BELONGS_TO_A_TARGET_EXPERIMENT_GROUP`.
|
|
38
|
+
- Add `ComposingStatus`, `ChatWithRoom`, `ChatMessageWithChat` and `RulePrediction`.
|
|
39
|
+
- Correctly mark the domain on `NestedRoom` as a potentially `null` value.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 4.6.0
|
|
43
|
+
- Add `is_removed` field for `BarChats`.
|
|
44
|
+
- ConditionHasChattedSettings type was removed
|
|
45
|
+
|
|
46
|
+
## 4.5.0
|
|
47
|
+
- Add `is_available` field for `BarChats`.
|
|
48
|
+
|
|
49
|
+
## 4.4.5
|
|
50
|
+
|
|
51
|
+
- Fixed type of `PublicRoom` interface field `legacy_id` to be `RoomLegacyToken` instead of `RoomLegacyId`.
|
|
52
|
+
- Added is_email_confirmed to `User`interface.
|
|
53
|
+
|
|
54
|
+
## 4.4.4
|
|
55
|
+
|
|
56
|
+
- Add new rule condition
|
|
57
|
+
|
|
58
|
+
## 4.4.3
|
|
59
|
+
|
|
60
|
+
- Added `estimated_waiting_time` into public room
|
|
61
|
+
|
|
62
|
+
## 4.4.2
|
|
63
|
+
|
|
64
|
+
- Added `is_bot` field to `ChatMembershipUser` interface
|
|
65
|
+
- Removed deprecated `RoomCreate` interface
|
|
66
|
+
- Add visitor_avatar url
|
|
67
|
+
- Add new chat type=task
|
|
68
|
+
- Add new message types
|
|
69
|
+
|
|
70
|
+
## 4.3.1
|
|
71
|
+
|
|
72
|
+
- Fix nullability of accepted_by_user/accepted_by_user_id
|
|
73
|
+
|
|
74
|
+
## 4.3.0
|
|
75
|
+
|
|
76
|
+
- Added `OutgoingTeamShare`, `IncomingTeamShare` and `TeamSharePayload` interfaces.
|
|
77
|
+
|
|
78
|
+
## 4.2.0
|
|
79
|
+
|
|
80
|
+
- Added the email request interface
|
|
81
|
+
|
|
82
|
+
## 4.1.0
|
|
83
|
+
|
|
84
|
+
- Added `is_connected_to_room` field to `Team` interface.
|
|
85
|
+
- Added `is_staff` field to `NestedUser` interface.
|
|
86
|
+
- Added `chat_end_with_msgs` as a possible type to `GiosgAppTriggerCondition` interface.
|
|
87
|
+
- Added `is_bot` field to `UserPayload` interface.
|
|
88
|
+
|
|
89
|
+
## 4.0.0
|
|
90
|
+
|
|
91
|
+
### Breaking changes:
|
|
92
|
+
|
|
93
|
+
- Removed `unread_message_count` from `BarChat` interface.
|
|
94
|
+
- Removed `is_participating` from `BarChat` interface.
|
|
95
|
+
|
|
96
|
+
## 3.4.0
|
|
97
|
+
|
|
98
|
+
- Added `minimal_bar_version` field to `OAuthResponseSuccess` interface.
|
|
99
|
+
|
|
100
|
+
## 3.3.0
|
|
101
|
+
|
|
102
|
+
- Added `group_chat_id` in `Team` interface.
|
|
103
|
+
|
|
104
|
+
## 3.2.3
|
|
105
|
+
|
|
106
|
+
- Renamed `Room.public_key` to `Room.public_key_id`.
|
|
107
|
+
- Removed `null` from `Room.is_chat_encryption_enabled`.
|
|
108
|
+
|
|
109
|
+
## 3.2.2
|
|
110
|
+
|
|
111
|
+
- Fixed `value` type in `VisitorVariable` interface. It can not be type of `string[]`.
|
|
112
|
+
|
|
113
|
+
## 3.2.1
|
|
114
|
+
|
|
115
|
+
- Deprecated `unread_message_count` in `BarChat` interface.
|
|
116
|
+
|
|
117
|
+
## 3.2.0
|
|
118
|
+
|
|
119
|
+
- Added `unread_message_count` to `ChatMembership`.
|
|
120
|
+
- Changed `Chat` `chat_session_latest_message` to `ChatMessage`.
|
|
121
|
+
|
|
122
|
+
## 3.1.0
|
|
123
|
+
|
|
124
|
+
- Added `router` and `legacy_chat_dialog_id` fields to `OrganizationRoomSettings`.
|
|
125
|
+
- Added `is_chat_encryption_enabled`, `public_key_id`, and `sensitive_data_purge_ttl` fields to `Room`.
|
|
126
|
+
- Added `LegacyChatDialogUid` and `PublicKeyUid`.
|
|
127
|
+
|
|
128
|
+
## 3.0.0
|
|
129
|
+
|
|
130
|
+
- Added `sla` field to `StaffCustomership` and `StaffCustomershipPayload`.
|
|
131
|
+
- Added `is_auto_tagging_enabled` boolean field to `OrganizationRoomSettings` and `OrganizationRoomSettingsPayload` interfaces.
|
|
132
|
+
|
|
133
|
+
### Breaking changes:
|
|
134
|
+
|
|
135
|
+
- Merged `RoomVisitorVariable` and `ChatVisitorVariable` to `VisitorVariable`
|
|
136
|
+
- Merged `RoomVisitorVariablePayload` and `ChatVisitorVariablePayload` to `VisitorVariablePayload`
|
|
137
|
+
|
|
138
|
+
## 2.0.1
|
|
139
|
+
|
|
140
|
+
- Exported `ChatMembershipUser` and `ChatMembershipVisitor`.
|
|
141
|
+
|
|
142
|
+
## 2.0.0
|
|
143
|
+
|
|
144
|
+
- Added new interfaces `GiosgAppInstance`, `GiosgApp`, `GiosgAppPayload`, `InstalledGiosgApp`, `NestedGiosgApp`, `Brand`, `BrandPayload`, `PublicBrand`, `CannedAnswerIncrement`,`CannedAnswer`, `CannedAnswerPayload`, `ChatAssignment`, `LeadFormData`, `LeadFormDataPayload` `AppShare`, `AppSharePayload`, `ShoppingCartProduct`, `ShoppingCart`, `EndpointMethod` `Endpoint`, `Language`, `NestedTargetRule`, `NestedTargetConfig`, `TargetConfig`, `TargetExperiment`, `TargetedAction`, `TargetedActionPayload`, `VisitorPredictionList`, `VisitorPrediction`, `VisitorPredictionPayload`, `VisitorSessionPrediction`, `VisitorSessionPredictionPayload`, `RoomVisitorVariable`, `RoomVisitorVariablePayload`, `NestedWebhookChannelSubscription`, `NestedWebhookChannelSubscriptionPayload`, `WebhookRequestLogEntry`, `Webhook`, `WebhookPayload`
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Breaking changes:
|
|
148
|
+
|
|
149
|
+
- Renamed `VisitorSessionId` to `VisitorSessionCid`.
|
|
150
|
+
- Renamed `VisitorGlobalSessionId` to `VisitorSessionGid`.
|
|
151
|
+
- Renamed `VisitorGlobalId` to `VisitorGid`.
|
|
152
|
+
- Removed `GiosgSessionId`, it was duplicate of `VisitorGlobalSessionId`.
|
|
153
|
+
|
|
154
|
+
## 1.3.2
|
|
155
|
+
|
|
156
|
+
- Added new chat_type option `group` to `Chat` interface.
|
|
157
|
+
- Standardized chat types, added `ChatType` type.
|
|
158
|
+
|
|
159
|
+
## 1.3.1
|
|
160
|
+
|
|
161
|
+
- Added new chat_type option `group` to `BarChat` interface.
|
|
162
|
+
- Added new interfaces `OutgoingRoomShare`, `IncomingRoomShare`, `NestedRouter`, and `RoomSharePayload`.
|
|
163
|
+
- Fixed `BarChat` interface, `chat_session_latest_message` can be null.
|
|
164
|
+
- Fixed `attachment_template` field type across all types. It can be null.
|
|
165
|
+
|
|
166
|
+
## 1.3.0
|
|
167
|
+
|
|
168
|
+
- Added new interfaces `Router`, `RouterPayload`, `RouterStep`, `RouterStepPayload`, and `RouterStepPrecondition`.
|
|
169
|
+
|
|
170
|
+
## 1.2.26
|
|
171
|
+
|
|
172
|
+
- Added new interfaces `Upload` and `UploadPayload`.
|
|
173
|
+
|
|
174
|
+
## 1.2.25
|
|
175
|
+
|
|
176
|
+
- Added new field for `LinkPreviewResponse`.
|
|
177
|
+
|
|
178
|
+
## 1.2.24
|
|
179
|
+
|
|
180
|
+
- Added `LinkPreviewResponse` type.
|
|
181
|
+
- Updated `DEVELOPMENT.md`.
|
|
182
|
+
|
|
183
|
+
## 1.2.23
|
|
184
|
+
|
|
185
|
+
- Vasilii add changes you made here!
|
|
186
|
+
|
|
187
|
+
## 1.2.22
|
|
188
|
+
|
|
189
|
+
- Nominal types are using uuids to make it easier to resolve versions conflicts.
|
|
190
|
+
|
|
191
|
+
## 1.2.17
|
|
192
|
+
|
|
193
|
+
- ChatMessage and DecryptedChatMessage interfaces are divided into DataMessages and StatusMessages.
|
|
194
|
+
|
|
195
|
+
## 1.2.11
|
|
196
|
+
|
|
197
|
+
- CHANGELOG added.
|
|
198
|
+
- Id`s a set to be nominal types.
|
|
199
|
+
- Actions standardized.
|
|
200
|
+
- Asset interfaces added.
|
|
201
|
+
- Chat interfaces added.
|
|
202
|
+
- Timezone, currency and Language standardization.
|
|
203
|
+
- Conditions standardized.
|
|
204
|
+
- Customer interfaces added.
|
|
205
|
+
- Customership interfaces added.
|
|
206
|
+
- Experiments interfaces added.
|
|
207
|
+
- Goal interfaces added.
|
|
208
|
+
- Authentication interfaces added.
|
|
209
|
+
- Partnership interfaces added.
|
|
210
|
+
- Permission interfaces added.
|
|
211
|
+
- Public interfaces added.
|
|
212
|
+
- Room interfaces added.
|
|
213
|
+
- Rules interfaces added.
|
|
214
|
+
- User client interfaces added.
|
|
215
|
+
- Visitor interfaces added.
|
|
216
|
+
- Index added.
|
|
217
|
+
- Auto generation of index file added.
|
|
218
|
+
- Package published as `@giosg/types`.
|
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# giosg types
|
|
2
|
+
|
|
3
|
+
This is a collection of interfaces used in giosg services.
|
|
4
|
+
|
|
5
|
+
# How to use
|
|
6
|
+
|
|
7
|
+
`npm install @giosg/types`
|
|
8
|
+
|
|
9
|
+
# Development and publishing
|
|
10
|
+
|
|
11
|
+
See: `static/common-interfaces/DEVELOPMENT.md`
|
|
12
|
+
|
|
13
|
+
# Changelog
|
|
14
|
+
|
|
15
|
+
Remember to maintain change log:
|
|
16
|
+
See: `static/common-interfaces/CHANGELOG.md`
|
|
Binary file
|
package/lib/actions.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { UserUid } from "./types";
|
|
2
|
+
export declare const ActionTypes: {
|
|
3
|
+
/** value: autosuggest message as a string, settings: ActionShowAutosuggestSettings*/
|
|
4
|
+
readonly SEND_AUTOSUGGEST: 1;
|
|
5
|
+
/** value: array of room unique identifiers, settings: none */
|
|
6
|
+
readonly JOIN_ROOMS: 2;
|
|
7
|
+
/** value: none, settings: none */
|
|
8
|
+
readonly NO_CHATBUTTON: 5;
|
|
9
|
+
/** value: none, settings: none */
|
|
10
|
+
readonly NO_AUTOSUGGEST: 6;
|
|
11
|
+
/** value: JavaScript expression as a string, settings:none */
|
|
12
|
+
readonly RUN_JAVASCRIPT: 7;
|
|
13
|
+
/** value: none, settings: none */
|
|
14
|
+
readonly ENABLE_CHATBUTTON: 8;
|
|
15
|
+
/** value: CSS selector as a string, settings: none */
|
|
16
|
+
readonly SHOW_ELEMENTS: 9;
|
|
17
|
+
/** value: CSS selector as a string, settings: none */
|
|
18
|
+
readonly HIDE_ELEMENTS: 10;
|
|
19
|
+
/** value: URL as a string, settings: none */
|
|
20
|
+
readonly REDIRECT: 11;
|
|
21
|
+
/** value: lead form unique identifier, settings: none */
|
|
22
|
+
readonly LOAD_LEAD_FORM: 13;
|
|
23
|
+
/** value: button text as a string, settings: none */
|
|
24
|
+
readonly CHANGE_CB_TEXT: 14;
|
|
25
|
+
/** value: room unique identifier, settings: none */
|
|
26
|
+
readonly CHANGE_CB_TARGET: 15;
|
|
27
|
+
/** value: language as a RFC 3066 code, settings: none */
|
|
28
|
+
readonly CHANGE_LANGUAGE: 16;
|
|
29
|
+
/** value: lead form unique identifier, settings: none */
|
|
30
|
+
readonly SHOW_LEAD_FORM: 17;
|
|
31
|
+
/** value: lead form processor unique identifier, settings: none */
|
|
32
|
+
readonly SET_LEAD_FORM_PROCESSOR: 18;
|
|
33
|
+
/** value: button unique identifier, settings: none */
|
|
34
|
+
readonly SHOW_BUTTON: 19;
|
|
35
|
+
/** value: unique identifier of the parent room of the window, settings: none */
|
|
36
|
+
readonly SHOW_CHAT_DIALOG: 20;
|
|
37
|
+
/** value: priority as an integer [1 - 10], settings: none */
|
|
38
|
+
readonly SET_VISITOR_PRIORITY: 21;
|
|
39
|
+
/** value: none , settings: none */
|
|
40
|
+
readonly DISABLE_CAPACITY_CHECK: 22;
|
|
41
|
+
/** value: CSS code as a string, settings: none */
|
|
42
|
+
readonly INJECT_CSS: 23;
|
|
43
|
+
/** value: message as a string, settings: ActionSendChatMessageSettings */
|
|
44
|
+
readonly SEND_SYSTEM_MESSAGE: 25;
|
|
45
|
+
/** value: interactionUuid, settings: none */
|
|
46
|
+
readonly LOAD_INTERACTION: 26;
|
|
47
|
+
/** value: asset unique identifier, settings: ActionSendInteractionToChatSettings */
|
|
48
|
+
readonly SEND_INTERACTION_TO_CHAT: 27;
|
|
49
|
+
};
|
|
50
|
+
export declare type ActionType = typeof ActionTypes[keyof typeof ActionTypes];
|
|
51
|
+
export declare type ActionTypeString = keyof typeof ActionTypes;
|
|
52
|
+
export declare const ACTION_TYPES: ("SEND_AUTOSUGGEST" | "JOIN_ROOMS" | "NO_CHATBUTTON" | "NO_AUTOSUGGEST" | "RUN_JAVASCRIPT" | "ENABLE_CHATBUTTON" | "SHOW_ELEMENTS" | "HIDE_ELEMENTS" | "REDIRECT" | "LOAD_LEAD_FORM" | "CHANGE_CB_TEXT" | "CHANGE_CB_TARGET" | "CHANGE_LANGUAGE" | "SHOW_LEAD_FORM" | "SET_LEAD_FORM_PROCESSOR" | "SHOW_BUTTON" | "SHOW_CHAT_DIALOG" | "SET_VISITOR_PRIORITY" | "DISABLE_CAPACITY_CHECK" | "INJECT_CSS" | "SEND_SYSTEM_MESSAGE" | "LOAD_INTERACTION" | "SEND_INTERACTION_TO_CHAT")[];
|
|
53
|
+
export interface ActionShowAutosuggestSettings {
|
|
54
|
+
/** Unique identifier of the user from whom the message shall be sent */
|
|
55
|
+
autosuggest_user_id: UserUid;
|
|
56
|
+
/** Delay before the chat window will be closed in seconds */
|
|
57
|
+
close_delay: number;
|
|
58
|
+
}
|
|
59
|
+
export interface ActionSendChatMessageSettings {
|
|
60
|
+
/** Name of the sender */
|
|
61
|
+
sender_public_name: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ActionSendInteractionToChatSettings {
|
|
64
|
+
/** Name of the sender */
|
|
65
|
+
sender_public_name: string;
|
|
66
|
+
/** Optional message to send alongside of the interaction */
|
|
67
|
+
message?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare type ActionSettingsType = ActionShowAutosuggestSettings | ActionSendChatMessageSettings | ActionSendInteractionToChatSettings | {};
|
|
70
|
+
export declare const ACTION_STYLES: readonly ["primary", "secondary", "info", "success", "warning", "danger", "link", "brand_primary", "brand_secondary"];
|
|
71
|
+
export declare type ActionStyle = typeof ACTION_STYLES[number];
|
|
72
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM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ShowAutosuggestSettings*/
|
|
3
|
+
SEND_AUTOSUGGEST: 1,
|
|
4
|
+
/** value: array of room unique identifiers, settings: none */
|
|
5
|
+
JOIN_ROOMS: 2,
|
|
6
|
+
/** value: none, settings: none */
|
|
7
|
+
NO_CHATBUTTON: 5,
|
|
8
|
+
/** value: none, settings: none */
|
|
9
|
+
NO_AUTOSUGGEST: 6,
|
|
10
|
+
/** value: JavaScript expression as a string, settings:none */
|
|
11
|
+
RUN_JAVASCRIPT: 7,
|
|
12
|
+
/** value: none, settings: none */
|
|
13
|
+
ENABLE_CHATBUTTON: 8,
|
|
14
|
+
/** value: CSS selector as a string, settings: none */
|
|
15
|
+
SHOW_ELEMENTS: 9,
|
|
16
|
+
/** value: CSS selector as a string, settings: none */
|
|
17
|
+
HIDE_ELEMENTS: 10,
|
|
18
|
+
/** value: URL as a string, settings: none */
|
|
19
|
+
REDIRECT: 11,
|
|
20
|
+
/** value: lead form unique identifier, settings: none */
|
|
21
|
+
LOAD_LEAD_FORM: 13,
|
|
22
|
+
/** value: button text as a string, settings: none */
|
|
23
|
+
CHANGE_CB_TEXT: 14,
|
|
24
|
+
/** value: room unique identifier, settings: none */
|
|
25
|
+
CHANGE_CB_TARGET: 15,
|
|
26
|
+
/** value: language as a RFC 3066 code, settings: none */
|
|
27
|
+
CHANGE_LANGUAGE: 16,
|
|
28
|
+
/** value: lead form unique identifier, settings: none */
|
|
29
|
+
SHOW_LEAD_FORM: 17,
|
|
30
|
+
/** value: lead form processor unique identifier, settings: none */
|
|
31
|
+
SET_LEAD_FORM_PROCESSOR: 18,
|
|
32
|
+
/** value: button unique identifier, settings: none */
|
|
33
|
+
SHOW_BUTTON: 19,
|
|
34
|
+
/** value: unique identifier of the parent room of the window, settings: none */
|
|
35
|
+
SHOW_CHAT_DIALOG: 20,
|
|
36
|
+
/** value: priority as an integer [1 - 10], settings: none */
|
|
37
|
+
SET_VISITOR_PRIORITY: 21,
|
|
38
|
+
/** value: none , settings: none */
|
|
39
|
+
DISABLE_CAPACITY_CHECK: 22,
|
|
40
|
+
/** value: CSS code as a string, settings: none */
|
|
41
|
+
INJECT_CSS: 23,
|
|
42
|
+
/** value: message as a string, settings: ActionSendChatMessageSettings */
|
|
43
|
+
SEND_SYSTEM_MESSAGE: 25,
|
|
44
|
+
/** value: interactionUuid, settings: none */
|
|
45
|
+
LOAD_INTERACTION: 26,
|
|
46
|
+
/** value: asset unique identifier, settings: ActionSendInteractionToChatSettings */
|
|
47
|
+
SEND_INTERACTION_TO_CHAT: 27,
|
|
48
|
+
};
|
|
49
|
+
export var ACTION_TYPES = Object.keys(ActionTypes);
|
|
50
|
+
export var ACTION_STYLES = [
|
|
51
|
+
"primary",
|
|
52
|
+
"secondary",
|
|
53
|
+
"info",
|
|
54
|
+
"success",
|
|
55
|
+
"warning",
|
|
56
|
+
"danger",
|
|
57
|
+
"link",
|
|
58
|
+
"brand_primary",
|
|
59
|
+
"brand_secondary",
|
|
60
|
+
];
|
package/lib/apps.d.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { NestedOrganization } from "./customer";
|
|
2
|
+
import { NestedUser } from "./customer";
|
|
3
|
+
import { PublicNestedAsset } from "./assets";
|
|
4
|
+
import { GiosgAppUid, OrganizationUid, UserUid, AssetUid, GiosgAppInstanceUid, UserPermissionScope } from "./types";
|
|
5
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
6
|
+
export interface GiosgAppInstance {
|
|
7
|
+
id: GiosgAppInstanceUid;
|
|
8
|
+
app_id: GiosgAppUid;
|
|
9
|
+
app: NestedGiosgApp;
|
|
10
|
+
organization_id: OrganizationUid;
|
|
11
|
+
organization: NestedOrganization;
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
|
+
app_user_id: UserUid | null;
|
|
15
|
+
app_user: NestedUser | null;
|
|
16
|
+
allowed_scopes: UserPermissionScope[];
|
|
17
|
+
is_disabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare type GiosgAppTriggerCondition = "chat_start" | "chat_end" | "chat_end_with_msgs" | "chat_open" | "chat_close" | "chat_focus" | "console_load" | "setup" | "install" | "uninstall" | "manual_dialog" | "manual_nav";
|
|
20
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
21
|
+
export interface GiosgApp {
|
|
22
|
+
id: GiosgAppUid;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
icon_asset_id: AssetUid | null;
|
|
26
|
+
icon_asset: PublicNestedAsset | null;
|
|
27
|
+
owned_by_organization_id: OrganizationUid;
|
|
28
|
+
owned_by_organization: NestedOrganization;
|
|
29
|
+
secret: string;
|
|
30
|
+
is_available_to_anyone: boolean;
|
|
31
|
+
is_available_to_partners: boolean;
|
|
32
|
+
is_app_user_required: boolean;
|
|
33
|
+
app_user_default_first_name: string | null;
|
|
34
|
+
app_user_default_last_name: string | null;
|
|
35
|
+
app_user_default_alias: string | null;
|
|
36
|
+
terms_of_service_url: string;
|
|
37
|
+
privacy_policy_url: string;
|
|
38
|
+
trigger_url: string | null;
|
|
39
|
+
trigger_conditions: GiosgAppTriggerCondition[];
|
|
40
|
+
required_scopes: UserPermissionScope[];
|
|
41
|
+
allowed_redirect_uris: string[];
|
|
42
|
+
installation_count: number;
|
|
43
|
+
created_at: string;
|
|
44
|
+
updated_at: string;
|
|
45
|
+
created_by_user_id: UserUid;
|
|
46
|
+
created_by_user: NestedUser;
|
|
47
|
+
updated_by_user_id: UserUid;
|
|
48
|
+
updated_by_user: NestedUser;
|
|
49
|
+
}
|
|
50
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
51
|
+
export interface GiosgAppPayload {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
icon_asset_id?: AssetUid | null;
|
|
55
|
+
is_available_to_anyone?: boolean;
|
|
56
|
+
is_available_to_partners?: boolean;
|
|
57
|
+
is_app_user_required: boolean;
|
|
58
|
+
app_user_default_first_name?: string | null;
|
|
59
|
+
app_user_default_last_name?: string | null;
|
|
60
|
+
app_user_default_alias?: string | null;
|
|
61
|
+
terms_of_service_url: string;
|
|
62
|
+
privacy_policy_url: string;
|
|
63
|
+
trigger_url?: string | null;
|
|
64
|
+
trigger_conditions?: GiosgAppTriggerCondition[];
|
|
65
|
+
required_scopes?: UserPermissionScope[];
|
|
66
|
+
allowed_redirect_uris?: string[];
|
|
67
|
+
}
|
|
68
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
69
|
+
export interface InstalledGiosgApp {
|
|
70
|
+
id: GiosgAppUid;
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
icon_asset_id: AssetUid;
|
|
74
|
+
icon_asset: PublicNestedAsset;
|
|
75
|
+
owned_by_organization_id: OrganizationUid;
|
|
76
|
+
owned_by_organization: NestedOrganization;
|
|
77
|
+
is_app_user_required: boolean;
|
|
78
|
+
installation_count: number;
|
|
79
|
+
created_at: string;
|
|
80
|
+
updated_at: string;
|
|
81
|
+
trigger_conditions: GiosgAppTriggerCondition[];
|
|
82
|
+
is_disabled: boolean;
|
|
83
|
+
}
|
|
84
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
85
|
+
export interface NestedGiosgApp {
|
|
86
|
+
id: GiosgAppUid;
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
icon_asset_id: AssetUid;
|
|
90
|
+
icon_asset: PublicNestedAsset;
|
|
91
|
+
owned_by_organization_id: OrganizationUid;
|
|
92
|
+
owned_by_organization: NestedOrganization;
|
|
93
|
+
is_app_user_required: boolean;
|
|
94
|
+
required_scopes: UserPermissionScope[];
|
|
95
|
+
installation_count: number;
|
|
96
|
+
created_at: string;
|
|
97
|
+
updated_at: string;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,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CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,WAAW,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,QAAQ,CAAC;IACxB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,wBAAwB,EAAE,eAAe,CAAC;IAC1C,qBAAqB,EAAE,kBAAkB,CAAC;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,wBAAwB,EAAE,CAAC;IAC/C,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,WAAW,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,QAAQ,CAAC;IACxB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,wBAAwB,EAAE,eAAe,CAAC;IAC1C,qBAAqB,EAAE,kBAAkB,CAAC;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/lib/apps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/assets.d.ts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { NestedUser } from "./customer";
|
|
2
|
+
import { AssetUid, OrganizationUid, UserUid, AssetType } from "./types";
|
|
3
|
+
export interface Asset {
|
|
4
|
+
/** Unique identifier of the asset */
|
|
5
|
+
id: AssetUid;
|
|
6
|
+
/** The original file name of the uploaded file */
|
|
7
|
+
file_name: string;
|
|
8
|
+
/** Content type of the uploaded file */
|
|
9
|
+
content_type: string | null;
|
|
10
|
+
/** Kind of file the asset is */
|
|
11
|
+
kind: AssetType | null;
|
|
12
|
+
/** Name of the asset */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Description of the asset */
|
|
15
|
+
description: string | null;
|
|
16
|
+
/** The full URL for original, uploaded file. Use this URL to link to your asset */
|
|
17
|
+
url: string;
|
|
18
|
+
/** Unique identifier of the organization that owns the asset */
|
|
19
|
+
organization_id: OrganizationUid;
|
|
20
|
+
/** Size of the uploaded file in bytes */
|
|
21
|
+
size: number;
|
|
22
|
+
/** Character encoding for a text file */
|
|
23
|
+
charset: string | null;
|
|
24
|
+
/** Date when the asset was created */
|
|
25
|
+
created_at: string;
|
|
26
|
+
/** Date when the asset was changed for the last time */
|
|
27
|
+
updated_at: string;
|
|
28
|
+
/** Unique identifier of the user who created the asset */
|
|
29
|
+
created_by_user_id: UserUid;
|
|
30
|
+
/** Unique identifier of the user who changed the asset for the last time */
|
|
31
|
+
updated_by_user_id: UserUid;
|
|
32
|
+
/** User who created the asset */
|
|
33
|
+
created_by_user: NestedUser;
|
|
34
|
+
/** User who changed the asset for the last time */
|
|
35
|
+
updated_by_user: NestedUser;
|
|
36
|
+
/** The width of an image in pixels. Available for images only. It is null for other types of assets */
|
|
37
|
+
width: number | null;
|
|
38
|
+
/** The height of an image in pixels. Available for images only. It is null for other types of assets */
|
|
39
|
+
height: number | null;
|
|
40
|
+
}
|
|
41
|
+
export interface AssetPayload {
|
|
42
|
+
/** Name for the newly created asset. If omitted, defaults to the file name. Otherwise, it must be a non-empty string value */
|
|
43
|
+
name?: string;
|
|
44
|
+
/** Description of the asset */
|
|
45
|
+
description?: string | null;
|
|
46
|
+
/** Character encoding for a text file */
|
|
47
|
+
charset?: string | null;
|
|
48
|
+
/** The asset file to be uploaded. File name is required */
|
|
49
|
+
upload: File;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
*/
|
|
54
|
+
export interface AssetUpdate {
|
|
55
|
+
/** Unique identifier of the asset */
|
|
56
|
+
id: AssetUid;
|
|
57
|
+
/** The original file name of the uploaded file */
|
|
58
|
+
file_name: string;
|
|
59
|
+
/** Content type of the uploaded file */
|
|
60
|
+
content_type: string | null;
|
|
61
|
+
/** Kind of file the asset is */
|
|
62
|
+
kind: AssetType | null;
|
|
63
|
+
/** Name of the asset */
|
|
64
|
+
name: string;
|
|
65
|
+
/** Description of the asset */
|
|
66
|
+
description: string | null;
|
|
67
|
+
/** The full URL for original, uploaded file. Use this URL to link to your asset */
|
|
68
|
+
url: string;
|
|
69
|
+
/** Unique identifier of the organization that owns the asset */
|
|
70
|
+
organization_id: OrganizationUid;
|
|
71
|
+
/** Size of the uploaded file in bytes */
|
|
72
|
+
size: number;
|
|
73
|
+
/** Character encoding for a text file */
|
|
74
|
+
charset: string | null;
|
|
75
|
+
/** Date when the asset was created */
|
|
76
|
+
created_at: string;
|
|
77
|
+
/** Date when the asset was changed for the last time */
|
|
78
|
+
updated_at: string;
|
|
79
|
+
/** Unique identifier of the user who created the asset */
|
|
80
|
+
created_by_user_id: UserUid;
|
|
81
|
+
/** Unique identifier of the user who changed the asset for the last time */
|
|
82
|
+
updated_by_user_id: UserUid;
|
|
83
|
+
/** User who created the asset */
|
|
84
|
+
created_by_user: NestedUser;
|
|
85
|
+
/** User who changed the asset for the last time */
|
|
86
|
+
updated_by_user: NestedUser;
|
|
87
|
+
/** The width of an image in pixels. Available for images only. It is null for other types of assets */
|
|
88
|
+
width: number | null;
|
|
89
|
+
/** The height of an image in pixels. Available for images only. It is null for other types of assets */
|
|
90
|
+
height: number | null;
|
|
91
|
+
/** The asset file to be uploaded. File name is required */
|
|
92
|
+
upload?: File;
|
|
93
|
+
}
|
|
94
|
+
export interface AssetUpdatePayload {
|
|
95
|
+
/** Name of the asset */
|
|
96
|
+
name?: string;
|
|
97
|
+
/** Description of the asset */
|
|
98
|
+
description?: string | null;
|
|
99
|
+
/** Character encoding for a text file */
|
|
100
|
+
charset?: string | null;
|
|
101
|
+
/** The asset file to be uploaded. File name is required */
|
|
102
|
+
upload?: File;
|
|
103
|
+
}
|
|
104
|
+
export interface NestedAsset {
|
|
105
|
+
/** Unique identifier of the asset*/
|
|
106
|
+
id: AssetUid;
|
|
107
|
+
/** The full URL for original, uploaded file. Use this URL to link to your asset */
|
|
108
|
+
url: string;
|
|
109
|
+
/** Name of the asset */
|
|
110
|
+
name: string;
|
|
111
|
+
/** Description of the asset */
|
|
112
|
+
description: string | null;
|
|
113
|
+
/** Kind of file the asset is */
|
|
114
|
+
kind: AssetType | null;
|
|
115
|
+
/** Content type of the uploaded file */
|
|
116
|
+
content_type: string | null;
|
|
117
|
+
/** Size of the uploaded file in bytes */
|
|
118
|
+
size: number;
|
|
119
|
+
/** Character encoding for a text file */
|
|
120
|
+
charset: string | null;
|
|
121
|
+
/** The width of an image in pixels. Available for images only. It is null for other types of assets */
|
|
122
|
+
width: number | null;
|
|
123
|
+
/** The height of an image in pixels. Available for images only. It is null for other types of assets */
|
|
124
|
+
height: number | null;
|
|
125
|
+
}
|
|
126
|
+
export interface PublicNestedAsset {
|
|
127
|
+
/** Unique identifier of the asset */
|
|
128
|
+
id: AssetUid;
|
|
129
|
+
/** The full URL for original, uploaded file. Use this URL to link to your asset */
|
|
130
|
+
url: string;
|
|
131
|
+
/** Kind of file the asset is */
|
|
132
|
+
kind: AssetType | null;
|
|
133
|
+
/** Content type of the uploaded file */
|
|
134
|
+
content_type: string | null;
|
|
135
|
+
/** Size of the uploaded file in bytes */
|
|
136
|
+
size: number;
|
|
137
|
+
/** Character encoding for a text file */
|
|
138
|
+
charset: string | null;
|
|
139
|
+
/** The width of an image in pixels. Available for images only. It is null for other types of assets */
|
|
140
|
+
width: number | null;
|
|
141
|
+
/** The height of an image in pixels. Available for images only. It is null for other types of assets */
|
|
142
|
+
height: number | null;
|
|
143
|
+
}
|
|
144
|
+
//# sourceM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
package/lib/assets.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/brands.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { NestedAsset } from "./assets";
|
|
2
|
+
import { NestedOrganization } from "./customer";
|
|
3
|
+
import { NestedUser } from "./customer";
|
|
4
|
+
import { PublicNestedAsset } from "./assets";
|
|
5
|
+
import { BrandUid, OrganizationUid, AssetUid } from "./types";
|
|
6
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
7
|
+
export interface Brand {
|
|
8
|
+
id: BrandUid;
|
|
9
|
+
organization: NestedOrganization;
|
|
10
|
+
organization_id: OrganizationUid;
|
|
11
|
+
name: string;
|
|
12
|
+
primary_color_code: string | null;
|
|
13
|
+
secondary_color_code: string | null;
|
|
14
|
+
logo_asset_id: AssetUid | null;
|
|
15
|
+
logo_asset: NestedAsset | null;
|
|
16
|
+
chat_button_asset_id: AssetUid | null;
|
|
17
|
+
chat_button_asset: NestedAsset | null;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
created_by_user_id: string;
|
|
21
|
+
updated_by_user_id: string;
|
|
22
|
+
created_by_user: NestedUser;
|
|
23
|
+
updated_by_user: NestedUser;
|
|
24
|
+
}
|
|
25
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
26
|
+
export interface BrandPayload {
|
|
27
|
+
name: string;
|
|
28
|
+
primary_color_code: string | null;
|
|
29
|
+
secondary_color_code: string | null;
|
|
30
|
+
logo_asset_id?: AssetUid | null;
|
|
31
|
+
}
|
|
32
|
+
/** TODO: Add jsdocs and check nullability of fields */
|
|
33
|
+
export interface PublicBrand {
|
|
34
|
+
id: BrandUid;
|
|
35
|
+
organization_id: OrganizationUid;
|
|
36
|
+
primary_color_code: string | null;
|
|
37
|
+
secondary_color_code: string | null;
|
|
38
|
+
logo_asset_id: AssetUid | null;
|
|
39
|
+
logo_asset: PublicNestedAsset | null;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=brands.d.ts.map
|