@snugdesk/core 0.2.17 → 0.2.19

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.
@@ -1321,6 +1321,7 @@ const FIELDS_ENTITY_MINIMAL = `
1321
1321
  id
1322
1322
  externalId
1323
1323
  tenantId
1324
+ entityTypeId
1324
1325
  metadata
1325
1326
  name
1326
1327
  image {
@@ -1375,7 +1376,7 @@ class EntityService {
1375
1376
  const statement = /* GraphQL */ `
1376
1377
  mutation CreateEntity($input: CreateEntityInput!, $condition: ModelEntityConditionInput) {
1377
1378
  createEntity(input: $input, condition: $condition) {
1378
- ${FIELDS_ENTITY}
1379
+ ${FIELDS_ENTITY_MINIMAL}
1379
1380
  }
1380
1381
  }
1381
1382
  `;
@@ -1390,7 +1391,7 @@ class EntityService {
1390
1391
  const statement = /* GraphQL */ `
1391
1392
  mutation UpdateEntity($input: UpdateEntityInput!, $condition: ModelEntityConditionInput) {
1392
1393
  updateEntity(input: $input, condition: $condition) {
1393
- ${FIELDS_ENTITY}
1394
+ ${FIELDS_ENTITY_MINIMAL}
1394
1395
  }
1395
1396
  }
1396
1397
  `;
@@ -1449,7 +1450,7 @@ class EntityService {
1449
1450
  nextToken: $nextToken
1450
1451
  ) {
1451
1452
  items {
1452
- ${FIELDS_ENTITY_EXPANDED}
1453
+ ${FIELDS_ENTITY}
1453
1454
  }
1454
1455
  nextToken
1455
1456
  }
@@ -2004,7 +2005,7 @@ const FIELDS_INTERACTION_INVITEE = `
2004
2005
  }
2005
2006
  entityId
2006
2007
  entity {
2007
- ${FIELDS_ENTITY_EXPANDED}
2008
+ ${FIELDS_ENTITY_MINIMAL}
2008
2009
  }
2009
2010
  teamId
2010
2011
  userId
@@ -2586,6 +2587,16 @@ class InteractionService {
2586
2587
  const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2587
2588
  return response.data.listInteractionMessageAttachmentsByInteractionMessageId;
2588
2589
  }
2590
+ OnInteractionByEntityIdListener(entityId) {
2591
+ const statement = `subscription OnInteractionByEntityId($entityId: ID!) {
2592
+ OnInteractionByEntityId(entityId: $entityId) {
2593
+ ${FIELDS_INTERACTION}
2594
+ }
2595
+ }`;
2596
+ const gqlAPIServiceArguments = { entityId };
2597
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
2598
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, 'OnInteractionByEntityId'>>>; */
2599
+ }
2589
2600
  OnInteractionInviteeByUserIdListener(userId) {
2590
2601
  const statement = `subscription OnInteractionInviteeByUserId($userId: ID!) {
2591
2602
  OnInteractionInviteeByUserId(userId: $userId) {