@superoffice/webapi 11.7.727 → 11.8.788

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.
Files changed (147) hide show
  1. package/LICENSE.md +15 -15
  2. package/README.md +184 -184
  3. package/__tests__/Appointment63-notz.json +1925 -1925
  4. package/__tests__/Appointment63-utctz.json +1925 -1925
  5. package/__tests__/Appointment63.json +1925 -1925
  6. package/__tests__/AppointmentTzTest.ts +115 -115
  7. package/__tests__/AxiosNockTest.ts +28 -28
  8. package/__tests__/ContactDefault.json +699 -699
  9. package/__tests__/ContactEntity.json +272 -272
  10. package/__tests__/ContactRestTest.ts +144 -144
  11. package/__tests__/ContactTest.ts +395 -395
  12. package/__tests__/ConvertersTest.ts +97 -97
  13. package/__tests__/DocumentTest.ts +101 -101
  14. package/__tests__/Person210-notz.json +1932 -1932
  15. package/__tests__/Person210-utctz.json +1932 -1932
  16. package/__tests__/Person210.json +1932 -1932
  17. package/__tests__/PersonImageData.nock +22 -22
  18. package/__tests__/PersonTest.ts +41 -41
  19. package/__tests__/PersonTzTest.ts +113 -113
  20. package/__tests__/RecurrenceInfo.json +55 -55
  21. package/__tests__/ResponseCallbackTest.ts +23 -23
  22. package/__tests__/TableRights.json +441 -441
  23. package/__tests__/WebapiTest.ts +264 -264
  24. package/__tests__/Webhook.json +16 -16
  25. package/__tests__/WebhookTest.ts +209 -209
  26. package/dist/cjs/Carriers.d.ts +367 -4
  27. package/dist/cjs/Carriers.d.ts.map +1 -1
  28. package/dist/cjs/Converters.d.ts +9 -0
  29. package/dist/cjs/Converters.d.ts.map +1 -1
  30. package/dist/cjs/Converters.js +185 -17
  31. package/dist/cjs/Converters.js.map +1 -1
  32. package/dist/cjs/DiagnosticsAgent.d.ts +38 -0
  33. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  34. package/dist/cjs/DiagnosticsAgent.js +91 -0
  35. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  36. package/dist/cjs/Enums.d.ts +18 -0
  37. package/dist/cjs/Enums.d.ts.map +1 -1
  38. package/dist/cjs/Enums.js +20 -1
  39. package/dist/cjs/Enums.js.map +1 -1
  40. package/dist/cjs/ListAgent.d.ts +71 -6
  41. package/dist/cjs/ListAgent.d.ts.map +1 -1
  42. package/dist/cjs/ListAgent.js +157 -0
  43. package/dist/cjs/ListAgent.js.map +1 -1
  44. package/dist/cjs/TicketAgent.d.ts +23 -0
  45. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  46. package/dist/cjs/TicketAgent.js +65 -0
  47. package/dist/cjs/TicketAgent.js.map +1 -1
  48. package/dist/esm/Carriers.d.ts +367 -4
  49. package/dist/esm/Carriers.d.ts.map +1 -1
  50. package/dist/esm/Converters.d.ts +9 -0
  51. package/dist/esm/Converters.d.ts.map +1 -1
  52. package/dist/esm/Converters.js +159 -0
  53. package/dist/esm/Converters.js.map +1 -1
  54. package/dist/esm/DiagnosticsAgent.d.ts +38 -0
  55. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  56. package/dist/esm/DiagnosticsAgent.js +91 -0
  57. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  58. package/dist/esm/Enums.d.ts +18 -0
  59. package/dist/esm/Enums.d.ts.map +1 -1
  60. package/dist/esm/Enums.js +19 -0
  61. package/dist/esm/Enums.js.map +1 -1
  62. package/dist/esm/ListAgent.d.ts +71 -6
  63. package/dist/esm/ListAgent.d.ts.map +1 -1
  64. package/dist/esm/ListAgent.js +157 -0
  65. package/dist/esm/ListAgent.js.map +1 -1
  66. package/dist/esm/TicketAgent.d.ts +23 -0
  67. package/dist/esm/TicketAgent.d.ts.map +1 -1
  68. package/dist/esm/TicketAgent.js +65 -0
  69. package/dist/esm/TicketAgent.js.map +1 -1
  70. package/examples-js/hello.js +12 -12
  71. package/examples-ts/hello.ts +8 -8
  72. package/package.json +93 -93
  73. package/scripts/postbuild.js +22 -22
  74. package/scripts/setVersion.js +44 -44
  75. package/src/AIAgent.ts +1992 -1992
  76. package/src/AppointmentAgent.ts +6263 -6263
  77. package/src/AppointmentRestApi.ts +225 -225
  78. package/src/ArchiveAgent.ts +1950 -1950
  79. package/src/AssociateAgent.ts +422 -422
  80. package/src/AxiosCacheHandler.ts +74 -74
  81. package/src/BLOBAgent.ts +2100 -2100
  82. package/src/Base64.ts +285 -285
  83. package/src/BatchAgent.ts +910 -910
  84. package/src/BulkUpdateAgent.ts +504 -504
  85. package/src/CRMScriptAgent.ts +1390 -1390
  86. package/src/Carriers.ts +52750 -52274
  87. package/src/ChatAgent.ts +1422 -1422
  88. package/src/ConfigurationAgent.ts +2228 -2228
  89. package/src/ContactAgent.ts +1756 -1756
  90. package/src/ContactRestApi.ts +237 -237
  91. package/src/Converters.ts +23271 -23090
  92. package/src/CustomerServiceAgent.ts +1799 -1799
  93. package/src/DashAgent.ts +1674 -1674
  94. package/src/DatabaseAgent.ts +120 -120
  95. package/src/DatabaseTableAgent.ts +534 -534
  96. package/src/Day_js.ts +41 -41
  97. package/src/DiagnosticsAgent.ts +1384 -1240
  98. package/src/DocumentAgent.ts +5079 -5079
  99. package/src/DocumentMigrationAgent.ts +524 -524
  100. package/src/DocumentRestApi.ts +259 -259
  101. package/src/EMailAgent.ts +5328 -5328
  102. package/src/Enums.ts +6936 -6916
  103. package/src/ErpSyncAgent.ts +2658 -2658
  104. package/src/FavouriteAgent.ts +720 -720
  105. package/src/FindAgent.ts +2330 -2330
  106. package/src/ForeignSystemAgent.ts +1710 -1710
  107. package/src/FreeTextAgent.ts +372 -372
  108. package/src/ImportAgent.ts +304 -304
  109. package/src/LicenseAgent.ts +1230 -1230
  110. package/src/ListAgent.ts +11451 -11237
  111. package/src/MDOAgent.ts +748 -748
  112. package/src/MarketingAgent.ts +890 -890
  113. package/src/MessagingAgent.ts +384 -384
  114. package/src/NavigatorAgent.ts +140 -140
  115. package/src/NumberAllocationAgent.ts +296 -296
  116. package/src/PersonAgent.ts +3287 -3287
  117. package/src/PersonRestApi.ts +241 -241
  118. package/src/PhoneListAgent.ts +458 -458
  119. package/src/PocketAgent.ts +780 -780
  120. package/src/PreferenceAgent.ts +1900 -1900
  121. package/src/PreviewsAgent.ts +116 -116
  122. package/src/ProjectAgent.ts +2391 -2391
  123. package/src/ProjectRestApi.ts +239 -239
  124. package/src/QuoteAgent.ts +5159 -5159
  125. package/src/RelationAgent.ts +220 -220
  126. package/src/ReportAgent.ts +154 -154
  127. package/src/ResourceAgent.ts +358 -358
  128. package/src/SaintAgent.ts +601 -601
  129. package/src/SaleAgent.ts +2034 -2034
  130. package/src/SaleRestApi.ts +233 -233
  131. package/src/SelectionAgent.ts +3195 -3195
  132. package/src/SentryAgent.ts +462 -462
  133. package/src/SoApiConstants.ts +8 -8
  134. package/src/TargetsAgent.ts +1104 -1104
  135. package/src/TicketAgent.ts +3708 -3638
  136. package/src/TimeZoneAgent.ts +528 -528
  137. package/src/TooltipsAgent.ts +116 -116
  138. package/src/UserAgent.ts +4856 -4856
  139. package/src/UserDefinedFieldInfoAgent.ts +1764 -1764
  140. package/src/ViewStateAgent.ts +858 -858
  141. package/src/WebApi.ts +872 -872
  142. package/src/WebApiBase.ts +565 -565
  143. package/src/WebhookAgent.ts +388 -388
  144. package/src/WorkflowAgent.ts +1338 -1338
  145. package/tsconfig.esm.json +8 -8
  146. package/tsconfig.jest.json +8 -8
  147. package/tsconfig.json +34 -34
