@salesforce/nimbus-plugin-lds 1.273.0 → 1.273.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/nimbus-plugin-lds",
3
- "version": "1.273.0",
3
+ "version": "1.273.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Nimbus plugins for LDS on Mobile native integrations: durable store, networking, and draft queue.",
6
6
  "types": "dist/types/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@rollup/plugin-wasm": "^5.2.0",
28
- "@salesforce/lds-store-sql": "^1.273.0",
28
+ "@salesforce/lds-store-sql": "^1.273.1",
29
29
  "@types/sql.js": "1.4.4",
30
30
  "nimbus-types": "^2.0.0-alpha1",
31
31
  "rollup-plugin-string": "^3.0.0",
package/sql/248001.sql ADDED
@@ -0,0 +1,211 @@
1
+ DROP INDEX idx_lds_data_uiapi_serviceresource_relatedrecordid;
2
+
3
+ DROP INDEX idx_lds_data_uiapi_assignedresource_serviceappointmentid;
4
+
5
+ DROP INDEX idx_lds_data_uiapi_assignedresource_serviceresourceid;
6
+
7
+ DROP INDEX IF EXISTS idx_lds_data_uiapi_record_apiname;
8
+
9
+ CREATE INDEX IF NOT EXISTS idx_lds_data_uiapi_record_apiname ON lds_data (
10
+ json_extract(data, '$.apiName')
11
+ )
12
+ WHERE
13
+ key LIKE 'UiApi::RecordRepresentation:%'
14
+ AND json_extract(data, '$.apiName') IS NOT NULL;
15
+
16
+ CREATE INDEX IF NOT EXISTS idx_lds_data_workorder_1 ON lds_data (
17
+ json_extract(data, '$.fields.ParentWorkOrderId.value'),
18
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
19
+ json_extract(metadata, '$.ingestionTimestamp'),
20
+ json_extract(data, '$.drafts')
21
+ )
22
+ WHERE
23
+ key LIKE 'UiApi::RecordRepresentation:%'
24
+ AND json_extract(data, '$.apiName') = 'WorkOrder'
25
+ AND json_extract(data, '$.fields.ParentWorkOrderId.value') IS NOT NULL;
26
+
27
+ CREATE INDEX IF NOT EXISTS idx_lds_data_workorderlineitem_1 ON lds_data (
28
+ json_extract(data, '$.fields.WorkOrderId.value'),
29
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
30
+ json_extract(metadata, '$.ingestionTimestamp'),
31
+ json_extract(data, '$.drafts')
32
+ )
33
+ WHERE
34
+ key LIKE 'UiApi::RecordRepresentation:%'
35
+ AND json_extract(data, '$.apiName') = 'WorkOrderLineItem'
36
+ AND json_extract(data, '$.fields.WorkOrderId.value') IS NOT NULL;
37
+
38
+ CREATE INDEX IF NOT EXISTS idx_lds_data_servicereport_1 ON lds_data (
39
+ json_extract(data, '$.fields.ParentId.value'),
40
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
41
+ json_extract(metadata, '$.ingestionTimestamp'),
42
+ json_extract(data, '$.drafts')
43
+ )
44
+ WHERE
45
+ key LIKE 'UiApi::RecordRepresentation:%'
46
+ AND json_extract(data, '$.apiName') = 'ServiceReport'
47
+ AND json_extract(data, '$.fields.ParentId.value') IS NOT NULL;
48
+
49
+ CREATE INDEX IF NOT EXISTS idx_lds_data_assignedresource_1 ON lds_data (
50
+ json_extract(data, '$.fields.ServiceAppointmentId.value'),
51
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
52
+ json_extract(metadata, '$.ingestionTimestamp'),
53
+ json_extract(data, '$.drafts')
54
+ )
55
+ WHERE
56
+ key LIKE 'UiApi::RecordRepresentation:%'
57
+ AND json_extract(data, '$.apiName') = 'AssignedResource'
58
+ AND json_extract(data, '$.fields.ServiceAppointmentId.value') IS NOT NULL;
59
+
60
+ CREATE INDEX IF NOT EXISTS idx_lds_data_productconsumed_1 ON lds_data (
61
+ json_extract(data, '$.fields.WorkOrderId.value'),
62
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
63
+ json_extract(metadata, '$.ingestionTimestamp'),
64
+ json_extract(data, '$.drafts')
65
+ )
66
+ WHERE
67
+ key LIKE 'UiApi::RecordRepresentation:%'
68
+ AND json_extract(data, '$.apiName') = 'ProductConsumed'
69
+ AND json_extract(data, '$.fields.WorkOrderId.value') IS NOT NULL;
70
+
71
+ CREATE INDEX IF NOT EXISTS idx_lds_data_productrequired_1 ON lds_data (
72
+ json_extract(data, '$.fields.ParentRecordId.value'),
73
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
74
+ json_extract(metadata, '$.ingestionTimestamp'),
75
+ json_extract(data, '$.drafts')
76
+ )
77
+ WHERE
78
+ key LIKE 'UiApi::RecordRepresentation:%'
79
+ AND json_extract(data, '$.apiName') = 'ProductRequired'
80
+ AND json_extract(data, '$.fields.ParentRecordId.value') IS NOT NULL;
81
+
82
+ CREATE INDEX IF NOT EXISTS idx_lds_data_linkedarticle_1 ON lds_data (
83
+ json_extract(data, '$.fields.LinkedEntityId.value'),
84
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
85
+ json_extract(metadata, '$.ingestionTimestamp'),
86
+ json_extract(data, '$.drafts')
87
+ )
88
+ WHERE
89
+ key LIKE 'UiApi::RecordRepresentation:%'
90
+ AND json_extract(data, '$.apiName') = 'LinkedArticle'
91
+ AND json_extract(data, '$.fields.LinkedEntityId.value') IS NOT NULL;
92
+
93
+ CREATE INDEX IF NOT EXISTS idx_lds_data_productrequest_1 ON lds_data (
94
+ json_extract(data, '$.fields.WorkOrderId.value'),
95
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
96
+ json_extract(metadata, '$.ingestionTimestamp'),
97
+ json_extract(data, '$.drafts')
98
+ )
99
+ WHERE
100
+ key LIKE 'UiApi::RecordRepresentation:%'
101
+ AND json_extract(data, '$.apiName') = 'ProductRequest'
102
+ AND json_extract(data, '$.fields.WorkOrderId.value') IS NOT NULL;
103
+
104
+ CREATE INDEX IF NOT EXISTS idx_lds_data_resourcepreference_1 ON lds_data (
105
+ json_extract(data, '$.fields.RelatedRecordId.value'),
106
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
107
+ json_extract(metadata, '$.ingestionTimestamp'),
108
+ json_extract(data, '$.drafts')
109
+ )
110
+ WHERE
111
+ key LIKE 'UiApi::RecordRepresentation:%'
112
+ AND json_extract(data, '$.apiName') = 'ResourcePreference'
113
+ AND json_extract(data, '$.fields.RelatedRecordId.value') IS NOT NULL;
114
+
115
+ CREATE INDEX IF NOT EXISTS idx_lds_data_skillrequirement_1 ON lds_data (
116
+ json_extract(data, '$.fields.RelatedRecordId.value'),
117
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
118
+ json_extract(metadata, '$.ingestionTimestamp'),
119
+ json_extract(data, '$.drafts')
120
+ )
121
+ WHERE
122
+ key LIKE 'UiApi::RecordRepresentation:%'
123
+ AND json_extract(data, '$.apiName') = 'SkillRequirement'
124
+ AND json_extract(data, '$.fields.RelatedRecordId.value') IS NOT NULL;
125
+
126
+ CREATE INDEX IF NOT EXISTS idx_lds_data_timesheetentry_1 ON lds_data (
127
+ json_extract(data, '$.fields.WorkOrderId.value'),
128
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
129
+ json_extract(metadata, '$.ingestionTimestamp'),
130
+ json_extract(data, '$.drafts')
131
+ )
132
+ WHERE
133
+ key LIKE 'UiApi::RecordRepresentation:%'
134
+ AND json_extract(data, '$.apiName') = 'TimeSheetEntry'
135
+ AND json_extract(data, '$.fields.WorkOrderId.value') IS NOT NULL;
136
+
137
+ CREATE INDEX IF NOT EXISTS idx_lds_data_workplan_1 ON lds_data (
138
+ json_extract(data, '$.fields.WorkOrderId.value'),
139
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
140
+ json_extract(metadata, '$.ingestionTimestamp'),
141
+ json_extract(data, '$.drafts')
142
+ )
143
+ WHERE
144
+ key LIKE 'UiApi::RecordRepresentation:%'
145
+ AND json_extract(data, '$.apiName') = 'WorkPlan'
146
+ AND json_extract(data, '$.fields.WorkOrderId.value') IS NOT NULL;
147
+
148
+ CREATE INDEX IF NOT EXISTS idx_lds_data_workstep_1 ON lds_data (
149
+ json_extract(data, '$.fields.WorkOrderId.value'),
150
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
151
+ json_extract(metadata, '$.ingestionTimestamp'),
152
+ json_extract(data, '$.drafts')
153
+ )
154
+ WHERE
155
+ key LIKE 'UiApi::RecordRepresentation:%'
156
+ AND json_extract(data, '$.apiName') = 'WorkStep'
157
+ AND json_extract(data, '$.fields.WorkOrderId.value') IS NOT NULL;
158
+
159
+ CREATE INDEX IF NOT EXISTS idx_lds_data_serviceresource_1 ON lds_data (
160
+ json_extract(data, '$.fields.RelatedRecordId.value'),
161
+ json_extract(data, '$.fields.IsActive.value') COLLATE NOCASE DESC,
162
+ json_extract(data, '$.fields.ResourceType.value') COLLATE NOCASE ASC,
163
+ json_extract(metadata, '$.ingestionTimestamp'),
164
+ json_extract(data, '$.drafts')
165
+ )
166
+ WHERE
167
+ key LIKE 'UiApi::RecordRepresentation:%'
168
+ AND json_extract(data, '$.apiName') = 'ServiceResource'
169
+ AND json_extract(data, '$.fields.RelatedRecordId.value') IS NOT NULL;
170
+
171
+ CREATE INDEX IF NOT EXISTS idx_lds_data_resourceabsence_1 ON lds_data (
172
+ json_extract(data, '$.fields.ResourceId.value'),
173
+ json_extract(data, '$.fields.Start.value') DESC,
174
+ json_extract(metadata, '$.ingestionTimestamp'),
175
+ json_extract(data, '$.drafts')
176
+ )
177
+ WHERE
178
+ key LIKE 'UiApi::RecordRepresentation:%'
179
+ AND json_extract(data, '$.apiName') = 'ResourceAbsence'
180
+ AND json_extract(data, '$.fields.ResourceId.value') IS NOT NULL;
181
+
182
+ CREATE INDEX IF NOT EXISTS idx_lds_data_serviceappointment_1 ON lds_data (
183
+ json_extract(data, '$.fields.RelatedBundleId.value'),
184
+ json_extract(metadata, '$.ingestionTimestamp'),
185
+ json_extract(data, '$.drafts')
186
+ )
187
+ WHERE
188
+ key LIKE 'UiApi::RecordRepresentation:%'
189
+ AND json_extract(data, '$.apiName') = 'ServiceAppointment'
190
+ AND json_extract(data, '$.fields.RelatedBundleId.value') IS NOT NULL;
191
+
192
+ CREATE INDEX IF NOT EXISTS idx_lds_data_serviceappointment_2 ON lds_data (
193
+ json_extract(data, '$.fields.ParentRecordId.value'),
194
+ json_extract(data, '$.fields.LastModifiedDate.value') DESC,
195
+ json_extract(metadata, '$.ingestionTimestamp'),
196
+ json_extract(data, '$.drafts')
197
+ )
198
+ WHERE
199
+ key LIKE 'UiApi::RecordRepresentation:%'
200
+ AND json_extract(data, '$.apiName') = 'ServiceAppointment'
201
+ AND json_extract(data, '$.fields.ParentRecordId.value') IS NOT NULL;
202
+
203
+ CREATE INDEX IF NOT EXISTS idx_lds_data_serviceappointmenthistory_1 ON lds_data (
204
+ json_extract(data, '$.fields.ServiceAppointmentId.value'),
205
+ json_extract(metadata, '$.ingestionTimestamp'),
206
+ json_extract(data, '$.drafts')
207
+ )
208
+ WHERE
209
+ key LIKE 'UiApi::RecordRepresentation:%'
210
+ AND json_extract(data, '$.apiName') = 'ServiceAppointmentHistory'
211
+ AND json_extract(data, '$.fields.ServiceAppointmentId.value') IS NOT NULL;