@proveanything/smartlinks 2.1.32 → 2.1.33
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/dist/adminViews.d.ts +86 -0
- package/dist/adminViews.js +178 -0
- package/dist/api/address.d.ts +39 -0
- package/dist/api/address.js +45 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/interactions.d.ts +3 -0
- package/dist/api/interactions.js +3 -0
- package/dist/context.d.ts +5 -0
- package/dist/context.js +4 -1
- package/dist/docs/API_SUMMARY.md +74 -9
- package/dist/docs/admin-views.md +93 -0
- package/dist/docs/app-manifest.md +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/openapi.yaml +81 -0
- package/dist/site.d.ts +5 -0
- package/dist/types/address.d.ts +69 -0
- package/dist/types/address.js +5 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/docs/API_SUMMARY.md +74 -9
- package/docs/admin-views.md +93 -0
- package/docs/app-manifest.md +14 -0
- package/openapi.yaml +81 -0
- package/package.json +1 -1
package/dist/adminViews.d.ts
CHANGED
|
@@ -97,8 +97,94 @@ export interface OpenAppRequest {
|
|
|
97
97
|
* SL.adminViews.openApp({ appId: 'crm', view: 'contact', params: { contactId } })
|
|
98
98
|
*/
|
|
99
99
|
export declare function openApp(req: OpenAppRequest): void;
|
|
100
|
+
/** One destination: its name, the params it needs, and what it opens. */
|
|
101
|
+
export interface DestinationInfo {
|
|
102
|
+
name: string;
|
|
103
|
+
/** Params that must be given. */
|
|
104
|
+
required: string[];
|
|
105
|
+
/** Params that may be given. */
|
|
106
|
+
optional?: string[];
|
|
107
|
+
/** What it opens, in a few words. */
|
|
108
|
+
description: string;
|
|
109
|
+
}
|
|
110
|
+
/** The platform's screens any admin screen can open by name. */
|
|
111
|
+
export declare const DESTINATIONS: DestinationInfo[];
|
|
112
|
+
/** A destination name. Any string is accepted, so a newer host's names work on an older SDK. */
|
|
113
|
+
export type Destination = 'contacts' | 'contact' | 'contact.messages' | 'conversation' | 'segment' | 'message.compose' | 'message.log' | 'campaign.new' | 'campaign' | 'templates' | 'template' | 'product' | 'proof' | 'interaction.type' | 'settings' | 'settings.domain' | 'settings.languages' | 'settings.translations' | 'settings.email' | 'settings.team' | 'settings.userGroups' | 'settings.setupLists' | 'settings.portal' | 'settings.hub' | 'settings.signIn' | 'media' | 'app' | (string & {});
|
|
114
|
+
/** What a message is about (the same shape as `comms.sendTransactional`'s `about`). Ids only. */
|
|
115
|
+
export interface DestinationAbout {
|
|
116
|
+
appId?: string;
|
|
117
|
+
type: string;
|
|
118
|
+
id: string;
|
|
119
|
+
view?: string;
|
|
120
|
+
params?: Record<string, string>;
|
|
121
|
+
label?: string;
|
|
122
|
+
}
|
|
123
|
+
/** Params for `open`: ids as strings, plus `about` (messages) and `params` (`app`). */
|
|
124
|
+
export interface OpenParams {
|
|
125
|
+
contactId?: string;
|
|
126
|
+
conversationId?: string;
|
|
127
|
+
segmentId?: string;
|
|
128
|
+
campaignId?: string;
|
|
129
|
+
templateId?: string;
|
|
130
|
+
productId?: string;
|
|
131
|
+
proofId?: string;
|
|
132
|
+
interactionId?: string;
|
|
133
|
+
appId?: string;
|
|
134
|
+
view?: string;
|
|
135
|
+
/** `message.compose` / `message.log`: the record the message is about, so it is logged against it. */
|
|
136
|
+
about?: DestinationAbout;
|
|
137
|
+
/** `app`: that app's view params. */
|
|
138
|
+
params?: Record<string, string>;
|
|
139
|
+
[key: string]: string | DestinationAbout | Record<string, string> | undefined;
|
|
140
|
+
}
|
|
141
|
+
export interface OpenResult {
|
|
142
|
+
ok: boolean;
|
|
143
|
+
/** `no-host` (not inside Studio) · `unknown` · `not-here` (its app isn't on) · `missing-param` · `preview`. */
|
|
144
|
+
reason?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The destinations this host can open here: `['contact', 'message.compose', 'settings.domain', …]`.
|
|
148
|
+
* Leaves out a screen whose app isn't on in this collection. `[]` with no host (the admin page opened
|
|
149
|
+
* on its own), after a short wait.
|
|
150
|
+
*/
|
|
151
|
+
export declare function available(): Promise<string[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Whether `open(name)` will open something here. Ask before showing a button: false when the screen's
|
|
154
|
+
* app isn't on (Messages not switched on) or there is no host. Then hide the button, or say what to
|
|
155
|
+
* switch on. Build your own only when the platform has nothing.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* const canMessage = await SL.adminViews.canOpen('message.compose')
|
|
159
|
+
*/
|
|
160
|
+
export declare function canOpen(name: Destination): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Open one of the platform's screens by name: a contact, the Messages composer, a person's messages, a
|
|
163
|
+
* template, a product, a settings page. The host (Studio) decides which app or page that is today, so
|
|
164
|
+
* the app never hard-codes another app's address or builds its own copy. Resolves with whether it
|
|
165
|
+
* opened (`{ ok: false, reason: 'no-host' }` outside Studio).
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* // Message this parent, tied to their booking (it is logged against the booking and links back)
|
|
169
|
+
* SL.adminViews.open('message.compose', {
|
|
170
|
+
* contactId,
|
|
171
|
+
* about: { type: 'booking', id: bookingId, view: 'booking', params: { bookingId }, label: 'Sat 3pm' },
|
|
172
|
+
* })
|
|
173
|
+
* SL.adminViews.open('contact', { contactId })
|
|
174
|
+
* SL.adminViews.open('settings.domain')
|
|
175
|
+
*/
|
|
176
|
+
export declare function open(to: Destination, params?: OpenParams): Promise<OpenResult>;
|
|
100
177
|
/**
|
|
101
178
|
* Ask an embedded app to open a screen. Post this only once the app has said it follows navigate
|
|
102
179
|
* (`smartlinks:navigable`); otherwise reload the frame at the new path as before.
|
|
103
180
|
*/
|
|
104
181
|
export declare function postNavigate(target: Window | null | undefined, req: NavigateRequest, targetOrigin?: string): void;
|
|
182
|
+
/** Tell an embedded app which destinations it can open here (on load, on request, and when it changes). */
|
|
183
|
+
export declare function postDestinations(target: Window | null | undefined, availableNames: string[], targetOrigin?: string): void;
|
|
184
|
+
/** Answer an app's `smartlinks:open`. */
|
|
185
|
+
export declare function postOpenResult(target: Window | null | undefined, result: {
|
|
186
|
+
id: string;
|
|
187
|
+
to: string;
|
|
188
|
+
ok: boolean;
|
|
189
|
+
reason?: string;
|
|
190
|
+
}, targetOrigin?: string): void;
|
package/dist/adminViews.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// host → app { type: 'smartlinks:navigate', view?, path?, params?, highlight? } open a screen, no reload
|
|
5
5
|
// app → host 'smartlinks:navigable' (the app follows navigate) 'smartlinks:navigate-result'
|
|
6
6
|
// app → host 'smartlinks:open-app' { appId, view?, params?, path? } open ANOTHER app at a screen
|
|
7
|
+
// app → host 'smartlinks:open' { id, to, params?, about? } open a platform screen by NAME
|
|
8
|
+
// ('contact', 'message.compose', 'settings.domain'); the host picks the app or page
|
|
7
9
|
// plus `chrome=none`: the host carries the app's menu itself, so the app hides its own.
|
|
8
10
|
// One list drives the app's own side menu, Studio's workspace menu and the assistant. See
|
|
9
11
|
// docs/admin-views.md.
|
|
@@ -256,6 +258,160 @@ export function openApp(req) {
|
|
|
256
258
|
return;
|
|
257
259
|
postParent('smartlinks:open-app', Object.assign(Object.assign(Object.assign({ appId: req.appId }, (req.view ? { view: req.view } : {})), (req.params ? { params: req.params } : {})), (req.path ? { path: req.path } : {})));
|
|
258
260
|
}
|
|
261
|
+
/** The platform's screens any admin screen can open by name. */
|
|
262
|
+
export const DESTINATIONS = [
|
|
263
|
+
// People
|
|
264
|
+
{ name: 'contacts', required: [], description: 'The contacts list in Customers.' },
|
|
265
|
+
{ name: 'contact', required: ['contactId'], description: 'One contact in Customers.' },
|
|
266
|
+
{ name: 'contact.messages', required: ['contactId'], description: "A person's messages: the Message log for them." },
|
|
267
|
+
{ name: 'conversation', required: ['conversationId'], description: 'One conversation in Messages.' },
|
|
268
|
+
{ name: 'segment', required: ['segmentId'], description: 'One segment in Customers.' },
|
|
269
|
+
// Messages
|
|
270
|
+
{ name: 'message.compose', required: [], optional: ['contactId', 'about'], description: 'The Messages composer: write to one person (or choose who).' },
|
|
271
|
+
{ name: 'message.log', required: [], optional: ['contactId', 'about'], description: 'The Message log, filtered by person or by what the messages were about.' },
|
|
272
|
+
{ name: 'campaign.new', required: [], optional: ['segmentId'], description: 'A new campaign: one message to many people, with opt-in and unsubscribe.' },
|
|
273
|
+
{ name: 'campaign', required: ['campaignId'], description: 'One campaign in Messages.' },
|
|
274
|
+
{ name: 'templates', required: [], description: 'The email and message templates.' },
|
|
275
|
+
{ name: 'template', required: ['templateId'], description: 'One template, open in the template editor.' },
|
|
276
|
+
// Catalogue and records
|
|
277
|
+
{ name: 'product', required: ['productId'], description: 'One product in Items.' },
|
|
278
|
+
{ name: 'proof', required: ['productId', 'proofId'], description: 'One item (proof) of a product.' },
|
|
279
|
+
{ name: 'interaction.type', required: ['interactionId'], description: 'One interaction type in Customers.' },
|
|
280
|
+
// Settings
|
|
281
|
+
{ name: 'settings', required: [], description: 'The business settings in Studio.' },
|
|
282
|
+
{ name: 'settings.domain', required: [], description: 'The domain settings.' },
|
|
283
|
+
{ name: 'settings.languages', required: [], description: 'The languages customers see.' },
|
|
284
|
+
{ name: 'settings.translations', required: [], description: 'Everything translated for customers.' },
|
|
285
|
+
{ name: 'settings.email', required: [], description: 'Email settings: the sending address and its look.' },
|
|
286
|
+
{ name: 'settings.team', required: [], description: 'The people who run the business in Studio.' },
|
|
287
|
+
{ name: 'settings.userGroups', required: [], description: 'User groups.' },
|
|
288
|
+
{ name: 'settings.setupLists', required: [], optional: ['appId'], description: "Set-up lists (an app's lists the business keeps)." },
|
|
289
|
+
{ name: 'settings.portal', required: [], description: 'The Portal: what people see when they scan.' },
|
|
290
|
+
{ name: 'settings.hub', required: [], description: 'The Hub: the ready-made site.' },
|
|
291
|
+
{ name: 'settings.signIn', required: [], description: 'Customer sign-in.' },
|
|
292
|
+
{ name: 'media', required: [], description: 'Images and files (assets).' },
|
|
293
|
+
// Anything else
|
|
294
|
+
{ name: 'app', required: ['appId'], optional: ['view', 'params'], description: "Another app at one of its screens (as `openApp`)." },
|
|
295
|
+
];
|
|
296
|
+
const ANSWER_MS = 1500;
|
|
297
|
+
let available_ = null;
|
|
298
|
+
let listening = false;
|
|
299
|
+
const openWaiters = new Map();
|
|
300
|
+
const listWaiters = new Set();
|
|
301
|
+
function cleanAbout(a) {
|
|
302
|
+
if (!a || typeof a !== 'object')
|
|
303
|
+
return undefined;
|
|
304
|
+
const o = a;
|
|
305
|
+
if (typeof o.type !== 'string' || typeof o.id !== 'string' || !o.type || !o.id)
|
|
306
|
+
return undefined;
|
|
307
|
+
const out = { type: o.type, id: o.id };
|
|
308
|
+
if (typeof o.appId === 'string')
|
|
309
|
+
out.appId = o.appId;
|
|
310
|
+
if (typeof o.view === 'string')
|
|
311
|
+
out.view = o.view;
|
|
312
|
+
if (typeof o.label === 'string')
|
|
313
|
+
out.label = o.label;
|
|
314
|
+
if (o.params && typeof o.params === 'object')
|
|
315
|
+
out.params = stringsOnly(o.params);
|
|
316
|
+
return out;
|
|
317
|
+
}
|
|
318
|
+
function stringsOnly(o) {
|
|
319
|
+
const out = {};
|
|
320
|
+
if (o && typeof o === 'object')
|
|
321
|
+
for (const [k, v] of Object.entries(o))
|
|
322
|
+
if (typeof v === 'string' && v)
|
|
323
|
+
out[k] = v;
|
|
324
|
+
return out;
|
|
325
|
+
}
|
|
326
|
+
function listen() {
|
|
327
|
+
if (listening || typeof window === 'undefined' || !inIframe())
|
|
328
|
+
return;
|
|
329
|
+
listening = true;
|
|
330
|
+
window.addEventListener('message', (e) => {
|
|
331
|
+
if (e.source !== window.parent)
|
|
332
|
+
return;
|
|
333
|
+
const d = e.data;
|
|
334
|
+
if (!d || typeof d !== 'object')
|
|
335
|
+
return;
|
|
336
|
+
if (d.type === 'smartlinks:destinations' && Array.isArray(d.available)) {
|
|
337
|
+
available_ = d.available.filter((n) => typeof n === 'string');
|
|
338
|
+
for (const w of listWaiters)
|
|
339
|
+
w(available_);
|
|
340
|
+
listWaiters.clear();
|
|
341
|
+
}
|
|
342
|
+
else if (d.type === 'smartlinks:open-result' && typeof d.id === 'string') {
|
|
343
|
+
const w = openWaiters.get(d.id);
|
|
344
|
+
if (w) {
|
|
345
|
+
openWaiters.delete(d.id);
|
|
346
|
+
w(Object.assign({ ok: !!d.ok }, (typeof d.reason === 'string' ? { reason: d.reason } : {})));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* The destinations this host can open here: `['contact', 'message.compose', 'settings.domain', …]`.
|
|
353
|
+
* Leaves out a screen whose app isn't on in this collection. `[]` with no host (the admin page opened
|
|
354
|
+
* on its own), after a short wait.
|
|
355
|
+
*/
|
|
356
|
+
export function available() {
|
|
357
|
+
if (typeof window === 'undefined' || !inIframe())
|
|
358
|
+
return Promise.resolve([]);
|
|
359
|
+
listen();
|
|
360
|
+
if (available_)
|
|
361
|
+
return Promise.resolve(available_);
|
|
362
|
+
return new Promise((resolve) => {
|
|
363
|
+
const done = (list) => { clearTimeout(timer); resolve(list); };
|
|
364
|
+
const timer = setTimeout(() => { listWaiters.delete(done); resolve([]); }, ANSWER_MS);
|
|
365
|
+
listWaiters.add(done);
|
|
366
|
+
postParent('smartlinks:destinations-request', {});
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Whether `open(name)` will open something here. Ask before showing a button: false when the screen's
|
|
371
|
+
* app isn't on (Messages not switched on) or there is no host. Then hide the button, or say what to
|
|
372
|
+
* switch on. Build your own only when the platform has nothing.
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* const canMessage = await SL.adminViews.canOpen('message.compose')
|
|
376
|
+
*/
|
|
377
|
+
export async function canOpen(name) {
|
|
378
|
+
return (await available()).includes(name);
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Open one of the platform's screens by name: a contact, the Messages composer, a person's messages, a
|
|
382
|
+
* template, a product, a settings page. The host (Studio) decides which app or page that is today, so
|
|
383
|
+
* the app never hard-codes another app's address or builds its own copy. Resolves with whether it
|
|
384
|
+
* opened (`{ ok: false, reason: 'no-host' }` outside Studio).
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* // Message this parent, tied to their booking (it is logged against the booking and links back)
|
|
388
|
+
* SL.adminViews.open('message.compose', {
|
|
389
|
+
* contactId,
|
|
390
|
+
* about: { type: 'booking', id: bookingId, view: 'booking', params: { bookingId }, label: 'Sat 3pm' },
|
|
391
|
+
* })
|
|
392
|
+
* SL.adminViews.open('contact', { contactId })
|
|
393
|
+
* SL.adminViews.open('settings.domain')
|
|
394
|
+
*/
|
|
395
|
+
export function open(to, params = {}) {
|
|
396
|
+
if (typeof to !== 'string' || !to)
|
|
397
|
+
return Promise.resolve({ ok: false, reason: 'unknown' });
|
|
398
|
+
if (typeof window === 'undefined' || !inIframe())
|
|
399
|
+
return Promise.resolve({ ok: false, reason: 'no-host' });
|
|
400
|
+
listen();
|
|
401
|
+
const id = `o_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
402
|
+
const flat = {};
|
|
403
|
+
for (const [k, v] of Object.entries(params || {}))
|
|
404
|
+
if (k !== 'about' && k !== 'params' && typeof v === 'string' && v)
|
|
405
|
+
flat[k] = v;
|
|
406
|
+
const about = cleanAbout(params === null || params === void 0 ? void 0 : params.about);
|
|
407
|
+
const appParams = (params === null || params === void 0 ? void 0 : params.params) ? stringsOnly(params.params) : undefined;
|
|
408
|
+
return new Promise((resolve) => {
|
|
409
|
+
const timer = setTimeout(() => { openWaiters.delete(id); resolve({ ok: false, reason: 'no-host' }); }, ANSWER_MS);
|
|
410
|
+
openWaiters.set(id, (r) => { clearTimeout(timer); resolve(r); });
|
|
411
|
+
postParent('smartlinks:open', Object.assign(Object.assign({ id,
|
|
412
|
+
to, params: flat }, (about ? { about } : {})), (appParams ? { appParams } : {})));
|
|
413
|
+
});
|
|
414
|
+
}
|
|
259
415
|
// -----------------------------------------------------------------------------
|
|
260
416
|
// Host side
|
|
261
417
|
// -----------------------------------------------------------------------------
|
|
@@ -273,3 +429,25 @@ export function postNavigate(target, req, targetOrigin = '*') {
|
|
|
273
429
|
/* ignore */
|
|
274
430
|
}
|
|
275
431
|
}
|
|
432
|
+
/** Tell an embedded app which destinations it can open here (on load, on request, and when it changes). */
|
|
433
|
+
export function postDestinations(target, availableNames, targetOrigin = '*') {
|
|
434
|
+
if (!target)
|
|
435
|
+
return;
|
|
436
|
+
try {
|
|
437
|
+
target.postMessage({ type: 'smartlinks:destinations', available: availableNames }, targetOrigin);
|
|
438
|
+
}
|
|
439
|
+
catch (_a) {
|
|
440
|
+
/* ignore */
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/** Answer an app's `smartlinks:open`. */
|
|
444
|
+
export function postOpenResult(target, result, targetOrigin = '*') {
|
|
445
|
+
if (!target)
|
|
446
|
+
return;
|
|
447
|
+
try {
|
|
448
|
+
target.postMessage(Object.assign({ type: 'smartlinks:open-result' }, result), targetOrigin);
|
|
449
|
+
}
|
|
450
|
+
catch (_a) {
|
|
451
|
+
/* ignore */
|
|
452
|
+
}
|
|
453
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { AddressFront, AddressNameAvailability, AddressResponse } from "../types/address.js";
|
|
2
|
+
/**
|
|
3
|
+
* The business's address in one place (admin): its name, what its front page shows, and its apps' pages
|
|
4
|
+
* under `/_apps/<name>/` (prove docs/design/business-address.md, app-page-addresses.md). Changes reach
|
|
5
|
+
* visitors within about a minute.
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace address {
|
|
8
|
+
/** Everything about the business's address: name, own domain, front page, websites that can take it, app pages. */
|
|
9
|
+
function get(collectionId: string): Promise<AddressResponse>;
|
|
10
|
+
/** Is this name free? (lower-case letters, numbers and hyphens) */
|
|
11
|
+
function checkName(collectionId: string, name: string): Promise<AddressNameAvailability>;
|
|
12
|
+
/**
|
|
13
|
+
* Choose (or change) the business's name: `<name>.smartlinks.host`. The previous name is released.
|
|
14
|
+
* @throws ErrorResponse 400 BAD_NAME, 409 NAME_TAKEN
|
|
15
|
+
*/
|
|
16
|
+
function setName(collectionId: string, name: string): Promise<{
|
|
17
|
+
name: string;
|
|
18
|
+
host: string;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* What the front page shows. Applies to the business's name, its automatic address and its own domain
|
|
22
|
+
* together. A website must be installed and live; a redirect must be https and not one of its own addresses.
|
|
23
|
+
* @throws ErrorResponse 400 BAD_FRONT | BAD_URL | REDIRECT_LOOP, 404 APP_NOT_INSTALLED, 409 PRODUCTION_ONLY | NOT_A_WEBSITE
|
|
24
|
+
*/
|
|
25
|
+
function setFront(collectionId: string, front: AddressFront): Promise<{
|
|
26
|
+
front: AddressFront;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Rename an app's page (old names keep redirecting) and/or show it on the holding page.
|
|
30
|
+
* @throws ErrorResponse 400 PAGE_NAME_INVALID, 404 APP_NOT_INSTALLED, 409 PAGE_NAME_TAKEN
|
|
31
|
+
*/
|
|
32
|
+
function setPage(collectionId: string, appId: string, change: {
|
|
33
|
+
name?: string;
|
|
34
|
+
listed?: boolean;
|
|
35
|
+
}): Promise<{
|
|
36
|
+
name?: string;
|
|
37
|
+
listed?: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { request, post } from "../http.js";
|
|
2
|
+
/**
|
|
3
|
+
* The business's address in one place (admin): its name, what its front page shows, and its apps' pages
|
|
4
|
+
* under `/_apps/<name>/` (prove docs/design/business-address.md, app-page-addresses.md). Changes reach
|
|
5
|
+
* visitors within about a minute.
|
|
6
|
+
*/
|
|
7
|
+
export var address;
|
|
8
|
+
(function (address) {
|
|
9
|
+
const base = (collectionId) => `/admin/collection/${encodeURIComponent(collectionId)}/address`;
|
|
10
|
+
/** Everything about the business's address: name, own domain, front page, websites that can take it, app pages. */
|
|
11
|
+
async function get(collectionId) {
|
|
12
|
+
return request(base(collectionId));
|
|
13
|
+
}
|
|
14
|
+
address.get = get;
|
|
15
|
+
/** Is this name free? (lower-case letters, numbers and hyphens) */
|
|
16
|
+
async function checkName(collectionId, name) {
|
|
17
|
+
return request(`${base(collectionId)}/available?${new URLSearchParams({ name })}`);
|
|
18
|
+
}
|
|
19
|
+
address.checkName = checkName;
|
|
20
|
+
/**
|
|
21
|
+
* Choose (or change) the business's name: `<name>.smartlinks.host`. The previous name is released.
|
|
22
|
+
* @throws ErrorResponse 400 BAD_NAME, 409 NAME_TAKEN
|
|
23
|
+
*/
|
|
24
|
+
async function setName(collectionId, name) {
|
|
25
|
+
return post(`${base(collectionId)}/name`, { name });
|
|
26
|
+
}
|
|
27
|
+
address.setName = setName;
|
|
28
|
+
/**
|
|
29
|
+
* What the front page shows. Applies to the business's name, its automatic address and its own domain
|
|
30
|
+
* together. A website must be installed and live; a redirect must be https and not one of its own addresses.
|
|
31
|
+
* @throws ErrorResponse 400 BAD_FRONT | BAD_URL | REDIRECT_LOOP, 404 APP_NOT_INSTALLED, 409 PRODUCTION_ONLY | NOT_A_WEBSITE
|
|
32
|
+
*/
|
|
33
|
+
async function setFront(collectionId, front) {
|
|
34
|
+
return post(`${base(collectionId)}/front`, front);
|
|
35
|
+
}
|
|
36
|
+
address.setFront = setFront;
|
|
37
|
+
/**
|
|
38
|
+
* Rename an app's page (old names keep redirecting) and/or show it on the holding page.
|
|
39
|
+
* @throws ErrorResponse 400 PAGE_NAME_INVALID, 404 APP_NOT_INSTALLED, 409 PAGE_NAME_TAKEN
|
|
40
|
+
*/
|
|
41
|
+
async function setPage(collectionId, appId, change) {
|
|
42
|
+
return post(`${base(collectionId)}/pages/${encodeURIComponent(appId)}`, change);
|
|
43
|
+
}
|
|
44
|
+
address.setPage = setPage;
|
|
45
|
+
})(address || (address = {}));
|
package/dist/api/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export { functions } from "./functions.js";
|
|
|
39
39
|
export { location } from "./location.js";
|
|
40
40
|
export * as realtime from "./realtime.js";
|
|
41
41
|
export { adminCards } from "./adminCards.js";
|
|
42
|
+
export { address } from "./address.js";
|
|
42
43
|
export { tags } from "./tags.js";
|
|
43
44
|
export { order } from "./order.js";
|
|
44
45
|
export { app } from "./appObjects.js";
|
package/dist/api/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export { location } from "./location.js";
|
|
|
42
42
|
import * as realtime_1 from "./realtime.js";
|
|
43
43
|
export { realtime_1 as realtime };
|
|
44
44
|
export { adminCards } from "./adminCards.js";
|
|
45
|
+
export { address } from "./address.js";
|
|
45
46
|
export { tags } from "./tags.js";
|
|
46
47
|
export { order } from "./order.js";
|
|
47
48
|
export { app } from "./appObjects.js";
|
|
@@ -54,8 +54,11 @@ export declare namespace interactions {
|
|
|
54
54
|
* @example
|
|
55
55
|
* const vote = await SL.interactions.ensureType(collectionId, {
|
|
56
56
|
* appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true },
|
|
57
|
+
* display: { title: 'Cast a vote', description: 'Someone voted in the poll' },
|
|
57
58
|
* })
|
|
58
59
|
* // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
60
|
+
* // Always give display.title: it's the name staff see in the CRM, on activity and when choosing
|
|
61
|
+
* // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
59
62
|
*/
|
|
60
63
|
function ensureType(collectionId: string, input: EnsureInteractionTypeInput): Promise<InteractionTypeRecord>;
|
|
61
64
|
function get(collectionId: string, id: string): Promise<InteractionTypeRecord>;
|
package/dist/api/interactions.js
CHANGED
|
@@ -111,8 +111,11 @@ export var interactions;
|
|
|
111
111
|
* @example
|
|
112
112
|
* const vote = await SL.interactions.ensureType(collectionId, {
|
|
113
113
|
* appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true },
|
|
114
|
+
* display: { title: 'Cast a vote', description: 'Someone voted in the poll' },
|
|
114
115
|
* })
|
|
115
116
|
* // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
117
|
+
* // Always give display.title: it's the name staff see in the CRM, on activity and when choosing
|
|
118
|
+
* // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
116
119
|
*/
|
|
117
120
|
async function ensureType(collectionId, input) {
|
|
118
121
|
const { appId, key, permissions, display, data } = input;
|
package/dist/context.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ export interface SmartLinksContext {
|
|
|
15
15
|
* (`appChannel: 'preview'`) on this collection. Set by Forge; never present elsewhere.
|
|
16
16
|
*/
|
|
17
17
|
slPreview?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Where the app's page lives on the business's address when served as an app page
|
|
20
|
+
* (`/_apps/<name>`): build share links to the app from it. Absent elsewhere.
|
|
21
|
+
*/
|
|
22
|
+
basePath?: string;
|
|
18
23
|
/** Any other declared view params (e.g. pageId, voteId, orientation, tvMode). */
|
|
19
24
|
[key: string]: string | undefined;
|
|
20
25
|
}
|
package/dist/context.js
CHANGED
|
@@ -42,7 +42,7 @@ export function readContext(overrides) {
|
|
|
42
42
|
}
|
|
43
43
|
// 4. the SITE the page is served as (lowest precedence). When an app runs as a public website at
|
|
44
44
|
// its own hostname (an "app site"), the host page injects window.__SMARTLINKS_SITE__ =
|
|
45
|
-
// { collectionId, appId, channel, host } — so a site knows its collection with no URL params.
|
|
45
|
+
// { collectionId, appId, channel, host[, basePath] } — so a site knows its collection with no URL params.
|
|
46
46
|
const site = globalThis.__SMARTLINKS_SITE__;
|
|
47
47
|
if (site && typeof site === 'object') {
|
|
48
48
|
const fill = (key, value) => { if (out[key] == null && typeof value === 'string' && value)
|
|
@@ -55,6 +55,9 @@ export function readContext(overrides) {
|
|
|
55
55
|
fill('appChannelApp', site.appId);
|
|
56
56
|
}
|
|
57
57
|
fill('slPreview', site.previewPass);
|
|
58
|
+
// Served as an app page on the business's address (/_apps/<name>): where the page lives.
|
|
59
|
+
if (typeof site.basePath === 'string' && /^\/_apps\/[a-z0-9-]+$/.test(site.basePath))
|
|
60
|
+
fill('basePath', site.basePath);
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
catch (_a) {
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.33 | Generated: 2026-11-20T18:06:02.523Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -137,6 +137,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
137
137
|
- **serialNumber** - Assign, lookup, and manage serial numbers across scopes.
|
|
138
138
|
|
|
139
139
|
— Other —
|
|
140
|
+
- **address** - Functions for address operations
|
|
140
141
|
- **adminCards** - Functions for adminCards operations
|
|
141
142
|
- **aiGuide** - Functions for aiGuide operations
|
|
142
143
|
- **analytics** - Functions for analytics operations
|
|
@@ -487,6 +488,53 @@ Examples include:
|
|
|
487
488
|
|
|
488
489
|
## Types
|
|
489
490
|
|
|
491
|
+
### address
|
|
492
|
+
|
|
493
|
+
**AddressPage** (interface)
|
|
494
|
+
```typescript
|
|
495
|
+
interface AddressPage {
|
|
496
|
+
appId: string
|
|
497
|
+
title: string
|
|
498
|
+
name: string
|
|
499
|
+
defaultName: string
|
|
500
|
+
listed: boolean
|
|
501
|
+
url: string
|
|
502
|
+
}
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
**AddressWebsite** (interface)
|
|
506
|
+
```typescript
|
|
507
|
+
interface AddressWebsite {
|
|
508
|
+
appId: string
|
|
509
|
+
title: string
|
|
510
|
+
live: boolean
|
|
511
|
+
channel: string | null
|
|
512
|
+
}
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**AddressResponse** (interface)
|
|
516
|
+
```typescript
|
|
517
|
+
interface AddressResponse {
|
|
518
|
+
name: string | null
|
|
519
|
+
host: string
|
|
520
|
+
defaultHost: string | null
|
|
521
|
+
domain: { host: string; live: boolean } | null
|
|
522
|
+
front: AddressFront
|
|
523
|
+
websites: AddressWebsite[]
|
|
524
|
+
pages: AddressPage[]
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
**AddressNameAvailability** (interface)
|
|
529
|
+
```typescript
|
|
530
|
+
interface AddressNameAvailability {
|
|
531
|
+
available: boolean
|
|
532
|
+
host: string
|
|
533
|
+
}
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**AddressFront** = ``
|
|
537
|
+
|
|
490
538
|
### adminCards
|
|
491
539
|
|
|
492
540
|
**AdminCardRefresh** (interface)
|
|
@@ -12796,6 +12844,23 @@ interface Gs1DigitalLinkParams {
|
|
|
12796
12844
|
|
|
12797
12845
|
## API Functions
|
|
12798
12846
|
|
|
12847
|
+
### address
|
|
12848
|
+
|
|
12849
|
+
**get**(collectionId: string) → `Promise<AddressResponse>`
|
|
12850
|
+
Everything about the business's address: name, own domain, front page, websites that can take it, app pages.
|
|
12851
|
+
|
|
12852
|
+
**checkName**(collectionId: string, name: string) → `Promise<AddressNameAvailability>`
|
|
12853
|
+
Is this name free? (lower-case letters, numbers and hyphens)
|
|
12854
|
+
|
|
12855
|
+
**setName**(collectionId: string, name: string) → `Promise<`
|
|
12856
|
+
Choose (or change) the business's name: `<name>.smartlinks.host`. The previous name is released.
|
|
12857
|
+
|
|
12858
|
+
**setFront**(collectionId: string, front: AddressFront) → `Promise<`
|
|
12859
|
+
What the front page shows. Applies to the business's name, its automatic address and its own domain together. A website must be installed and live; a redirect must be https and not one of its own addresses.
|
|
12860
|
+
|
|
12861
|
+
**setPage**(collectionId: string, appId: string, change: { name?: string; listed?: boolean }) → `Promise<`
|
|
12862
|
+
Rename an app's page (old names keep redirecting) and/or show it on the holding page.
|
|
12863
|
+
|
|
12799
12864
|
### adminCards
|
|
12800
12865
|
|
|
12801
12866
|
**list**(collectionId: string) → `Promise<AdminCardsResponse>`
|
|
@@ -14568,38 +14633,38 @@ POST /api/v1/public/collection/:collectionId/interactions/submit Submits an inte
|
|
|
14568
14633
|
|
|
14569
14634
|
**ensureType**(collectionId: string,
|
|
14570
14635
|
input: EnsureInteractionTypeInput) → `Promise<InteractionTypeRecord>`
|
|
14571
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14636
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14572
14637
|
|
|
14573
14638
|
**get**(collectionId: string,
|
|
14574
14639
|
id: string) → `Promise<InteractionTypeRecord>`
|
|
14575
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14640
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14576
14641
|
|
|
14577
14642
|
**update**(collectionId: string,
|
|
14578
14643
|
id: string,
|
|
14579
14644
|
patchBody: UpdateInteractionTypeBody) → `Promise<InteractionTypeRecord>`
|
|
14580
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14645
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14581
14646
|
|
|
14582
14647
|
**remove**(collectionId: string,
|
|
14583
14648
|
id: string) → `Promise<void>`
|
|
14584
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14649
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14585
14650
|
|
|
14586
14651
|
**publicCountsByOutcome**(collectionId: string,
|
|
14587
14652
|
body: PublicInteractionsCountsByOutcomeRequest,
|
|
14588
14653
|
authToken?: string) → `Promise<OutcomeCount[]>`
|
|
14589
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14654
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14590
14655
|
|
|
14591
14656
|
**publicMyInteractions**(collectionId: string,
|
|
14592
14657
|
body: PublicInteractionsByUserRequest,
|
|
14593
14658
|
authToken?: string) → `Promise<InteractionEventRow[]>`
|
|
14594
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14659
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14595
14660
|
|
|
14596
14661
|
**publicList**(collectionId: string,
|
|
14597
14662
|
query: ListInteractionTypesQuery = {}) → `Promise<InteractionTypeList>`
|
|
14598
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14663
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14599
14664
|
|
|
14600
14665
|
**publicGet**(collectionId: string,
|
|
14601
14666
|
id: string) → `Promise<InteractionTypeRecord>`
|
|
14602
|
-
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId
|
|
14667
|
+
Find this app's interaction type by its readable `key` (data.interactionType), or create it. Returns the type record — its `id` is the server-minted UUID every event must use. ADMIN only (run it in your admin/setup screen), then store the id in your app config so public code can read it: `interactionIds: { vote: type.id }`. Safe to run on every setup. const vote = await SL.interactions.ensureType(collectionId, { appId: 'my-app', key: 'vote', permissions: { allowPublicSubmit: true, uniquePerUser: true }, display: { title: 'Cast a vote', description: 'Someone voted in the poll' }, }) // vote.id → '52bab6fa-…' — store it in config; never hardcode 'vote' as an interactionId // Always give display.title: it's the name staff see in the CRM, on activity and when choosing // "everyone who voted" for a segment. (Without one the platform names it from the key.)
|
|
14603
14668
|
|
|
14604
14669
|
### jobs
|
|
14605
14670
|
|