@@ -9244,6 +9244,10 @@ export interface Appointment extends Carrier {
9244
9244
  * Internal notes for the appointment.
9245
9245
  */
9246
9246
  internalNotes?: string;
9247
+ /**
9248
+ * Link to task list
9249
+ */
9250
+ taskId?: number;
9247
9251
  }
9248
9252
  /**
9249
9253
  * Sets an appointment's status to Completed if the appointment had a different status, or sets the status to started if already set to completed.
@@ -14766,12 +14770,12 @@ export interface List_SaveAllAutomatedCategoryUpdatesRequest {
14766
14770
  export interface List_GetAllAutomatedCategoryUpdatesRequest {
14767
14771
  }
14768
14772
  /**
14769
- * Get the settings for an update when saving a sale
14773
+ * Before saving a sale, call this to see if the current changes on the sale should result in a userconfirmation dialog asking to automatically update category on contact or person
14770
14774
  * Returns AutomatedCategoryUpdate
14771
14775
  */
14772
14776
  export interface List_GetNeedCategoryUpdateForSaleRequest {
14773
14777
  /**
14774
- * The saleEntity that might trigger the category update
14778
+ * The new salestatus that might trigger the category update
14775
14779
  */
14776
14780
  saleStatus: enums.SaleStatus;
14777
14781
  /**
@@ -14788,12 +14792,12 @@ export interface List_GetNeedCategoryUpdateForSaleRequest {
14788
14792
  personId: number;
14789
14793
  }
14790
14794
  /**
14791
- * Get the settings for an update when saving a sale
14795
+ * Before saving a person with changed leadstatus, call this to see if we should ask for a userconfirmation to automatically update category on contact or person
14792
14796
  * Returns AutomatedCategoryUpdate
14793
14797
  */
14794
14798
  export interface List_GetNeedCategoryUpdateForPersonRequest {
14795
14799
  /**
14796
- * The leadstatus that might trigger the category update
14800
+ * The new leadstatus that might trigger the category update
14797
14801
  */
14798
14802
  leadStatus: number;
14799
14803
  /**
@@ -14809,6 +14813,27 @@ export interface List_GetNeedCategoryUpdateForPersonRequest {
14809
14813
  */
14810
14814
  categoryId: number;
14811
14815
  }
14816
+ /**
14817
+ * Does the actual update of the category. Ask the user first, if user confirmed yes, do automatically update category, this call will do that actual update
14818
+ */
14819
+ export interface List_PerformNeededCategoryUpdateRequest {
14820
+ /**
14821
+ * The person id that will get the resulting update
14822
+ */
14823
+ personId: number;
14824
+ /**
14825
+ * The contact id that will get the resulting update
14826
+ */
14827
+ contactId: number;
14828
+ /**
14829
+ * The category id person and contact will be updated to
14830
+ */
14831
+ categoryId: number;
14832
+ /**
14833
+ * The setting that triggered the update
14834
+ */
14835
+ setting: AutomatedCategoryUpdate;
14836
+ }
14812
14837
  /**
14813
14838
  *
14814
14839
  */
@@ -18315,6 +18340,72 @@ export interface List_GetAllTicketPrioritiesRequest {
18315
18340
  */
18316
18341
  includeDeleted: boolean;
18317
18342
  }
18343
+ /**
18344
+ * Ticket relation definition entity
18345
+ */
18346
+ export interface TicketRelationDefinitionEntity extends Carrier {
18347
+ /**
18348
+ * Primary key
18349
+ */
18350
+ ticketRelationDefId?: number;
18351
+ /**
18352
+ * The name of this Ticket relation
18353
+ */
18354
+ name?: string;
18355
+ /**
18356
+ * Tooltip or other description
18357
+ */
18358
+ description?: string;
18359
+ /**
18360
+ * Rank order
18361
+ */
18362
+ rank?: number;
18363
+ /**
18364
+ * Type of the relation (Related, Parent, Child)
18365
+ */
18366
+ relationType?: enums.TicketRelationType;
18367
+ /**
18368
+ * Is this row part of SuperOffice priming data
18369
+ */
18370
+ isBuiltIn?: boolean;
18371
+ /**
18372
+ * Parent relation is mandatory when a new request is created
18373
+ */
18374
+ isParentMandatory?: boolean;
18375
+ /**
18376
+ * Close parent when all children are closed
18377
+ */
18378
+ isCloseParentWithChild?: boolean;
18379
+ /**
18380
+ * Prevent closing parent until all children are closed
18381
+ */
18382
+ isPreventClosingParent?: boolean;
18383
+ /**
18384
+ * Offer to close all related when parent is closed
18385
+ */
18386
+ isCloseWithParent?: boolean;
18387
+ /**
18388
+ * Source ticket type(s) for this relation
18389
+ */
18390
+ sourceTicketTypes?: number[];
18391
+ /**
18392
+ * Destination ticket type(s) for this relation
18393
+ */
18394
+ destinationTicketTypes?: number[];
18395
+ }
18396
+ /**
18397
+ * This method will set sort order of ticket relation definition in a list
18398
+ */
18399
+ export interface List_SetTicketRelationDefinitionSortOrderRequest {
18400
+ /**
18401
+ * Id of ticket relation definition
18402
+ */
18403
+ ticketRelationDefId: number;
18404
+ /**
18405
+ * Indicates the sort order for this relation definition. 1 is first. Any records following this one will be renumbered automatically
18406
+ */
18407
+ sortOrder: number;
18408
+ }
18318
18409
  /**
18319
18410
  * Entity for a ticket status. This entity describes the meta data for a ticket status, and provides special operations on it.
18320
18411
  */
@@ -20472,6 +20563,229 @@ export interface Associate_LogOffWindowsUsersRequest {
20472
20563
  */
20473
20564
  associateIds: number[];
20474
20565
  }
20566
+ /**
20567
+ *
20568
+ */
20569
+ export interface AnalyticsData {
20570
+ /**
20571
+ * Amplitude API key for analytics integration
20572
+ */
20573
+ amplitudeApiKey?: string;
20574
+ /**
20575
+ * Userflow authentication token
20576
+ */
20577
+ userflowToken?: string;
20578
+ /**
20579
+ * User full name. Only included in Sod
20580
+ */
20581
+ name?: string;
20582
+ /**
20583
+ * User email address. Only included in Sod
20584
+ */
20585
+ email?: string;
20586
+ /**
20587
+ * User company name. Only included in Sod
20588
+ */
20589
+ company?: string;
20590
+ /**
20591
+ * Current license status of the user and installation
20592
+ */
20593
+ licenseStatus?: UserAndInstallationLicenceStatus;
20594
+ /**
20595
+ * Dictionary of license types and their status
20596
+ */
20597
+ hasLicensce?: StringBoolDictionary;
20598
+ /**
20599
+ * Names of system licenses assigned to the user
20600
+ */
20601
+ systemLicenseNames?: string[];
20602
+ /**
20603
+ * Date and time when the user signed up
20604
+ */
20605
+ userSignedUpAt?: string;
20606
+ /**
20607
+ * Number of contacts associated with the user
20608
+ */
20609
+ numContact?: number;
20610
+ /**
20611
+ * Number of persons associated with the user
20612
+ */
20613
+ numPerson?: number;
20614
+ /**
20615
+ * Number of appointments for the user
20616
+ */
20617
+ numAppointment?: number;
20618
+ /**
20619
+ * Number of sales associated with the user
20620
+ */
20621
+ numSale?: number;
20622
+ /**
20623
+ * Number of projects associated with the user
20624
+ */
20625
+ numProject?: number;
20626
+ /**
20627
+ * Number of selections made by the user
20628
+ */
20629
+ numSelection?: number;
20630
+ /**
20631
+ * Number of email items associated with the user
20632
+ */
20633
+ numEmailItem?: number;
20634
+ /**
20635
+ * Number of ticket log actions performed by the user
20636
+ */
20637
+ numTicketLogAction?: number;
20638
+ /**
20639
+ * Number of dashboards available to the user
20640
+ */
20641
+ numDashboard?: number;
20642
+ /**
20643
+ * Number of quotes created by the user
20644
+ */
20645
+ numQuote?: number;
20646
+ /**
20647
+ * Number of quote lines associated with the user
20648
+ */
20649
+ numQuoteLine?: number;
20650
+ /**
20651
+ * Number of documents associated with the user
20652
+ */
20653
+ numDocument?: number;
20654
+ /**
20655
+ * Number of target assignment info records
20656
+ */
20657
+ numTargetAssignmentInfo?: number;
20658
+ /**
20659
+ * Number of mailings sent by the user
20660
+ */
20661
+ numMailing?: number;
20662
+ /**
20663
+ * Number of forms created by the user
20664
+ */
20665
+ numForm?: number;
20666
+ /**
20667
+ * Number of workflows associated with the user
20668
+ */
20669
+ numWorkflow?: number;
20670
+ /**
20671
+ * Total number of contacts in the system
20672
+ */
20673
+ totContact?: number;
20674
+ /**
20675
+ * Total number of persons in the system
20676
+ */
20677
+ totPerson?: number;
20678
+ /**
20679
+ * Total number of appointments in the system
20680
+ */
20681
+ totAppointment?: number;
20682
+ /**
20683
+ * Total number of sales in the system
20684
+ */
20685
+ totSale?: number;
20686
+ /**
20687
+ * Total number of projects in the system
20688
+ */
20689
+ totProject?: number;
20690
+ /**
20691
+ * Total number of selections in the system
20692
+ */
20693
+ totSelection?: number;
20694
+ /**
20695
+ * Total number of email items in the system
20696
+ */
20697
+ totEmailItem?: number;
20698
+ /**
20699
+ * Total number of ticket log actions in the system
20700
+ */
20701
+ totTicketLogAction?: number;
20702
+ /**
20703
+ * Total number of dashboards in the system
20704
+ */
20705
+ totDashboard?: number;
20706
+ /**
20707
+ * Total number of quotes in the system
20708
+ */
20709
+ totQuote?: number;
20710
+ /**
20711
+ * Total number of quote lines in the system
20712
+ */
20713
+ totQuoteLine?: number;
20714
+ /**
20715
+ * Total number of documents in the system
20716
+ */
20717
+ totDocument?: number;
20718
+ /**
20719
+ * Total number of target assignment info records
20720
+ */
20721
+ totTargetAssignmentInfo?: number;
20722
+ /**
20723
+ * Total number of mailings in the system
20724
+ */
20725
+ totMailing?: number;
20726
+ /**
20727
+ * Total number of forms in the system
20728
+ */
20729
+ totForm?: number;
20730
+ /**
20731
+ * Total number of workflows in the system
20732
+ */
20733
+ totWorkflow?: number;
20734
+ /**
20735
+ * Number of days since the user registered
20736
+ */
20737
+ userRegisteredAgeDays?: number;
20738
+ /**
20739
+ * Name of the user's country
20740
+ */
20741
+ userCountryName?: string;
20742
+ /**
20743
+ * Country code of the user
20744
+ */
20745
+ userCountryCode?: string;
20746
+ /**
20747
+ * Array of user preferences (name and value)
20748
+ */
20749
+ preferences?: StringBoolDictionary;
20750
+ /**
20751
+ * Total number of web users in the system
20752
+ */
20753
+ totWebUsers?: number;
20754
+ /**
20755
+ * Name of the group's country
20756
+ */
20757
+ groupCountryName?: string;
20758
+ /**
20759
+ * Country code of the group
20760
+ */
20761
+ groupCountryCode?: string;
20762
+ /**
20763
+ * Date when the group was registered
20764
+ */
20765
+ groupRegisteredDate?: string;
20766
+ /**
20767
+ * Number of days since the group was registered
20768
+ */
20769
+ groupRegisteredAgeDays?: number;
20770
+ /**
20771
+ * Array of feature toggles (name and enabled status)
20772
+ */
20773
+ featureToggles?: StringBoolDictionary;
20774
+ /**
20775
+ * Current file version as a string
20776
+ */
20777
+ fileVersion?: string;
20778
+ /**
20779
+ * Current file version as a number
20780
+ */
20781
+ fileVersionNumber?: number;
20782
+ }
20783
+ /**
20784
+ * Retrieve analytics properties to be included in usage tracking.
20785
+ * Returns AnalyticsData
20786
+ */
20787
+ export interface Diagnostics_GetAnalyticsDataRequest {
20788
+ }
20475
20789
  /**
20476
20790
  * Cache maintenance
20477
20791
  */
@@ -20606,6 +20920,30 @@ export interface Diagnostics_ChangeLogSettingsRequest {
20606
20920
  */
20607
20921
  logToTrace: boolean;
20608
20922
  }
20923
+ /**
20924
+ * Sends events to Amplitude and Userflow.
20925
+ * Returns number
20926
+ */
20927
+ export interface Diagnostics_TrackEventRequest {
20928
+ /**
20929
+ * "Sale Completed" or "Sale Sold" etc. See the TrackEventNames class for suitable string constants.
20930
+ */
20931
+ trackEventName: string;
20932
+ /**
20933
+ * key-value pairs of event properties. client is set from the application token. Special keys: app_version, platform, os_name, os_version, device_brand, device_manufacturer
20934
+ */
20935
+ eventProperties: StringDictionary;
20936
+ }
20937
+ /**
20938
+ * Sends user identification to Amplitude and Userflow. Sets current rights, user licenses automatically. Additional properties can be specified in userProperties.
20939
+ * Returns number
20940
+ */
20941
+ export interface Diagnostics_TrackUserRequest {
20942
+ /**
20943
+ * Optional: Additional key-value pairs of user properties to set on the user. Special keys: app_version, platform, os_name, os_version, device_brand, device_manufacturer
20944
+ */
20945
+ userProperties: StringDictionary;
20946
+ }
20609
20947
  /**
20610
20948
  *
20611
20949
  */
@@ -35791,6 +36129,31 @@ export interface Ticket_GetTicketMessageWithOptionsRequest {
35791
36129
  */
35792
36130
  includeNonInlineAttachmentsInfo: boolean;
35793
36131
  }
36132
+ /**
36133
+ * Relationship between two tickets, as described by the TicketRelationDefinition.
36134
+ */
36135
+ export interface TicketRelationEntity extends Carrier {
36136
+ /**
36137
+ * Primary key
36138
+ */
36139
+ ticketRelationId?: number;
36140
+ /**
36141
+ * Source ticket in this relation
36142
+ */
36143
+ sourceTicketId?: number;
36144
+ /**
36145
+ * Destination ticket in this relation
36146
+ */
36147
+ destinationTicketId?: number;
36148
+ /**
36149
+ * Ticket relation type
36150
+ */
36151
+ relationType?: enums.TicketRelationType;
36152
+ /**
36153
+ * Comment for relation
36154
+ */
36155
+ comment?: string;
36156
+ }
35794
36157
  /**
35795
36158
  * The ticket summary with heading, created date.
35796
36159
  */