@droz-js/sdk 0.8.5 → 0.8.6
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/package.json +1 -1
- package/src/drozchat-ws.d.ts +3 -0
- package/src/drozchat.d.ts +3 -0
- package/src/sdks/drozchat.d.ts +12 -0
- package/src/sdks/drozchat.js +12 -2
- package/src/sdks/drozcommons.d.ts +6 -4
- package/src/sdks/drozcommons.js +1 -0
package/package.json
CHANGED
package/src/drozchat-ws.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ declare const DrozChatWs_base: new () => {
|
|
|
3
3
|
readonly ws: any;
|
|
4
4
|
connect(): Promise<void>;
|
|
5
5
|
} & {
|
|
6
|
+
generateAnalyticsToken(variables?: import("./sdks/drozchat").Exact<{
|
|
7
|
+
[key: string]: never;
|
|
8
|
+
}>, options?: unknown): Promise<import("./sdks/drozchat").GenerateAnalyticsTokenMutation>;
|
|
6
9
|
getDrozChatChannel(variables: import("./sdks/drozchat").Exact<{
|
|
7
10
|
id: import("./sdks/drozchat").Scalars["ID"]["input"];
|
|
8
11
|
}>, options?: unknown): Promise<import("./sdks/drozchat").GetDrozChatChannelQuery>;
|
package/src/drozchat.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ declare const DrozChat_base: new (options?: import("./client/http").HttpClientOp
|
|
|
6
6
|
withCustomHeaders(headers: () => Record<string, string>): any;
|
|
7
7
|
withHttpRequestExecutor(httpRequestExecutor: import("./client/http").HttpRequestExecutor): any;
|
|
8
8
|
} & {
|
|
9
|
+
generateAnalyticsToken(variables?: import("./sdks/drozchat").Exact<{
|
|
10
|
+
[key: string]: never;
|
|
11
|
+
}>, options?: unknown): Promise<import("./sdks/drozchat").GenerateAnalyticsTokenMutation>;
|
|
9
12
|
getDrozChatChannel(variables: import("./sdks/drozchat").Exact<{
|
|
10
13
|
id: import("./sdks/drozchat").Scalars["ID"]["input"];
|
|
11
14
|
}>, options?: unknown): Promise<import("./sdks/drozchat").GetDrozChatChannelQuery>;
|
package/src/sdks/drozchat.d.ts
CHANGED
|
@@ -145,6 +145,9 @@ export type AgentSearchResultsFacetValue = {
|
|
|
145
145
|
count: Scalars['Float']['output'];
|
|
146
146
|
value: Scalars['String']['output'];
|
|
147
147
|
};
|
|
148
|
+
export type AnalyticsToken = {
|
|
149
|
+
token: Scalars['String']['output'];
|
|
150
|
+
};
|
|
148
151
|
export declare enum AppInstanceStatus {
|
|
149
152
|
Active = "Active",
|
|
150
153
|
Failing = "Failing",
|
|
@@ -266,6 +269,7 @@ export type Mutation = {
|
|
|
266
269
|
deleteTags: Array<Maybe<TicketTag>>;
|
|
267
270
|
disableDrozChatChannel?: Maybe<DrozChatChannel>;
|
|
268
271
|
enableDrozChatChannel?: Maybe<DrozChatChannel>;
|
|
272
|
+
generateAnalyticsToken?: Maybe<AnalyticsToken>;
|
|
269
273
|
markTicketMessagesAsRead?: Maybe<Scalars['Void']['output']>;
|
|
270
274
|
removeDrozChatChannelAgent?: Maybe<DrozChatChannel>;
|
|
271
275
|
removeTagsFromTicket: Ticket;
|
|
@@ -654,6 +658,12 @@ export type UpdateTicketInput = {
|
|
|
654
658
|
priority?: InputMaybe<TicketPriority>;
|
|
655
659
|
subject?: InputMaybe<Scalars['String']['input']>;
|
|
656
660
|
};
|
|
661
|
+
export type GenerateAnalyticsTokenMutationVariables = Exact<{
|
|
662
|
+
[key: string]: never;
|
|
663
|
+
}>;
|
|
664
|
+
export type GenerateAnalyticsTokenMutation = {
|
|
665
|
+
generateAnalyticsToken?: Maybe<Pick<AnalyticsToken, 'token'>>;
|
|
666
|
+
};
|
|
657
667
|
export type DrozChatChannelFragment = Pick<DrozChatChannel, 'id' | 'name' | 'drn' | 'agentIds' | 'createdAt' | 'updatedAt'>;
|
|
658
668
|
export type GetDrozChatChannelQueryVariables = Exact<{
|
|
659
669
|
id: Scalars['ID']['input'];
|
|
@@ -922,6 +932,7 @@ export declare const SessionAttributesFragmentDoc = "\n fragment sessionAttri
|
|
|
922
932
|
export declare const TicketWithSessionFragmentDoc = "\n fragment ticketWithSession on Ticket {\n ...ticket\n sessionAttributes {\n ...sessionAttributes\n }\n}\n ";
|
|
923
933
|
export declare const TicketMessageFragmentDoc = "\n fragment ticketMessage on TicketMessage {\n id\n ticketId\n from\n to\n channelId\n contentType\n content\n filename\n size\n createdAt\n updatedAt\n}\n ";
|
|
924
934
|
export declare const FacetsFragmentDoc = "\n fragment facets on TicketsSearchResultsFacet {\n ... on SearchResultsFacet {\n name\n values {\n value\n count\n }\n stats {\n min\n max\n }\n }\n ... on AgentSearchResultsFacet {\n name\n values {\n value\n agent {\n id\n name\n }\n count\n }\n stats {\n min\n max\n }\n }\n ... on ChannelSearchResultsFacet {\n name\n values {\n value\n channel {\n id\n name\n }\n count\n }\n stats {\n min\n max\n }\n }\n}\n ";
|
|
935
|
+
export declare const GenerateAnalyticsTokenDocument = "\n mutation generateAnalyticsToken {\n generateAnalyticsToken {\n token\n }\n}\n ";
|
|
925
936
|
export declare const GetDrozChatChannelDocument = "\n query getDrozChatChannel($id: ID!) {\n getDrozChatChannel(id: $id) {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n ";
|
|
926
937
|
export declare const ListDrozChatChannelsDocument = "\n query listDrozChatChannels {\n listDrozChatChannels {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n ";
|
|
927
938
|
export declare const ListDrozChatAgentChannelsDocument = "\n query listDrozChatAgentChannels($agentId: ID!) {\n listDrozChatAgentChannels(agentId: $agentId) {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n ";
|
|
@@ -956,6 +967,7 @@ export declare const OnTicketByStateDocument = "\n subscription onTicketBySta
|
|
|
956
967
|
export declare const OnTicketMessageDocument = "\n subscription onTicketMessage($ticketId: ID!) {\n onTicketMessage(ticketId: $ticketId) {\n message {\n ...ticketMessage\n }\n action\n }\n}\n \n fragment ticketMessage on TicketMessage {\n id\n ticketId\n from\n to\n channelId\n contentType\n content\n filename\n size\n createdAt\n updatedAt\n}\n ";
|
|
957
968
|
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
958
969
|
export declare function getSdk<C>(requester: Requester<C>): {
|
|
970
|
+
generateAnalyticsToken(variables?: GenerateAnalyticsTokenMutationVariables, options?: C): Promise<GenerateAnalyticsTokenMutation>;
|
|
959
971
|
getDrozChatChannel(variables: GetDrozChatChannelQueryVariables, options?: C): Promise<GetDrozChatChannelQuery>;
|
|
960
972
|
listDrozChatChannels(variables?: ListDrozChatChannelsQueryVariables, options?: C): Promise<ListDrozChatChannelsQuery>;
|
|
961
973
|
listDrozChatAgentChannels(variables: ListDrozChatAgentChannelsQueryVariables, options?: C): Promise<ListDrozChatAgentChannelsQuery>;
|
package/src/sdks/drozchat.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.serviceName = exports.OnTicketMessageDocument = void 0;
|
|
4
|
+
exports.OnTicketInProgressMineDocument = exports.TransferTicketToChannelDocument = exports.RemoveTagsFromTicketDocument = exports.AddTagsToTicketDocument = exports.CloseTicketDocument = exports.UnassignTicketDocument = exports.AssignTicketMyselfDocument = exports.AssignTicketDocument = exports.CreateTicketMessageForStorageDocument = exports.CreateTicketMessageDocument = exports.MarkTicketMessagesAsReadDocument = exports.UpdateTicketDocument = exports.CreateTicketDocument = exports.SearchTicketsDocument = exports.ListTicketMessagesDocument = exports.ListTicketsInProgressMineDocument = exports.ListTicketsDocument = exports.GetTicketDocument = exports.DeleteTagsDocument = exports.CreateTagsDocument = exports.ListTagsDocument = exports.RemoveDrozChatChannelAgentDocument = exports.AddDrozChatChannelAgentDocument = exports.EnableDrozChatChannelDocument = exports.DisableDrozChatChannelDocument = exports.UpdateDrozChatChannelDocument = exports.CreateDrozChatChannelDocument = exports.ListDrozChatAgentChannelsDocument = exports.ListDrozChatChannelsDocument = exports.GetDrozChatChannelDocument = exports.GenerateAnalyticsTokenDocument = exports.FacetsFragmentDoc = exports.TicketMessageFragmentDoc = exports.TicketWithSessionFragmentDoc = exports.SessionAttributesFragmentDoc = exports.TicketFragmentDoc = exports.DrozChatChannelFragmentDoc = exports.TicketTriggerAppFragmentDoc = exports.CustomerFragmentDoc = exports.TagFragmentDoc = exports.DrozChatAgentFragmentDoc = exports.Typenames = exports.TicketStatus = exports.TicketState = exports.TicketSearchSortBy = exports.TicketPriority = exports.TicketMessageRecipient = exports.SubscriptionAction = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
|
+
exports.serviceName = exports.OnTicketMessageDocument = exports.OnTicketByStateDocument = void 0;
|
|
6
6
|
exports.getSdk = getSdk;
|
|
7
7
|
var AppInstanceStatus;
|
|
8
8
|
(function (AppInstanceStatus) {
|
|
@@ -249,6 +249,13 @@ exports.FacetsFragmentDoc = `
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
`;
|
|
252
|
+
exports.GenerateAnalyticsTokenDocument = `
|
|
253
|
+
mutation generateAnalyticsToken {
|
|
254
|
+
generateAnalyticsToken {
|
|
255
|
+
token
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
252
259
|
exports.GetDrozChatChannelDocument = `
|
|
253
260
|
query getDrozChatChannel($id: ID!) {
|
|
254
261
|
getDrozChatChannel(id: $id) {
|
|
@@ -618,6 +625,9 @@ exports.OnTicketMessageDocument = `
|
|
|
618
625
|
${exports.TicketMessageFragmentDoc}`;
|
|
619
626
|
function getSdk(requester) {
|
|
620
627
|
return {
|
|
628
|
+
generateAnalyticsToken(variables, options) {
|
|
629
|
+
return requester(exports.GenerateAnalyticsTokenDocument, variables, options);
|
|
630
|
+
},
|
|
621
631
|
getDrozChatChannel(variables, options) {
|
|
622
632
|
return requester(exports.GetDrozChatChannelDocument, variables, options);
|
|
623
633
|
},
|
|
@@ -155,6 +155,7 @@ export type AwsAccount = {
|
|
|
155
155
|
};
|
|
156
156
|
export type AwsAccountParameters = {
|
|
157
157
|
administrativeApiSecret?: Maybe<Scalars['String']['output']>;
|
|
158
|
+
analyticsJwtSignKey?: Maybe<Scalars['String']['output']>;
|
|
158
159
|
mercadoLivreClientId?: Maybe<Scalars['String']['output']>;
|
|
159
160
|
mercadoLivreClientSecret?: Maybe<Scalars['String']['output']>;
|
|
160
161
|
metaAppId?: Maybe<Scalars['String']['output']>;
|
|
@@ -450,6 +451,7 @@ export declare enum Typenames {
|
|
|
450
451
|
}
|
|
451
452
|
export type UpdateAccountParametersInput = {
|
|
452
453
|
administrativeApiSecret?: InputMaybe<Scalars['String']['input']>;
|
|
454
|
+
analyticsEncryptionKey?: InputMaybe<Scalars['String']['input']>;
|
|
453
455
|
id: Scalars['ID']['input'];
|
|
454
456
|
mercadoLivreClientId?: InputMaybe<Scalars['String']['input']>;
|
|
455
457
|
mercadoLivreClientSecret?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -470,7 +472,7 @@ export type UpdateTenantInput = {
|
|
|
470
472
|
};
|
|
471
473
|
export type AwsAccountFragment = (Pick<AwsAccount, 'id' | 'name' | 'tenantsCount'> & {
|
|
472
474
|
availableRegions: Array<RegionFragment>;
|
|
473
|
-
parameters: Pick<AwsAccountParameters, 'administrativeApiSecret' | 'typesenseNodes' | 'typesenseApiKey' | 'openAIApiKey' | 'metaAppId' | 'metaClientSecret' | 'metaConfigurationId' | 'metaWebhookVerificationToken' | 'metaSystemUserId' | 'metaSystemUserToken' | 'mercadoLivreClientId' | 'mercadoLivreClientSecret'>;
|
|
475
|
+
parameters: Pick<AwsAccountParameters, 'administrativeApiSecret' | 'typesenseNodes' | 'typesenseApiKey' | 'openAIApiKey' | 'metaAppId' | 'metaClientSecret' | 'metaConfigurationId' | 'metaWebhookVerificationToken' | 'metaSystemUserId' | 'metaSystemUserToken' | 'mercadoLivreClientId' | 'mercadoLivreClientSecret' | 'analyticsJwtSignKey'>;
|
|
474
476
|
});
|
|
475
477
|
export type RegionFragment = Pick<Region, 'name'>;
|
|
476
478
|
export type ListAccountsQueryVariables = Exact<{
|
|
@@ -626,15 +628,15 @@ export type JoinTenantAsSuperAdminMutationVariables = Exact<{
|
|
|
626
628
|
}>;
|
|
627
629
|
export type JoinTenantAsSuperAdminMutation = Pick<Mutation, 'joinTenantAsSuperAdmin'>;
|
|
628
630
|
export declare const RegionFragmentDoc = "\n fragment region on Region {\n name\n}\n ";
|
|
629
|
-
export declare const AwsAccountFragmentDoc = "\n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n availableRegions {\n ...region\n }\n parameters {\n administrativeApiSecret\n typesenseNodes\n typesenseApiKey\n openAIApiKey\n metaAppId\n metaClientSecret\n metaConfigurationId\n metaWebhookVerificationToken\n metaSystemUserId\n metaSystemUserToken\n mercadoLivreClientId\n mercadoLivreClientSecret\n }\n}\n ";
|
|
631
|
+
export declare const AwsAccountFragmentDoc = "\n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n availableRegions {\n ...region\n }\n parameters {\n administrativeApiSecret\n typesenseNodes\n typesenseApiKey\n openAIApiKey\n metaAppId\n metaClientSecret\n metaConfigurationId\n metaWebhookVerificationToken\n metaSystemUserId\n metaSystemUserToken\n mercadoLivreClientId\n mercadoLivreClientSecret\n analyticsJwtSignKey\n }\n}\n ";
|
|
630
632
|
export declare const DeploymentFragmentDoc = "\n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
|
|
631
633
|
export declare const GitBranchFragmentDoc = "\n fragment gitBranch on GitBranch {\n name\n}\n ";
|
|
632
634
|
export declare const GitRepositoryFragmentDoc = "\n fragment gitRepository on GitRepository {\n id\n name\n branches {\n ...gitBranch\n }\n}\n ";
|
|
633
635
|
export declare const ServiceFragmentDoc = "\n fragment service on Service {\n accountId\n tenantId\n serviceId\n type\n endpoint\n}\n ";
|
|
634
636
|
export declare const TenantFragmentDoc = "\n fragment tenant on Tenant {\n accountId\n tenantId\n name\n deployedVersions\n disabled\n createdAt\n updatedAt\n billing {\n reclameaqui {\n cutoffSyncDays\n }\n automate {\n isEnabled\n }\n }\n account {\n id\n name\n }\n}\n ";
|
|
635
|
-
export declare const ListAccountsDocument = "\n query listAccounts {\n listAccounts {\n ...awsAccount\n }\n}\n \n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n availableRegions {\n ...region\n }\n parameters {\n administrativeApiSecret\n typesenseNodes\n typesenseApiKey\n openAIApiKey\n metaAppId\n metaClientSecret\n metaConfigurationId\n metaWebhookVerificationToken\n metaSystemUserId\n metaSystemUserToken\n mercadoLivreClientId\n mercadoLivreClientSecret\n }\n}\n \n\n fragment region on Region {\n name\n}\n ";
|
|
637
|
+
export declare const ListAccountsDocument = "\n query listAccounts {\n listAccounts {\n ...awsAccount\n }\n}\n \n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n availableRegions {\n ...region\n }\n parameters {\n administrativeApiSecret\n typesenseNodes\n typesenseApiKey\n openAIApiKey\n metaAppId\n metaClientSecret\n metaConfigurationId\n metaWebhookVerificationToken\n metaSystemUserId\n metaSystemUserToken\n mercadoLivreClientId\n mercadoLivreClientSecret\n analyticsJwtSignKey\n }\n}\n \n\n fragment region on Region {\n name\n}\n ";
|
|
636
638
|
export declare const ListRegionsDocument = "\n query listRegions {\n listRegions {\n ...region\n }\n}\n \n fragment region on Region {\n name\n}\n ";
|
|
637
|
-
export declare const UpdateAccountParametersDocument = "\n mutation updateAccountParameters($input: UpdateAccountParametersInput!) {\n updateAccountParameters(input: $input) {\n ...awsAccount\n }\n}\n \n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n availableRegions {\n ...region\n }\n parameters {\n administrativeApiSecret\n typesenseNodes\n typesenseApiKey\n openAIApiKey\n metaAppId\n metaClientSecret\n metaConfigurationId\n metaWebhookVerificationToken\n metaSystemUserId\n metaSystemUserToken\n mercadoLivreClientId\n mercadoLivreClientSecret\n }\n}\n \n\n fragment region on Region {\n name\n}\n ";
|
|
639
|
+
export declare const UpdateAccountParametersDocument = "\n mutation updateAccountParameters($input: UpdateAccountParametersInput!) {\n updateAccountParameters(input: $input) {\n ...awsAccount\n }\n}\n \n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n availableRegions {\n ...region\n }\n parameters {\n administrativeApiSecret\n typesenseNodes\n typesenseApiKey\n openAIApiKey\n metaAppId\n metaClientSecret\n metaConfigurationId\n metaWebhookVerificationToken\n metaSystemUserId\n metaSystemUserToken\n mercadoLivreClientId\n mercadoLivreClientSecret\n analyticsJwtSignKey\n }\n}\n \n\n fragment region on Region {\n name\n}\n ";
|
|
638
640
|
export declare const GetAmplifyConfigDocument = "\n query getAmplifyConfig($forDev: Boolean) {\n amplifyConfig(forDev: $forDev)\n}\n ";
|
|
639
641
|
export declare const GetAuthInfoDocument = "\n query getAuthInfo {\n authInfo {\n authenticationEndpoint\n jwtIssuer\n loginUrl\n logoutUrl\n cognitoConfig {\n region\n userPoolId\n userPoolWebClientId\n }\n }\n}\n ";
|
|
640
642
|
export declare const ListGitRepositoriesDocument = "\n query listGitRepositories {\n listGitRepositories {\n ...gitRepository\n }\n}\n \n fragment gitRepository on GitRepository {\n id\n name\n branches {\n ...gitBranch\n }\n}\n \n\n fragment gitBranch on GitBranch {\n name\n}\n ";
|