@fias/arche-sdk 2.27.0 → 2.29.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.
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Platform limits a plugin designs its UI around — the same numbers the
3
+ * server enforces, so an app can stop a person before a call is refused
4
+ * instead of hand-copying them.
5
+ *
6
+ * Duplicated as literals because the SDK ships inside plugin iframes and has
7
+ * no dependency on the platform packages; each object is pinned BY EQUALITY to
8
+ * the server's own constant by `tests/architecture/sdk-platform-limits-match.test.ts`,
9
+ * so a server change that is not mirrored here fails CI.
10
+ */
11
+ /** X `publish_post` (`useFiasX().publishPost`). X counts characters its own way and refuses an over-long post itself. */
12
+ export declare const X_PUBLISH_LIMITS: {
13
+ readonly MAX_TEXT_CHARACTERS: 25000;
14
+ readonly MAX_IMAGES_PER_POST: 4;
15
+ readonly MAX_IMAGES_PER_PUBLISH: 4;
16
+ readonly MAX_THREAD_POSTS: 10;
17
+ readonly MIN_POLL_OPTIONS: 2;
18
+ readonly MAX_POLL_OPTIONS: 4;
19
+ readonly MAX_POLL_OPTION_CHARACTERS: 25;
20
+ readonly MIN_POLL_MINUTES: 5;
21
+ readonly MAX_POLL_MINUTES: 10080;
22
+ readonly IMAGE_MIME_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "image/gif"];
23
+ readonly MAX_IMAGE_BYTES: number;
24
+ };
25
+ /** LinkedIn `publish_post` (`useFiasLinkedIn().publishPost`). */
26
+ export declare const LINKEDIN_PUBLISH_LIMITS: {
27
+ readonly MAX_TEXT_CHARACTERS: 3000;
28
+ readonly MAX_IMAGES: 9;
29
+ readonly IMAGE_MIME_TYPES: readonly ["image/png", "image/jpeg", "image/gif"];
30
+ readonly MAX_IMAGE_BYTES: number;
31
+ };
32
+ /** Scheduled calls (`useFiasSchedules`). */
33
+ export declare const SCHEDULE_LIMITS: {
34
+ /** Waiting at once, per person, per app. */
35
+ readonly MAX_ACTIVE_PER_USER_ARCHE: 25;
36
+ /** The earliest a call may be scheduled, from now. */
37
+ readonly MIN_LEAD_SECONDS: number;
38
+ /** The latest, from now. */
39
+ readonly MAX_LEAD_DAYS: 60;
40
+ };
41
+ /** The Data Store (`useFiasDataStore`). */
42
+ export declare const DATA_STORE_LIMITS: {
43
+ /** One document's `data`, serialized. */
44
+ readonly MAX_DOCUMENT_SIZE_BYTES: number;
45
+ /** Per owner — one user, one workspace, or the app's shared data — per collection. */
46
+ readonly MAX_DOCUMENTS_PER_OWNER_PER_COLLECTION: 10000;
47
+ /** Writes in one atomic `batch`. */
48
+ readonly MAX_BATCH_OPERATIONS: 100;
49
+ };
50
+ /** Calls per minute, per person, per app — the Data Store's own budgets. */
51
+ export declare const DATA_STORE_RATE_LIMITS_PER_MINUTE: {
52
+ readonly put: 120;
53
+ readonly get: 300;
54
+ readonly query: 60;
55
+ readonly delete: 60;
56
+ /** Counted in units of 25 operations: a full 100-op batch is 4. */
57
+ readonly batch: 30;
58
+ };
59
+ /** The manifest's `fiasAI` block (`fias-plugin.json`). */
60
+ export declare const FIAS_AI_MANIFEST_LIMITS: {
61
+ readonly MAX_ACTIONS: 30;
62
+ readonly MAX_ID_LENGTH: 100;
63
+ readonly MAX_DESCRIPTION_LENGTH: 1000;
64
+ readonly MAX_CATEGORY_LENGTH: 100;
65
+ readonly MAX_BLOCK_DESCRIPTION_LENGTH: 2000;
66
+ readonly MAX_PARAMETER_SCHEMA_BYTES: 4096;
67
+ readonly MAX_AVAILABLE_WHEN_KEYS: 8;
68
+ readonly MAX_AVAILABLE_WHEN_KEY_LENGTH: 64;
69
+ readonly MAX_AVAILABLE_WHEN_STRING_LENGTH: 100;
70
+ readonly MAX_BLOCK_SERIALIZED_BYTES: number;
71
+ };
72
+ //# sourceMappingURL=limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,yHAAyH;AACzH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAYnB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,uBAAuB;;;;;CAK1B,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,eAAe;IAC1B,4CAA4C;;IAE5C,sDAAsD;;IAEtD,4BAA4B;;CAEpB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,iBAAiB;IAC5B,yCAAyC;;IAEzC,sFAAsF;;IAEtF,oCAAoC;;CAE5B,CAAC;AAEX,4EAA4E;AAC5E,eAAO,MAAM,iCAAiC;;;;;IAK5C,mEAAmE;;CAE3D,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAW1B,CAAC"}
package/dist/limits.js ADDED
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /**
3
+ * Platform limits a plugin designs its UI around — the same numbers the
4
+ * server enforces, so an app can stop a person before a call is refused
5
+ * instead of hand-copying them.
6
+ *
7
+ * Duplicated as literals because the SDK ships inside plugin iframes and has
8
+ * no dependency on the platform packages; each object is pinned BY EQUALITY to
9
+ * the server's own constant by `tests/architecture/sdk-platform-limits-match.test.ts`,
10
+ * so a server change that is not mirrored here fails CI.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.FIAS_AI_MANIFEST_LIMITS = exports.DATA_STORE_RATE_LIMITS_PER_MINUTE = exports.DATA_STORE_LIMITS = exports.SCHEDULE_LIMITS = exports.LINKEDIN_PUBLISH_LIMITS = exports.X_PUBLISH_LIMITS = void 0;
14
+ /** X `publish_post` (`useFiasX().publishPost`). X counts characters its own way and refuses an over-long post itself. */
15
+ exports.X_PUBLISH_LIMITS = {
16
+ MAX_TEXT_CHARACTERS: 25000,
17
+ MAX_IMAGES_PER_POST: 4,
18
+ MAX_IMAGES_PER_PUBLISH: 4,
19
+ MAX_THREAD_POSTS: 10,
20
+ MIN_POLL_OPTIONS: 2,
21
+ MAX_POLL_OPTIONS: 4,
22
+ MAX_POLL_OPTION_CHARACTERS: 25,
23
+ MIN_POLL_MINUTES: 5,
24
+ MAX_POLL_MINUTES: 10080,
25
+ IMAGE_MIME_TYPES: ['image/png', 'image/jpeg', 'image/webp', 'image/gif'],
26
+ MAX_IMAGE_BYTES: 5 * 1024 * 1024,
27
+ };
28
+ /** LinkedIn `publish_post` (`useFiasLinkedIn().publishPost`). */
29
+ exports.LINKEDIN_PUBLISH_LIMITS = {
30
+ MAX_TEXT_CHARACTERS: 3000,
31
+ MAX_IMAGES: 9,
32
+ IMAGE_MIME_TYPES: ['image/png', 'image/jpeg', 'image/gif'],
33
+ MAX_IMAGE_BYTES: 8 * 1024 * 1024,
34
+ };
35
+ /** Scheduled calls (`useFiasSchedules`). */
36
+ exports.SCHEDULE_LIMITS = {
37
+ /** Waiting at once, per person, per app. */
38
+ MAX_ACTIVE_PER_USER_ARCHE: 25,
39
+ /** The earliest a call may be scheduled, from now. */
40
+ MIN_LEAD_SECONDS: 5 * 60,
41
+ /** The latest, from now. */
42
+ MAX_LEAD_DAYS: 60,
43
+ };
44
+ /** The Data Store (`useFiasDataStore`). */
45
+ exports.DATA_STORE_LIMITS = {
46
+ /** One document's `data`, serialized. */
47
+ MAX_DOCUMENT_SIZE_BYTES: 100 * 1024,
48
+ /** Per owner — one user, one workspace, or the app's shared data — per collection. */
49
+ MAX_DOCUMENTS_PER_OWNER_PER_COLLECTION: 10000,
50
+ /** Writes in one atomic `batch`. */
51
+ MAX_BATCH_OPERATIONS: 100,
52
+ };
53
+ /** Calls per minute, per person, per app — the Data Store's own budgets. */
54
+ exports.DATA_STORE_RATE_LIMITS_PER_MINUTE = {
55
+ put: 120,
56
+ get: 300,
57
+ query: 60,
58
+ delete: 60,
59
+ /** Counted in units of 25 operations: a full 100-op batch is 4. */
60
+ batch: 30,
61
+ };
62
+ /** The manifest's `fiasAI` block (`fias-plugin.json`). */
63
+ exports.FIAS_AI_MANIFEST_LIMITS = {
64
+ MAX_ACTIONS: 30,
65
+ MAX_ID_LENGTH: 100,
66
+ MAX_DESCRIPTION_LENGTH: 1000,
67
+ MAX_CATEGORY_LENGTH: 100,
68
+ MAX_BLOCK_DESCRIPTION_LENGTH: 2000,
69
+ MAX_PARAMETER_SCHEMA_BYTES: 4096,
70
+ MAX_AVAILABLE_WHEN_KEYS: 8,
71
+ MAX_AVAILABLE_WHEN_KEY_LENGTH: 64,
72
+ MAX_AVAILABLE_WHEN_STRING_LENGTH: 100,
73
+ MAX_BLOCK_SERIALIZED_BYTES: 32 * 1024,
74
+ };
75
+ //# sourceMappingURL=limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.js","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,yHAAyH;AAC5G,QAAA,gBAAgB,GAAG;IAC9B,mBAAmB,EAAE,KAAM;IAC3B,mBAAmB,EAAE,CAAC;IACtB,sBAAsB,EAAE,CAAC;IACzB,gBAAgB,EAAE,EAAE;IACpB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,0BAA0B,EAAE,EAAE;IAC9B,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,KAAM;IACxB,gBAAgB,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,CAAC;IACxE,eAAe,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI;CACxB,CAAC;AAEX,iEAAiE;AACpD,QAAA,uBAAuB,GAAG;IACrC,mBAAmB,EAAE,IAAK;IAC1B,UAAU,EAAE,CAAC;IACb,gBAAgB,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;IAC1D,eAAe,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI;CACxB,CAAC;AAEX,4CAA4C;AAC/B,QAAA,eAAe,GAAG;IAC7B,4CAA4C;IAC5C,yBAAyB,EAAE,EAAE;IAC7B,sDAAsD;IACtD,gBAAgB,EAAE,CAAC,GAAG,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