@sess.si/sdk 0.4.0 → 0.5.0
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 +5 -0
- package/README.md +18 -16
- package/dist/ask.d.ts +5 -5
- package/dist/ask.js +6 -6
- package/dist/commerce/builders.d.ts +2 -2
- package/dist/commerce/builders.js +4 -4
- package/dist/commerce/items.d.ts +3 -3
- package/dist/commerce/items.js +2 -2
- package/dist/errors.d.ts +1 -1
- package/dist/generated/openapi.d.ts +6388 -2539
- package/dist/internal/version.d.ts +1 -1
- package/dist/internal/version.js +1 -1
- package/dist/types.d.ts +13 -13
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This package's version, sent in the User-Agent header. Tests check it against package.json. */
|
|
2
|
-
export declare const SDK_VERSION = "0.
|
|
2
|
+
export declare const SDK_VERSION = "0.5.0";
|
package/dist/internal/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This package's version, sent in the User-Agent header. Tests check it against package.json. */
|
|
2
|
-
export const SDK_VERSION = '0.
|
|
2
|
+
export const SDK_VERSION = '0.5.0';
|
package/dist/types.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export interface ItemsComponent {
|
|
|
112
112
|
name?: string;
|
|
113
113
|
/** 1–100 rows, in order. */
|
|
114
114
|
rows: {
|
|
115
|
-
/** What one line is: at most
|
|
115
|
+
/** What one line is: at most 30. Example: `Design retainer, October` */
|
|
116
116
|
name: string;
|
|
117
117
|
/** Optional second line: quantity, unit price or a reference; at most 160. Example: `3 × $150.00` */
|
|
118
118
|
detail?: string;
|
|
@@ -140,7 +140,7 @@ export interface ItemsComponent {
|
|
|
140
140
|
* `length` (on `SessError`) name the value and the most it may have.
|
|
141
141
|
*/
|
|
142
142
|
export type SurfaceComponent = (Component<'heading'> & {
|
|
143
|
-
/** A section heading: a few words; at most
|
|
143
|
+
/** A section heading: a few words; at most 40. Example: `Order details` */
|
|
144
144
|
text: string;
|
|
145
145
|
}) | (Component<'text'> & {
|
|
146
146
|
/**
|
|
@@ -152,21 +152,21 @@ export type SurfaceComponent = (Component<'heading'> & {
|
|
|
152
152
|
/** Optional caption above the record: a few words; at most 200. Example: `Order 1042` */
|
|
153
153
|
label?: string;
|
|
154
154
|
/**
|
|
155
|
-
* Rows shown verbatim, 1–50. A row's name: a word or two; at most
|
|
155
|
+
* Rows shown verbatim, 1–50. A row's name: a word or two; at most 24 (example `Amount`).
|
|
156
156
|
* A row's value: a string of at most 200, or a number, boolean or null (example `$120.00`).
|
|
157
157
|
*/
|
|
158
158
|
fields: {
|
|
159
159
|
[key: string]: string | number | boolean | null;
|
|
160
160
|
};
|
|
161
161
|
}) | (Omit<Component<'field'>, 'schema'> & {
|
|
162
|
-
/** What the field asks for: short, a few words; at most
|
|
162
|
+
/** What the field asks for: short, a few words; at most 40. Example: `Refund amount` */
|
|
163
163
|
label: string;
|
|
164
164
|
/**
|
|
165
|
-
* Optional help under the label: one hint; at most
|
|
165
|
+
* Optional help under the label: one hint; at most 120.
|
|
166
166
|
* Example: `Leave it as is to refund the full amount.`
|
|
167
167
|
*/
|
|
168
168
|
description?: string;
|
|
169
|
-
/** The words shown for one choice: short; at most
|
|
169
|
+
/** The words shown for one choice: short; at most 30. Example: `Next Monday` */
|
|
170
170
|
option_labels?: {
|
|
171
171
|
[key: string]: string;
|
|
172
172
|
};
|
|
@@ -182,24 +182,24 @@ export type SurfaceComponent = (Component<'heading'> & {
|
|
|
182
182
|
schema: FieldSchema;
|
|
183
183
|
}) | ItemsComponent;
|
|
184
184
|
type DocumentedAction = RawPublishSessionRequest['interaction']['actions'][number] & {
|
|
185
|
-
/** A button: a verb, 1–3 words; at most
|
|
185
|
+
/** A button: a verb, 1–3 words; at most 16. Examples: `Approve`, `Send refund` */
|
|
186
186
|
label: string;
|
|
187
187
|
};
|
|
188
188
|
/**
|
|
189
189
|
* An interactive Surface: a title, plain-text components and typed fields, and 1–5 actions.
|
|
190
|
-
* Limits in Unicode code points: title
|
|
191
|
-
* caption 200, row name
|
|
192
|
-
*
|
|
190
|
+
* Limits in Unicode code points: title 60, description 200, heading 40, text 4000, record
|
|
191
|
+
* caption 200, row name 24, row string value 200, field label 40, field help 120, option label
|
|
192
|
+
* 30, button 16; at most 5 actions.
|
|
193
193
|
*/
|
|
194
194
|
export type InteractiveInteraction = Omit<RawPublishSessionRequest['interaction'], 'source' | 'actions'> & {
|
|
195
195
|
/**
|
|
196
|
-
* The page's heading: a question or a task, about 40 characters; at most
|
|
196
|
+
* The page's heading: a question or a task, about 40 characters; at most 60.
|
|
197
197
|
* Examples: `Approve the refund?`, `Pick a delivery date`
|
|
198
198
|
*/
|
|
199
199
|
title: string;
|
|
200
200
|
/**
|
|
201
201
|
* Optional context under the title: what the person decides and why, in one or two plain
|
|
202
|
-
* sentences; at most
|
|
202
|
+
* sentences; at most 200. Example: `The customer was charged twice for order 1042.`
|
|
203
203
|
*/
|
|
204
204
|
description?: string;
|
|
205
205
|
/**
|
|
@@ -211,7 +211,7 @@ export type InteractiveInteraction = Omit<RawPublishSessionRequest['interaction'
|
|
|
211
211
|
kind: 'sess_surface';
|
|
212
212
|
components: SurfaceComponent[];
|
|
213
213
|
};
|
|
214
|
-
/** The buttons, 1–5. A button: a verb, 1–3 words; at most
|
|
214
|
+
/** The buttons, 1–5. A button: a verb, 1–3 words; at most 16. */
|
|
215
215
|
actions: DocumentedAction[];
|
|
216
216
|
};
|
|
217
217
|
export type CreateSessionRequest = {
|
package/package.json
CHANGED