@jsb188/mday 1.1.8 → 1.1.11

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 (123) hide show
  1. package/package.json +105 -35
  2. package/src/constants/agentDoc.ts +12 -0
  3. package/src/constants/agentMemory.ts +154 -0
  4. package/src/constants/aiChat.ts +5 -0
  5. package/src/constants/campaign.ts +127 -0
  6. package/src/constants/dataTable.ts +48 -0
  7. package/src/constants/dataTableFieldTypes.generated.ts +63 -0
  8. package/src/constants/docAccess.ts +32 -0
  9. package/src/constants/email.ts +44 -0
  10. package/src/constants/fieldDoc.ts +34 -0
  11. package/src/constants/graphqlReactivity.ts +113 -0
  12. package/src/constants/inboundContact.ts +8 -0
  13. package/src/constants/integration.ts +13 -0
  14. package/src/constants/log.ts +7 -366
  15. package/src/constants/logActivityGroupColors.generated.ts +19 -0
  16. package/src/constants/logTaxonomy.generated.ts +1103 -0
  17. package/src/constants/noteDoc.ts +77 -0
  18. package/src/constants/organization.ts +18 -11
  19. package/src/constants/pageRoute.ts +23 -0
  20. package/src/constants/schedule.ts +220 -0
  21. package/src/constants/scheduleRuleTemplateSeed.ts +138 -0
  22. package/src/constants/scheduleRuleTemplates.generated.ts +145 -0
  23. package/src/constants/sheet.ts +168 -0
  24. package/src/constants/sheetRegionSources.generated.ts +578 -0
  25. package/src/constants/square.ts +16 -0
  26. package/src/constants/storage.ts +61 -0
  27. package/src/constants/usage.ts +79 -0
  28. package/src/schemas/editLogEntry.ts +1017 -738
  29. package/src/schemas/fieldDocsQuery.ts +12 -0
  30. package/src/schemas/inboundContact.ts +77 -0
  31. package/src/schemas/logsQuery.ts +57 -316
  32. package/src/schemas/organization.ts +53 -213
  33. package/src/types/account.d.ts +81 -0
  34. package/src/types/agentDoc.d.ts +64 -0
  35. package/src/types/agentMemory.d.ts +74 -0
  36. package/src/types/campaign.d.ts +683 -0
  37. package/src/types/dataTable.d.ts +366 -0
  38. package/src/types/docAccess.d.ts +96 -0
  39. package/src/types/email.d.ts +142 -0
  40. package/src/types/fieldDoc.d.ts +273 -0
  41. package/src/types/inboundContact.d.ts +57 -0
  42. package/src/types/integration.d.ts +42 -0
  43. package/src/types/log.d.ts +169 -190
  44. package/src/types/noteDoc.d.ts +86 -0
  45. package/src/types/organization.d.ts +175 -76
  46. package/src/types/pageRoute.d.ts +48 -0
  47. package/src/types/schedule.d.ts +391 -0
  48. package/src/types/sheet.d.ts +1130 -0
  49. package/src/types/storage.d.ts +242 -0
  50. package/src/types/usage.d.ts +106 -0
  51. package/src/types/workflow.d.ts +305 -0
  52. package/src/utils/agentDoc.ts +109 -0
  53. package/src/utils/aiChat.ts +26 -0
  54. package/src/utils/campaign.ts +741 -0
  55. package/src/utils/campaignFormEditor.ts +871 -0
  56. package/src/utils/dataTable.ts +849 -0
  57. package/src/utils/dataTableFieldTypeRegistry.ts +105 -0
  58. package/src/utils/dataTableRealtimeAuthority.ts +209 -0
  59. package/src/utils/dataTableRealtimeSelection.ts +134 -0
  60. package/src/utils/dataTableRowDocument.ts +508 -0
  61. package/src/utils/dataTableSource.ts +230 -0
  62. package/src/utils/docAccess.ts +383 -0
  63. package/src/utils/documentName.ts +53 -0
  64. package/src/utils/email.ts +172 -0
  65. package/src/utils/fieldDoc.ts +113 -0
  66. package/src/utils/log.ts +173 -778
  67. package/src/utils/logRegistryValue.ts +90 -0
  68. package/src/utils/logStoreRead.ts +266 -0
  69. package/src/utils/logTaxonomy.ts +76 -0
  70. package/src/utils/logTaxonomyDisplay.ts +439 -0
  71. package/src/utils/noteDoc.ts +827 -0
  72. package/src/utils/organization.ts +683 -81
  73. package/src/utils/pageRoute.ts +71 -0
  74. package/src/utils/schedule.ts +799 -0
  75. package/src/utils/scheduleEvaluation.ts +1994 -0
  76. package/src/utils/scheduleICS.ts +246 -0
  77. package/src/utils/scheduleRuleTemplates.ts +188 -0
  78. package/src/utils/sheet.ts +4973 -0
  79. package/src/utils/sheetAxisMove.ts +830 -0
  80. package/src/utils/sheetBootstrap.ts +1769 -0
  81. package/src/utils/sheetCommand.ts +423 -0
  82. package/src/utils/sheetExport.ts +238 -0
  83. package/src/utils/sheetFormulaEvaluation.ts +914 -0
  84. package/src/utils/sheetFormulaEvaluator.ts +852 -0
  85. package/src/utils/sheetJournal.ts +78 -0
  86. package/src/utils/sheetNumberFormat.ts +1211 -0
  87. package/src/utils/sheetRegion.ts +374 -0
  88. package/src/utils/sheetRegionFilter.ts +1259 -0
  89. package/src/utils/sheetRegionSourceRegistry.ts +594 -0
  90. package/src/utils/sheetSequence.ts +148 -0
  91. package/src/utils/sheetSnapshot.ts +992 -0
  92. package/src/utils/sheetStructureEdit.ts +1284 -0
  93. package/src/utils/square.ts +32 -0
  94. package/src/utils/storage.ts +152 -0
  95. package/src/utils/table-route.ts +262 -0
  96. package/src/utils/workflow.ts +380 -0
  97. package/tests/dataTableFieldTypeRegistry.test.ts +110 -0
  98. package/tests/docAccess.test.ts +525 -0
  99. package/tests/editLogEntry.test.ts +112 -0
  100. package/tests/noteDoc.test.ts +669 -0
  101. package/tests/schedule.test.ts +693 -0
  102. package/tests/scheduleEvaluation.test.ts +1970 -0
  103. package/tests/scheduleICS.test.ts +208 -0
  104. package/tests/scheduleRuleTemplates.test.ts +176 -0
  105. package/tests/scheduleSweepInvariants.test.ts +428 -0
  106. package/tests/sheetAxisMove.test.ts +343 -0
  107. package/tests/sheetFormulaEvaluator.test.ts +575 -0
  108. package/tests/sheetRegionFilter.test.ts +1135 -0
  109. package/tests/sheetSequence.test.ts +41 -0
  110. package/tests/sheetStructureEdit.test.ts +82 -0
  111. package/tsconfig.json +12 -0
  112. package/vitest.config.ts +8 -0
  113. package/src/constants/log-activityTexts.ts +0 -209
  114. package/src/constants/product.ts +0 -66
  115. package/src/constants/report.ts +0 -25
  116. package/src/schemas/childOrganizationsQuery.ts +0 -44
  117. package/src/schemas/productsQuery.ts +0 -145
  118. package/src/schemas/reportsQuery.ts +0 -107
  119. package/src/types/action.d.ts +0 -42
  120. package/src/types/product.d.ts +0 -173
  121. package/src/types/report.d.ts +0 -203
  122. package/src/utils/product-calEvent.ts +0 -508
  123. package/src/utils/route-helpers.ts +0 -583
