@snugdesk/core 0.2.22 → 0.2.23

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.
@@ -1564,6 +1564,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
1564
1564
  }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1565
1565
 
1566
1566
  const FIELDS_INTERACTION_ENDPOINT = `
1567
+ id
1568
+ externalId
1569
+ tenantId
1570
+ widgetId
1571
+ address
1572
+ configuration
1573
+ sellPrice {
1574
+ currency
1575
+ upfrontCost
1576
+ monthlyCost
1577
+ inboundCost
1578
+ outboundCost
1579
+ }
1580
+ documents {
1581
+ fileName
1582
+ documentType
1583
+ contentType
1584
+ }
1585
+ createdAt
1586
+ updatedAt
1587
+ deletedAt
1588
+ updatedByUserId
1589
+ updatedByUserSessionId
1590
+ `;
1591
+ const FIELDS_INTERACTION_ENDPOINT_MINIMAL = `
1567
1592
  id
1568
1593
  externalId
1569
1594
  tenantId
@@ -1575,7 +1600,127 @@ const FIELDS_INTERACTION_ENDPOINT = `
1575
1600
  deletedAt
1576
1601
  `;
1577
1602
  class InteractionEndpointService {
1578
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1603
+ appSyncService;
1604
+ constructor(appSyncService) {
1605
+ this.appSyncService = appSyncService;
1606
+ }
1607
+ async GetInteractionEndpoint(id) {
1608
+ const statement = `query GetInteractionEndpoint($id: ID!) {
1609
+ getInteractionEndpoint(id: $id) {
1610
+ ${FIELDS_INTERACTION_ENDPOINT}
1611
+ }
1612
+ }`;
1613
+ const gqlAPIServiceArguments = {
1614
+ id,
1615
+ };
1616
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1617
+ return response.data.getInteractionEndpoint;
1618
+ }
1619
+ async CreateInteractionEndpoint(input, condition) {
1620
+ const statement = `mutation CreateInteractionEndpoint($input: CreateInteractionEndpointInput!, $condition: ModelInteractionEndpointConditionInput) {
1621
+ createInteractionEndpoint(input: $input, condition: $condition) {
1622
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
1623
+ }
1624
+ }`;
1625
+ const gqlAPIServiceArguments = {
1626
+ input,
1627
+ };
1628
+ if (condition) {
1629
+ gqlAPIServiceArguments.condition = condition;
1630
+ }
1631
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1632
+ return response.data.createInteractionEndpoint;
1633
+ }
1634
+ async UpdateInteractionEndpoint(input, condition) {
1635
+ const statement = `mutation UpdateInteractionEndpoint($input: UpdateInteractionEndpointInput!, $condition: ModelInteractionEndpointConditionInput) {
1636
+ updateInteractionEndpoint(input: $input, condition: $condition) {
1637
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
1638
+ }
1639
+ }`;
1640
+ const gqlAPIServiceArguments = {
1641
+ input,
1642
+ };
1643
+ if (condition) {
1644
+ gqlAPIServiceArguments.condition = condition;
1645
+ }
1646
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1647
+ return response.data.updateInteractionEndpoint;
1648
+ }
1649
+ async ListInteractionEndpointsByTenantId(tenantId, address, sortDirection, filter, limit, nextToken) {
1650
+ const statement = `query ListInteractionEndpointsByTenantId($tenantId: ID!, $address: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionEndpointFilterInput, $limit: Int, $nextToken: String) {
1651
+ listInteractionEndpointsByTenantId(
1652
+ tenantId: $tenantId
1653
+ address: $address
1654
+ sortDirection: $sortDirection
1655
+ filter: $filter
1656
+ limit: $limit
1657
+ nextToken: $nextToken
1658
+ ) {
1659
+ items {
1660
+ ${FIELDS_INTERACTION_ENDPOINT}
1661
+ }
1662
+ nextToken
1663
+ }
1664
+ }`;
1665
+ const gqlAPIServiceArguments = {
1666
+ tenantId,
1667
+ };
1668
+ if (address) {
1669
+ gqlAPIServiceArguments.address = address;
1670
+ }
1671
+ if (sortDirection) {
1672
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1673
+ }
1674
+ if (filter) {
1675
+ gqlAPIServiceArguments.filter = filter;
1676
+ }
1677
+ if (limit) {
1678
+ gqlAPIServiceArguments.limit = limit;
1679
+ }
1680
+ if (nextToken) {
1681
+ gqlAPIServiceArguments.nextToken = nextToken;
1682
+ }
1683
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1684
+ return response.data.listInteractionEndpointsByTenantId;
1685
+ }
1686
+ async ListInteractionEndpointsByWidgetId(widgetId, address, sortDirection, filter, limit, nextToken) {
1687
+ const statement = `query ListInteractionEndpointsByWidgetId($widgetId: ID!, $address: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionEndpointFilterInput, $limit: Int, $nextToken: String) {
1688
+ listInteractionEndpointsByWidgetId(
1689
+ widgetId: $widgetId
1690
+ address: $address
1691
+ sortDirection: $sortDirection
1692
+ filter: $filter
1693
+ limit: $limit
1694
+ nextToken: $nextToken
1695
+ ) {
1696
+ items {
1697
+ ${FIELDS_INTERACTION_ENDPOINT}
1698
+ }
1699
+ nextToken
1700
+ }
1701
+ }`;
1702
+ const gqlAPIServiceArguments = {
1703
+ widgetId,
1704
+ };
1705
+ if (address) {
1706
+ gqlAPIServiceArguments.address = address;
1707
+ }
1708
+ if (sortDirection) {
1709
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1710
+ }
1711
+ if (filter) {
1712
+ gqlAPIServiceArguments.filter = filter;
1713
+ }
1714
+ if (limit) {
1715
+ gqlAPIServiceArguments.limit = limit;
1716
+ }
1717
+ if (nextToken) {
1718
+ gqlAPIServiceArguments.nextToken = nextToken;
1719
+ }
1720
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1721
+ return response.data.listInteractionEndpointsByWidgetId;
1722
+ }
1723
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
1579
1724
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, providedIn: 'root' });
1580
1725
  }
1581
1726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, decorators: [{
@@ -1583,7 +1728,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
1583
1728
  args: [{
1584
1729
  providedIn: 'root',
1585
1730
  }]
1586
- }] });
1731
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1587
1732
 
1588
1733
  const FIELDS_INTERACTION_WIDGET = `
