@snugdesk/core 0.2.22 → 0.2.24

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.
@@ -1176,6 +1176,21 @@ var InteractionRouteLogic;
1176
1176
  InteractionRouteLogic["PARALLEL"] = "PARALLEL";
1177
1177
  })(InteractionRouteLogic || (InteractionRouteLogic = {}));
1178
1178
 
1179
+ var TenantComplianceDocumentStatus;
1180
+ (function (TenantComplianceDocumentStatus) {
1181
+ TenantComplianceDocumentStatus["ACTIVE"] = "ACTIVE";
1182
+ TenantComplianceDocumentStatus["EXPIRED"] = "EXPIRED";
1183
+ TenantComplianceDocumentStatus["REVOKED"] = "REVOKED";
1184
+ TenantComplianceDocumentStatus["PENDING_VERIFICATION"] = "PENDING_VERIFICATION";
1185
+ })(TenantComplianceDocumentStatus || (TenantComplianceDocumentStatus = {}));
1186
+ var TenantComplianceDocumentType;
1187
+ (function (TenantComplianceDocumentType) {
1188
+ TenantComplianceDocumentType["PAN_CARD"] = "PAN_CARD";
1189
+ TenantComplianceDocumentType["GST_CERTIFICATE"] = "GST_CERTIFICATE";
1190
+ TenantComplianceDocumentType["TDS_REGISTRATION"] = "TDS_REGISTRATION";
1191
+ TenantComplianceDocumentType["GOVT_CERTIFICATE"] = "GOVT_CERTIFICATE";
1192
+ TenantComplianceDocumentType["OTHER"] = "OTHER";
1193
+ })(TenantComplianceDocumentType || (TenantComplianceDocumentType = {}));
1179
1194
  var TenantSSOConfigurationProtocol;
