@salesforce/analytics 1.0.5 → 1.0.8
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/CHANGELOG.md +18 -0
- package/README.md +74 -39
- package/lib/commands/analytics/app/create.d.ts +1 -17
- package/lib/commands/analytics/app/create.js +9 -187
- package/lib/commands/analytics/app/create.js.map +1 -1
- package/lib/commands/analytics/app/update.d.ts +10 -1
- package/lib/commands/analytics/app/update.js +31 -5
- package/lib/commands/analytics/app/update.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/create.js +2 -2
- package/lib/commands/analytics/autoinstall/app/create.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/delete.js +2 -2
- package/lib/commands/analytics/autoinstall/app/delete.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/update.js +2 -2
- package/lib/commands/analytics/autoinstall/app/update.js.map +1 -1
- package/lib/commands/analytics/enable.js +2 -2
- package/lib/commands/analytics/enable.js.map +1 -1
- package/lib/commands/analytics/query.js +2 -1
- package/lib/commands/analytics/query.js.map +1 -1
- package/lib/commands/analytics/recipe/list.d.ts +17 -0
- package/lib/commands/analytics/recipe/list.js +41 -0
- package/lib/commands/analytics/recipe/list.js.map +1 -0
- package/lib/lib/analytics/constants.d.ts +2 -2
- package/lib/lib/analytics/constants.js +3 -3
- package/lib/lib/analytics/constants.js.map +1 -1
- package/lib/lib/analytics/event/appStreaming.d.ts +30 -0
- package/lib/lib/analytics/event/appStreaming.js +234 -0
- package/lib/lib/analytics/event/appStreaming.js.map +1 -0
- package/lib/lib/analytics/recipe/recipe.d.ts +14 -0
- package/lib/lib/analytics/recipe/recipe.js +20 -0
- package/lib/lib/analytics/recipe/recipe.js.map +1 -0
- package/messages/app.json +3 -0
- package/messages/recipe.json +5 -0
- package/oclif.manifest.json +1 -1
- package/package.json +9 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/analytics/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/analytics/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,4EAA4E;AAC/D,QAAA,6BAA6B,GAAG,EAAE,CAAC;AAEhD,wDAAwD;AACxD,qFAAqF;AACxE,QAAA,oBAAoB,GAAG,IAAI,CAAC;AAEzC,8EAA8E;AACjE,QAAA,oBAAoB,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { UX } from '@salesforce/command';
|
|
2
|
+
import { Logger, Org } from '@salesforce/core';
|
|
3
|
+
import Folder, { CreateAppBody } from '../app/folder';
|
|
4
|
+
export declare type StreamingResult = {
|
|
5
|
+
EventType: string;
|
|
6
|
+
Status: string;
|
|
7
|
+
Index: number;
|
|
8
|
+
Total: number;
|
|
9
|
+
ItemLabel: string;
|
|
10
|
+
Message: string;
|
|
11
|
+
};
|
|
12
|
+
export default class AppStreaming {
|
|
13
|
+
streamingResults: StreamingResult[];
|
|
14
|
+
protected logger: Logger | undefined;
|
|
15
|
+
protected ux: UX;
|
|
16
|
+
protected allEvents: boolean;
|
|
17
|
+
protected org: Org;
|
|
18
|
+
protected wait: number;
|
|
19
|
+
constructor(organization: Org, allEvents: boolean, wait: number, ux: UX);
|
|
20
|
+
createApp(folder: Folder, body: CreateAppBody): Promise<string | undefined>;
|
|
21
|
+
updateApp(folder: Folder, folderId: string, templateId: string): Promise<string | undefined>;
|
|
22
|
+
getStreamingResults(): StreamingResult[];
|
|
23
|
+
streamCreateEvent(folder: Folder, body: CreateAppBody): Promise<string | undefined>;
|
|
24
|
+
streamUpdateEvent(folder: Folder, folderId: string, templateId: string): Promise<string>;
|
|
25
|
+
private streamProcessor;
|
|
26
|
+
private logEvent;
|
|
27
|
+
private createStreamingClient;
|
|
28
|
+
private createEventJson;
|
|
29
|
+
private getStreamResultMark;
|
|
30
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const core_1 = require("@salesforce/core");
|
|
13
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
14
|
+
const kit_1 = require("@salesforce/kit");
|
|
15
|
+
const utils_1 = require("../utils");
|
|
16
|
+
const waveAssetEvent_1 = __importDefault(require("./waveAssetEvent"));
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'app');
|
|
19
|
+
class AppStreaming {
|
|
20
|
+
constructor(organization, allEvents, wait, ux) {
|
|
21
|
+
this.streamingResults = [];
|
|
22
|
+
this.allEvents = false;
|
|
23
|
+
this.allEvents = allEvents;
|
|
24
|
+
this.org = organization;
|
|
25
|
+
this.wait = wait;
|
|
26
|
+
this.ux = ux;
|
|
27
|
+
}
|
|
28
|
+
async createApp(folder, body) {
|
|
29
|
+
const waveAppId = await folder.create(body);
|
|
30
|
+
this.ux.styledHeader(messages.getMessage('startAppCreation', [waveAppId]));
|
|
31
|
+
return waveAppId;
|
|
32
|
+
}
|
|
33
|
+
async updateApp(folder, folderId, templateId) {
|
|
34
|
+
const waveAppId = await folder.update(folderId, templateId);
|
|
35
|
+
this.ux.styledHeader(messages.getMessage('startAppUpdate', [waveAppId]));
|
|
36
|
+
return waveAppId;
|
|
37
|
+
}
|
|
38
|
+
getStreamingResults() {
|
|
39
|
+
return this.streamingResults;
|
|
40
|
+
}
|
|
41
|
+
async streamCreateEvent(folder, body) {
|
|
42
|
+
let folderId;
|
|
43
|
+
const options = new core_1.StreamingClient.DefaultOptions(this.org, '/event/WaveAssetEvent', message => this.streamProcessor(folderId, message));
|
|
44
|
+
const asyncStatusClient = await this.createStreamingClient(options);
|
|
45
|
+
try {
|
|
46
|
+
await asyncStatusClient.subscribe(async () => {
|
|
47
|
+
folderId = await this.createApp(folder, body);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (error.code === 'genericTimeoutMessage') {
|
|
52
|
+
// include the app id in the error if we timeout waiting, since the app got created
|
|
53
|
+
(0, utils_1.throwWithData)(messages.getMessage('timeoutMessage', [error.message]), {
|
|
54
|
+
id: folderId
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
return folderId;
|
|
60
|
+
}
|
|
61
|
+
async streamUpdateEvent(folder, folderId, templateId) {
|
|
62
|
+
const options = new core_1.StreamingClient.DefaultOptions(this.org, '/event/WaveAssetEvent', message => this.streamProcessor(folderId, message));
|
|
63
|
+
const asyncStatusClient = await this.createStreamingClient(options);
|
|
64
|
+
try {
|
|
65
|
+
await asyncStatusClient.subscribe(async () => {
|
|
66
|
+
await this.updateApp(folder, folderId, templateId);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
if (error.code === 'genericTimeoutMessage') {
|
|
71
|
+
// include the app id in the error if we timeout waiting, since the app got created
|
|
72
|
+
(0, utils_1.throwWithData)(messages.getMessage('timeoutMessage', [error.message]), {
|
|
73
|
+
id: folderId
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
return folderId;
|
|
79
|
+
}
|
|
80
|
+
streamProcessor(folderId, event) {
|
|
81
|
+
const waveAssetEvent = new waveAssetEvent_1.default(event);
|
|
82
|
+
// Only handle events for the newly created folder id and ignore for tests
|
|
83
|
+
if (folderId !== waveAssetEvent.folderId && waveAssetEvent.folderId !== 'test') {
|
|
84
|
+
return { completed: false };
|
|
85
|
+
}
|
|
86
|
+
switch (waveAssetEvent.eventType) {
|
|
87
|
+
case 'ExternalData': {
|
|
88
|
+
this.logEvent('External Data', 'created', waveAssetEvent);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case 'Dataset': {
|
|
92
|
+
this.logEvent('Datasets', 'created', waveAssetEvent);
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'Lens': {
|
|
96
|
+
this.logEvent('Lenses', 'created', waveAssetEvent);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'Dashboard': {
|
|
100
|
+
this.logEvent('Dashboards', 'created', waveAssetEvent);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case 'Dataflow': {
|
|
104
|
+
this.logEvent('Dataflows', 'created', waveAssetEvent);
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
case 'Recipe': {
|
|
108
|
+
this.logEvent('Recipes', 'created', waveAssetEvent);
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 'ExecutionPlan': {
|
|
112
|
+
this.logEvent('Execution Plan', 'created', waveAssetEvent);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case 'UserDataflowInstance': {
|
|
116
|
+
this.logEvent('User Dataflow Instructions', 'executed', waveAssetEvent);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case 'ExtendedType': {
|
|
120
|
+
this.logEvent('Template Extensions', 'created', waveAssetEvent);
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case 'SystemDataflowInstance': {
|
|
124
|
+
this.logEvent('System Dataflow Instructions', 'executed', waveAssetEvent);
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
case 'ReplicationDataflowInstance': {
|
|
128
|
+
this.logEvent('Replication Dataflow Instructions', 'executed', waveAssetEvent);
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'UserXmd': {
|
|
132
|
+
this.logEvent('User XMDs', 'created', waveAssetEvent);
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case 'AssetPruning': {
|
|
136
|
+
this.logEvent('Asset', 'deleted', waveAssetEvent);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
case 'Image': {
|
|
140
|
+
this.logEvent('Images', 'created', waveAssetEvent);
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
case 'Application': {
|
|
144
|
+
this.createEventJson(waveAssetEvent);
|
|
145
|
+
if (waveAssetEvent.status === 'Success') {
|
|
146
|
+
this.ux.log(this.getStreamResultMark(true), messages.getMessage('finishAppCreation', [waveAssetEvent.label]));
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
// failed or cancelled
|
|
150
|
+
this.ux.log(this.getStreamResultMark(false), messages.getMessage('finishAppCreationFailure', [waveAssetEvent.message]));
|
|
151
|
+
(0, utils_1.throwWithData)(messages.getMessage('finishAppCreationFailure', [waveAssetEvent.message]), {
|
|
152
|
+
id: folderId,
|
|
153
|
+
events: this.streamingResults
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return { completed: true };
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return { completed: false };
|
|
160
|
+
}
|
|
161
|
+
logEvent(eventDisplayName, action, event) {
|
|
162
|
+
if (this.allEvents && event.total > 0) {
|
|
163
|
+
this.createEventJson(event);
|
|
164
|
+
if (event.status === 'Success') {
|
|
165
|
+
this.ux.log(this.getStreamResultMark(true), messages.getMessage('verboseAppCreateEventSuccess', [
|
|
166
|
+
messages.getMessage('appCreateSuccessfulLabel'),
|
|
167
|
+
eventDisplayName,
|
|
168
|
+
event.index,
|
|
169
|
+
event.total,
|
|
170
|
+
event.label
|
|
171
|
+
]));
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.ux.log(this.getStreamResultMark(false), messages.getMessage('appCreateEventFail', [
|
|
175
|
+
messages.getMessage('appCreateEventFailureLabel'),
|
|
176
|
+
eventDisplayName,
|
|
177
|
+
event.index,
|
|
178
|
+
event.total,
|
|
179
|
+
event.label,
|
|
180
|
+
event.message
|
|
181
|
+
]));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
if (event.status === 'Success' && event.total > 0 && event.total === event.index) {
|
|
186
|
+
this.createEventJson(event);
|
|
187
|
+
this.ux.log(this.getStreamResultMark(true), messages.getMessage('appCreateEvent', [event.total, eventDisplayName, action]));
|
|
188
|
+
}
|
|
189
|
+
if (event.status !== 'Success') {
|
|
190
|
+
this.createEventJson(event);
|
|
191
|
+
this.ux.log(this.getStreamResultMark(true), messages.getMessage('appCreateEventFail', [
|
|
192
|
+
messages.getMessage('appCreateEventFailureLabel'),
|
|
193
|
+
eventDisplayName,
|
|
194
|
+
event.index,
|
|
195
|
+
event.total,
|
|
196
|
+
event.label,
|
|
197
|
+
event.message
|
|
198
|
+
]));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async createStreamingClient(options) {
|
|
203
|
+
const timeout = kit_1.Duration.minutes(this.wait);
|
|
204
|
+
options.setHandshakeTimeout(timeout);
|
|
205
|
+
options.setSubscribeTimeout(timeout);
|
|
206
|
+
const asyncStatusClient = await core_1.StreamingClient.create(options);
|
|
207
|
+
await asyncStatusClient.handshake();
|
|
208
|
+
// Stream all WaveAssetEvents events for this org
|
|
209
|
+
asyncStatusClient.replay(-1);
|
|
210
|
+
return asyncStatusClient;
|
|
211
|
+
}
|
|
212
|
+
createEventJson(event) {
|
|
213
|
+
const entry = {
|
|
214
|
+
EventType: event.eventType,
|
|
215
|
+
Status: event.status,
|
|
216
|
+
Index: event.index,
|
|
217
|
+
Total: event.total,
|
|
218
|
+
ItemLabel: event.label,
|
|
219
|
+
Message: event.message
|
|
220
|
+
};
|
|
221
|
+
this.streamingResults.push(entry);
|
|
222
|
+
}
|
|
223
|
+
getStreamResultMark(success) {
|
|
224
|
+
if (process.platform === 'win32') {
|
|
225
|
+
return '';
|
|
226
|
+
}
|
|
227
|
+
if (success) {
|
|
228
|
+
return chalk_1.default.green('✔');
|
|
229
|
+
}
|
|
230
|
+
return chalk_1.default.red('✖');
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
exports.default = AppStreaming;
|
|
234
|
+
//# sourceMappingURL=appStreaming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appStreaming.js","sourceRoot":"","sources":["../../../../src/lib/analytics/event/appStreaming.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAGH,2CAAwF;AAExF,kDAA0B;AAC1B,yCAA2C;AAE3C,oCAAyC;AACzC,sEAA8C;AAE9C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;AAWvE,MAAqB,YAAY;IAS/B,YAAmB,YAAiB,EAAE,SAAkB,EAAE,IAAY,EAAE,EAAM;QARvE,qBAAgB,GAAG,EAAuB,CAAC;QAIxC,cAAS,GAAG,KAAK,CAAC;QAK1B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAAc,EAAE,IAAmB;QACxD,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3E,O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CAAC,OAAgB;QAC1C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;YAChC,OAAO,EAAE,CAAC;SACX;QACD,IAAI,OAAO,EAAE;YACX,OAAO,eAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,OAAO,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;CACF;AAtPD,+BAsPC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Org } from '@salesforce/core';
|
|
2
|
+
export declare type RecipeType = {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
namespace?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
status?: string;
|
|
8
|
+
};
|
|
9
|
+
export default class Recipe {
|
|
10
|
+
private readonly connection;
|
|
11
|
+
private readonly recipesUrl;
|
|
12
|
+
constructor(organization: Org);
|
|
13
|
+
list(): Promise<RecipeType[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2016, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const request_1 = require("../request");
|
|
10
|
+
class Recipe {
|
|
11
|
+
constructor(organization) {
|
|
12
|
+
this.connection = organization.getConnection();
|
|
13
|
+
this.recipesUrl = `${this.connection.baseUrl()}/wave/recipes/`;
|
|
14
|
+
}
|
|
15
|
+
list() {
|
|
16
|
+
return (0, request_1.fetchAllPages)(this.connection, this.recipesUrl, 'recipes');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = Recipe;
|
|
20
|
+
//# sourceMappingURL=recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../../src/lib/analytics/recipe/recipe.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAGH,wCAA2C;AAU3C,MAAqB,MAAM;IAIzB,YAAmB,YAAiB;QAClC,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACjE,CAAC;IAEM,IAAI;QACT,OAAO,IAAA,uBAAa,EAAa,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAChF,CAAC;CACF;AAZD,yBAYC"}
|
package/messages/app.json
CHANGED
|
@@ -25,12 +25,15 @@
|
|
|
25
25
|
"applogFlagLongDescription": "Specify to include app creation log details.",
|
|
26
26
|
"appCreateAsyncDescription": "create app asynchronously",
|
|
27
27
|
"appCreateAsyncLongDescription": "Create app asynchronously.",
|
|
28
|
+
"appUpdateAsyncDescription": "update app asynchronously",
|
|
29
|
+
"appUpdateAsyncLongDescription": "Update app asynchronously.",
|
|
28
30
|
"appCreateAllEventsDescription": "verbose display of all app create events",
|
|
29
31
|
"appCreateAllEventsLongDescription": "Verbose display of all app create events.",
|
|
30
32
|
"appDefinitionFileFlagDescription": "Tableau CRM template definition file; required unless --templateid is specified",
|
|
31
33
|
"appDefinitionFileFlagLongDescription": "Tableau CRM template definition file; required unless a --templateid value is specified.",
|
|
32
34
|
"appsFound": "Found [%s] Tableau CRM apps.",
|
|
33
35
|
"startAppCreation": "Successfully started the creation process for Tableau CRM app [%s].",
|
|
36
|
+
"startAppUpdate": "Successfully started the update process for Tableau CRM app [%s].",
|
|
34
37
|
"appCreateEvent": "%s %s %s, 0 failed",
|
|
35
38
|
"verboseAppCreateEventSuccess": "%s %s %s of %s [%s]",
|
|
36
39
|
"appCreateEventFail": "%s %s %s of %s [%s] with message [%s]",
|