@@ -0,0 +1,168 @@
1
+ export const SHEET_CELL_SOURCE_TYPE_ENUMS = [
2
+ 'USER',
3
+ 'REGION_GENERATED',
4
+ 'REGION_OVERRIDE',
5
+ ] as const;
6
+
7
+ export const SHEET_CELL_TEXT_WRAP_ENUMS = ['OVERFLOW', 'WRAP', 'CLIP'] as const;
8
+
9
+ export const SHEET_CELL_TEXT_ALIGN_ENUMS = ['LEFT', 'CENTER', 'RIGHT'] as const;
10
+
11
+ export const SHEET_CELL_VERTICAL_ALIGN_ENUMS = [
12
+ 'TOP',
13
+ 'MIDDLE',
14
+ 'BOTTOM',
15
+ ] as const;
16
+
17
+ export const SHEET_REGION_TYPE_ENUMS = ['DATA_TABLE'] as const;
18
+
19
+ export const SHEET_REGION_PROJECTION_STATUS_ENUMS = [
20
+ 'PENDING',
21
+ 'READY',
22
+ 'FAILED',
23
+ 'INACTIVE',
24
+ ] as const;
25
+
26
+ // Registry-generated (sheet region source registry): the custom entries come
27
+ // from sheet_region_source_kinds rows; regenerate with (cwd: server/)
28
+ // `deno task generate:region-sources`. Re-exported here so every existing
29
+ // import site keeps compiling unchanged.
30
+ export {
31
+ SHEET_CUSTOM_REGION_SOURCE_CHILD_ORGANIZATION_COLUMNS,
32
+ SHEET_CUSTOM_REGION_SOURCE_CHILD_ORGANIZATIONS,
33
+ SHEET_CUSTOM_REGION_SOURCE_COLUMN_FORMULA_VALUE_SOURCE_ENUMS,
34
+ SHEET_CUSTOM_REGION_SOURCE_LOG_COLUMNS,
35
+ SHEET_CUSTOM_REGION_SOURCE_LOGS,
36
+ SHEET_REGION_SOURCE_DESCRIPTORS,
37
+ SHEET_REGION_SOURCE_KIND_KEYS,
38
+ SHEET_REGION_SOURCE_TYPE_ENUMS,
39
+ } from './sheetRegionSources.generated.ts';
40
+
41
+ export const SHEET_REGION_CONFLICT_POLICY_ENUMS = [
42
+ 'TRUNCATE_AT_FIRST_BLOCKER',
43
+ 'OVERWRITE',
44
+ ] as const;
45
+
46
+ export const SHEET_REGION_SOURCE_FILTER_COMBINATOR_ENUMS = [
47
+ 'AND',
48
+ 'OR',
49
+ ] as const;
50
+
51
+ export const SHEET_REGION_SOURCE_FILTER_OPERATOR_ENUMS = [
52
+ 'CONTAINS',
53
+ 'EQUALS',
54
+ 'IN',
55
+ 'IS_EMPTY',
56
+ 'GT',
57
+ 'GTE',
58
+ 'LT',
59
+ 'LTE',
60
+ 'BEFORE',
61
+ 'AFTER',
62
+ 'ON_OR_BEFORE',
63
+ 'ON_OR_AFTER',
64
+ 'CONTAINS_ANY',
65
+ ] as const;
66
+
67
+ export const SHEET_REGION_SOURCE_SORT_DIRECTION_ENUMS = [
68
+ 'ASC',
69
+ 'DESC',
70
+ ] as const;
71
+
72
+ export const SHEET_STRUCTURE_OPERATION_ENUMS = [
73
+ 'INSERT_ROW_ABOVE',
74
+ 'INSERT_COLUMN_LEFT',
75
+ 'DELETE_ROW',
76
+ 'DELETE_COLUMN',
77
+ ] as const;
78
+
79
+ export const SHEET_CELL_VALUE_TYPE_ENUMS = [
80
+ 'CELL_INT',
81
+ 'CELL_FLOAT',
82
+ 'CELL_DATE',
83
+ 'CELL_BOOLEAN',
84
+ 'CELL_TEXT',
85
+ ] as const;
86
+
87
+ export const SHEET_CELL_NUMBER_FORMAT_TYPE_ENUMS = [
88
+ 'AUTOMATIC',
89
+ 'TEXT',
90
+ 'NUMBER',
91
+ 'PERCENT',
92
+ 'SCIENTIFIC',
93
+ 'ACCOUNTING',
94
+ 'FINANCIAL',
95
+ 'CURRENCY',
96
+ 'CURRENCY_ROUNDED',
97
+ 'DATE',
98
+ 'TIME',
99
+ 'DATE_TIME',
100
+ 'DURATION',
101
+ 'CUSTOM',
102
+ ] as const;
103
+
104
+ // Canonical Google-Sheets-style pattern per preset number format type; null
105
+ // types render raw (AUTOMATIC) or require an explicit saved pattern (CUSTOM).
106
+ // The "$" literal is substituted with the locale currency symbol at resolve time.
107
+ export const SHEET_NUMBER_FORMAT_PRESET_PATTERNS: Record<
108
+ (typeof SHEET_CELL_NUMBER_FORMAT_TYPE_ENUMS)[number],
109
+ string | null
110
+ > = {
111
+ AUTOMATIC: null,
112
+ TEXT: '@',
113
+ NUMBER: '#,##0.00',
114
+ PERCENT: '0.00%',
115
+ SCIENTIFIC: '0.00E+00',
116
+ ACCOUNTING: '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',
117
+ FINANCIAL: '#,##0.00;(#,##0.00)',
118
+ CURRENCY: '"$"#,##0.00',
119
+ CURRENCY_ROUNDED: '"$"#,##0',
120
+ DATE: 'm/d/yyyy',
121
+ TIME: 'h:mm:ss AM/PM',
122
+ DATE_TIME: 'm/d/yyyy h:mm:ss',
123
+ DURATION: '[h]:mm:ss',
124
+ CUSTOM: null,
125
+ };
126
+
127
+ export const GRID_ITEM_SORT_ENUMS = ['UPDATED_AT_DESC', 'TITLE_ASC'] as const;
128
+
129
+ export const SHEET_EXPORT_FORMAT_ENUMS = ['CSV', 'TSV', 'XLSX', 'PDF'] as const;
130
+
131
+ // Journaled sheet_tab_changes row kinds. Stage 1 only produces CELLS,
132
+ // STRUCTURE, and REGION rows; RANGES and DESIGN are reserved for Stage 5.
133
+ export const SHEET_TAB_CHANGE_KIND_ENUMS = [
134
+ 'CELLS',
135
+ 'STRUCTURE',
136
+ 'RANGES',
137
+ 'REGION',
138
+ 'DESIGN',
139
+ ] as const;
140
+
141
+ export const GRID_ITEM_LIST_LIMIT = 1000;
142
+ export const SHEET_MAX_ROW_COUNT = 500;
143
+ // Largest column count a sheet can reach today: the server import parser caps
144
+ // imported worksheets at 256 columns (sheetOps-import-parse.ts maxColumns must
145
+ // stay in sync with this)
146
+ export const SHEET_MAX_COLUMN_COUNT = 256;
147
+ export const SHEET_DATA_TABLE_REGION_DEFAULT_LIMIT = 10;
148
+ export const SHEET_DATA_TABLE_REGION_INSERT_DEFAULT_LIMIT = 50;
149
+ export const SHEET_DATA_TABLE_REGION_MAX_ROWS = SHEET_MAX_ROW_COUNT;
150
+ export const SHEET_DEFAULT_ROW_COUNT = SHEET_MAX_ROW_COUNT;
151
+ export const SHEET_DEFAULT_COLUMN_COUNT = 26;
152
+ // Viewport clamps must cover the full sheet caps: the client fetches the whole
153
+ // sheet in one sheetView query and never refetches while scrolling, so any
154
+ // clamp below the sheet caps renders the overflow rows/columns permanently
155
+ // blank (rows 401-500 were blank when this was 400)
156
+ export const SHEET_VIEWPORT_MAX_ROWS = SHEET_MAX_ROW_COUNT;
157
+ export const SHEET_VIEWPORT_MAX_COLUMNS = SHEET_MAX_COLUMN_COUNT;
158
+ export const SHEET_DEFAULT_COLUMN_WIDTH = 160;
159
+
160
+ // Hard cap for one complete Sheet realtime event encoded as UTF-8 JSON.
161
+ export const SHEET_REALTIME_RELAY_MAX_BYTES = 64 * 1024;
162
+
163
+ export const BUILT_IN_DATA_TABLE_NAMES = [
164
+ 'log',
165
+ 'logs',
166
+ 'organizations',
167
+ 'orgs',
168
+ ];