1589
1734
  id
@@ -1997,7 +2142,7 @@ const FIELDS_INTERACTION_EXPANDED = `
1997
2142
  }
1998
2143
  endpointId
1999
2144
  endpoint {
2000
- ${FIELDS_INTERACTION_ENDPOINT}
2145
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
2001
2146
  }
2002
2147
  entityConversationId
2003
2148
  entityConversation {
@@ -2175,7 +2320,7 @@ const FIELDS_INTERACTION_MESSAGE_EXPANDED = `
2175
2320
  externalId
2176
2321
  endpointId
2177
2322
  endpoint {
2178
- ${FIELDS_INTERACTION_ENDPOINT}
2323
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
2179
2324
  }
2180
2325
  campaignId
2181
2326
  campaignFlowNodeId
@@ -3680,5 +3825,5 @@ class CustomValidators {
3680
3825
  * Generated bundle index. Do not edit.
3681
3826
  */
3682
3827
 
3683
- export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, FIELDS_ENTITY_CONVERSATION_MINIMAL, FIELDS_ENTITY_EXPANDED, FIELDS_ENTITY_MINIMAL, FIELDS_ENTITY_TYPE, FIELDS_INTERACTION, FIELDS_INTERACTION_ATTENDEE, FIELDS_INTERACTION_ATTENDEE_EXPANDED, FIELDS_INTERACTION_ENDPOINT, FIELDS_INTERACTION_EXPANDED, FIELDS_INTERACTION_HOST, FIELDS_INTERACTION_INVITEE, FIELDS_INTERACTION_MESSAGE, FIELDS_INTERACTION_MESSAGE_ATTACHMENT, FIELDS_INTERACTION_MESSAGE_EXPANDED, FIELDS_INTERACTION_MINIMAL, FIELDS_INTERACTION_WIDGET, FIELDS_INTERACTION_WIDGET_USER_SETTING, FIELDS_TEAM, FIELDS_TEAM_MEMBER, FIELDS_TENANT, FIELDS_TICKET, FIELDS_TICKET_PRIORITY, FIELDS_TICKET_STATUS, FIELDS_TICKET_TYPE, FIELDS_USER, FIELDS_USER_SESSION, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, OpenSearchHelperService, ProcessingStatus, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, StorageType, TeamService, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
3828
+ export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, FIELDS_ENTITY_CONVERSATION_MINIMAL, FIELDS_ENTITY_EXPANDED, FIELDS_ENTITY_MINIMAL, FIELDS_ENTITY_TYPE, FIELDS_INTERACTION, FIELDS_INTERACTION_ATTENDEE, FIELDS_INTERACTION_ATTENDEE_EXPANDED, FIELDS_INTERACTION_ENDPOINT, FIELDS_INTERACTION_ENDPOINT_MINIMAL, FIELDS_INTERACTION_EXPANDED, FIELDS_INTERACTION_HOST, FIELDS_INTERACTION_INVITEE, FIELDS_INTERACTION_MESSAGE, FIELDS_INTERACTION_MESSAGE_ATTACHMENT, FIELDS_INTERACTION_MESSAGE_EXPANDED, FIELDS_INTERACTION_MINIMAL, FIELDS_INTERACTION_WIDGET, FIELDS_INTERACTION_WIDGET_USER_SETTING, FIELDS_TEAM, FIELDS_TEAM_MEMBER, FIELDS_TENANT, FIELDS_TICKET, FIELDS_TICKET_PRIORITY, FIELDS_TICKET_STATUS, FIELDS_TICKET_TYPE, FIELDS_USER, FIELDS_USER_SESSION, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, OpenSearchHelperService, ProcessingStatus, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, StorageType, TeamService, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
3684
3829
  //# sourceMappingURL=snugdesk-core.mjs.map