1180
1195
  (function (TenantSSOConfigurationProtocol) {
1181
1196
  TenantSSOConfigurationProtocol["SAML"] = "SAML";
@@ -1564,6 +1579,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
1564
1579
  }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1565
1580
 
1566
1581
  const FIELDS_INTERACTION_ENDPOINT = `
1582
+ id
1583
+ externalId
1584
+ tenantId
1585
+ widgetId
1586
+ address
1587
+ configuration
1588
+ sellPrice {
1589
+ currency
1590
+ upfrontCost
1591
+ monthlyCost
1592
+ inboundCost
1593
+ outboundCost
1594
+ }
1595
+ documents {
1596
+ fileName
1597
+ documentType
1598
+ contentType
1599
+ }
1600
+ createdAt
1601
+ updatedAt
1602
+ deletedAt
1603
+ updatedByUserId
1604
+ updatedByUserSessionId
1605
+ `;
1606
+ const FIELDS_INTERACTION_ENDPOINT_MINIMAL = `
1567
1607
  id
1568
1608
  externalId
1569
1609
  tenantId
@@ -1575,7 +1615,127 @@ const FIELDS_INTERACTION_ENDPOINT = `
1575
1615
  deletedAt
1576
1616
  `;
1577
1617
  class InteractionEndpointService {
1578
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1618
+ appSyncService;
1619
+ constructor(appSyncService) {
1620
+ this.appSyncService = appSyncService;
1621
+ }
1622
+ async GetInteractionEndpoint(id) {
1623
+ const statement = `query GetInteractionEndpoint($id: ID!) {
1624
+ getInteractionEndpoint(id: $id) {
1625
+ ${FIELDS_INTERACTION_ENDPOINT}
1626
+ }
1627
+ }`;
1628
+ const gqlAPIServiceArguments = {
1629
+ id,
1630
+ };
1631
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1632
+ return response.data.getInteractionEndpoint;
1633
+ }
1634
+ async CreateInteractionEndpoint(input, condition) {
1635
+ const statement = `mutation CreateInteractionEndpoint($input: CreateInteractionEndpointInput!, $condition: ModelInteractionEndpointConditionInput) {
1636
+ createInteractionEndpoint(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.createInteractionEndpoint;
1648
+ }
1649
+ async UpdateInteractionEndpoint(input, condition) {
1650
+ const statement = `mutation UpdateInteractionEndpoint($input: UpdateInteractionEndpointInput!, $condition: ModelInteractionEndpointConditionInput) {
1651
+ updateInteractionEndpoint(input: $input, condition: $condition) {
1652
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
1653
+ }
1654
+ }`;
1655
+ const gqlAPIServiceArguments = {
1656
+ input,
1657
+ };
1658
+ if (condition) {
1659
+ gqlAPIServiceArguments.condition = condition;
1660
+ }
1661
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1662
+ return response.data.updateInteractionEndpoint;
1663
+ }
1664
+ async ListInteractionEndpointsByTenantId(tenantId, address, sortDirection, filter, limit, nextToken) {
1665
+ const statement = `query ListInteractionEndpointsByTenantId($tenantId: ID!, $address: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionEndpointFilterInput, $limit: Int, $nextToken: String) {
1666
+ listInteractionEndpointsByTenantId(
1667
+ tenantId: $tenantId
1668
+ address: $address
1669
+ sortDirection: $sortDirection
1670
+ filter: $filter
1671
+ limit: $limit
1672
+ nextToken: $nextToken
1673
+ ) {
1674
+ items {
1675
+ ${FIELDS_INTERACTION_ENDPOINT}
1676
+ }
1677
+ nextToken
1678
+ }
1679
+ }`;
1680
+ const gqlAPIServiceArguments = {
1681
+ tenantId,
1682
+ };
1683
+ if (address) {
1684
+ gqlAPIServiceArguments.address = address;
1685
+ }
1686
+ if (sortDirection) {
1687
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1688
+ }
1689
+ if (filter) {
1690
+ gqlAPIServiceArguments.filter = filter;
1691
+ }
1692
+ if (limit) {
1693
+ gqlAPIServiceArguments.limit = limit;
1694
+ }
1695
+ if (nextToken) {
1696
+ gqlAPIServiceArguments.nextToken = nextToken;
1697
+ }
1698
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1699
+ return response.data.listInteractionEndpointsByTenantId;
1700
+ }
1701
+ async ListInteractionEndpointsByWidgetId(widgetId, address, sortDirection, filter, limit, nextToken) {
1702
+ const statement = `query ListInteractionEndpointsByWidgetId($widgetId: ID!, $address: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionEndpointFilterInput, $limit: Int, $nextToken: String) {
1703
+ listInteractionEndpointsByWidgetId(
1704
+ widgetId: $widgetId
1705
+ address: $address
1706
+ sortDirection: $sortDirection
1707
+ filter: $filter
1708
+ limit: $limit
1709
+ nextToken: $nextToken
1710
+ ) {
1711
+ items {
1712
+ ${FIELDS_INTERACTION_ENDPOINT}
1713
+ }
1714
+ nextToken
1715
+ }
1716
+ }`;
1717
+ const gqlAPIServiceArguments = {
1718
+ widgetId,
1719
+ };
1720
+ if (address) {
1721
+ gqlAPIServiceArguments.address = address;
1722
+ }
1723
+ if (sortDirection) {
1724
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1725
+ }
1726
+ if (filter) {
1727
+ gqlAPIServiceArguments.filter = filter;
1728
+ }
1729
+ if (limit) {
1730
+ gqlAPIServiceArguments.limit = limit;
1731
+ }
1732
+ if (nextToken) {
1733
+ gqlAPIServiceArguments.nextToken = nextToken;
1734
+ }
1735
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1736
+ return response.data.listInteractionEndpointsByWidgetId;
1737
+ }
1738
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
1579
1739
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, providedIn: 'root' });
1580
1740
  }
1581
1741
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InteractionEndpointService, decorators: [{
@@ -1583,7 +1743,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
1583
1743
  args: [{
1584
1744
  providedIn: 'root',
1585
1745
  }]
1586
- }] });
1746
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1587
1747
 
1588
1748
  const FIELDS_INTERACTION_WIDGET = `
1589
1749
  id
@@ -1997,7 +2157,7 @@ const FIELDS_INTERACTION_EXPANDED = `
1997
2157
  }
1998
2158
  endpointId
1999
2159
  endpoint {
2000
- ${FIELDS_INTERACTION_ENDPOINT}
2160
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
2001
2161
  }
2002
2162
  entityConversationId
