@deepraxis/sdk 0.1.1-dev.9beb33a → 0.1.1-dev.bdcd5e6
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/METHODS.md +1 -59
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +1 -103
- package/dist/generated/sdk.gen.js +0 -248
- package/dist/generated/types.gen.d.ts +569 -1790
- package/dist/operations.generated.d.ts +0 -318
- package/dist/operations.generated.js +0 -380
- package/dist/resources.generated.d.ts +0 -200
- package/dist/resources.generated.js +0 -31
- package/package.json +1 -1
|
@@ -29787,37 +29787,45 @@ export type SetRunFeedbackResponses = {
|
|
|
29787
29787
|
};
|
|
29788
29788
|
};
|
|
29789
29789
|
export type SetRunFeedbackResponse = SetRunFeedbackResponses[keyof SetRunFeedbackResponses];
|
|
29790
|
-
export type
|
|
29790
|
+
export type ListCustomersData = {
|
|
29791
29791
|
body?: never;
|
|
29792
29792
|
path: {
|
|
29793
29793
|
/**
|
|
29794
|
-
* Active service agent
|
|
29794
|
+
* Active service agent id from agent creation or listing.
|
|
29795
29795
|
*/
|
|
29796
29796
|
agent_id: string;
|
|
29797
29797
|
};
|
|
29798
29798
|
query?: {
|
|
29799
29799
|
/**
|
|
29800
|
-
* Maximum
|
|
29800
|
+
* Maximum customers per page, 1 to 100; defaults to 20.
|
|
29801
29801
|
*/
|
|
29802
29802
|
limit?: number;
|
|
29803
29803
|
/**
|
|
29804
|
-
* next_page from the previous response with the same
|
|
29804
|
+
* next_page from the previous response with the same q, type, blocked and limit.
|
|
29805
29805
|
*/
|
|
29806
29806
|
page?: string;
|
|
29807
29807
|
/**
|
|
29808
|
-
* Case-sensitive literal prefix of
|
|
29808
|
+
* Case-sensitive literal prefix of the customer id; omit for all customers.
|
|
29809
29809
|
*/
|
|
29810
29810
|
q?: string;
|
|
29811
|
+
/**
|
|
29812
|
+
* Only identified or only anonymous customers; omit for both.
|
|
29813
|
+
*/
|
|
29814
|
+
type?: 'identified' | 'anonymous';
|
|
29815
|
+
/**
|
|
29816
|
+
* true for blocked customers only, false for customers who are not blocked; omit for both.
|
|
29817
|
+
*/
|
|
29818
|
+
blocked?: boolean;
|
|
29811
29819
|
};
|
|
29812
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
29820
|
+
url: '/agent/v1/agents/{agent_id}/customers';
|
|
29813
29821
|
};
|
|
29814
|
-
export type
|
|
29822
|
+
export type ListCustomersErrors = {
|
|
29815
29823
|
/**
|
|
29816
|
-
*
|
|
29824
|
+
* INVALID_PARAMS: limit outside 1 to 100, type other than identified or anonymous, blocked other than true or false, or an unknown query parameter. INVALID_PAGE_TOKEN: next_page from another query; restart without page.
|
|
29817
29825
|
*/
|
|
29818
29826
|
400: unknown;
|
|
29819
29827
|
/**
|
|
29820
|
-
* Authenticate with a
|
|
29828
|
+
* Authenticate with your API key or a console session.
|
|
29821
29829
|
*/
|
|
29822
29830
|
401: unknown;
|
|
29823
29831
|
/**
|
|
@@ -29825,14 +29833,14 @@ export type ListEndUsersErrors = {
|
|
|
29825
29833
|
*/
|
|
29826
29834
|
403: AgentError;
|
|
29827
29835
|
/**
|
|
29828
|
-
*
|
|
29836
|
+
* The agent is not an active service agent of your organization, or the caller is a customer access token.
|
|
29829
29837
|
*/
|
|
29830
29838
|
404: unknown;
|
|
29831
29839
|
};
|
|
29832
|
-
export type
|
|
29833
|
-
export type
|
|
29840
|
+
export type ListCustomersError = ListCustomersErrors[keyof ListCustomersErrors];
|
|
29841
|
+
export type ListCustomersResponses = {
|
|
29834
29842
|
/**
|
|
29835
|
-
* Matching
|
|
29843
|
+
* Matching customers and the next page cursor.
|
|
29836
29844
|
*/
|
|
29837
29845
|
200: {
|
|
29838
29846
|
/**
|
|
@@ -29840,23 +29848,35 @@ export type ListEndUsersResponses = {
|
|
|
29840
29848
|
*/
|
|
29841
29849
|
data: Array<{
|
|
29842
29850
|
/**
|
|
29843
|
-
*
|
|
29851
|
+
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
29852
|
+
*/
|
|
29853
|
+
id: string;
|
|
29854
|
+
/**
|
|
29855
|
+
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
29856
|
+
*/
|
|
29857
|
+
type: 'identified' | 'anonymous';
|
|
29858
|
+
/**
|
|
29859
|
+
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
29860
|
+
*/
|
|
29861
|
+
merged_into: string | null;
|
|
29862
|
+
/**
|
|
29863
|
+
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
29844
29864
|
*/
|
|
29845
|
-
|
|
29865
|
+
blocked: boolean;
|
|
29846
29866
|
/**
|
|
29847
|
-
* Earliest session
|
|
29867
|
+
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
29848
29868
|
*/
|
|
29849
29869
|
first_seen_at: string | null;
|
|
29850
29870
|
/**
|
|
29851
|
-
* Latest session update or token issuance
|
|
29871
|
+
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
29852
29872
|
*/
|
|
29853
|
-
|
|
29873
|
+
last_seen_at: string | null;
|
|
29854
29874
|
/**
|
|
29855
|
-
*
|
|
29875
|
+
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
29856
29876
|
*/
|
|
29857
29877
|
session_count: number;
|
|
29858
29878
|
/**
|
|
29859
|
-
*
|
|
29879
|
+
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
29860
29880
|
*/
|
|
29861
29881
|
cost: {
|
|
29862
29882
|
/**
|
|
@@ -29868,45 +29888,41 @@ export type ListEndUsersResponses = {
|
|
|
29868
29888
|
*/
|
|
29869
29889
|
currency: 'USD';
|
|
29870
29890
|
};
|
|
29871
|
-
/**
|
|
29872
|
-
* Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
|
|
29873
|
-
*/
|
|
29874
|
-
blocked: boolean;
|
|
29875
29891
|
}>;
|
|
29876
29892
|
/**
|
|
29877
|
-
* Cursor for the same agent, q and limit; null when exhausted.
|
|
29893
|
+
* Cursor for the next page with the same agent, q, type, blocked and limit; null when exhausted.
|
|
29878
29894
|
*/
|
|
29879
29895
|
next_page: string | null;
|
|
29880
29896
|
};
|
|
29881
29897
|
};
|
|
29882
|
-
export type
|
|
29883
|
-
export type
|
|
29898
|
+
export type ListCustomersResponse = ListCustomersResponses[keyof ListCustomersResponses];
|
|
29899
|
+
export type DeleteCustomerData = {
|
|
29884
29900
|
body?: never;
|
|
29885
29901
|
path: {
|
|
29886
29902
|
/**
|
|
29887
|
-
* Active service agent
|
|
29903
|
+
* Active service agent id from agent creation or listing.
|
|
29888
29904
|
*/
|
|
29889
29905
|
agent_id: string;
|
|
29890
29906
|
/**
|
|
29891
|
-
*
|
|
29907
|
+
* Customer id from customer listing, or your own customer_id.
|
|
29892
29908
|
*/
|
|
29893
|
-
|
|
29909
|
+
customer_id: string;
|
|
29894
29910
|
};
|
|
29895
29911
|
query: {
|
|
29896
29912
|
/**
|
|
29897
|
-
* Must
|
|
29913
|
+
* Must equal the customer_id path parameter exactly, confirming the destructive deletion.
|
|
29898
29914
|
*/
|
|
29899
29915
|
confirm: string;
|
|
29900
29916
|
};
|
|
29901
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
29917
|
+
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}';
|
|
29902
29918
|
};
|
|
29903
|
-
export type
|
|
29919
|
+
export type DeleteCustomerErrors = {
|
|
29904
29920
|
/**
|
|
29905
|
-
*
|
|
29921
|
+
* INVALID_PARAMS: confirm is missing or differs from customer_id; send ?confirm=<customer_id>.
|
|
29906
29922
|
*/
|
|
29907
29923
|
400: unknown;
|
|
29908
29924
|
/**
|
|
29909
|
-
* Authenticate with a
|
|
29925
|
+
* Authenticate with your API key or a console session.
|
|
29910
29926
|
*/
|
|
29911
29927
|
401: unknown;
|
|
29912
29928
|
/**
|
|
@@ -29914,12 +29930,12 @@ export type DeleteEndUserErrors = {
|
|
|
29914
29930
|
*/
|
|
29915
29931
|
403: AgentError;
|
|
29916
29932
|
/**
|
|
29917
|
-
*
|
|
29933
|
+
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
29918
29934
|
*/
|
|
29919
29935
|
404: unknown;
|
|
29920
29936
|
};
|
|
29921
|
-
export type
|
|
29922
|
-
export type
|
|
29937
|
+
export type DeleteCustomerError = DeleteCustomerErrors[keyof DeleteCustomerErrors];
|
|
29938
|
+
export type DeleteCustomerResponses = {
|
|
29923
29939
|
/**
|
|
29924
29940
|
* Deletion accepted; poll the deletion endpoint until done or failed.
|
|
29925
29941
|
*/
|
|
@@ -29934,29 +29950,25 @@ export type DeleteEndUserResponses = {
|
|
|
29934
29950
|
status: 'pending';
|
|
29935
29951
|
};
|
|
29936
29952
|
};
|
|
29937
|
-
export type
|
|
29938
|
-
export type
|
|
29953
|
+
export type DeleteCustomerResponse = DeleteCustomerResponses[keyof DeleteCustomerResponses];
|
|
29954
|
+
export type GetCustomerData = {
|
|
29939
29955
|
body?: never;
|
|
29940
29956
|
path: {
|
|
29941
29957
|
/**
|
|
29942
|
-
* Active service agent
|
|
29958
|
+
* Active service agent id from agent creation or listing.
|
|
29943
29959
|
*/
|
|
29944
29960
|
agent_id: string;
|
|
29945
29961
|
/**
|
|
29946
|
-
*
|
|
29962
|
+
* Customer id from customer listing, or your own customer_id.
|
|
29947
29963
|
*/
|
|
29948
|
-
|
|
29964
|
+
customer_id: string;
|
|
29949
29965
|
};
|
|
29950
29966
|
query?: never;
|
|
29951
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
29967
|
+
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}';
|
|
29952
29968
|
};
|
|
29953
|
-
export type
|
|
29954
|
-
/**
|
|
29955
|
-
* Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
|
|
29956
|
-
*/
|
|
29957
|
-
400: unknown;
|
|
29969
|
+
export type GetCustomerErrors = {
|
|
29958
29970
|
/**
|
|
29959
|
-
* Authenticate with a
|
|
29971
|
+
* Authenticate with your API key or a console session.
|
|
29960
29972
|
*/
|
|
29961
29973
|
401: unknown;
|
|
29962
29974
|
/**
|
|
@@ -29964,34 +29976,46 @@ export type GetEndUserErrors = {
|
|
|
29964
29976
|
*/
|
|
29965
29977
|
403: AgentError;
|
|
29966
29978
|
/**
|
|
29967
|
-
*
|
|
29979
|
+
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
29968
29980
|
*/
|
|
29969
29981
|
404: unknown;
|
|
29970
29982
|
};
|
|
29971
|
-
export type
|
|
29972
|
-
export type
|
|
29983
|
+
export type GetCustomerError = GetCustomerErrors[keyof GetCustomerErrors];
|
|
29984
|
+
export type GetCustomerResponses = {
|
|
29973
29985
|
/**
|
|
29974
|
-
*
|
|
29986
|
+
* The customer with its recent sessions.
|
|
29975
29987
|
*/
|
|
29976
29988
|
200: {
|
|
29977
29989
|
/**
|
|
29978
|
-
*
|
|
29990
|
+
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
29991
|
+
*/
|
|
29992
|
+
id: string;
|
|
29993
|
+
/**
|
|
29994
|
+
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
29995
|
+
*/
|
|
29996
|
+
type: 'identified' | 'anonymous';
|
|
29997
|
+
/**
|
|
29998
|
+
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
29999
|
+
*/
|
|
30000
|
+
merged_into: string | null;
|
|
30001
|
+
/**
|
|
30002
|
+
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
29979
30003
|
*/
|
|
29980
|
-
|
|
30004
|
+
blocked: boolean;
|
|
29981
30005
|
/**
|
|
29982
|
-
* Earliest session
|
|
30006
|
+
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
29983
30007
|
*/
|
|
29984
30008
|
first_seen_at: string | null;
|
|
29985
30009
|
/**
|
|
29986
|
-
* Latest session update or token issuance
|
|
30010
|
+
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
29987
30011
|
*/
|
|
29988
|
-
|
|
30012
|
+
last_seen_at: string | null;
|
|
29989
30013
|
/**
|
|
29990
|
-
*
|
|
30014
|
+
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
29991
30015
|
*/
|
|
29992
30016
|
session_count: number;
|
|
29993
30017
|
/**
|
|
29994
|
-
*
|
|
30018
|
+
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
29995
30019
|
*/
|
|
29996
30020
|
cost: {
|
|
29997
30021
|
/**
|
|
@@ -30004,11 +30028,7 @@ export type GetEndUserResponses = {
|
|
|
30004
30028
|
currency: 'USD';
|
|
30005
30029
|
};
|
|
30006
30030
|
/**
|
|
30007
|
-
*
|
|
30008
|
-
*/
|
|
30009
|
-
blocked: boolean;
|
|
30010
|
-
/**
|
|
30011
|
-
* Up to twenty sessions, ordered by most recent update first.
|
|
30031
|
+
* Up to twenty sessions of the customer, and of anonymous customers merged into it, most recently updated first.
|
|
30012
30032
|
*/
|
|
30013
30033
|
recent_sessions: Array<{
|
|
30014
30034
|
/**
|
|
@@ -30034,29 +30054,25 @@ export type GetEndUserResponses = {
|
|
|
30034
30054
|
}>;
|
|
30035
30055
|
};
|
|
30036
30056
|
};
|
|
30037
|
-
export type
|
|
30038
|
-
export type
|
|
30057
|
+
export type GetCustomerResponse = GetCustomerResponses[keyof GetCustomerResponses];
|
|
30058
|
+
export type GetCustomerDeletionData = {
|
|
30039
30059
|
body?: never;
|
|
30040
30060
|
path: {
|
|
30041
30061
|
/**
|
|
30042
|
-
* Active service agent
|
|
30062
|
+
* Active service agent id from agent creation or listing.
|
|
30043
30063
|
*/
|
|
30044
30064
|
agent_id: string;
|
|
30045
30065
|
/**
|
|
30046
|
-
*
|
|
30066
|
+
* Customer id from customer listing, or your own customer_id.
|
|
30047
30067
|
*/
|
|
30048
|
-
|
|
30068
|
+
customer_id: string;
|
|
30049
30069
|
};
|
|
30050
30070
|
query?: never;
|
|
30051
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
30071
|
+
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion';
|
|
30052
30072
|
};
|
|
30053
|
-
export type
|
|
30054
|
-
/**
|
|
30055
|
-
* Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
|
|
30056
|
-
*/
|
|
30057
|
-
400: unknown;
|
|
30073
|
+
export type GetCustomerDeletionErrors = {
|
|
30058
30074
|
/**
|
|
30059
|
-
* Authenticate with a
|
|
30075
|
+
* Authenticate with your API key or a console session.
|
|
30060
30076
|
*/
|
|
30061
30077
|
401: unknown;
|
|
30062
30078
|
/**
|
|
@@ -30064,14 +30080,14 @@ export type GetEndUserDeletionErrors = {
|
|
|
30064
30080
|
*/
|
|
30065
30081
|
403: AgentError;
|
|
30066
30082
|
/**
|
|
30067
|
-
*
|
|
30083
|
+
* CUSTOMER_NOT_FOUND or no deletion task: the customer or task is unknown, or the caller is a customer access token.
|
|
30068
30084
|
*/
|
|
30069
30085
|
404: unknown;
|
|
30070
30086
|
};
|
|
30071
|
-
export type
|
|
30072
|
-
export type
|
|
30087
|
+
export type GetCustomerDeletionError = GetCustomerDeletionErrors[keyof GetCustomerDeletionErrors];
|
|
30088
|
+
export type GetCustomerDeletionResponses = {
|
|
30073
30089
|
/**
|
|
30074
|
-
*
|
|
30090
|
+
* The latest deletion task and its snapshot counts.
|
|
30075
30091
|
*/
|
|
30076
30092
|
200: {
|
|
30077
30093
|
/**
|
|
@@ -30125,29 +30141,25 @@ export type GetEndUserDeletionResponses = {
|
|
|
30125
30141
|
updated_at: string;
|
|
30126
30142
|
};
|
|
30127
30143
|
};
|
|
30128
|
-
export type
|
|
30129
|
-
export type
|
|
30144
|
+
export type GetCustomerDeletionResponse = GetCustomerDeletionResponses[keyof GetCustomerDeletionResponses];
|
|
30145
|
+
export type BlockCustomerData = {
|
|
30130
30146
|
body?: never;
|
|
30131
30147
|
path: {
|
|
30132
30148
|
/**
|
|
30133
|
-
* Active service agent
|
|
30149
|
+
* Active service agent id from agent creation or listing.
|
|
30134
30150
|
*/
|
|
30135
30151
|
agent_id: string;
|
|
30136
30152
|
/**
|
|
30137
|
-
*
|
|
30153
|
+
* Customer id from customer listing, or your own customer_id.
|
|
30138
30154
|
*/
|
|
30139
|
-
|
|
30155
|
+
customer_id: string;
|
|
30140
30156
|
};
|
|
30141
30157
|
query?: never;
|
|
30142
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
30158
|
+
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/block';
|
|
30143
30159
|
};
|
|
30144
|
-
export type
|
|
30145
|
-
/**
|
|
30146
|
-
* Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
|
|
30147
|
-
*/
|
|
30148
|
-
400: unknown;
|
|
30160
|
+
export type BlockCustomerErrors = {
|
|
30149
30161
|
/**
|
|
30150
|
-
* Authenticate with a
|
|
30162
|
+
* Authenticate with your API key or a console session.
|
|
30151
30163
|
*/
|
|
30152
30164
|
401: unknown;
|
|
30153
30165
|
/**
|
|
@@ -30155,92 +30167,50 @@ export type RevokeEndUserTokensErrors = {
|
|
|
30155
30167
|
*/
|
|
30156
30168
|
403: AgentError;
|
|
30157
30169
|
/**
|
|
30158
|
-
*
|
|
30170
|
+
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30159
30171
|
*/
|
|
30160
30172
|
404: unknown;
|
|
30161
30173
|
/**
|
|
30162
|
-
* Credential revocation failed;
|
|
30174
|
+
* Credential revocation failed; the customer stays blocked if you asked to block it. Retry to finish revoking.
|
|
30163
30175
|
*/
|
|
30164
30176
|
502: unknown;
|
|
30165
30177
|
};
|
|
30166
|
-
export type
|
|
30167
|
-
export type
|
|
30178
|
+
export type BlockCustomerError = BlockCustomerErrors[keyof BlockCustomerErrors];
|
|
30179
|
+
export type BlockCustomerResponses = {
|
|
30168
30180
|
/**
|
|
30169
|
-
*
|
|
30181
|
+
* The customer after the change.
|
|
30170
30182
|
*/
|
|
30171
30183
|
200: {
|
|
30172
30184
|
/**
|
|
30173
|
-
*
|
|
30185
|
+
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
30174
30186
|
*/
|
|
30175
|
-
|
|
30176
|
-
};
|
|
30177
|
-
};
|
|
30178
|
-
export type RevokeEndUserTokensResponse = RevokeEndUserTokensResponses[keyof RevokeEndUserTokensResponses];
|
|
30179
|
-
export type BlockEndUserData = {
|
|
30180
|
-
body?: never;
|
|
30181
|
-
path: {
|
|
30187
|
+
id: string;
|
|
30182
30188
|
/**
|
|
30183
|
-
*
|
|
30189
|
+
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
30184
30190
|
*/
|
|
30185
|
-
|
|
30191
|
+
type: 'identified' | 'anonymous';
|
|
30186
30192
|
/**
|
|
30187
|
-
*
|
|
30193
|
+
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
30188
30194
|
*/
|
|
30189
|
-
|
|
30190
|
-
};
|
|
30191
|
-
query?: never;
|
|
30192
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block';
|
|
30193
|
-
};
|
|
30194
|
-
export type BlockEndUserErrors = {
|
|
30195
|
-
/**
|
|
30196
|
-
* Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
|
|
30197
|
-
*/
|
|
30198
|
-
400: unknown;
|
|
30199
|
-
/**
|
|
30200
|
-
* Authenticate with a host credential.
|
|
30201
|
-
*/
|
|
30202
|
-
401: unknown;
|
|
30203
|
-
/**
|
|
30204
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30205
|
-
*/
|
|
30206
|
-
403: AgentError;
|
|
30207
|
-
/**
|
|
30208
|
-
* Agent or requested user is unavailable to this caller, or the caller is an end user.
|
|
30209
|
-
*/
|
|
30210
|
-
404: unknown;
|
|
30211
|
-
/**
|
|
30212
|
-
* Configure an embed policy before blocking or unblocking; retry if a concurrent policy update caused the conflict.
|
|
30213
|
-
*/
|
|
30214
|
-
409: unknown;
|
|
30215
|
-
/**
|
|
30216
|
-
* Credential revocation failed; grant timestamps remain unchanged. A requested block remains in effect; retry to finish revocation.
|
|
30217
|
-
*/
|
|
30218
|
-
502: unknown;
|
|
30219
|
-
};
|
|
30220
|
-
export type BlockEndUserError = BlockEndUserErrors[keyof BlockEndUserErrors];
|
|
30221
|
-
export type BlockEndUserResponses = {
|
|
30222
|
-
/**
|
|
30223
|
-
* Current end-user view.
|
|
30224
|
-
*/
|
|
30225
|
-
200: {
|
|
30195
|
+
merged_into: string | null;
|
|
30226
30196
|
/**
|
|
30227
|
-
*
|
|
30197
|
+
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
30228
30198
|
*/
|
|
30229
|
-
|
|
30199
|
+
blocked: boolean;
|
|
30230
30200
|
/**
|
|
30231
|
-
* Earliest session
|
|
30201
|
+
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
30232
30202
|
*/
|
|
30233
30203
|
first_seen_at: string | null;
|
|
30234
30204
|
/**
|
|
30235
|
-
* Latest session update or token issuance
|
|
30205
|
+
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
30236
30206
|
*/
|
|
30237
|
-
|
|
30207
|
+
last_seen_at: string | null;
|
|
30238
30208
|
/**
|
|
30239
|
-
*
|
|
30209
|
+
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
30240
30210
|
*/
|
|
30241
30211
|
session_count: number;
|
|
30242
30212
|
/**
|
|
30243
|
-
*
|
|
30213
|
+
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
30244
30214
|
*/
|
|
30245
30215
|
cost: {
|
|
30246
30216
|
/**
|
|
@@ -30252,35 +30222,27 @@ export type BlockEndUserResponses = {
|
|
|
30252
30222
|
*/
|
|
30253
30223
|
currency: 'USD';
|
|
30254
30224
|
};
|
|
30255
|
-
/**
|
|
30256
|
-
* Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
|
|
30257
|
-
*/
|
|
30258
|
-
blocked: boolean;
|
|
30259
30225
|
};
|
|
30260
30226
|
};
|
|
30261
|
-
export type
|
|
30262
|
-
export type
|
|
30227
|
+
export type BlockCustomerResponse = BlockCustomerResponses[keyof BlockCustomerResponses];
|
|
30228
|
+
export type UnblockCustomerData = {
|
|
30263
30229
|
body?: never;
|
|
30264
30230
|
path: {
|
|
30265
30231
|
/**
|
|
30266
|
-
* Active service agent
|
|
30232
|
+
* Active service agent id from agent creation or listing.
|
|
30267
30233
|
*/
|
|
30268
30234
|
agent_id: string;
|
|
30269
30235
|
/**
|
|
30270
|
-
*
|
|
30236
|
+
* Customer id from customer listing, or your own customer_id.
|
|
30271
30237
|
*/
|
|
30272
|
-
|
|
30238
|
+
customer_id: string;
|
|
30273
30239
|
};
|
|
30274
30240
|
query?: never;
|
|
30275
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
30241
|
+
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock';
|
|
30276
30242
|
};
|
|
30277
|
-
export type
|
|
30278
|
-
/**
|
|
30279
|
-
* Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
|
|
30280
|
-
*/
|
|
30281
|
-
400: unknown;
|
|
30243
|
+
export type UnblockCustomerErrors = {
|
|
30282
30244
|
/**
|
|
30283
|
-
* Authenticate with a
|
|
30245
|
+
* Authenticate with your API key or a console session.
|
|
30284
30246
|
*/
|
|
30285
30247
|
401: unknown;
|
|
30286
30248
|
/**
|
|
@@ -30288,38 +30250,46 @@ export type UnblockEndUserErrors = {
|
|
|
30288
30250
|
*/
|
|
30289
30251
|
403: AgentError;
|
|
30290
30252
|
/**
|
|
30291
|
-
*
|
|
30253
|
+
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30292
30254
|
*/
|
|
30293
30255
|
404: unknown;
|
|
30294
|
-
/**
|
|
30295
|
-
* Configure an embed policy before blocking or unblocking; retry if a concurrent policy update caused the conflict.
|
|
30296
|
-
*/
|
|
30297
|
-
409: unknown;
|
|
30298
30256
|
};
|
|
30299
|
-
export type
|
|
30300
|
-
export type
|
|
30257
|
+
export type UnblockCustomerError = UnblockCustomerErrors[keyof UnblockCustomerErrors];
|
|
30258
|
+
export type UnblockCustomerResponses = {
|
|
30301
30259
|
/**
|
|
30302
|
-
*
|
|
30260
|
+
* The customer after the change.
|
|
30303
30261
|
*/
|
|
30304
30262
|
200: {
|
|
30305
30263
|
/**
|
|
30306
|
-
*
|
|
30264
|
+
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
30265
|
+
*/
|
|
30266
|
+
id: string;
|
|
30267
|
+
/**
|
|
30268
|
+
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
30269
|
+
*/
|
|
30270
|
+
type: 'identified' | 'anonymous';
|
|
30271
|
+
/**
|
|
30272
|
+
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
30273
|
+
*/
|
|
30274
|
+
merged_into: string | null;
|
|
30275
|
+
/**
|
|
30276
|
+
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
30307
30277
|
*/
|
|
30308
|
-
|
|
30278
|
+
blocked: boolean;
|
|
30309
30279
|
/**
|
|
30310
|
-
* Earliest session
|
|
30280
|
+
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
30311
30281
|
*/
|
|
30312
30282
|
first_seen_at: string | null;
|
|
30313
30283
|
/**
|
|
30314
|
-
* Latest session update or token issuance
|
|
30284
|
+
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
30315
30285
|
*/
|
|
30316
|
-
|
|
30286
|
+
last_seen_at: string | null;
|
|
30317
30287
|
/**
|
|
30318
|
-
*
|
|
30288
|
+
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
30319
30289
|
*/
|
|
30320
30290
|
session_count: number;
|
|
30321
30291
|
/**
|
|
30322
|
-
*
|
|
30292
|
+
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
30323
30293
|
*/
|
|
30324
30294
|
cost: {
|
|
30325
30295
|
/**
|
|
@@ -30331,50 +30301,25 @@ export type UnblockEndUserResponses = {
|
|
|
30331
30301
|
*/
|
|
30332
30302
|
currency: 'USD';
|
|
30333
30303
|
};
|
|
30334
|
-
/**
|
|
30335
|
-
* Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
|
|
30336
|
-
*/
|
|
30337
|
-
blocked: boolean;
|
|
30338
30304
|
};
|
|
30339
30305
|
};
|
|
30340
|
-
export type
|
|
30341
|
-
export type
|
|
30306
|
+
export type UnblockCustomerResponse = UnblockCustomerResponses[keyof UnblockCustomerResponses];
|
|
30307
|
+
export type RevokeCustomerTokensData = {
|
|
30342
30308
|
body?: never;
|
|
30343
30309
|
path: {
|
|
30344
30310
|
/**
|
|
30345
30311
|
* Active service agent id from agent creation or listing.
|
|
30346
30312
|
*/
|
|
30347
30313
|
agent_id: string;
|
|
30348
|
-
};
|
|
30349
|
-
query?: {
|
|
30350
|
-
/**
|
|
30351
|
-
* Maximum customers per page, 1 to 100; defaults to 20.
|
|
30352
|
-
*/
|
|
30353
|
-
limit?: number;
|
|
30354
|
-
/**
|
|
30355
|
-
* next_page from the previous response with the same q, type, blocked and limit.
|
|
30356
|
-
*/
|
|
30357
|
-
page?: string;
|
|
30358
|
-
/**
|
|
30359
|
-
* Case-sensitive literal prefix of the customer id; omit for all customers.
|
|
30360
|
-
*/
|
|
30361
|
-
q?: string;
|
|
30362
|
-
/**
|
|
30363
|
-
* Only identified or only anonymous customers; omit for both.
|
|
30364
|
-
*/
|
|
30365
|
-
type?: 'identified' | 'anonymous';
|
|
30366
30314
|
/**
|
|
30367
|
-
*
|
|
30315
|
+
* Customer id from customer listing, or your own customer_id.
|
|
30368
30316
|
*/
|
|
30369
|
-
|
|
30317
|
+
customer_id: string;
|
|
30370
30318
|
};
|
|
30371
|
-
|
|
30319
|
+
query?: never;
|
|
30320
|
+
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens';
|
|
30372
30321
|
};
|
|
30373
|
-
export type
|
|
30374
|
-
/**
|
|
30375
|
-
* INVALID_PARAMS: limit outside 1 to 100, type other than identified or anonymous, blocked other than true or false, or an unknown query parameter. INVALID_PAGE_TOKEN: next_page from another query; restart without page.
|
|
30376
|
-
*/
|
|
30377
|
-
400: unknown;
|
|
30322
|
+
export type RevokeCustomerTokensErrors = {
|
|
30378
30323
|
/**
|
|
30379
30324
|
* Authenticate with your API key or a console session.
|
|
30380
30325
|
*/
|
|
@@ -30384,1339 +30329,293 @@ export type ListCustomersErrors = {
|
|
|
30384
30329
|
*/
|
|
30385
30330
|
403: AgentError;
|
|
30386
30331
|
/**
|
|
30387
|
-
*
|
|
30332
|
+
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30388
30333
|
*/
|
|
30389
30334
|
404: unknown;
|
|
30390
|
-
};
|
|
30391
|
-
export type ListCustomersError = ListCustomersErrors[keyof ListCustomersErrors];
|
|
30392
|
-
export type ListCustomersResponses = {
|
|
30393
30335
|
/**
|
|
30394
|
-
*
|
|
30336
|
+
* Credential revocation failed; the customer stays blocked if you asked to block it. Retry to finish revoking.
|
|
30395
30337
|
*/
|
|
30396
|
-
|
|
30397
|
-
/**
|
|
30398
|
-
* Items of this page, in the order requested by the call.
|
|
30399
|
-
*/
|
|
30400
|
-
data: Array<{
|
|
30401
|
-
/**
|
|
30402
|
-
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
30403
|
-
*/
|
|
30404
|
-
id: string;
|
|
30405
|
-
/**
|
|
30406
|
-
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
30407
|
-
*/
|
|
30408
|
-
type: 'identified' | 'anonymous';
|
|
30409
|
-
/**
|
|
30410
|
-
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
30411
|
-
*/
|
|
30412
|
-
merged_into: string | null;
|
|
30413
|
-
/**
|
|
30414
|
-
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
30415
|
-
*/
|
|
30416
|
-
blocked: boolean;
|
|
30417
|
-
/**
|
|
30418
|
-
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
30419
|
-
*/
|
|
30420
|
-
first_seen_at: string | null;
|
|
30421
|
-
/**
|
|
30422
|
-
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
30423
|
-
*/
|
|
30424
|
-
last_seen_at: string | null;
|
|
30425
|
-
/**
|
|
30426
|
-
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
30427
|
-
*/
|
|
30428
|
-
session_count: number;
|
|
30429
|
-
/**
|
|
30430
|
-
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
30431
|
-
*/
|
|
30432
|
-
cost: {
|
|
30433
|
-
/**
|
|
30434
|
-
* Amount in US dollars, as a decimal string with exactly 6 decimals and no exponent, e.g. "0.000345" or "12.500000".
|
|
30435
|
-
*/
|
|
30436
|
-
amount: string;
|
|
30437
|
-
/**
|
|
30438
|
-
* Always USD.
|
|
30439
|
-
*/
|
|
30440
|
-
currency: 'USD';
|
|
30441
|
-
};
|
|
30442
|
-
}>;
|
|
30443
|
-
/**
|
|
30444
|
-
* Cursor for the next page with the same agent, q, type, blocked and limit; null when exhausted.
|
|
30445
|
-
*/
|
|
30446
|
-
next_page: string | null;
|
|
30447
|
-
};
|
|
30448
|
-
};
|
|
30449
|
-
export type ListCustomersResponse = ListCustomersResponses[keyof ListCustomersResponses];
|
|
30450
|
-
export type DeleteCustomerData = {
|
|
30451
|
-
body?: never;
|
|
30452
|
-
path: {
|
|
30453
|
-
/**
|
|
30454
|
-
* Active service agent id from agent creation or listing.
|
|
30455
|
-
*/
|
|
30456
|
-
agent_id: string;
|
|
30457
|
-
/**
|
|
30458
|
-
* Customer id from customer listing, or your own customer_id.
|
|
30459
|
-
*/
|
|
30460
|
-
customer_id: string;
|
|
30461
|
-
};
|
|
30462
|
-
query: {
|
|
30463
|
-
/**
|
|
30464
|
-
* Must equal the customer_id path parameter exactly, confirming the destructive deletion.
|
|
30465
|
-
*/
|
|
30466
|
-
confirm: string;
|
|
30467
|
-
};
|
|
30468
|
-
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}';
|
|
30469
|
-
};
|
|
30470
|
-
export type DeleteCustomerErrors = {
|
|
30471
|
-
/**
|
|
30472
|
-
* INVALID_PARAMS: confirm is missing or differs from customer_id; send ?confirm=<customer_id>.
|
|
30473
|
-
*/
|
|
30474
|
-
400: unknown;
|
|
30475
|
-
/**
|
|
30476
|
-
* Authenticate with your API key or a console session.
|
|
30477
|
-
*/
|
|
30478
|
-
401: unknown;
|
|
30479
|
-
/**
|
|
30480
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30481
|
-
*/
|
|
30482
|
-
403: AgentError;
|
|
30483
|
-
/**
|
|
30484
|
-
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30485
|
-
*/
|
|
30486
|
-
404: unknown;
|
|
30487
|
-
};
|
|
30488
|
-
export type DeleteCustomerError = DeleteCustomerErrors[keyof DeleteCustomerErrors];
|
|
30489
|
-
export type DeleteCustomerResponses = {
|
|
30490
|
-
/**
|
|
30491
|
-
* Deletion accepted; poll the deletion endpoint until done or failed.
|
|
30492
|
-
*/
|
|
30493
|
-
202: {
|
|
30494
|
-
/**
|
|
30495
|
-
* Deletion task identifier.
|
|
30496
|
-
*/
|
|
30497
|
-
id: string;
|
|
30498
|
-
/**
|
|
30499
|
-
* Accepted for asynchronous processing; poll deletion for progress.
|
|
30500
|
-
*/
|
|
30501
|
-
status: 'pending';
|
|
30502
|
-
};
|
|
30503
|
-
};
|
|
30504
|
-
export type DeleteCustomerResponse = DeleteCustomerResponses[keyof DeleteCustomerResponses];
|
|
30505
|
-
export type GetCustomerData = {
|
|
30506
|
-
body?: never;
|
|
30507
|
-
path: {
|
|
30508
|
-
/**
|
|
30509
|
-
* Active service agent id from agent creation or listing.
|
|
30510
|
-
*/
|
|
30511
|
-
agent_id: string;
|
|
30512
|
-
/**
|
|
30513
|
-
* Customer id from customer listing, or your own customer_id.
|
|
30514
|
-
*/
|
|
30515
|
-
customer_id: string;
|
|
30516
|
-
};
|
|
30517
|
-
query?: never;
|
|
30518
|
-
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}';
|
|
30519
|
-
};
|
|
30520
|
-
export type GetCustomerErrors = {
|
|
30521
|
-
/**
|
|
30522
|
-
* Authenticate with your API key or a console session.
|
|
30523
|
-
*/
|
|
30524
|
-
401: unknown;
|
|
30525
|
-
/**
|
|
30526
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30527
|
-
*/
|
|
30528
|
-
403: AgentError;
|
|
30529
|
-
/**
|
|
30530
|
-
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30531
|
-
*/
|
|
30532
|
-
404: unknown;
|
|
30533
|
-
};
|
|
30534
|
-
export type GetCustomerError = GetCustomerErrors[keyof GetCustomerErrors];
|
|
30535
|
-
export type GetCustomerResponses = {
|
|
30536
|
-
/**
|
|
30537
|
-
* The customer with its recent sessions.
|
|
30538
|
-
*/
|
|
30539
|
-
200: {
|
|
30540
|
-
/**
|
|
30541
|
-
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
30542
|
-
*/
|
|
30543
|
-
id: string;
|
|
30544
|
-
/**
|
|
30545
|
-
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
30546
|
-
*/
|
|
30547
|
-
type: 'identified' | 'anonymous';
|
|
30548
|
-
/**
|
|
30549
|
-
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
30550
|
-
*/
|
|
30551
|
-
merged_into: string | null;
|
|
30552
|
-
/**
|
|
30553
|
-
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
30554
|
-
*/
|
|
30555
|
-
blocked: boolean;
|
|
30556
|
-
/**
|
|
30557
|
-
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
30558
|
-
*/
|
|
30559
|
-
first_seen_at: string | null;
|
|
30560
|
-
/**
|
|
30561
|
-
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
30562
|
-
*/
|
|
30563
|
-
last_seen_at: string | null;
|
|
30564
|
-
/**
|
|
30565
|
-
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
30566
|
-
*/
|
|
30567
|
-
session_count: number;
|
|
30568
|
-
/**
|
|
30569
|
-
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
30570
|
-
*/
|
|
30571
|
-
cost: {
|
|
30572
|
-
/**
|
|
30573
|
-
* Amount in US dollars, as a decimal string with exactly 6 decimals and no exponent, e.g. "0.000345" or "12.500000".
|
|
30574
|
-
*/
|
|
30575
|
-
amount: string;
|
|
30576
|
-
/**
|
|
30577
|
-
* Always USD.
|
|
30578
|
-
*/
|
|
30579
|
-
currency: 'USD';
|
|
30580
|
-
};
|
|
30581
|
-
/**
|
|
30582
|
-
* Up to twenty sessions of the customer, and of anonymous customers merged into it, most recently updated first.
|
|
30583
|
-
*/
|
|
30584
|
-
recent_sessions: Array<{
|
|
30585
|
-
/**
|
|
30586
|
-
* Public sesn_ session identifier, usable with session retrieval.
|
|
30587
|
-
*/
|
|
30588
|
-
id: string;
|
|
30589
|
-
/**
|
|
30590
|
-
* Session title, or null when unset.
|
|
30591
|
-
*/
|
|
30592
|
-
title: string | null;
|
|
30593
|
-
/**
|
|
30594
|
-
* Session entry surface, or null when no surface was recorded.
|
|
30595
|
-
*/
|
|
30596
|
-
source: string | null;
|
|
30597
|
-
/**
|
|
30598
|
-
* Session creation time in UTC.
|
|
30599
|
-
*/
|
|
30600
|
-
created_at: string;
|
|
30601
|
-
/**
|
|
30602
|
-
* Most recent session update time in UTC.
|
|
30603
|
-
*/
|
|
30604
|
-
updated_at: string;
|
|
30605
|
-
}>;
|
|
30606
|
-
};
|
|
30607
|
-
};
|
|
30608
|
-
export type GetCustomerResponse = GetCustomerResponses[keyof GetCustomerResponses];
|
|
30609
|
-
export type GetCustomerDeletionData = {
|
|
30610
|
-
body?: never;
|
|
30611
|
-
path: {
|
|
30612
|
-
/**
|
|
30613
|
-
* Active service agent id from agent creation or listing.
|
|
30614
|
-
*/
|
|
30615
|
-
agent_id: string;
|
|
30616
|
-
/**
|
|
30617
|
-
* Customer id from customer listing, or your own customer_id.
|
|
30618
|
-
*/
|
|
30619
|
-
customer_id: string;
|
|
30620
|
-
};
|
|
30621
|
-
query?: never;
|
|
30622
|
-
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion';
|
|
30623
|
-
};
|
|
30624
|
-
export type GetCustomerDeletionErrors = {
|
|
30625
|
-
/**
|
|
30626
|
-
* Authenticate with your API key or a console session.
|
|
30627
|
-
*/
|
|
30628
|
-
401: unknown;
|
|
30629
|
-
/**
|
|
30630
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30631
|
-
*/
|
|
30632
|
-
403: AgentError;
|
|
30633
|
-
/**
|
|
30634
|
-
* CUSTOMER_NOT_FOUND or no deletion task: the customer or task is unknown, or the caller is a customer access token.
|
|
30635
|
-
*/
|
|
30636
|
-
404: unknown;
|
|
30637
|
-
};
|
|
30638
|
-
export type GetCustomerDeletionError = GetCustomerDeletionErrors[keyof GetCustomerDeletionErrors];
|
|
30639
|
-
export type GetCustomerDeletionResponses = {
|
|
30640
|
-
/**
|
|
30641
|
-
* The latest deletion task and its snapshot counts.
|
|
30642
|
-
*/
|
|
30643
|
-
200: {
|
|
30644
|
-
/**
|
|
30645
|
-
* Deletion task identifier.
|
|
30646
|
-
*/
|
|
30647
|
-
id: string;
|
|
30648
|
-
/**
|
|
30649
|
-
* pending: accepted; snapshotting: exporting recovery data; deleting: verified snapshot exists and erasure is running; done: erasure completed; failed: stopped safely, retry DELETE to resume the same task.
|
|
30650
|
-
*/
|
|
30651
|
-
status: 'pending' | 'snapshotting' | 'deleting' | 'done' | 'failed';
|
|
30652
|
-
/**
|
|
30653
|
-
* Counts from the verified snapshot; empty until snapshotting completes.
|
|
30654
|
-
*/
|
|
30655
|
-
counts: {
|
|
30656
|
-
/**
|
|
30657
|
-
* Number of primary and child sessions in the snapshot.
|
|
30658
|
-
*/
|
|
30659
|
-
sessions?: number;
|
|
30660
|
-
/**
|
|
30661
|
-
* Number of durable session events captured without changing the history.
|
|
30662
|
-
*/
|
|
30663
|
-
events?: number;
|
|
30664
|
-
/**
|
|
30665
|
-
* Number of stored transcript messages in the snapshot.
|
|
30666
|
-
*/
|
|
30667
|
-
messages?: number;
|
|
30668
|
-
/**
|
|
30669
|
-
* Number of backed-up directory, authorization, feedback and projection rows.
|
|
30670
|
-
*/
|
|
30671
|
-
d1_rows?: number;
|
|
30672
|
-
/**
|
|
30673
|
-
* Number of session attachment references; their file bytes are retained.
|
|
30674
|
-
*/
|
|
30675
|
-
attachments?: number;
|
|
30676
|
-
};
|
|
30677
|
-
/**
|
|
30678
|
-
* Operator recovery snapshot key, retained for seven days. Attachment bytes are not copied or deleted.
|
|
30679
|
-
*/
|
|
30680
|
-
snapshot_key?: string;
|
|
30681
|
-
/**
|
|
30682
|
-
* Content-free failure summary; retry the confirmed deletion to resume.
|
|
30683
|
-
*/
|
|
30684
|
-
error?: string;
|
|
30685
|
-
/**
|
|
30686
|
-
* Task creation time in RFC 3339 format.
|
|
30687
|
-
*/
|
|
30688
|
-
created_at: string;
|
|
30689
|
-
/**
|
|
30690
|
-
* Latest task update time in RFC 3339 format.
|
|
30691
|
-
*/
|
|
30692
|
-
updated_at: string;
|
|
30693
|
-
};
|
|
30694
|
-
};
|
|
30695
|
-
export type GetCustomerDeletionResponse = GetCustomerDeletionResponses[keyof GetCustomerDeletionResponses];
|
|
30696
|
-
export type BlockCustomerData = {
|
|
30697
|
-
body?: never;
|
|
30698
|
-
path: {
|
|
30699
|
-
/**
|
|
30700
|
-
* Active service agent id from agent creation or listing.
|
|
30701
|
-
*/
|
|
30702
|
-
agent_id: string;
|
|
30703
|
-
/**
|
|
30704
|
-
* Customer id from customer listing, or your own customer_id.
|
|
30705
|
-
*/
|
|
30706
|
-
customer_id: string;
|
|
30707
|
-
};
|
|
30708
|
-
query?: never;
|
|
30709
|
-
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/block';
|
|
30710
|
-
};
|
|
30711
|
-
export type BlockCustomerErrors = {
|
|
30712
|
-
/**
|
|
30713
|
-
* Authenticate with your API key or a console session.
|
|
30714
|
-
*/
|
|
30715
|
-
401: unknown;
|
|
30716
|
-
/**
|
|
30717
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30718
|
-
*/
|
|
30719
|
-
403: AgentError;
|
|
30720
|
-
/**
|
|
30721
|
-
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30722
|
-
*/
|
|
30723
|
-
404: unknown;
|
|
30724
|
-
/**
|
|
30725
|
-
* Credential revocation failed; the customer stays blocked if you asked to block it. Retry to finish revoking.
|
|
30726
|
-
*/
|
|
30727
|
-
502: unknown;
|
|
30728
|
-
};
|
|
30729
|
-
export type BlockCustomerError = BlockCustomerErrors[keyof BlockCustomerErrors];
|
|
30730
|
-
export type BlockCustomerResponses = {
|
|
30731
|
-
/**
|
|
30732
|
-
* The customer after the change.
|
|
30733
|
-
*/
|
|
30734
|
-
200: {
|
|
30735
|
-
/**
|
|
30736
|
-
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
30737
|
-
*/
|
|
30738
|
-
id: string;
|
|
30739
|
-
/**
|
|
30740
|
-
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
30741
|
-
*/
|
|
30742
|
-
type: 'identified' | 'anonymous';
|
|
30743
|
-
/**
|
|
30744
|
-
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
30745
|
-
*/
|
|
30746
|
-
merged_into: string | null;
|
|
30747
|
-
/**
|
|
30748
|
-
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
30749
|
-
*/
|
|
30750
|
-
blocked: boolean;
|
|
30751
|
-
/**
|
|
30752
|
-
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
30753
|
-
*/
|
|
30754
|
-
first_seen_at: string | null;
|
|
30755
|
-
/**
|
|
30756
|
-
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
30757
|
-
*/
|
|
30758
|
-
last_seen_at: string | null;
|
|
30759
|
-
/**
|
|
30760
|
-
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
30761
|
-
*/
|
|
30762
|
-
session_count: number;
|
|
30763
|
-
/**
|
|
30764
|
-
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
30765
|
-
*/
|
|
30766
|
-
cost: {
|
|
30767
|
-
/**
|
|
30768
|
-
* Amount in US dollars, as a decimal string with exactly 6 decimals and no exponent, e.g. "0.000345" or "12.500000".
|
|
30769
|
-
*/
|
|
30770
|
-
amount: string;
|
|
30771
|
-
/**
|
|
30772
|
-
* Always USD.
|
|
30773
|
-
*/
|
|
30774
|
-
currency: 'USD';
|
|
30775
|
-
};
|
|
30776
|
-
};
|
|
30777
|
-
};
|
|
30778
|
-
export type BlockCustomerResponse = BlockCustomerResponses[keyof BlockCustomerResponses];
|
|
30779
|
-
export type UnblockCustomerData = {
|
|
30780
|
-
body?: never;
|
|
30781
|
-
path: {
|
|
30782
|
-
/**
|
|
30783
|
-
* Active service agent id from agent creation or listing.
|
|
30784
|
-
*/
|
|
30785
|
-
agent_id: string;
|
|
30786
|
-
/**
|
|
30787
|
-
* Customer id from customer listing, or your own customer_id.
|
|
30788
|
-
*/
|
|
30789
|
-
customer_id: string;
|
|
30790
|
-
};
|
|
30791
|
-
query?: never;
|
|
30792
|
-
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock';
|
|
30793
|
-
};
|
|
30794
|
-
export type UnblockCustomerErrors = {
|
|
30795
|
-
/**
|
|
30796
|
-
* Authenticate with your API key or a console session.
|
|
30797
|
-
*/
|
|
30798
|
-
401: unknown;
|
|
30799
|
-
/**
|
|
30800
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30801
|
-
*/
|
|
30802
|
-
403: AgentError;
|
|
30803
|
-
/**
|
|
30804
|
-
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30805
|
-
*/
|
|
30806
|
-
404: unknown;
|
|
30807
|
-
};
|
|
30808
|
-
export type UnblockCustomerError = UnblockCustomerErrors[keyof UnblockCustomerErrors];
|
|
30809
|
-
export type UnblockCustomerResponses = {
|
|
30810
|
-
/**
|
|
30811
|
-
* The customer after the change.
|
|
30812
|
-
*/
|
|
30813
|
-
200: {
|
|
30814
|
-
/**
|
|
30815
|
-
* The customer id: your customer_id for an identified customer, or anon_ followed by 16 characters for an anonymous one.
|
|
30816
|
-
*/
|
|
30817
|
-
id: string;
|
|
30818
|
-
/**
|
|
30819
|
-
* identified: signed in through a grant code from your backend, or seen under your own id before customer sign-in existed. anonymous: a visitor admitted with the publishable key.
|
|
30820
|
-
*/
|
|
30821
|
-
type: 'identified' | 'anonymous';
|
|
30822
|
-
/**
|
|
30823
|
-
* For an anonymous customer who later signed in, the identified customer it joined; their conversations count toward that customer. null otherwise.
|
|
30824
|
-
*/
|
|
30825
|
-
merged_into: string | null;
|
|
30826
|
-
/**
|
|
30827
|
-
* Whether the customer is blocked: no grant code, sign-in, renewal or new session is accepted for this id until it is unblocked.
|
|
30828
|
-
*/
|
|
30829
|
-
blocked: boolean;
|
|
30830
|
-
/**
|
|
30831
|
-
* Earliest sign-in, session or token issuance for this customer, in RFC 3339; null when nothing is recorded.
|
|
30832
|
-
*/
|
|
30833
|
-
first_seen_at: string | null;
|
|
30834
|
-
/**
|
|
30835
|
-
* Latest sign-in, token renewal, session update or token issuance, in RFC 3339; the list is ordered by it, newest first.
|
|
30836
|
-
*/
|
|
30837
|
-
last_seen_at: string | null;
|
|
30838
|
-
/**
|
|
30839
|
-
* Sessions of this customer on this agent, including those of anonymous customers merged into it.
|
|
30840
|
-
*/
|
|
30841
|
-
session_count: number;
|
|
30842
|
-
/**
|
|
30843
|
-
* Recorded cost of those sessions: model usage (threads included) plus session runtime; "0.000000" when nothing has been recorded.
|
|
30844
|
-
*/
|
|
30845
|
-
cost: {
|
|
30846
|
-
/**
|
|
30847
|
-
* Amount in US dollars, as a decimal string with exactly 6 decimals and no exponent, e.g. "0.000345" or "12.500000".
|
|
30848
|
-
*/
|
|
30849
|
-
amount: string;
|
|
30850
|
-
/**
|
|
30851
|
-
* Always USD.
|
|
30852
|
-
*/
|
|
30853
|
-
currency: 'USD';
|
|
30854
|
-
};
|
|
30855
|
-
};
|
|
30856
|
-
};
|
|
30857
|
-
export type UnblockCustomerResponse = UnblockCustomerResponses[keyof UnblockCustomerResponses];
|
|
30858
|
-
export type RevokeCustomerTokensData = {
|
|
30859
|
-
body?: never;
|
|
30860
|
-
path: {
|
|
30861
|
-
/**
|
|
30862
|
-
* Active service agent id from agent creation or listing.
|
|
30863
|
-
*/
|
|
30864
|
-
agent_id: string;
|
|
30865
|
-
/**
|
|
30866
|
-
* Customer id from customer listing, or your own customer_id.
|
|
30867
|
-
*/
|
|
30868
|
-
customer_id: string;
|
|
30869
|
-
};
|
|
30870
|
-
query?: never;
|
|
30871
|
-
url: '/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens';
|
|
30872
|
-
};
|
|
30873
|
-
export type RevokeCustomerTokensErrors = {
|
|
30874
|
-
/**
|
|
30875
|
-
* Authenticate with your API key or a console session.
|
|
30876
|
-
*/
|
|
30877
|
-
401: unknown;
|
|
30878
|
-
/**
|
|
30879
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30880
|
-
*/
|
|
30881
|
-
403: AgentError;
|
|
30882
|
-
/**
|
|
30883
|
-
* CUSTOMER_NOT_FOUND: the customer is unknown on this agent, or the caller is a customer access token.
|
|
30884
|
-
*/
|
|
30885
|
-
404: unknown;
|
|
30886
|
-
/**
|
|
30887
|
-
* Credential revocation failed; the customer stays blocked if you asked to block it. Retry to finish revoking.
|
|
30888
|
-
*/
|
|
30889
|
-
502: unknown;
|
|
30890
|
-
};
|
|
30891
|
-
export type RevokeCustomerTokensError = RevokeCustomerTokensErrors[keyof RevokeCustomerTokensErrors];
|
|
30892
|
-
export type RevokeCustomerTokensResponses = {
|
|
30893
|
-
/**
|
|
30894
|
-
* How many access tokens this request revoked.
|
|
30895
|
-
*/
|
|
30896
|
-
200: {
|
|
30897
|
-
/**
|
|
30898
|
-
* Number of access tokens this request revoked; 0 when none was live.
|
|
30899
|
-
*/
|
|
30900
|
-
revoked: number;
|
|
30901
|
-
};
|
|
30902
|
-
};
|
|
30903
|
-
export type RevokeCustomerTokensResponse = RevokeCustomerTokensResponses[keyof RevokeCustomerTokensResponses];
|
|
30904
|
-
export type GetAgentAppearanceData = {
|
|
30905
|
-
body?: never;
|
|
30906
|
-
path: {
|
|
30907
|
-
/**
|
|
30908
|
-
* Service agent id from agent creation or listing; with a customer access token, the agent the token was issued for.
|
|
30909
|
-
*/
|
|
30910
|
-
agent_id: string;
|
|
30911
|
-
};
|
|
30912
|
-
query?: never;
|
|
30913
|
-
url: '/agent/v1/agents/{agent_id}/appearance';
|
|
30914
|
-
};
|
|
30915
|
-
export type GetAgentAppearanceErrors = {
|
|
30916
|
-
/**
|
|
30917
|
-
* Authenticate with a customer access token of this agent, your API key or a console session.
|
|
30918
|
-
*/
|
|
30919
|
-
401: unknown;
|
|
30920
|
-
/**
|
|
30921
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
30922
|
-
*/
|
|
30923
|
-
403: AgentError;
|
|
30924
|
-
/**
|
|
30925
|
-
* AGENT_NOT_FOUND: the agent is absent, archived or not a service agent, or the customer access token belongs to another agent.
|
|
30926
|
-
*/
|
|
30927
|
-
404: unknown;
|
|
30928
|
-
/**
|
|
30929
|
-
* Appearance is temporarily unavailable; use the default appearance and continue the conversation.
|
|
30930
|
-
*/
|
|
30931
|
-
503: unknown;
|
|
30932
|
-
};
|
|
30933
|
-
export type GetAgentAppearanceError = GetAgentAppearanceErrors[keyof GetAgentAppearanceErrors];
|
|
30934
|
-
export type GetAgentAppearanceResponses = {
|
|
30935
|
-
/**
|
|
30936
|
-
* Saved Kit options, at most 8192 UTF-8 JSON bytes. Omitted groups use Kit defaults; an unconfigured agent returns an empty object.
|
|
30937
|
-
*/
|
|
30938
|
-
200: {
|
|
30939
|
-
/**
|
|
30940
|
-
* Public identity displayed on the chat page, independent of the internal agent name.
|
|
30941
|
-
*/
|
|
30942
|
-
agent?: {
|
|
30943
|
-
/**
|
|
30944
|
-
* Display name; omission keeps the neutral browser-language default.
|
|
30945
|
-
*/
|
|
30946
|
-
name?: string;
|
|
30947
|
-
/**
|
|
30948
|
-
* Optional HTTPS avatar image URL; non-HTTPS images are rejected.
|
|
30949
|
-
*/
|
|
30950
|
-
avatar?: string;
|
|
30951
|
-
};
|
|
30952
|
-
/**
|
|
30953
|
-
* Loader default: inline stays in the page, sidebar attaches to the edge, popup floats above its launcher, modal centers an overlay. A script data-layout overrides it; Hosted always uses inline.
|
|
30954
|
-
*/
|
|
30955
|
-
layout?: 'inline' | 'sidebar' | 'popup' | 'modal';
|
|
30956
|
-
/**
|
|
30957
|
-
* Default entry button for the loader; an explicit script data-launcher takes precedence.
|
|
30958
|
-
*/
|
|
30959
|
-
launcher?: {
|
|
30960
|
-
/**
|
|
30961
|
-
* Entry control: none hides the launcher, bubble shows a button, mascot shows a character that reacts while the visitor types and the agent thinks and answers. A mascot needs pack.
|
|
30962
|
-
*/
|
|
30963
|
-
type: 'none' | 'bubble' | 'mascot';
|
|
30964
|
-
/**
|
|
30965
|
-
* Mascot images: exactly one of preset or images. Send pack, not image.
|
|
30966
|
-
*/
|
|
30967
|
-
pack?: {
|
|
30968
|
-
/**
|
|
30969
|
-
* Built-in character: mint (mint support girl), cat (cat-eared girl) or bot (small robot).
|
|
30970
|
-
*/
|
|
30971
|
-
preset?: 'mint' | 'cat' | 'bot';
|
|
30972
|
-
/**
|
|
30973
|
-
* One HTTPS image per slot; only idle is required and a missing slot shows idle. Use 2:3 canvases with the feet bottom-centered on a transparent background; PNG or WebP stay still, GIF, WebP and APNG play as they are.
|
|
30974
|
-
*/
|
|
30975
|
-
images?: {
|
|
30976
|
-
/**
|
|
30977
|
-
* Resting state.
|
|
30978
|
-
*/
|
|
30979
|
-
idle: string;
|
|
30980
|
-
/**
|
|
30981
|
-
* Page open and while the greeting bubble shows.
|
|
30982
|
-
*/
|
|
30983
|
-
greet?: string;
|
|
30984
|
-
/**
|
|
30985
|
-
* The visitor is typing in the composer.
|
|
30986
|
-
*/
|
|
30987
|
-
listening?: string;
|
|
30988
|
-
/**
|
|
30989
|
-
* After the visitor sends, before the first reply text.
|
|
30990
|
-
*/
|
|
30991
|
-
thinking?: string;
|
|
30992
|
-
/**
|
|
30993
|
-
* While the reply streams; alternates with talking-2 every 220 ms.
|
|
30994
|
-
*/
|
|
30995
|
-
talking?: string;
|
|
30996
|
-
/**
|
|
30997
|
-
* Second mouth frame of talking, mouth closed; without it talking alternates with idle.
|
|
30998
|
-
*/
|
|
30999
|
-
'talking-2'?: string;
|
|
31000
|
-
/**
|
|
31001
|
-
* The last turn failed or was refused.
|
|
31002
|
-
*/
|
|
31003
|
-
sorry?: string;
|
|
31004
|
-
/**
|
|
31005
|
-
* No interaction for 60 seconds; hover or click wakes the mascot.
|
|
31006
|
-
*/
|
|
31007
|
-
sleep?: string;
|
|
31008
|
-
};
|
|
31009
|
-
};
|
|
31010
|
-
/**
|
|
31011
|
-
* Legacy single mascot image, read as pack.images.idle. When pack is present, pack wins.
|
|
31012
|
-
*/
|
|
31013
|
-
image?: string;
|
|
31014
|
-
/**
|
|
31015
|
-
* float (default) gently floats the mascot, bounces on hover and waves with the greeting; none keeps it still. Reduced-motion settings always win.
|
|
31016
|
-
*/
|
|
31017
|
-
motion?: 'float' | 'none';
|
|
31018
|
-
/**
|
|
31019
|
-
* Launcher corner: bottom-right is the default; bottom-left uses the opposite corner.
|
|
31020
|
-
*/
|
|
31021
|
-
position?: 'bottom-right' | 'bottom-left';
|
|
31022
|
-
/**
|
|
31023
|
-
* Accessible entry button label and bubble text; omission uses the default chat label.
|
|
31024
|
-
*/
|
|
31025
|
-
label?: string;
|
|
31026
|
-
};
|
|
31027
|
-
/**
|
|
31028
|
-
* Visible chat heading; omitted title uses the public agent name.
|
|
31029
|
-
*/
|
|
31030
|
-
header?: {
|
|
31031
|
-
/**
|
|
31032
|
-
* Optional heading text shown instead of the public agent name.
|
|
31033
|
-
*/
|
|
31034
|
-
title?: string;
|
|
31035
|
-
/**
|
|
31036
|
-
* Optional secondary line beneath the heading.
|
|
31037
|
-
*/
|
|
31038
|
-
subtitle?: string;
|
|
31039
|
-
/**
|
|
31040
|
-
* Optional HTTPS image shown in the heading avatar position.
|
|
31041
|
-
*/
|
|
31042
|
-
icon?: string;
|
|
31043
|
-
};
|
|
31044
|
-
/**
|
|
31045
|
-
* Visual tokens applied to the conversation and header; omitted fields use Kit defaults.
|
|
31046
|
-
*/
|
|
31047
|
-
theme?: {
|
|
31048
|
-
/**
|
|
31049
|
-
* light or dark selects a fixed scheme; system follows the device preference.
|
|
31050
|
-
*/
|
|
31051
|
-
colorScheme?: 'light' | 'dark' | 'system';
|
|
31052
|
-
/**
|
|
31053
|
-
* Explicit opaque CSS accent color, for example #167A43.
|
|
31054
|
-
*/
|
|
31055
|
-
accent?: string;
|
|
31056
|
-
/**
|
|
31057
|
-
* Explicit opaque CSS background color, for example #ffffff.
|
|
31058
|
-
*/
|
|
31059
|
-
surface?: string;
|
|
31060
|
-
/**
|
|
31061
|
-
* neutral uses grayscale surfaces, warm uses warm tones, cool uses cool tones.
|
|
31062
|
-
*/
|
|
31063
|
-
grayscale?: 'neutral' | 'warm' | 'cool';
|
|
31064
|
-
/**
|
|
31065
|
-
* Corner rounding: none is square, sm is small, md is medium, lg is large, full is fully rounded.
|
|
31066
|
-
*/
|
|
31067
|
-
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
31068
|
-
/**
|
|
31069
|
-
* Spacing: compact reduces gaps, normal uses defaults, spacious increases gaps.
|
|
31070
|
-
*/
|
|
31071
|
-
density?: 'compact' | 'normal' | 'spacious';
|
|
31072
|
-
/**
|
|
31073
|
-
* CSS font family list using fonts available on the device; external font loading is not configured here.
|
|
31074
|
-
*/
|
|
31075
|
-
fontFamily?: string;
|
|
31076
|
-
/**
|
|
31077
|
-
* Positive base font size in CSS pixels; omission preserves Kit sizing.
|
|
31078
|
-
*/
|
|
31079
|
-
fontSize?: number;
|
|
31080
|
-
};
|
|
31081
|
-
/**
|
|
31082
|
-
* Reserved Kit locale preference: zh for Chinese, en for English. Kit currently passes this option through without translating all controls.
|
|
31083
|
-
*/
|
|
31084
|
-
locale?: 'zh' | 'en';
|
|
31085
|
-
/**
|
|
31086
|
-
* Content displayed before the first message in a conversation.
|
|
31087
|
-
*/
|
|
31088
|
-
startScreen?: {
|
|
31089
|
-
/**
|
|
31090
|
-
* Optional welcome text on the empty conversation.
|
|
31091
|
-
*/
|
|
31092
|
-
greeting?: string;
|
|
31093
|
-
/**
|
|
31094
|
-
* Up to four suggested questions; clicking a label sends its prompt text.
|
|
31095
|
-
*/
|
|
31096
|
-
prompts?: Array<{
|
|
31097
|
-
/**
|
|
31098
|
-
* Visible suggested-question button text.
|
|
31099
|
-
*/
|
|
31100
|
-
label: string;
|
|
31101
|
-
/**
|
|
31102
|
-
* User message sent when this suggestion is selected.
|
|
31103
|
-
*/
|
|
31104
|
-
prompt: string;
|
|
31105
|
-
}>;
|
|
31106
|
-
};
|
|
31107
|
-
/**
|
|
31108
|
-
* Message input appearance; transport and attachment settings are excluded.
|
|
31109
|
-
*/
|
|
31110
|
-
composer?: {
|
|
31111
|
-
/**
|
|
31112
|
-
* Hint shown when the message input is empty.
|
|
31113
|
-
*/
|
|
31114
|
-
placeholder?: string;
|
|
31115
|
-
};
|
|
31116
|
-
/**
|
|
31117
|
-
* Optional notice displayed beside the conversation composer.
|
|
31118
|
-
*/
|
|
31119
|
-
disclaimer?: string;
|
|
31120
|
-
/**
|
|
31121
|
-
* Optional text below the conversation.
|
|
31122
|
-
*/
|
|
31123
|
-
footer?: string;
|
|
31124
|
-
/**
|
|
31125
|
-
* Availability of the conversation history control.
|
|
31126
|
-
*/
|
|
31127
|
-
history?: {
|
|
31128
|
-
/**
|
|
31129
|
-
* False hides history; omission uses the default enabled state.
|
|
31130
|
-
*/
|
|
31131
|
-
enabled?: boolean;
|
|
31132
|
-
};
|
|
31133
|
-
};
|
|
31134
|
-
};
|
|
31135
|
-
export type GetAgentAppearanceResponse = GetAgentAppearanceResponses[keyof GetAgentAppearanceResponses];
|
|
31136
|
-
export type CreateCustomerGrantCodeData = {
|
|
31137
|
-
body: {
|
|
31138
|
-
/**
|
|
31139
|
-
* Your stable, opaque identifier for the signed-in customer, such as your database user id. Do not use an email address or phone number. "auth" is reserved, and ids starting with anon_ are reserved for anonymous customers.
|
|
31140
|
-
*/
|
|
31141
|
-
customer_id: string;
|
|
31142
|
-
/**
|
|
31143
|
-
* Existing agent version that every token of this sign-in pins. Defaults to the agent's active_version when the code is issued.
|
|
31144
|
-
*/
|
|
31145
|
-
version?: number;
|
|
31146
|
-
/**
|
|
31147
|
-
* Budget for each session the customer starts, in the same shape as a session budget. Defaults to the embed policy session budget and cannot exceed its maximum.
|
|
31148
|
-
*/
|
|
31149
|
-
budget?: {
|
|
31150
|
-
/**
|
|
31151
|
-
* Budget kind; always limit.
|
|
31152
|
-
*/
|
|
31153
|
-
type: 'limit';
|
|
31154
|
-
/**
|
|
31155
|
-
* Spending limit of each session the customer starts.
|
|
31156
|
-
*/
|
|
31157
|
-
max_list_cost: {
|
|
31158
|
-
/**
|
|
31159
|
-
* Largest list cost of each session, in US dollars, as a decimal string with at most 2 fraction digits, e.g. "0.50". "0" lets the customer sign in without spending.
|
|
31160
|
-
*/
|
|
31161
|
-
amount: string;
|
|
31162
|
-
/**
|
|
31163
|
-
* Always USD.
|
|
31164
|
-
*/
|
|
31165
|
-
currency: 'USD';
|
|
31166
|
-
};
|
|
31167
|
-
};
|
|
31168
|
-
/**
|
|
31169
|
-
* Optional context the agent receives at the start of each session, as text blocks, limited to 8192 UTF-8 bytes in total.
|
|
31170
|
-
*/
|
|
31171
|
-
system_message?: Array<{
|
|
31172
|
-
/**
|
|
31173
|
-
* The text block kind; text is the only supported kind.
|
|
31174
|
-
*/
|
|
31175
|
-
type: 'text';
|
|
31176
|
-
/**
|
|
31177
|
-
* Context text about this customer. All blocks together must fit within 8192 UTF-8 bytes.
|
|
31178
|
-
*/
|
|
31179
|
-
text: string;
|
|
31180
|
-
}>;
|
|
31181
|
-
/**
|
|
31182
|
-
* Optional system prompt override, accepted only when the embed policy allows agent overrides.
|
|
31183
|
-
*/
|
|
31184
|
-
agent_override?: {
|
|
31185
|
-
/**
|
|
31186
|
-
* Replacement system prompt, or null to clear it for this sign-in.
|
|
31187
|
-
*/
|
|
31188
|
-
system: string | null;
|
|
31189
|
-
};
|
|
31190
|
-
/**
|
|
31191
|
-
* Up to 16 string pairs copied onto every session the customer starts. The playground key is reserved.
|
|
31192
|
-
*/
|
|
31193
|
-
metadata?: {
|
|
31194
|
-
[key: string]: string;
|
|
31195
|
-
};
|
|
31196
|
-
/**
|
|
31197
|
-
* Page origin, such as https://shop.example.com, that must be one of the agent policy's allowed_origins (or localhost when the policy allows it). When set, every token of this sign-in works only from exactly this origin. Omit to accept any policy origin.
|
|
31198
|
-
*/
|
|
31199
|
-
origin?: string;
|
|
31200
|
-
/**
|
|
31201
|
-
* Seconds the code stays redeemable, from 60 to 86400. Defaults to 900.
|
|
31202
|
-
*/
|
|
31203
|
-
expires_in?: number;
|
|
31204
|
-
/**
|
|
31205
|
-
* Total lifetime of the sign-in in seconds, from 3600 to 604800 (7 days). Tokens renew within it; after it the customer signs in again. Defaults to 604800.
|
|
31206
|
-
*/
|
|
31207
|
-
max_session_seconds?: number;
|
|
31208
|
-
/**
|
|
31209
|
-
* The current access token of the anonymous customer who used this agent before signing in. Their conversations become visible to the identified customer, and the anonymous sign-in ends at exchange.
|
|
31210
|
-
*/
|
|
31211
|
-
anonymous_access_token?: string;
|
|
31212
|
-
/**
|
|
31213
|
-
* Set true to also return hosted_url, a link to the agent's Hosted chat page that carries the code in its fragment. The page exchanges the code only when the customer clicks to start, so link previews in email or chat apps do not use it up. The agent must have an identity_number, and origin cannot be set: the code is bound to no origin. Defaults to false.
|
|
31214
|
-
*/
|
|
31215
|
-
hosted?: boolean;
|
|
31216
|
-
};
|
|
31217
|
-
path: {
|
|
31218
|
-
/**
|
|
31219
|
-
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31220
|
-
*/
|
|
31221
|
-
agent_id: string;
|
|
31222
|
-
};
|
|
31223
|
-
query?: never;
|
|
31224
|
-
url: '/agent/v1/agents/{agent_id}/customers/auth/grant_codes';
|
|
31225
|
-
};
|
|
31226
|
-
export type CreateCustomerGrantCodeErrors = {
|
|
31227
|
-
/**
|
|
31228
|
-
* INVALID_PARAMS: an unknown field, a reserved or malformed customer_id, an origin outside the policy, a value outside its range, or an anonymous_access_token that is not a live anonymous token of this agent. The message names the field to correct.
|
|
31229
|
-
*/
|
|
31230
|
-
400: unknown;
|
|
31231
|
-
/**
|
|
31232
|
-
* Authenticate with your backend API key or a console session.
|
|
31233
|
-
*/
|
|
31234
|
-
401: unknown;
|
|
31235
|
-
/**
|
|
31236
|
-
* CUSTOMER_BLOCKED: the customer is on the agent's blocked list; unblock them in the console first.
|
|
31237
|
-
*/
|
|
31238
|
-
403: unknown;
|
|
31239
|
-
/**
|
|
31240
|
-
* The agent is not an active service agent of your organization, or the caller is a customer access token.
|
|
31241
|
-
*/
|
|
31242
|
-
404: unknown;
|
|
31243
|
-
};
|
|
31244
|
-
export type CreateCustomerGrantCodeResponses = {
|
|
31245
|
-
/**
|
|
31246
|
-
* The one-time grant code and its expiry. Only its hash is stored; it cannot be read again.
|
|
31247
|
-
*/
|
|
31248
|
-
201: {
|
|
31249
|
-
/**
|
|
31250
|
-
* Object type, always customer_grant_code.
|
|
31251
|
-
*/
|
|
31252
|
-
type: 'customer_grant_code';
|
|
31253
|
-
/**
|
|
31254
|
-
* One-time grant code (cgc_…). Hand it to Agent Kit in the browser, which exchanges it for an access token; it is never shown again.
|
|
31255
|
-
*/
|
|
31256
|
-
code: string;
|
|
31257
|
-
/**
|
|
31258
|
-
* The customer_id that the code signs in.
|
|
31259
|
-
*/
|
|
31260
|
-
customer_id: string;
|
|
31261
|
-
/**
|
|
31262
|
-
* RFC 3339 time after which the code can no longer be exchanged.
|
|
31263
|
-
*/
|
|
31264
|
-
expires_at: string;
|
|
31265
|
-
/**
|
|
31266
|
-
* Returned only when hosted is true: https://chat.praxisusercontent.com/a/{identity_number}?mode=hosted#grant={code}. Send it to the customer before expires_at; the code stays in the fragment and never reaches a server log.
|
|
31267
|
-
*/
|
|
31268
|
-
hosted_url?: string;
|
|
31269
|
-
};
|
|
31270
|
-
};
|
|
31271
|
-
export type CreateCustomerGrantCodeResponse = CreateCustomerGrantCodeResponses[keyof CreateCustomerGrantCodeResponses];
|
|
31272
|
-
export type CreateCustomerAccessTokenData = {
|
|
31273
|
-
/**
|
|
31274
|
-
* Exactly one of grant_code (a signed-in customer) or publishable_key (an anonymous visitor).
|
|
31275
|
-
*/
|
|
31276
|
-
body: {
|
|
31277
|
-
/**
|
|
31278
|
-
* The grant code your backend received from grant_codes. It works once.
|
|
31279
|
-
*/
|
|
31280
|
-
grant_code: string;
|
|
31281
|
-
} | {
|
|
31282
|
-
/**
|
|
31283
|
-
* The agent's publishable key, for a visitor who has not signed in. Creates a new anonymous customer.
|
|
31284
|
-
*/
|
|
31285
|
-
publishable_key: string;
|
|
31286
|
-
};
|
|
31287
|
-
headers?: {
|
|
31288
|
-
/**
|
|
31289
|
-
* Browser page origin. Required for publishable_key and for a grant code bound to an origin; it must be in the agent's allowed_origins.
|
|
31290
|
-
*/
|
|
31291
|
-
Origin?: string;
|
|
31292
|
-
};
|
|
31293
|
-
path: {
|
|
31294
|
-
/**
|
|
31295
|
-
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31296
|
-
*/
|
|
31297
|
-
agent_id: string;
|
|
31298
|
-
};
|
|
31299
|
-
query?: never;
|
|
31300
|
-
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens';
|
|
31301
|
-
};
|
|
31302
|
-
export type CreateCustomerAccessTokenErrors = {
|
|
31303
|
-
/**
|
|
31304
|
-
* INVALID_PARAMS: send exactly one of grant_code or publishable_key, nothing else.
|
|
31305
|
-
*/
|
|
31306
|
-
400: unknown;
|
|
31307
|
-
/**
|
|
31308
|
-
* GRANT_CODE_INVALID: the code is unknown, already used, expired or for another agent (one answer for all four); request a new grant code from your backend. UNAUTHENTICATED: the publishable key is unknown, disabled or for another agent.
|
|
31309
|
-
*/
|
|
31310
|
-
401: unknown;
|
|
31311
|
-
/**
|
|
31312
|
-
* EMBED_BUDGET_EXHAUSTED: the publishable key's daily spending cap is reached; wait for the UTC reset or ask the owner to raise it.
|
|
31313
|
-
*/
|
|
31314
|
-
402: unknown;
|
|
31315
|
-
/**
|
|
31316
|
-
* ORIGIN_NOT_ALLOWED or EMBED_ORIGIN_NOT_ALLOWED: call from the origin the code was issued for, or from one in the agent's allowed_origins. CUSTOMER_BLOCKED: the merchant blocked this customer.
|
|
31317
|
-
*/
|
|
31318
|
-
403: unknown;
|
|
31319
|
-
/**
|
|
31320
|
-
* EMBED_RATE_LIMITED: the per-IP minute limit or the key's daily session cap is reached; wait for Retry-After or the UTC reset.
|
|
31321
|
-
*/
|
|
31322
|
-
429: unknown;
|
|
31323
|
-
/**
|
|
31324
|
-
* Issuance or rate limiting is unavailable; retry later with a new grant code if this one expires.
|
|
31325
|
-
*/
|
|
31326
|
-
503: unknown;
|
|
31327
|
-
};
|
|
31328
|
-
export type CreateCustomerAccessTokenResponses = {
|
|
31329
|
-
/**
|
|
31330
|
-
* A customer access token, its expiry and the end of the sign-in.
|
|
31331
|
-
*/
|
|
31332
|
-
201: {
|
|
31333
|
-
/**
|
|
31334
|
-
* Object type, always customer_access_token.
|
|
31335
|
-
*/
|
|
31336
|
-
type: 'customer_access_token';
|
|
31337
|
-
/**
|
|
31338
|
-
* Bearer credential for this agent's sessions on behalf of the customer. Renew it before expires_at.
|
|
31339
|
-
*/
|
|
31340
|
-
access_token: string;
|
|
31341
|
-
/**
|
|
31342
|
-
* RFC 3339 expiry of this access token: at most two hours after issue and never after session_expires_at.
|
|
31343
|
-
*/
|
|
31344
|
-
expires_at: string;
|
|
31345
|
-
/**
|
|
31346
|
-
* RFC 3339 end of the sign-in. Renewal stops working here; the customer signs in again with a new grant code.
|
|
31347
|
-
*/
|
|
31348
|
-
session_expires_at: string;
|
|
31349
|
-
/**
|
|
31350
|
-
* The customer this token acts for.
|
|
31351
|
-
*/
|
|
31352
|
-
customer: {
|
|
31353
|
-
/**
|
|
31354
|
-
* The customer id: your customer_id, or anon_ followed by 16 characters for an anonymous customer.
|
|
31355
|
-
*/
|
|
31356
|
-
id: string;
|
|
31357
|
-
/**
|
|
31358
|
-
* identified: signed in through a grant code from your backend. anonymous: a visitor admitted with the publishable key.
|
|
31359
|
-
*/
|
|
31360
|
-
type: 'identified' | 'anonymous';
|
|
31361
|
-
};
|
|
31362
|
-
};
|
|
31363
|
-
};
|
|
31364
|
-
export type CreateCustomerAccessTokenResponse = CreateCustomerAccessTokenResponses[keyof CreateCustomerAccessTokenResponses];
|
|
31365
|
-
export type RenewCustomerAccessTokenData = {
|
|
31366
|
-
body?: never;
|
|
31367
|
-
path: {
|
|
31368
|
-
/**
|
|
31369
|
-
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31370
|
-
*/
|
|
31371
|
-
agent_id: string;
|
|
31372
|
-
};
|
|
31373
|
-
query?: never;
|
|
31374
|
-
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens/renew';
|
|
31375
|
-
};
|
|
31376
|
-
export type RenewCustomerAccessTokenErrors = {
|
|
31377
|
-
/**
|
|
31378
|
-
* ACCESS_TOKEN_REVOKED: the token or its sign-in was revoked (logout, merge, or revocation by the merchant); sign the customer in again with a new grant code. Other 401 responses mean the Bearer token is missing, invalid or expired; renew before expires_at. CUSTOMER_SESSION_EXPIRED: less than 60 seconds of the sign-in remain; sign in again: request a new grant code from your backend.
|
|
31379
|
-
*/
|
|
31380
|
-
401: unknown;
|
|
31381
|
-
/**
|
|
31382
|
-
* CUSTOMER_BLOCKED: the merchant blocked this customer; unblock them before signing them in. ORIGIN_NOT_ALLOWED: the request Origin is not the origin this sign-in is bound to, or is not in the agent's allowed_origins; call from the page that signed in.
|
|
31383
|
-
*/
|
|
31384
|
-
403: unknown;
|
|
31385
|
-
/**
|
|
31386
|
-
* The token belongs to another agent, is not a customer access token, or the agent is archived or absent; use the agent_id the token was issued for.
|
|
31387
|
-
*/
|
|
31388
|
-
404: unknown;
|
|
31389
|
-
};
|
|
31390
|
-
export type RenewCustomerAccessTokenResponses = {
|
|
31391
|
-
/**
|
|
31392
|
-
* A new access token in the same sign-in. The presented token stays valid until its own expiry.
|
|
31393
|
-
*/
|
|
31394
|
-
201: {
|
|
31395
|
-
/**
|
|
31396
|
-
* Object type, always customer_access_token.
|
|
31397
|
-
*/
|
|
31398
|
-
type: 'customer_access_token';
|
|
31399
|
-
/**
|
|
31400
|
-
* Bearer credential for this agent's sessions on behalf of the customer. Renew it before expires_at.
|
|
31401
|
-
*/
|
|
31402
|
-
access_token: string;
|
|
31403
|
-
/**
|
|
31404
|
-
* RFC 3339 expiry of this access token: at most two hours after issue and never after session_expires_at.
|
|
31405
|
-
*/
|
|
31406
|
-
expires_at: string;
|
|
31407
|
-
/**
|
|
31408
|
-
* RFC 3339 end of the sign-in. Renewal stops working here; the customer signs in again with a new grant code.
|
|
31409
|
-
*/
|
|
31410
|
-
session_expires_at: string;
|
|
31411
|
-
/**
|
|
31412
|
-
* The customer this token acts for.
|
|
31413
|
-
*/
|
|
31414
|
-
customer: {
|
|
31415
|
-
/**
|
|
31416
|
-
* The customer id: your customer_id, or anon_ followed by 16 characters for an anonymous customer.
|
|
31417
|
-
*/
|
|
31418
|
-
id: string;
|
|
31419
|
-
/**
|
|
31420
|
-
* identified: signed in through a grant code from your backend. anonymous: a visitor admitted with the publishable key.
|
|
31421
|
-
*/
|
|
31422
|
-
type: 'identified' | 'anonymous';
|
|
31423
|
-
};
|
|
31424
|
-
};
|
|
31425
|
-
};
|
|
31426
|
-
export type RenewCustomerAccessTokenResponse = RenewCustomerAccessTokenResponses[keyof RenewCustomerAccessTokenResponses];
|
|
31427
|
-
export type DeleteCurrentCustomerAccessTokenData = {
|
|
31428
|
-
body?: never;
|
|
31429
|
-
path: {
|
|
31430
|
-
/**
|
|
31431
|
-
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31432
|
-
*/
|
|
31433
|
-
agent_id: string;
|
|
31434
|
-
};
|
|
31435
|
-
query?: never;
|
|
31436
|
-
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens/current';
|
|
31437
|
-
};
|
|
31438
|
-
export type DeleteCurrentCustomerAccessTokenErrors = {
|
|
31439
|
-
/**
|
|
31440
|
-
* ACCESS_TOKEN_REVOKED: the token or its sign-in was revoked (logout, merge, or revocation by the merchant); sign the customer in again with a new grant code. Other 401 responses mean the Bearer token is missing, invalid or expired; renew before expires_at.
|
|
31441
|
-
*/
|
|
31442
|
-
401: unknown;
|
|
31443
|
-
/**
|
|
31444
|
-
* CUSTOMER_BLOCKED: the merchant blocked this customer; unblock them before signing them in. ORIGIN_NOT_ALLOWED: the request Origin is not the origin this sign-in is bound to, or is not in the agent's allowed_origins; call from the page that signed in.
|
|
31445
|
-
*/
|
|
31446
|
-
403: unknown;
|
|
31447
|
-
/**
|
|
31448
|
-
* The token belongs to another agent, is not a customer access token, or the agent is archived or absent; use the agent_id the token was issued for.
|
|
31449
|
-
*/
|
|
31450
|
-
404: unknown;
|
|
31451
|
-
};
|
|
31452
|
-
export type DeleteCurrentCustomerAccessTokenResponses = {
|
|
31453
|
-
/**
|
|
31454
|
-
* Logged out: the sign-in and every access token in it are revoked, and their live event streams close.
|
|
31455
|
-
*/
|
|
31456
|
-
204: void;
|
|
31457
|
-
};
|
|
31458
|
-
export type DeleteCurrentCustomerAccessTokenResponse = DeleteCurrentCustomerAccessTokenResponses[keyof DeleteCurrentCustomerAccessTokenResponses];
|
|
31459
|
-
export type ExchangeEmbedCodeData = {
|
|
31460
|
-
body: {
|
|
31461
|
-
/**
|
|
31462
|
-
* Single-use credential from the c fragment parameter of hosted_url returned by embed token creation. Valid for 60 seconds.
|
|
31463
|
-
*/
|
|
31464
|
-
code: string;
|
|
31465
|
-
};
|
|
31466
|
-
path?: never;
|
|
31467
|
-
query?: never;
|
|
31468
|
-
url: '/agent/v1/embed/exchange';
|
|
31469
|
-
};
|
|
31470
|
-
export type ExchangeEmbedCodeErrors = {
|
|
31471
|
-
/**
|
|
31472
|
-
* Expected a JSON object containing only code. Correct the request body.
|
|
31473
|
-
*/
|
|
31474
|
-
400: unknown;
|
|
31475
|
-
/**
|
|
31476
|
-
* UNAUTHENTICATED (or INVALID_API_KEY, API_KEY_DISABLED, API_KEY_EXPIRED, INVALID_API_TOKEN, API_TOKEN_EXPIRED, API_TOKEN_REVOKED): the API key is missing, invalid or revoked. Send a valid key as X-API-Key or as a Bearer token.
|
|
31477
|
-
*/
|
|
31478
|
-
401: AgentError;
|
|
31479
|
-
/**
|
|
31480
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
31481
|
-
*/
|
|
31482
|
-
403: AgentError;
|
|
31483
|
-
/**
|
|
31484
|
-
* The code is expired, already used or unknown. Return to the host website for a new link; all three cases have the same response body.
|
|
31485
|
-
*/
|
|
31486
|
-
404: unknown;
|
|
31487
|
-
/**
|
|
31488
|
-
* The IP minute limit is reached. Wait for Retry-After before trying a fresh link.
|
|
31489
|
-
*/
|
|
31490
|
-
429: unknown;
|
|
31491
|
-
/**
|
|
31492
|
-
* Exchange or rate limiting is unavailable. Return to the host website for a new link later.
|
|
31493
|
-
*/
|
|
31494
|
-
503: unknown;
|
|
30338
|
+
502: unknown;
|
|
31495
30339
|
};
|
|
31496
|
-
export type
|
|
31497
|
-
export type
|
|
30340
|
+
export type RevokeCustomerTokensError = RevokeCustomerTokensErrors[keyof RevokeCustomerTokensErrors];
|
|
30341
|
+
export type RevokeCustomerTokensResponses = {
|
|
31498
30342
|
/**
|
|
31499
|
-
*
|
|
30343
|
+
* How many access tokens this request revoked.
|
|
31500
30344
|
*/
|
|
31501
30345
|
200: {
|
|
31502
30346
|
/**
|
|
31503
|
-
*
|
|
31504
|
-
*/
|
|
31505
|
-
token: string;
|
|
31506
|
-
/**
|
|
31507
|
-
* Token expiration as an ISO 8601 UTC timestamp. Return to the host website after expiration.
|
|
30347
|
+
* Number of access tokens this request revoked; 0 when none was live.
|
|
31508
30348
|
*/
|
|
31509
|
-
|
|
30349
|
+
revoked: number;
|
|
31510
30350
|
};
|
|
31511
30351
|
};
|
|
31512
|
-
export type
|
|
31513
|
-
export type
|
|
31514
|
-
body
|
|
31515
|
-
|
|
31516
|
-
* Public key created by the service agent owner; safe to include in browser code.
|
|
31517
|
-
*/
|
|
31518
|
-
publishable_key: string;
|
|
31519
|
-
/**
|
|
31520
|
-
* Secret returned by a previous anonymous issuance for this key. Omit for a new visitor; an unknown secret creates a new visitor.
|
|
31521
|
-
*/
|
|
31522
|
-
visitor_secret?: string;
|
|
31523
|
-
};
|
|
31524
|
-
headers: {
|
|
30352
|
+
export type RevokeCustomerTokensResponse = RevokeCustomerTokensResponses[keyof RevokeCustomerTokensResponses];
|
|
30353
|
+
export type GetAgentAppearanceData = {
|
|
30354
|
+
body?: never;
|
|
30355
|
+
path: {
|
|
31525
30356
|
/**
|
|
31526
|
-
*
|
|
30357
|
+
* Service agent id from agent creation or listing; with a customer access token, the agent the token was issued for.
|
|
31527
30358
|
*/
|
|
31528
|
-
|
|
30359
|
+
agent_id: string;
|
|
31529
30360
|
};
|
|
31530
|
-
path?: never;
|
|
31531
30361
|
query?: never;
|
|
31532
|
-
url: '/agent/v1/
|
|
30362
|
+
url: '/agent/v1/agents/{agent_id}/appearance';
|
|
31533
30363
|
};
|
|
31534
|
-
export type
|
|
31535
|
-
/**
|
|
31536
|
-
* Unknown or invalid request fields, or key budget exceeds policy. Correct the request or ask the owner to update the key.
|
|
31537
|
-
*/
|
|
31538
|
-
400: unknown;
|
|
30364
|
+
export type GetAgentAppearanceErrors = {
|
|
31539
30365
|
/**
|
|
31540
|
-
*
|
|
30366
|
+
* Authenticate with a customer access token of this agent, your API key or a console session.
|
|
31541
30367
|
*/
|
|
31542
30368
|
401: unknown;
|
|
31543
30369
|
/**
|
|
31544
|
-
*
|
|
31545
|
-
*/
|
|
31546
|
-
402: unknown;
|
|
31547
|
-
/**
|
|
31548
|
-
* EMBED_ORIGIN_NOT_ALLOWED or EMBED_USER_BLOCKED. Use an allowed page origin or contact the owner.
|
|
30370
|
+
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
31549
30371
|
*/
|
|
31550
|
-
403:
|
|
30372
|
+
403: AgentError;
|
|
31551
30373
|
/**
|
|
31552
|
-
*
|
|
30374
|
+
* AGENT_NOT_FOUND: the agent is absent, archived or not a service agent, or the customer access token belongs to another agent.
|
|
31553
30375
|
*/
|
|
31554
|
-
|
|
30376
|
+
404: unknown;
|
|
31555
30377
|
/**
|
|
31556
|
-
*
|
|
30378
|
+
* Appearance is temporarily unavailable; use the default appearance and continue the conversation.
|
|
31557
30379
|
*/
|
|
31558
30380
|
503: unknown;
|
|
31559
30381
|
};
|
|
31560
|
-
export type
|
|
30382
|
+
export type GetAgentAppearanceError = GetAgentAppearanceErrors[keyof GetAgentAppearanceErrors];
|
|
30383
|
+
export type GetAgentAppearanceResponses = {
|
|
31561
30384
|
/**
|
|
31562
|
-
*
|
|
30385
|
+
* Saved Kit options, at most 8192 UTF-8 JSON bytes. Omitted groups use Kit defaults; an unconfigured agent returns an empty object.
|
|
31563
30386
|
*/
|
|
31564
30387
|
200: {
|
|
31565
30388
|
/**
|
|
31566
|
-
*
|
|
31567
|
-
*/
|
|
31568
|
-
token: string;
|
|
31569
|
-
/**
|
|
31570
|
-
* RFC 3339 expiration; refresh before this time using the same visitor_secret.
|
|
31571
|
-
*/
|
|
31572
|
-
expires_at: string;
|
|
31573
|
-
/**
|
|
31574
|
-
* Newly generated visitor secret; save it locally and include it on later requests. Absent when the supplied secret was recognized.
|
|
31575
|
-
*/
|
|
31576
|
-
visitor_secret?: string;
|
|
31577
|
-
};
|
|
31578
|
-
};
|
|
31579
|
-
export type CreateAnonymousEmbedTokenResponse = CreateAnonymousEmbedTokenResponses[keyof CreateAnonymousEmbedTokenResponses];
|
|
31580
|
-
export type ListEmbedTokensData = {
|
|
31581
|
-
body?: never;
|
|
31582
|
-
path?: never;
|
|
31583
|
-
query?: {
|
|
31584
|
-
/**
|
|
31585
|
-
* Filter by service agent identifier (agent_ or agt_ prefix).
|
|
30389
|
+
* Public identity displayed on the chat page, independent of the internal agent name.
|
|
31586
30390
|
*/
|
|
31587
|
-
|
|
30391
|
+
agent?: {
|
|
30392
|
+
/**
|
|
30393
|
+
* Display name; omission keeps the neutral browser-language default.
|
|
30394
|
+
*/
|
|
30395
|
+
name?: string;
|
|
30396
|
+
/**
|
|
30397
|
+
* Optional HTTPS avatar image URL; non-HTTPS images are rejected.
|
|
30398
|
+
*/
|
|
30399
|
+
avatar?: string;
|
|
30400
|
+
};
|
|
31588
30401
|
/**
|
|
31589
|
-
*
|
|
30402
|
+
* Loader default: inline stays in the page, sidebar attaches to the edge, popup floats above its launcher, modal centers an overlay. A script data-layout overrides it; Hosted always uses inline.
|
|
31590
30403
|
*/
|
|
31591
|
-
|
|
30404
|
+
layout?: 'inline' | 'sidebar' | 'popup' | 'modal';
|
|
31592
30405
|
/**
|
|
31593
|
-
*
|
|
30406
|
+
* Default entry button for the loader; an explicit script data-launcher takes precedence.
|
|
31594
30407
|
*/
|
|
31595
|
-
|
|
30408
|
+
launcher?: {
|
|
30409
|
+
/**
|
|
30410
|
+
* Entry control: none hides the launcher, bubble shows a button, mascot shows a character that reacts while the visitor types and the agent thinks and answers. A mascot needs pack.
|
|
30411
|
+
*/
|
|
30412
|
+
type: 'none' | 'bubble' | 'mascot';
|
|
30413
|
+
/**
|
|
30414
|
+
* Mascot images: exactly one of preset or images. Send pack, not image.
|
|
30415
|
+
*/
|
|
30416
|
+
pack?: {
|
|
30417
|
+
/**
|
|
30418
|
+
* Built-in character: mint (mint support girl), cat (cat-eared girl) or bot (small robot).
|
|
30419
|
+
*/
|
|
30420
|
+
preset?: 'mint' | 'cat' | 'bot';
|
|
30421
|
+
/**
|
|
30422
|
+
* One HTTPS image per slot; only idle is required and a missing slot shows idle. Use 2:3 canvases with the feet bottom-centered on a transparent background; PNG or WebP stay still, GIF, WebP and APNG play as they are.
|
|
30423
|
+
*/
|
|
30424
|
+
images?: {
|
|
30425
|
+
/**
|
|
30426
|
+
* Resting state.
|
|
30427
|
+
*/
|
|
30428
|
+
idle: string;
|
|
30429
|
+
/**
|
|
30430
|
+
* Page open and while the greeting bubble shows.
|
|
30431
|
+
*/
|
|
30432
|
+
greet?: string;
|
|
30433
|
+
/**
|
|
30434
|
+
* The visitor is typing in the composer.
|
|
30435
|
+
*/
|
|
30436
|
+
listening?: string;
|
|
30437
|
+
/**
|
|
30438
|
+
* After the visitor sends, before the first reply text.
|
|
30439
|
+
*/
|
|
30440
|
+
thinking?: string;
|
|
30441
|
+
/**
|
|
30442
|
+
* While the reply streams; alternates with talking-2 every 220 ms.
|
|
30443
|
+
*/
|
|
30444
|
+
talking?: string;
|
|
30445
|
+
/**
|
|
30446
|
+
* Second mouth frame of talking, mouth closed; without it talking alternates with idle.
|
|
30447
|
+
*/
|
|
30448
|
+
'talking-2'?: string;
|
|
30449
|
+
/**
|
|
30450
|
+
* The last turn failed or was refused.
|
|
30451
|
+
*/
|
|
30452
|
+
sorry?: string;
|
|
30453
|
+
/**
|
|
30454
|
+
* No interaction for 60 seconds; hover or click wakes the mascot.
|
|
30455
|
+
*/
|
|
30456
|
+
sleep?: string;
|
|
30457
|
+
};
|
|
30458
|
+
};
|
|
30459
|
+
/**
|
|
30460
|
+
* Legacy single mascot image, read as pack.images.idle. When pack is present, pack wins.
|
|
30461
|
+
*/
|
|
30462
|
+
image?: string;
|
|
30463
|
+
/**
|
|
30464
|
+
* float (default) gently floats the mascot, bounces on hover and waves with the greeting; none keeps it still. Reduced-motion settings always win.
|
|
30465
|
+
*/
|
|
30466
|
+
motion?: 'float' | 'none';
|
|
30467
|
+
/**
|
|
30468
|
+
* Launcher corner: bottom-right is the default; bottom-left uses the opposite corner.
|
|
30469
|
+
*/
|
|
30470
|
+
position?: 'bottom-right' | 'bottom-left';
|
|
30471
|
+
/**
|
|
30472
|
+
* Accessible entry button label and bubble text; omission uses the default chat label.
|
|
30473
|
+
*/
|
|
30474
|
+
label?: string;
|
|
30475
|
+
};
|
|
31596
30476
|
/**
|
|
31597
|
-
*
|
|
30477
|
+
* Visible chat heading; omitted title uses the public agent name.
|
|
31598
30478
|
*/
|
|
31599
|
-
|
|
31600
|
-
|
|
31601
|
-
|
|
31602
|
-
|
|
31603
|
-
|
|
31604
|
-
|
|
31605
|
-
|
|
31606
|
-
|
|
31607
|
-
|
|
31608
|
-
|
|
31609
|
-
|
|
31610
|
-
|
|
31611
|
-
|
|
31612
|
-
|
|
31613
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
31614
|
-
*/
|
|
31615
|
-
403: AgentError;
|
|
31616
|
-
/**
|
|
31617
|
-
* The grant is missing or belongs to another organization, or the caller is an end user.
|
|
31618
|
-
*/
|
|
31619
|
-
404: unknown;
|
|
31620
|
-
/**
|
|
31621
|
-
* Upstream revocation failed; the record remains unrevoked and the request may be retried.
|
|
31622
|
-
*/
|
|
31623
|
-
502: unknown;
|
|
31624
|
-
};
|
|
31625
|
-
export type ListEmbedTokensError = ListEmbedTokensErrors[keyof ListEmbedTokensErrors];
|
|
31626
|
-
export type ListEmbedTokensResponses = {
|
|
31627
|
-
/**
|
|
31628
|
-
* Issuance records and next page cursor.
|
|
31629
|
-
*/
|
|
31630
|
-
200: {
|
|
30479
|
+
header?: {
|
|
30480
|
+
/**
|
|
30481
|
+
* Optional heading text shown instead of the public agent name.
|
|
30482
|
+
*/
|
|
30483
|
+
title?: string;
|
|
30484
|
+
/**
|
|
30485
|
+
* Optional secondary line beneath the heading.
|
|
30486
|
+
*/
|
|
30487
|
+
subtitle?: string;
|
|
30488
|
+
/**
|
|
30489
|
+
* Optional HTTPS image shown in the heading avatar position.
|
|
30490
|
+
*/
|
|
30491
|
+
icon?: string;
|
|
30492
|
+
};
|
|
31631
30493
|
/**
|
|
31632
|
-
*
|
|
30494
|
+
* Visual tokens applied to the conversation and header; omitted fields use Kit defaults.
|
|
31633
30495
|
*/
|
|
31634
|
-
|
|
30496
|
+
theme?: {
|
|
31635
30497
|
/**
|
|
31636
|
-
*
|
|
30498
|
+
* light or dark selects a fixed scheme; system follows the device preference.
|
|
31637
30499
|
*/
|
|
31638
|
-
|
|
30500
|
+
colorScheme?: 'light' | 'dark' | 'system';
|
|
31639
30501
|
/**
|
|
31640
|
-
*
|
|
30502
|
+
* Explicit opaque CSS accent color, for example #167A43.
|
|
31641
30503
|
*/
|
|
31642
|
-
|
|
30504
|
+
accent?: string;
|
|
31643
30505
|
/**
|
|
31644
|
-
*
|
|
30506
|
+
* Explicit opaque CSS background color, for example #ffffff.
|
|
31645
30507
|
*/
|
|
31646
|
-
|
|
30508
|
+
surface?: string;
|
|
31647
30509
|
/**
|
|
31648
|
-
*
|
|
30510
|
+
* neutral uses grayscale surfaces, warm uses warm tones, cool uses cool tones.
|
|
31649
30511
|
*/
|
|
31650
|
-
|
|
30512
|
+
grayscale?: 'neutral' | 'warm' | 'cool';
|
|
31651
30513
|
/**
|
|
31652
|
-
*
|
|
30514
|
+
* Corner rounding: none is square, sm is small, md is medium, lg is large, full is fully rounded.
|
|
31653
30515
|
*/
|
|
31654
|
-
|
|
30516
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
31655
30517
|
/**
|
|
31656
|
-
*
|
|
30518
|
+
* Spacing: compact reduces gaps, normal uses defaults, spacious increases gaps.
|
|
31657
30519
|
*/
|
|
31658
|
-
|
|
30520
|
+
density?: 'compact' | 'normal' | 'spacious';
|
|
31659
30521
|
/**
|
|
31660
|
-
*
|
|
30522
|
+
* CSS font family list using fonts available on the device; external font loading is not configured here.
|
|
31661
30523
|
*/
|
|
31662
|
-
|
|
30524
|
+
fontFamily?: string;
|
|
31663
30525
|
/**
|
|
31664
|
-
*
|
|
30526
|
+
* Positive base font size in CSS pixels; omission preserves Kit sizing.
|
|
31665
30527
|
*/
|
|
31666
|
-
|
|
30528
|
+
fontSize?: number;
|
|
30529
|
+
};
|
|
30530
|
+
/**
|
|
30531
|
+
* Reserved Kit locale preference: zh for Chinese, en for English. Kit currently passes this option through without translating all controls.
|
|
30532
|
+
*/
|
|
30533
|
+
locale?: 'zh' | 'en';
|
|
30534
|
+
/**
|
|
30535
|
+
* Content displayed before the first message in a conversation.
|
|
30536
|
+
*/
|
|
30537
|
+
startScreen?: {
|
|
31667
30538
|
/**
|
|
31668
|
-
*
|
|
30539
|
+
* Optional welcome text on the empty conversation.
|
|
31669
30540
|
*/
|
|
31670
|
-
|
|
30541
|
+
greeting?: string;
|
|
31671
30542
|
/**
|
|
31672
|
-
*
|
|
30543
|
+
* Up to four suggested questions; clicking a label sends its prompt text.
|
|
31673
30544
|
*/
|
|
31674
|
-
|
|
30545
|
+
prompts?: Array<{
|
|
31675
30546
|
/**
|
|
31676
|
-
*
|
|
30547
|
+
* Visible suggested-question button text.
|
|
31677
30548
|
*/
|
|
31678
|
-
|
|
30549
|
+
label: string;
|
|
31679
30550
|
/**
|
|
31680
|
-
*
|
|
30551
|
+
* User message sent when this suggestion is selected.
|
|
31681
30552
|
*/
|
|
31682
|
-
|
|
31683
|
-
}
|
|
31684
|
-
}
|
|
30553
|
+
prompt: string;
|
|
30554
|
+
}>;
|
|
30555
|
+
};
|
|
31685
30556
|
/**
|
|
31686
|
-
*
|
|
30557
|
+
* Message input appearance; transport and attachment settings are excluded.
|
|
31687
30558
|
*/
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31691
|
-
|
|
31692
|
-
|
|
31693
|
-
|
|
30559
|
+
composer?: {
|
|
30560
|
+
/**
|
|
30561
|
+
* Hint shown when the message input is empty.
|
|
30562
|
+
*/
|
|
30563
|
+
placeholder?: string;
|
|
30564
|
+
};
|
|
31694
30565
|
/**
|
|
31695
|
-
*
|
|
30566
|
+
* Optional notice displayed beside the conversation composer.
|
|
31696
30567
|
*/
|
|
31697
|
-
|
|
30568
|
+
disclaimer?: string;
|
|
31698
30569
|
/**
|
|
31699
|
-
*
|
|
30570
|
+
* Optional text below the conversation.
|
|
31700
30571
|
*/
|
|
31701
|
-
|
|
30572
|
+
footer?: string;
|
|
31702
30573
|
/**
|
|
31703
|
-
*
|
|
30574
|
+
* Availability of the conversation history control.
|
|
31704
30575
|
*/
|
|
31705
|
-
|
|
30576
|
+
history?: {
|
|
30577
|
+
/**
|
|
30578
|
+
* False hides history; omission uses the default enabled state.
|
|
30579
|
+
*/
|
|
30580
|
+
enabled?: boolean;
|
|
30581
|
+
};
|
|
30582
|
+
};
|
|
30583
|
+
};
|
|
30584
|
+
export type GetAgentAppearanceResponse = GetAgentAppearanceResponses[keyof GetAgentAppearanceResponses];
|
|
30585
|
+
export type CreateCustomerGrantCodeData = {
|
|
30586
|
+
body: {
|
|
31706
30587
|
/**
|
|
31707
|
-
* Your
|
|
30588
|
+
* Your stable, opaque identifier for the signed-in customer, such as your database user id. Do not use an email address or phone number. "auth" is reserved, and ids starting with anon_ are reserved for anonymous customers.
|
|
31708
30589
|
*/
|
|
31709
|
-
|
|
30590
|
+
customer_id: string;
|
|
31710
30591
|
/**
|
|
31711
|
-
*
|
|
30592
|
+
* Existing agent version that every token of this sign-in pins. Defaults to the agent's active_version when the code is issued.
|
|
31712
30593
|
*/
|
|
31713
|
-
|
|
30594
|
+
version?: number;
|
|
31714
30595
|
/**
|
|
31715
|
-
*
|
|
30596
|
+
* Budget for each session the customer starts, in the same shape as a session budget. Defaults to the embed policy session budget and cannot exceed its maximum.
|
|
31716
30597
|
*/
|
|
31717
|
-
|
|
30598
|
+
budget?: {
|
|
30599
|
+
/**
|
|
30600
|
+
* Budget kind; always limit.
|
|
30601
|
+
*/
|
|
30602
|
+
type: 'limit';
|
|
30603
|
+
/**
|
|
30604
|
+
* Spending limit of each session the customer starts.
|
|
30605
|
+
*/
|
|
30606
|
+
max_list_cost: {
|
|
30607
|
+
/**
|
|
30608
|
+
* Largest list cost of each session, in US dollars, as a decimal string with at most 2 fraction digits, e.g. "0.50". "0" lets the customer sign in without spending.
|
|
30609
|
+
*/
|
|
30610
|
+
amount: string;
|
|
30611
|
+
/**
|
|
30612
|
+
* Always USD.
|
|
30613
|
+
*/
|
|
30614
|
+
currency: 'USD';
|
|
30615
|
+
};
|
|
30616
|
+
};
|
|
31718
30617
|
/**
|
|
31719
|
-
* Optional
|
|
30618
|
+
* Optional context the agent receives at the start of each session, as text blocks, limited to 8192 UTF-8 bytes in total.
|
|
31720
30619
|
*/
|
|
31721
30620
|
system_message?: Array<{
|
|
31722
30621
|
/**
|
|
@@ -31724,7 +30623,7 @@ export type CreateEmbedTokenData = {
|
|
|
31724
30623
|
*/
|
|
31725
30624
|
type: 'text';
|
|
31726
30625
|
/**
|
|
31727
|
-
*
|
|
30626
|
+
* Context text about this customer. All blocks together must fit within 8192 UTF-8 bytes.
|
|
31728
30627
|
*/
|
|
31729
30628
|
text: string;
|
|
31730
30629
|
}>;
|
|
@@ -31733,162 +30632,279 @@ export type CreateEmbedTokenData = {
|
|
|
31733
30632
|
*/
|
|
31734
30633
|
agent_override?: {
|
|
31735
30634
|
/**
|
|
31736
|
-
* Replacement system prompt, or null to clear it for this
|
|
30635
|
+
* Replacement system prompt, or null to clear it for this sign-in.
|
|
31737
30636
|
*/
|
|
31738
30637
|
system: string | null;
|
|
31739
30638
|
};
|
|
31740
30639
|
/**
|
|
31741
|
-
*
|
|
31742
|
-
*/
|
|
31743
|
-
allowed_origins?: Array<string>;
|
|
31744
|
-
/**
|
|
31745
|
-
* Host metadata preserved verbatim; at most 16 keys of 1–64 characters and string values of at most 512 characters. Defaults to an empty object.
|
|
30640
|
+
* Up to 16 string pairs copied onto every session the customer starts. The playground key is reserved.
|
|
31746
30641
|
*/
|
|
31747
30642
|
metadata?: {
|
|
31748
30643
|
[key: string]: string;
|
|
31749
30644
|
};
|
|
30645
|
+
/**
|
|
30646
|
+
* Page origin, such as https://shop.example.com, that must be one of the agent policy's allowed_origins (or localhost when the policy allows it). When set, every token of this sign-in works only from exactly this origin. Omit to accept any policy origin.
|
|
30647
|
+
*/
|
|
30648
|
+
origin?: string;
|
|
30649
|
+
/**
|
|
30650
|
+
* Seconds the code stays redeemable, from 60 to 86400. Defaults to 900.
|
|
30651
|
+
*/
|
|
30652
|
+
expires_in?: number;
|
|
30653
|
+
/**
|
|
30654
|
+
* Total lifetime of the sign-in in seconds, from 3600 to 604800 (7 days). Tokens renew within it; after it the customer signs in again. Defaults to 604800.
|
|
30655
|
+
*/
|
|
30656
|
+
max_session_seconds?: number;
|
|
30657
|
+
/**
|
|
30658
|
+
* The current access token of the anonymous customer who used this agent before signing in. Their conversations become visible to the identified customer, and the anonymous sign-in ends at exchange.
|
|
30659
|
+
*/
|
|
30660
|
+
anonymous_access_token?: string;
|
|
30661
|
+
/**
|
|
30662
|
+
* Set true to also return hosted_url, a link to the agent's Hosted chat page that carries the code in its fragment. The page exchanges the code only when the customer clicks to start, so link previews in email or chat apps do not use it up. The agent must have an identity_number, and origin cannot be set: the code is bound to no origin. Defaults to false.
|
|
30663
|
+
*/
|
|
30664
|
+
hosted?: boolean;
|
|
30665
|
+
};
|
|
30666
|
+
path: {
|
|
30667
|
+
/**
|
|
30668
|
+
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
30669
|
+
*/
|
|
30670
|
+
agent_id: string;
|
|
31750
30671
|
};
|
|
31751
|
-
path?: never;
|
|
31752
30672
|
query?: never;
|
|
31753
|
-
url: '/agent/v1/
|
|
30673
|
+
url: '/agent/v1/agents/{agent_id}/customers/auth/grant_codes';
|
|
31754
30674
|
};
|
|
31755
|
-
export type
|
|
30675
|
+
export type CreateCustomerGrantCodeErrors = {
|
|
31756
30676
|
/**
|
|
31757
|
-
*
|
|
30677
|
+
* INVALID_PARAMS: an unknown field, a reserved or malformed customer_id, an origin outside the policy, a value outside its range, or an anonymous_access_token that is not a live anonymous token of this agent. The message names the field to correct.
|
|
31758
30678
|
*/
|
|
31759
30679
|
400: unknown;
|
|
31760
30680
|
/**
|
|
31761
|
-
*
|
|
30681
|
+
* Authenticate with your backend API key or a console session.
|
|
31762
30682
|
*/
|
|
31763
30683
|
401: unknown;
|
|
31764
30684
|
/**
|
|
31765
|
-
*
|
|
30685
|
+
* CUSTOMER_BLOCKED: the customer is on the agent's blocked list; unblock them in the console first.
|
|
31766
30686
|
*/
|
|
31767
30687
|
403: unknown;
|
|
31768
30688
|
/**
|
|
31769
|
-
* The
|
|
30689
|
+
* The agent is not an active service agent of your organization, or the caller is a customer access token.
|
|
31770
30690
|
*/
|
|
31771
30691
|
404: unknown;
|
|
31772
|
-
/**
|
|
31773
|
-
* Token issuance is unavailable; no usable credential was returned.
|
|
31774
|
-
*/
|
|
31775
|
-
502: unknown;
|
|
31776
30692
|
};
|
|
31777
|
-
export type
|
|
30693
|
+
export type CreateCustomerGrantCodeResponses = {
|
|
31778
30694
|
/**
|
|
31779
|
-
*
|
|
30695
|
+
* The one-time grant code and its expiry. Only its hash is stored; it cannot be read again.
|
|
31780
30696
|
*/
|
|
31781
30697
|
201: {
|
|
31782
30698
|
/**
|
|
31783
|
-
*
|
|
30699
|
+
* Object type, always customer_grant_code.
|
|
31784
30700
|
*/
|
|
31785
|
-
|
|
30701
|
+
type: 'customer_grant_code';
|
|
31786
30702
|
/**
|
|
31787
|
-
*
|
|
30703
|
+
* One-time grant code (cgc_…). Hand it to Agent Kit in the browser, which exchanges it for an access token; it is never shown again.
|
|
31788
30704
|
*/
|
|
31789
|
-
|
|
30705
|
+
code: string;
|
|
31790
30706
|
/**
|
|
31791
|
-
*
|
|
30707
|
+
* The customer_id that the code signs in.
|
|
31792
30708
|
*/
|
|
31793
|
-
|
|
30709
|
+
customer_id: string;
|
|
31794
30710
|
/**
|
|
31795
|
-
*
|
|
30711
|
+
* RFC 3339 time after which the code can no longer be exchanged.
|
|
31796
30712
|
*/
|
|
31797
30713
|
expires_at: string;
|
|
30714
|
+
/**
|
|
30715
|
+
* Returned only when hosted is true: https://chat.praxisusercontent.com/a/{identity_number}?mode=hosted#grant={code}. Send it to the customer before expires_at; the code stays in the fragment and never reaches a server log.
|
|
30716
|
+
*/
|
|
30717
|
+
hosted_url?: string;
|
|
31798
30718
|
};
|
|
31799
30719
|
};
|
|
31800
|
-
export type
|
|
31801
|
-
export type
|
|
31802
|
-
|
|
30720
|
+
export type CreateCustomerGrantCodeResponse = CreateCustomerGrantCodeResponses[keyof CreateCustomerGrantCodeResponses];
|
|
30721
|
+
export type CreateCustomerAccessTokenData = {
|
|
30722
|
+
/**
|
|
30723
|
+
* Exactly one of grant_code (a signed-in customer) or publishable_key (an anonymous visitor).
|
|
30724
|
+
*/
|
|
30725
|
+
body: {
|
|
30726
|
+
/**
|
|
30727
|
+
* The grant code your backend received from grant_codes. It works once.
|
|
30728
|
+
*/
|
|
30729
|
+
grant_code: string;
|
|
30730
|
+
} | {
|
|
30731
|
+
/**
|
|
30732
|
+
* The agent's publishable key, for a visitor who has not signed in. Creates a new anonymous customer.
|
|
30733
|
+
*/
|
|
30734
|
+
publishable_key: string;
|
|
30735
|
+
};
|
|
30736
|
+
headers?: {
|
|
30737
|
+
/**
|
|
30738
|
+
* Browser page origin. Required for publishable_key and for a grant code bound to an origin; it must be in the agent's allowed_origins.
|
|
30739
|
+
*/
|
|
30740
|
+
Origin?: string;
|
|
30741
|
+
};
|
|
31803
30742
|
path: {
|
|
31804
30743
|
/**
|
|
31805
|
-
*
|
|
30744
|
+
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31806
30745
|
*/
|
|
31807
|
-
|
|
30746
|
+
agent_id: string;
|
|
31808
30747
|
};
|
|
31809
30748
|
query?: never;
|
|
31810
|
-
url: '/agent/v1/
|
|
30749
|
+
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens';
|
|
31811
30750
|
};
|
|
31812
|
-
export type
|
|
30751
|
+
export type CreateCustomerAccessTokenErrors = {
|
|
31813
30752
|
/**
|
|
31814
|
-
*
|
|
30753
|
+
* INVALID_PARAMS: send exactly one of grant_code or publishable_key, nothing else.
|
|
31815
30754
|
*/
|
|
31816
30755
|
400: unknown;
|
|
31817
30756
|
/**
|
|
31818
|
-
*
|
|
30757
|
+
* GRANT_CODE_INVALID: the code is unknown, already used, expired or for another agent (one answer for all four); request a new grant code from your backend. UNAUTHENTICATED: the publishable key is unknown, disabled or for another agent.
|
|
31819
30758
|
*/
|
|
31820
30759
|
401: unknown;
|
|
31821
30760
|
/**
|
|
31822
|
-
*
|
|
30761
|
+
* EMBED_BUDGET_EXHAUSTED: the publishable key's daily spending cap is reached; wait for the UTC reset or ask the owner to raise it.
|
|
31823
30762
|
*/
|
|
31824
|
-
|
|
30763
|
+
402: unknown;
|
|
31825
30764
|
/**
|
|
31826
|
-
*
|
|
30765
|
+
* ORIGIN_NOT_ALLOWED or EMBED_ORIGIN_NOT_ALLOWED: call from the origin the code was issued for, or from one in the agent's allowed_origins. CUSTOMER_BLOCKED: the merchant blocked this customer.
|
|
31827
30766
|
*/
|
|
31828
|
-
|
|
30767
|
+
403: unknown;
|
|
31829
30768
|
/**
|
|
31830
|
-
*
|
|
30769
|
+
* EMBED_RATE_LIMITED: the per-IP minute limit or the key's daily session cap is reached; wait for Retry-After or the UTC reset.
|
|
31831
30770
|
*/
|
|
31832
|
-
|
|
30771
|
+
429: unknown;
|
|
30772
|
+
/**
|
|
30773
|
+
* Issuance or rate limiting is unavailable; retry later with a new grant code if this one expires.
|
|
30774
|
+
*/
|
|
30775
|
+
503: unknown;
|
|
31833
30776
|
};
|
|
31834
|
-
export type
|
|
31835
|
-
export type RevokeEmbedTokenResponses = {
|
|
30777
|
+
export type CreateCustomerAccessTokenResponses = {
|
|
31836
30778
|
/**
|
|
31837
|
-
*
|
|
30779
|
+
* A customer access token, its expiry and the end of the sign-in.
|
|
31838
30780
|
*/
|
|
31839
|
-
|
|
30781
|
+
201: {
|
|
31840
30782
|
/**
|
|
31841
|
-
*
|
|
30783
|
+
* Object type, always customer_access_token.
|
|
31842
30784
|
*/
|
|
31843
|
-
|
|
30785
|
+
type: 'customer_access_token';
|
|
31844
30786
|
/**
|
|
31845
|
-
*
|
|
30787
|
+
* Bearer credential for this agent's sessions on behalf of the customer. Renew it before expires_at.
|
|
31846
30788
|
*/
|
|
31847
|
-
|
|
30789
|
+
access_token: string;
|
|
31848
30790
|
/**
|
|
31849
|
-
*
|
|
30791
|
+
* RFC 3339 expiry of this access token: at most two hours after issue and never after session_expires_at.
|
|
31850
30792
|
*/
|
|
31851
|
-
|
|
30793
|
+
expires_at: string;
|
|
30794
|
+
/**
|
|
30795
|
+
* RFC 3339 end of the sign-in. Renewal stops working here; the customer signs in again with a new grant code.
|
|
30796
|
+
*/
|
|
30797
|
+
session_expires_at: string;
|
|
30798
|
+
/**
|
|
30799
|
+
* The customer this token acts for.
|
|
30800
|
+
*/
|
|
30801
|
+
customer: {
|
|
30802
|
+
/**
|
|
30803
|
+
* The customer id: your customer_id, or anon_ followed by 16 characters for an anonymous customer.
|
|
30804
|
+
*/
|
|
30805
|
+
id: string;
|
|
30806
|
+
/**
|
|
30807
|
+
* identified: signed in through a grant code from your backend. anonymous: a visitor admitted with the publishable key.
|
|
30808
|
+
*/
|
|
30809
|
+
type: 'identified' | 'anonymous';
|
|
30810
|
+
};
|
|
30811
|
+
};
|
|
30812
|
+
};
|
|
30813
|
+
export type CreateCustomerAccessTokenResponse = CreateCustomerAccessTokenResponses[keyof CreateCustomerAccessTokenResponses];
|
|
30814
|
+
export type RenewCustomerAccessTokenData = {
|
|
30815
|
+
body?: never;
|
|
30816
|
+
path: {
|
|
31852
30817
|
/**
|
|
31853
|
-
*
|
|
30818
|
+
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31854
30819
|
*/
|
|
31855
|
-
|
|
30820
|
+
agent_id: string;
|
|
30821
|
+
};
|
|
30822
|
+
query?: never;
|
|
30823
|
+
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens/renew';
|
|
30824
|
+
};
|
|
30825
|
+
export type RenewCustomerAccessTokenErrors = {
|
|
30826
|
+
/**
|
|
30827
|
+
* ACCESS_TOKEN_REVOKED: the token or its sign-in was revoked (logout, merge, or revocation by the merchant); sign the customer in again with a new grant code. Other 401 responses mean the Bearer token is missing, invalid or expired; renew before expires_at. CUSTOMER_SESSION_EXPIRED: less than 60 seconds of the sign-in remain; sign in again: request a new grant code from your backend.
|
|
30828
|
+
*/
|
|
30829
|
+
401: unknown;
|
|
30830
|
+
/**
|
|
30831
|
+
* CUSTOMER_BLOCKED: the merchant blocked this customer; unblock them before signing them in. ORIGIN_NOT_ALLOWED: the request Origin is not the origin this sign-in is bound to, or is not in the agent's allowed_origins; call from the page that signed in.
|
|
30832
|
+
*/
|
|
30833
|
+
403: unknown;
|
|
30834
|
+
/**
|
|
30835
|
+
* The token belongs to another agent, is not a customer access token, or the agent is archived or absent; use the agent_id the token was issued for.
|
|
30836
|
+
*/
|
|
30837
|
+
404: unknown;
|
|
30838
|
+
};
|
|
30839
|
+
export type RenewCustomerAccessTokenResponses = {
|
|
30840
|
+
/**
|
|
30841
|
+
* A new access token in the same sign-in. The presented token stays valid until its own expiry.
|
|
30842
|
+
*/
|
|
30843
|
+
201: {
|
|
31856
30844
|
/**
|
|
31857
|
-
*
|
|
30845
|
+
* Object type, always customer_access_token.
|
|
31858
30846
|
*/
|
|
31859
|
-
|
|
30847
|
+
type: 'customer_access_token';
|
|
31860
30848
|
/**
|
|
31861
|
-
*
|
|
30849
|
+
* Bearer credential for this agent's sessions on behalf of the customer. Renew it before expires_at.
|
|
31862
30850
|
*/
|
|
31863
|
-
|
|
30851
|
+
access_token: string;
|
|
31864
30852
|
/**
|
|
31865
|
-
*
|
|
30853
|
+
* RFC 3339 expiry of this access token: at most two hours after issue and never after session_expires_at.
|
|
31866
30854
|
*/
|
|
31867
30855
|
expires_at: string;
|
|
31868
30856
|
/**
|
|
31869
|
-
*
|
|
30857
|
+
* RFC 3339 end of the sign-in. Renewal stops working here; the customer signs in again with a new grant code.
|
|
31870
30858
|
*/
|
|
31871
|
-
|
|
30859
|
+
session_expires_at: string;
|
|
31872
30860
|
/**
|
|
31873
|
-
*
|
|
30861
|
+
* The customer this token acts for.
|
|
31874
30862
|
*/
|
|
31875
|
-
|
|
30863
|
+
customer: {
|
|
30864
|
+
/**
|
|
30865
|
+
* The customer id: your customer_id, or anon_ followed by 16 characters for an anonymous customer.
|
|
30866
|
+
*/
|
|
30867
|
+
id: string;
|
|
30868
|
+
/**
|
|
30869
|
+
* identified: signed in through a grant code from your backend. anonymous: a visitor admitted with the publishable key.
|
|
30870
|
+
*/
|
|
30871
|
+
type: 'identified' | 'anonymous';
|
|
30872
|
+
};
|
|
30873
|
+
};
|
|
30874
|
+
};
|
|
30875
|
+
export type RenewCustomerAccessTokenResponse = RenewCustomerAccessTokenResponses[keyof RenewCustomerAccessTokenResponses];
|
|
30876
|
+
export type DeleteCurrentCustomerAccessTokenData = {
|
|
30877
|
+
body?: never;
|
|
30878
|
+
path: {
|
|
31876
30879
|
/**
|
|
31877
|
-
*
|
|
30880
|
+
* Service agent id (agent_…) or its short identity number, from agent creation or listing.
|
|
31878
30881
|
*/
|
|
31879
|
-
|
|
31880
|
-
/**
|
|
31881
|
-
* user identifies a signed-in organization member; api_key identifies the issuing API key.
|
|
31882
|
-
*/
|
|
31883
|
-
type: 'user' | 'api_key';
|
|
31884
|
-
/**
|
|
31885
|
-
* Identifier of the object, as returned by the API; pass it in the path of follow-up calls on the same resource.
|
|
31886
|
-
*/
|
|
31887
|
-
id: string;
|
|
31888
|
-
};
|
|
30882
|
+
agent_id: string;
|
|
31889
30883
|
};
|
|
30884
|
+
query?: never;
|
|
30885
|
+
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens/current';
|
|
30886
|
+
};
|
|
30887
|
+
export type DeleteCurrentCustomerAccessTokenErrors = {
|
|
30888
|
+
/**
|
|
30889
|
+
* ACCESS_TOKEN_REVOKED: the token or its sign-in was revoked (logout, merge, or revocation by the merchant); sign the customer in again with a new grant code. Other 401 responses mean the Bearer token is missing, invalid or expired; renew before expires_at.
|
|
30890
|
+
*/
|
|
30891
|
+
401: unknown;
|
|
30892
|
+
/**
|
|
30893
|
+
* CUSTOMER_BLOCKED: the merchant blocked this customer; unblock them before signing them in. ORIGIN_NOT_ALLOWED: the request Origin is not the origin this sign-in is bound to, or is not in the agent's allowed_origins; call from the page that signed in.
|
|
30894
|
+
*/
|
|
30895
|
+
403: unknown;
|
|
30896
|
+
/**
|
|
30897
|
+
* The token belongs to another agent, is not a customer access token, or the agent is archived or absent; use the agent_id the token was issued for.
|
|
30898
|
+
*/
|
|
30899
|
+
404: unknown;
|
|
31890
30900
|
};
|
|
31891
|
-
export type
|
|
30901
|
+
export type DeleteCurrentCustomerAccessTokenResponses = {
|
|
30902
|
+
/**
|
|
30903
|
+
* Logged out: the sign-in and every access token in it are revoked, and their live event streams close.
|
|
30904
|
+
*/
|
|
30905
|
+
204: void;
|
|
30906
|
+
};
|
|
30907
|
+
export type DeleteCurrentCustomerAccessTokenResponse = DeleteCurrentCustomerAccessTokenResponses[keyof DeleteCurrentCustomerAccessTokenResponses];
|
|
31892
30908
|
export type ComputersListData = {
|
|
31893
30909
|
body?: never;
|
|
31894
30910
|
path?: never;
|
|
@@ -37647,243 +36663,6 @@ export type ListSessionCompactionsResponses = {
|
|
|
37647
36663
|
};
|
|
37648
36664
|
};
|
|
37649
36665
|
export type ListSessionCompactionsResponse = ListSessionCompactionsResponses[keyof ListSessionCompactionsResponses];
|
|
37650
|
-
export type GetEmbedAppearanceData = {
|
|
37651
|
-
body?: never;
|
|
37652
|
-
headers?: {
|
|
37653
|
-
/**
|
|
37654
|
-
* Active public key from the agent's console embed settings; alternative to an end-user Bearer token.
|
|
37655
|
-
*/
|
|
37656
|
-
'Praxis-Publishable-Key'?: string;
|
|
37657
|
-
};
|
|
37658
|
-
path?: never;
|
|
37659
|
-
query?: never;
|
|
37660
|
-
url: '/agent/v1/embed/appearance';
|
|
37661
|
-
};
|
|
37662
|
-
export type GetEmbedAppearanceErrors = {
|
|
37663
|
-
/**
|
|
37664
|
-
* Addressing parameters are not accepted; remove identity_number, agent_id and other query parameters.
|
|
37665
|
-
*/
|
|
37666
|
-
400: unknown;
|
|
37667
|
-
/**
|
|
37668
|
-
* Supply a valid embed token or an active publishable key; organization member credentials cannot read this surface.
|
|
37669
|
-
*/
|
|
37670
|
-
401: unknown;
|
|
37671
|
-
/**
|
|
37672
|
-
* permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
|
|
37673
|
-
*/
|
|
37674
|
-
403: AgentError;
|
|
37675
|
-
/**
|
|
37676
|
-
* The credential's service agent is absent or archived; obtain credentials for an active service agent.
|
|
37677
|
-
*/
|
|
37678
|
-
404: unknown;
|
|
37679
|
-
/**
|
|
37680
|
-
* Appearance is temporarily unavailable; use default appearance and continue the conversation.
|
|
37681
|
-
*/
|
|
37682
|
-
503: unknown;
|
|
37683
|
-
};
|
|
37684
|
-
export type GetEmbedAppearanceError = GetEmbedAppearanceErrors[keyof GetEmbedAppearanceErrors];
|
|
37685
|
-
export type GetEmbedAppearanceResponses = {
|
|
37686
|
-
/**
|
|
37687
|
-
* Saved Kit options, at most 8192 UTF-8 JSON bytes. Omitted groups use Kit defaults; an unconfigured agent returns an empty object.
|
|
37688
|
-
*/
|
|
37689
|
-
200: {
|
|
37690
|
-
/**
|
|
37691
|
-
* Public identity displayed on the chat page, independent of the internal agent name.
|
|
37692
|
-
*/
|
|
37693
|
-
agent?: {
|
|
37694
|
-
/**
|
|
37695
|
-
* Display name; omission keeps the neutral browser-language default.
|
|
37696
|
-
*/
|
|
37697
|
-
name?: string;
|
|
37698
|
-
/**
|
|
37699
|
-
* Optional HTTPS avatar image URL; non-HTTPS images are rejected.
|
|
37700
|
-
*/
|
|
37701
|
-
avatar?: string;
|
|
37702
|
-
};
|
|
37703
|
-
/**
|
|
37704
|
-
* Loader default: inline stays in the page, sidebar attaches to the edge, popup floats above its launcher, modal centers an overlay. A script data-layout overrides it; Hosted always uses inline.
|
|
37705
|
-
*/
|
|
37706
|
-
layout?: 'inline' | 'sidebar' | 'popup' | 'modal';
|
|
37707
|
-
/**
|
|
37708
|
-
* Default entry button for the loader; an explicit script data-launcher takes precedence.
|
|
37709
|
-
*/
|
|
37710
|
-
launcher?: {
|
|
37711
|
-
/**
|
|
37712
|
-
* Entry control: none hides the launcher, bubble shows a button, mascot shows a character that reacts while the visitor types and the agent thinks and answers. A mascot needs pack.
|
|
37713
|
-
*/
|
|
37714
|
-
type: 'none' | 'bubble' | 'mascot';
|
|
37715
|
-
/**
|
|
37716
|
-
* Mascot images: exactly one of preset or images. Send pack, not image.
|
|
37717
|
-
*/
|
|
37718
|
-
pack?: {
|
|
37719
|
-
/**
|
|
37720
|
-
* Built-in character: mint (mint support girl), cat (cat-eared girl) or bot (small robot).
|
|
37721
|
-
*/
|
|
37722
|
-
preset?: 'mint' | 'cat' | 'bot';
|
|
37723
|
-
/**
|
|
37724
|
-
* One HTTPS image per slot; only idle is required and a missing slot shows idle. Use 2:3 canvases with the feet bottom-centered on a transparent background; PNG or WebP stay still, GIF, WebP and APNG play as they are.
|
|
37725
|
-
*/
|
|
37726
|
-
images?: {
|
|
37727
|
-
/**
|
|
37728
|
-
* Resting state.
|
|
37729
|
-
*/
|
|
37730
|
-
idle: string;
|
|
37731
|
-
/**
|
|
37732
|
-
* Page open and while the greeting bubble shows.
|
|
37733
|
-
*/
|
|
37734
|
-
greet?: string;
|
|
37735
|
-
/**
|
|
37736
|
-
* The visitor is typing in the composer.
|
|
37737
|
-
*/
|
|
37738
|
-
listening?: string;
|
|
37739
|
-
/**
|
|
37740
|
-
* After the visitor sends, before the first reply text.
|
|
37741
|
-
*/
|
|
37742
|
-
thinking?: string;
|
|
37743
|
-
/**
|
|
37744
|
-
* While the reply streams; alternates with talking-2 every 220 ms.
|
|
37745
|
-
*/
|
|
37746
|
-
talking?: string;
|
|
37747
|
-
/**
|
|
37748
|
-
* Second mouth frame of talking, mouth closed; without it talking alternates with idle.
|
|
37749
|
-
*/
|
|
37750
|
-
'talking-2'?: string;
|
|
37751
|
-
/**
|
|
37752
|
-
* The last turn failed or was refused.
|
|
37753
|
-
*/
|
|
37754
|
-
sorry?: string;
|
|
37755
|
-
/**
|
|
37756
|
-
* No interaction for 60 seconds; hover or click wakes the mascot.
|
|
37757
|
-
*/
|
|
37758
|
-
sleep?: string;
|
|
37759
|
-
};
|
|
37760
|
-
};
|
|
37761
|
-
/**
|
|
37762
|
-
* Legacy single mascot image, read as pack.images.idle. When pack is present, pack wins.
|
|
37763
|
-
*/
|
|
37764
|
-
image?: string;
|
|
37765
|
-
/**
|
|
37766
|
-
* float (default) gently floats the mascot, bounces on hover and waves with the greeting; none keeps it still. Reduced-motion settings always win.
|
|
37767
|
-
*/
|
|
37768
|
-
motion?: 'float' | 'none';
|
|
37769
|
-
/**
|
|
37770
|
-
* Launcher corner: bottom-right is the default; bottom-left uses the opposite corner.
|
|
37771
|
-
*/
|
|
37772
|
-
position?: 'bottom-right' | 'bottom-left';
|
|
37773
|
-
/**
|
|
37774
|
-
* Accessible entry button label and bubble text; omission uses the default chat label.
|
|
37775
|
-
*/
|
|
37776
|
-
label?: string;
|
|
37777
|
-
};
|
|
37778
|
-
/**
|
|
37779
|
-
* Visible chat heading; omitted title uses the public agent name.
|
|
37780
|
-
*/
|
|
37781
|
-
header?: {
|
|
37782
|
-
/**
|
|
37783
|
-
* Optional heading text shown instead of the public agent name.
|
|
37784
|
-
*/
|
|
37785
|
-
title?: string;
|
|
37786
|
-
/**
|
|
37787
|
-
* Optional secondary line beneath the heading.
|
|
37788
|
-
*/
|
|
37789
|
-
subtitle?: string;
|
|
37790
|
-
/**
|
|
37791
|
-
* Optional HTTPS image shown in the heading avatar position.
|
|
37792
|
-
*/
|
|
37793
|
-
icon?: string;
|
|
37794
|
-
};
|
|
37795
|
-
/**
|
|
37796
|
-
* Visual tokens applied to the conversation and header; omitted fields use Kit defaults.
|
|
37797
|
-
*/
|
|
37798
|
-
theme?: {
|
|
37799
|
-
/**
|
|
37800
|
-
* light or dark selects a fixed scheme; system follows the device preference.
|
|
37801
|
-
*/
|
|
37802
|
-
colorScheme?: 'light' | 'dark' | 'system';
|
|
37803
|
-
/**
|
|
37804
|
-
* Explicit opaque CSS accent color, for example #167A43.
|
|
37805
|
-
*/
|
|
37806
|
-
accent?: string;
|
|
37807
|
-
/**
|
|
37808
|
-
* Explicit opaque CSS background color, for example #ffffff.
|
|
37809
|
-
*/
|
|
37810
|
-
surface?: string;
|
|
37811
|
-
/**
|
|
37812
|
-
* neutral uses grayscale surfaces, warm uses warm tones, cool uses cool tones.
|
|
37813
|
-
*/
|
|
37814
|
-
grayscale?: 'neutral' | 'warm' | 'cool';
|
|
37815
|
-
/**
|
|
37816
|
-
* Corner rounding: none is square, sm is small, md is medium, lg is large, full is fully rounded.
|
|
37817
|
-
*/
|
|
37818
|
-
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
37819
|
-
/**
|
|
37820
|
-
* Spacing: compact reduces gaps, normal uses defaults, spacious increases gaps.
|
|
37821
|
-
*/
|
|
37822
|
-
density?: 'compact' | 'normal' | 'spacious';
|
|
37823
|
-
/**
|
|
37824
|
-
* CSS font family list using fonts available on the device; external font loading is not configured here.
|
|
37825
|
-
*/
|
|
37826
|
-
fontFamily?: string;
|
|
37827
|
-
/**
|
|
37828
|
-
* Positive base font size in CSS pixels; omission preserves Kit sizing.
|
|
37829
|
-
*/
|
|
37830
|
-
fontSize?: number;
|
|
37831
|
-
};
|
|
37832
|
-
/**
|
|
37833
|
-
* Reserved Kit locale preference: zh for Chinese, en for English. Kit currently passes this option through without translating all controls.
|
|
37834
|
-
*/
|
|
37835
|
-
locale?: 'zh' | 'en';
|
|
37836
|
-
/**
|
|
37837
|
-
* Content displayed before the first message in a conversation.
|
|
37838
|
-
*/
|
|
37839
|
-
startScreen?: {
|
|
37840
|
-
/**
|
|
37841
|
-
* Optional welcome text on the empty conversation.
|
|
37842
|
-
*/
|
|
37843
|
-
greeting?: string;
|
|
37844
|
-
/**
|
|
37845
|
-
* Up to four suggested questions; clicking a label sends its prompt text.
|
|
37846
|
-
*/
|
|
37847
|
-
prompts?: Array<{
|
|
37848
|
-
/**
|
|
37849
|
-
* Visible suggested-question button text.
|
|
37850
|
-
*/
|
|
37851
|
-
label: string;
|
|
37852
|
-
/**
|
|
37853
|
-
* User message sent when this suggestion is selected.
|
|
37854
|
-
*/
|
|
37855
|
-
prompt: string;
|
|
37856
|
-
}>;
|
|
37857
|
-
};
|
|
37858
|
-
/**
|
|
37859
|
-
* Message input appearance; transport and attachment settings are excluded.
|
|
37860
|
-
*/
|
|
37861
|
-
composer?: {
|
|
37862
|
-
/**
|
|
37863
|
-
* Hint shown when the message input is empty.
|
|
37864
|
-
*/
|
|
37865
|
-
placeholder?: string;
|
|
37866
|
-
};
|
|
37867
|
-
/**
|
|
37868
|
-
* Optional notice displayed beside the conversation composer.
|
|
37869
|
-
*/
|
|
37870
|
-
disclaimer?: string;
|
|
37871
|
-
/**
|
|
37872
|
-
* Optional text below the conversation.
|
|
37873
|
-
*/
|
|
37874
|
-
footer?: string;
|
|
37875
|
-
/**
|
|
37876
|
-
* Availability of the conversation history control.
|
|
37877
|
-
*/
|
|
37878
|
-
history?: {
|
|
37879
|
-
/**
|
|
37880
|
-
* False hides history; omission uses the default enabled state.
|
|
37881
|
-
*/
|
|
37882
|
-
enabled?: boolean;
|
|
37883
|
-
};
|
|
37884
|
-
};
|
|
37885
|
-
};
|
|
37886
|
-
export type GetEmbedAppearanceResponse = GetEmbedAppearanceResponses[keyof GetEmbedAppearanceResponses];
|
|
37887
36666
|
export type CreateAudioSpeechData = {
|
|
37888
36667
|
body: unknown & {
|
|
37889
36668
|
/**
|
|
@@ -44212,7 +42991,7 @@ export type ListOrganizationCostsResponses = {
|
|
|
44212
42991
|
*/
|
|
44213
42992
|
ResourceName?: string;
|
|
44214
42993
|
/**
|
|
44215
|
-
*
|
|
42994
|
+
* Amount in BillingCurrency: US dollars for USD, decimal string, 6 decimals.
|
|
44216
42995
|
*/
|
|
44217
42996
|
BilledCost: string;
|
|
44218
42997
|
/**
|
|
@@ -44430,7 +43209,7 @@ export type ListOrganizationEventsResponses = {
|
|
|
44430
43209
|
*/
|
|
44431
43210
|
ResourceName: string;
|
|
44432
43211
|
/**
|
|
44433
|
-
* Amount billed
|
|
43212
|
+
* Amount billed: US dollars for USD (otherwise BillingCurrency), decimal string, 6 decimals (for example `0.001700`); unsettled usage counts as `0.000000` until it settles.
|
|
44434
43213
|
*/
|
|
44435
43214
|
BilledCost: string;
|
|
44436
43215
|
/**
|
|
@@ -44454,7 +43233,7 @@ export type ListOrganizationEventsResponses = {
|
|
|
44454
43233
|
*/
|
|
44455
43234
|
status: 'settled' | 'no_charge' | 'rejected';
|
|
44456
43235
|
/**
|
|
44457
|
-
*
|
|
43236
|
+
* Amount that could not be charged: US dollars, decimal string, 6 decimals, when status is settled_with_shortfall; null otherwise.
|
|
44458
43237
|
*/
|
|
44459
43238
|
shortfall: string | null;
|
|
44460
43239
|
/**
|
|
@@ -44551,7 +43330,7 @@ export type GetOrganizationEventResponses = {
|
|
|
44551
43330
|
*/
|
|
44552
43331
|
ResourceName: string;
|
|
44553
43332
|
/**
|
|
44554
|
-
* Amount billed
|
|
43333
|
+
* Amount billed: US dollars for USD (otherwise BillingCurrency), decimal string, 6 decimals (for example `0.001700`); unsettled usage counts as `0.000000` until it settles.
|
|
44555
43334
|
*/
|
|
44556
43335
|
BilledCost: string;
|
|
44557
43336
|
/**
|
|
@@ -44575,7 +43354,7 @@ export type GetOrganizationEventResponses = {
|
|
|
44575
43354
|
*/
|
|
44576
43355
|
status: 'settled' | 'no_charge' | 'rejected';
|
|
44577
43356
|
/**
|
|
44578
|
-
*
|
|
43357
|
+
* Amount that could not be charged: US dollars, decimal string, 6 decimals, when status is settled_with_shortfall; null otherwise.
|
|
44579
43358
|
*/
|
|
44580
43359
|
shortfall: string | null;
|
|
44581
43360
|
/**
|
|
@@ -44612,7 +43391,7 @@ export type GetOrganizationEventResponses = {
|
|
|
44612
43391
|
*/
|
|
44613
43392
|
PricingUnit: string | null;
|
|
44614
43393
|
/**
|
|
44615
|
-
* Amount billed for this line
|
|
43394
|
+
* Amount billed for this line: US dollars for USD (otherwise BillingCurrency), decimal string, 6 decimals (for example `0.001700`).
|
|
44616
43395
|
*/
|
|
44617
43396
|
BilledCost: string;
|
|
44618
43397
|
}>;
|
|
@@ -44625,7 +43404,7 @@ export type GetOrganizationEventResponses = {
|
|
|
44625
43404
|
*/
|
|
44626
43405
|
transaction_id: string;
|
|
44627
43406
|
/**
|
|
44628
|
-
* Amount billed
|
|
43407
|
+
* Amount billed: US dollars for USD (otherwise BillingCurrency), decimal string, 6 decimals (for example `0.001700`); unsettled usage counts as `0.000000` until it settles.
|
|
44629
43408
|
*/
|
|
44630
43409
|
BilledCost: string;
|
|
44631
43410
|
/**
|
|
@@ -44679,7 +43458,7 @@ export type ExportOrganizationChargesResponses = {
|
|
|
44679
43458
|
*/
|
|
44680
43459
|
ChargePeriodEnd: string;
|
|
44681
43460
|
/**
|
|
44682
|
-
* Amount billed
|
|
43461
|
+
* Amount billed: US dollars for USD (otherwise BillingCurrency), decimal string, 6 decimals (for example `0.001700`); unsettled usage counts as `0.000000` until it settles.
|
|
44683
43462
|
*/
|
|
44684
43463
|
BilledCost: string;
|
|
44685
43464
|
/**
|