2003
2163
  entityConversation {
@@ -2175,7 +2335,7 @@ const FIELDS_INTERACTION_MESSAGE_EXPANDED = `
2175
2335
  externalId
2176
2336
  endpointId
2177
2337
  endpoint {
2178
- ${FIELDS_INTERACTION_ENDPOINT}
2338
+ ${FIELDS_INTERACTION_ENDPOINT_MINIMAL}
2179
2339
  }
2180
2340
  campaignId
2181
2341
  campaignFlowNodeId
@@ -3012,6 +3172,117 @@ const FIELDS_TENANT = `
3012
3172
  createdAt
3013
3173
  updatedAt
3014
3174
  deletedAt
3175
+ updatedByUserId
3176
+ updatedByUserSessionId
3177
+ `;
3178
+ const FIELDS_TENANT_MINIMAL = `
3179
+ id
3180
+ externalId
3181
+ tenantDomain
3182
+ organizationName
3183
+ websiteURL
3184
+ image {
3185
+ location
3186
+ }
3187
+ preferences {
3188
+ timezoneName
3189
+ language {
3190
+ code
3191
+ nameEn
3192
+ nameLocal
3193
+ }
3194
+ allowUserToChangePreferences
3195
+ }
3196
+ activatedAt
3197
+ blockedAt
3198
+ createdAt
3199
+ updatedAt
3200
+ deletedAt
3201
+ updatedByUserId
3202
+ updatedByUserSessionId
3203
+ `;
3204
+ const FIELDS_TENANT_EXPANDED = `
3205
+ id
3206
+ externalId
3207
+ tenantDomain
3208
+ organizationName
3209
+ websiteURL
3210
+ image {
3211
+ key
3212
+ bucket
3213
+ location
3214
+ }
3215
+ billingInformation {
3216
+ companyName
3217
+ address
3218
+ state
3219
+ city
3220
+ postalCode
3221
+ companyIdentificationNumber
3222
+ taxIdentificationNumber
3223
+ }
3224
+ contactInformation {
3225
+ name
3226
+ email
3227
+ address
3228
+ state
3229
+ city
3230
+ postalCode
3231
+ }
3232
+ preferences {
3233
+ timezoneName
3234
+ language {
3235
+ code
3236
+ nameEn
3237
+ nameLocal
3238
+ }
3239
+ allowUserToChangePreferences
3240
+ }
3241
+ ssoConfiguration {
3242
+ provider
3243
+ protocol
3244
+ displayName
3245
+ configuration
3246
+ isEnabled
3247
+ isDefaultLoginMode
3248
+ }
3249
+ security {
3250
+ domainValidationTokenExpiry
3251
+ userValidationTokenExpiry
3252
+ secretTokenExpiry
3253
+ sessionTokenExpiry
3254
+ sessionIdleTimeout
3255
+ }
3256
+ activatedAt
3257
+ blockedAt
3258
+ createdAt
3259
+ updatedAt
3260
+ deletedAt
3261
+ updatedByUserId
3262
+ updatedByUserSessionId
3263
+ `;
3264
+ const FIELDS_TENANT_COMPLIANCE_DOCUMENT = `
3265
+ id
3266
+ tenantId
3267
+ documentName
3268
+ documentType
3269
+ documentNumber
3270
+ legalEntityName
3271
+ issuedBy
3272
+ issueDate
3273
+ expiryDate
3274
+ status
3275
+ notes
3276
+ file {
3277
+ key
3278
+ bucket
3279
+ location
3280
+ }
3281
+ createdAt
3282
+ updatedAt
3283
+ deletedAt
3284
+ updatedByUserId
3285
+ updatedByUserSessionId
3015
3286
  `;
3016
3287
  class TenantService {
3017
3288
  appSyncService;
@@ -3028,6 +3299,105 @@ class TenantService {
3028
3299
  const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3029
3300
  return response.data?.getTenant;
3030
3301
  }
3302
+ async GetTenantExpanded(id) {
3303
+ const statement = `query GetTenant($id: ID!) {
3304
+ getTenant(id: $id) {
3305
+ ${FIELDS_TENANT_EXPANDED}
3306
+ }
3307
+ }`;
3308
+ const gqlAPIServiceArguments = { id };
3309
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3310
+ return response.data?.getTenant;
3311
+ }
3312
+ async CreateTenant(input, condition) {
3313
+ const statement = `mutation CreateTenant($input: CreateTenantInput!, $condition: ModelTenantConditionInput) {
3314
+ createTenant(input: $input, condition: $condition) {
3315
+ ${FIELDS_TENANT_MINIMAL}
3316
+ }
3317
+ }`;
3318
+ const gqlAPIServiceArguments = { input };
3319
+ if (condition) {
3320
+ gqlAPIServiceArguments.condition = condition;
3321
+ }
3322
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3323
+ return response.data.createTenant;
3324
+ }
3325
+ async UpdateTenant(input, condition) {
3326
+ const statement = `mutation UpdateTenant($input: UpdateTenantInput!, $condition: ModelTenantConditionInput) {
3327
+ updateTenant(input: $input, condition: $condition) {
3328
+ ${FIELDS_TENANT_MINIMAL}
3329
+ }
3330
+ }`;
3331
+ const gqlAPIServiceArguments = { input };
3332
+ if (condition) {
3333
+ gqlAPIServiceArguments.condition = condition;
3334
+ }
3335
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3336
+ return response.data.updateTenant;
3337
+ }
3338
+ async CreateTenantComplianceDocument(input, condition) {
3339
+ const statement = `mutation CreateTenantComplianceDocument($input: CreateTenantComplianceDocumentInput!, $condition: ModelTenantComplianceDocumentConditionInput) {
3340
+ createTenantComplianceDocument(input: $input, condition: $condition) {
3341
+ ${FIELDS_TENANT_COMPLIANCE_DOCUMENT}
3342
+ }
3343
+ }`;
3344
+ const gqlAPIServiceArguments = { input };
3345
+ if (condition) {
3346
+ gqlAPIServiceArguments.condition = condition;
3347
+ }
3348
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3349
+ return response.data.createTenantComplianceDocument;
3350
+ }
3351
+ async UpdateTenantComplianceDocument(input, condition) {
3352
+ const statement = `mutation UpdateTenantComplianceDocument($input: UpdateTenantComplianceDocumentInput!, $condition: ModelTenantComplianceDocumentConditionInput) {
3353
+ updateTenantComplianceDocument(input: $input, condition: $condition) {
3354
+ ${FIELDS_TENANT_COMPLIANCE_DOCUMENT}
3355
+ }
3356
+ }`;
3357
+ const gqlAPIServiceArguments = { input };
3358
+ if (condition) {
3359
+ gqlAPIServiceArguments.condition = condition;
3360
+ }
3361
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3362
+ return response.data.updateTenantComplianceDocument;
3363
+ }
3364
+ async ListTenantComplianceDocumentsByTenantId(tenantId, updatedAt, sortDirection, filter, limit, nextToken) {
3365
+ const statement = `query ListTenantComplianceDocumentsByTenantId($tenantId: ID!, $updatedAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTenantComplianceDocumentFilterInput, $limit: Int, $nextToken: String) {
3366
+ listTenantComplianceDocumentsByTenantId(
3367
+ tenantId: $tenantId
3368
+ updatedAt: $updatedAt
3369
+ sortDirection: $sortDirection
3370
+ filter: $filter
3371
+ limit: $limit
3372
+ nextToken: $nextToken
3373
+ ) {
3374
+ items {
3375
+ ${FIELDS_TENANT_COMPLIANCE_DOCUMENT}
3376
+ }
3377
+ nextToken
3378
+ }
3379
+ }`;
3380
+ const gqlAPIServiceArguments = {
3381
+ tenantId,
3382
+ };
3383
+ if (updatedAt) {
3384
+ gqlAPIServiceArguments.updatedAt = updatedAt;
3385
+ }
3386
+ if (sortDirection) {
3387
+ gqlAPIServiceArguments.sortDirection = sortDirection;
3388
+ }
3389
+ if (filter) {
3390
+ gqlAPIServiceArguments.filter = filter;
3391
+ }
3392
+ if (limit) {
3393
+ gqlAPIServiceArguments.limit = limit;
3394
+ }
3395
+ if (nextToken) {
3396
+ gqlAPIServiceArguments.nextToken = nextToken;
3397
+ }
3398
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
3399
+ return response.data.listTenantComplianceDocumentsByTenantId;
3400
+ }
3031
3401
  OnTenantByIdListener(id) {
3032
3402
  const statement = `subscription OnTenantById($id: ID!) {
3033
3403
  OnTenantById(id: $id) {
@@ -3680,5 +4050,5 @@ class CustomValidators {
3680
4050
  * Generated bundle index. Do not edit.
3681
4051
  */
3682
4052
 
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 };
4053
+ 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_TENANT_COMPLIANCE_DOCUMENT, FIELDS_TENANT_EXPANDED, FIELDS_TENANT_MINIMAL, 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, TenantComplianceDocumentStatus, TenantComplianceDocumentType, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
3684
4054
  //# sourceMappingURL=snugdesk-core.mjs.map