@sylphx/sdk 0.31.0 → 0.32.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.
Files changed (120) hide show
  1. package/README.md +131 -4
  2. package/dist/access.d.ts +146 -17
  3. package/dist/access.js +114 -8
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +1564 -0
  6. package/dist/agents.js +1096 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/ai.d.ts +1 -2
  9. package/dist/ai.js +2 -3
  10. package/dist/ai.js.map +1 -1
  11. package/dist/artifacts.d.ts +1 -1
  12. package/dist/artifacts.js +2 -2
  13. package/dist/assets.d.ts +447 -0
  14. package/dist/assets.js +266 -0
  15. package/dist/assets.js.map +1 -0
  16. package/dist/auth/client.d.ts +239 -0
  17. package/dist/auth/client.js +337 -0
  18. package/dist/auth/client.js.map +1 -0
  19. package/dist/auth/end-user-keys-mock.d.ts +83 -0
  20. package/dist/auth/end-user-keys-mock.js +427 -0
  21. package/dist/auth/end-user-keys-mock.js.map +1 -0
  22. package/dist/auth/end-user-keys.d.ts +219 -0
  23. package/dist/auth/end-user-keys.js +240 -0
  24. package/dist/auth/end-user-keys.js.map +1 -0
  25. package/dist/auth/verify.d.ts +38 -3
  26. package/dist/auth/verify.js +58 -8
  27. package/dist/auth/verify.js.map +1 -1
  28. package/dist/auth.d.ts +656 -9
  29. package/dist/auth.js +563 -6
  30. package/dist/auth.js.map +1 -1
  31. package/dist/billing.d.ts +99 -21
  32. package/dist/billing.js +43 -5
  33. package/dist/billing.js.map +1 -1
  34. package/dist/broker.d.ts +5 -4
  35. package/dist/broker.js +3 -3
  36. package/dist/broker.js.map +1 -1
  37. package/dist/build.d.ts +362 -29
  38. package/dist/build.js +302 -10
  39. package/dist/build.js.map +1 -1
  40. package/dist/common.d.ts +1 -1
  41. package/dist/common.js +1 -1
  42. package/dist/config/flags.d.ts +140 -0
  43. package/dist/config/flags.js +462 -0
  44. package/dist/config/flags.js.map +1 -0
  45. package/dist/config.d.ts +380 -15
  46. package/dist/config.js +283 -5
  47. package/dist/config.js.map +1 -1
  48. package/dist/connections.d.ts +6 -6
  49. package/dist/connections.js +3 -3
  50. package/dist/data.d.ts +612 -7
  51. package/dist/data.js +566 -4
  52. package/dist/data.js.map +1 -1
  53. package/dist/entitlement.d.ts +10 -8
  54. package/dist/entitlement.js +3 -4
  55. package/dist/entitlement.js.map +1 -1
  56. package/dist/events/realtime.d.ts +69 -0
  57. package/dist/events/realtime.js +107 -0
  58. package/dist/events/realtime.js.map +1 -0
  59. package/dist/events/webhooks.d.ts +40 -0
  60. package/dist/events/webhooks.js +110 -0
  61. package/dist/events/webhooks.js.map +1 -0
  62. package/dist/events.d.ts +369 -22
  63. package/dist/events.js +311 -8
  64. package/dist/events.js.map +1 -1
  65. package/dist/flags.d.ts +18 -0
  66. package/dist/flags.js +44 -0
  67. package/dist/flags.js.map +1 -0
  68. package/dist/hosting.d.ts +13 -14
  69. package/dist/hosting.js +3 -4
  70. package/dist/hosting.js.map +1 -1
  71. package/dist/ids.d.ts +987 -0
  72. package/dist/ids.js +317 -0
  73. package/dist/ids.js.map +1 -0
  74. package/dist/index.d.ts +25 -1
  75. package/dist/index.js +34 -2
  76. package/dist/index.js.map +1 -1
  77. package/dist/keys.d.ts +2 -2
  78. package/dist/keys.js +3 -3
  79. package/dist/knowledge.d.ts +1192 -0
  80. package/dist/knowledge.js +1002 -0
  81. package/dist/knowledge.js.map +1 -0
  82. package/dist/localization.d.ts +663 -0
  83. package/dist/localization.js +491 -0
  84. package/dist/localization.js.map +1 -0
  85. package/dist/methods.js +3251 -133
  86. package/dist/methods.js.map +1 -1
  87. package/dist/money.d.ts +3086 -0
  88. package/dist/money.js +2358 -0
  89. package/dist/money.js.map +1 -0
  90. package/dist/network.d.ts +4 -5
  91. package/dist/network.js +3 -4
  92. package/dist/network.js.map +1 -1
  93. package/dist/notify.d.ts +667 -125
  94. package/dist/notify.js +471 -73
  95. package/dist/notify.js.map +1 -1
  96. package/dist/observability.d.ts +322 -7
  97. package/dist/observability.js +244 -8
  98. package/dist/observability.js.map +1 -1
  99. package/dist/realtime.d.ts +404 -0
  100. package/dist/realtime.js +312 -0
  101. package/dist/realtime.js.map +1 -0
  102. package/dist/release.d.ts +14 -15
  103. package/dist/release.js +3 -4
  104. package/dist/release.js.map +1 -1
  105. package/dist/runners.d.ts +2 -3
  106. package/dist/runners.js +3 -4
  107. package/dist/runners.js.map +1 -1
  108. package/dist/runtime.d.ts +5 -1
  109. package/dist/runtime.js +7 -3
  110. package/dist/runtime.js.map +1 -1
  111. package/dist/sandboxes.d.ts +64 -20
  112. package/dist/sandboxes.js +9 -4
  113. package/dist/sandboxes.js.map +1 -1
  114. package/dist/secrets.d.ts +342 -6
  115. package/dist/secrets.js +271 -4
  116. package/dist/secrets.js.map +1 -1
  117. package/dist/workflows.d.ts +969 -15
  118. package/dist/workflows.js +815 -6
  119. package/dist/workflows.js.map +1 -1
  120. package/package.json +2 -2
@@ -0,0 +1,663 @@
1
+ import * as runtime from './runtime.js';
2
+ import './common.js';
3
+ import type * as common from './common.js';
4
+ /**
5
+ * A Catalog is a string catalog: one source locale, its target locales, and
6
+ * how to translate them. Its entries are written by `:sync`; `:export` returns
7
+ * the files per locale.
8
+ */
9
+ export interface Catalog {
10
+ /** `orgs/{org}/projects/{project}/envs/{env}/catalogs/{catalog}`. */
11
+ name?: string;
12
+ /** `cat_<cell><ulid>`; never reused. */
13
+ readonly uid?: string;
14
+ /** Resource metadata. */
15
+ meta?: common.ResourceMeta;
16
+ /** Desired state. */
17
+ spec?: CatalogSpec;
18
+ /** Observed state. */
19
+ readonly status?: CatalogStatus;
20
+ }
21
+ /**
22
+ * A Catalog Entry is one source message and its translations. `:sync` writes
23
+ * it; it is never created directly. Its id is a stable hash of the file and
24
+ * key, assigned by the server.
25
+ */
26
+ export interface CatalogEntry {
27
+ /** `orgs/{org}/projects/{project}/envs/{env}/catalogs/{catalog}/entries/{entry}`. */
28
+ name?: string;
29
+ /** `ent_<cell><ulid>`; never reused. */
30
+ readonly uid?: string;
31
+ /** Resource metadata. */
32
+ meta?: common.ResourceMeta;
33
+ /**
34
+ * The source text plus an optional `|context`, or an id for id-keyed
35
+ * formats.
36
+ */
37
+ readonly key?: string;
38
+ /**
39
+ * The source file's path within the upload; empty for a single-file
40
+ * catalog.
41
+ */
42
+ readonly file?: string;
43
+ /** The source message, a Unicode MessageFormat 2 pattern. */
44
+ readonly sourceText?: string;
45
+ /** Disambiguates the same text with different meanings. */
46
+ readonly context?: string;
47
+ /** A note for translators. */
48
+ readonly description?: string;
49
+ /** The longest a translation may be, in characters; 0 is no limit. */
50
+ readonly maxLength?: number;
51
+ /**
52
+ * The first 16 lowercase hex characters of the SHA-256 of the UTF-8 source
53
+ * pattern. A translation is stale when its source hash differs.
54
+ */
55
+ readonly sourceHash?: string;
56
+ /** Whether the source still has this message. */
57
+ readonly state?: EntryState;
58
+ /** The translations, one per target locale at most. */
59
+ readonly translations?: Translation[];
60
+ /** When the entry was first synced. */
61
+ readonly createTime?: string;
62
+ /** When the entry last changed. */
63
+ readonly updateTime?: string;
64
+ }
65
+ /** A CatalogFile is one file of a catalog. */
66
+ export interface CatalogFile {
67
+ /**
68
+ * The file's path. The service does not interpret it and echoes it back, for
69
+ * example a namespace file name.
70
+ */
71
+ path?: string;
72
+ /** The file's locale, a BCP 47 tag. */
73
+ locale?: string;
74
+ /** The file's text, UTF-8; at most 4 MiB. */
75
+ content?: string;
76
+ }
77
+ /** CatalogSpec is the caller-writable state of a Catalog. */
78
+ export interface CatalogSpec {
79
+ /** The locale the source texts are written in, a BCP 47 tag such as `en`. */
80
+ sourceLocale?: string;
81
+ /**
82
+ * The locales to translate into, BCP 47 tags. `zh-Hant-HK` and `zh-Hant-TW`
83
+ * are separate locales. At most 60, each once.
84
+ */
85
+ targetLocales?: string[];
86
+ /**
87
+ * Pseudo-locales to generate at export. They are never stored or
88
+ * translated.
89
+ */
90
+ pseudoLocales?: PseudoLocale[];
91
+ /** The brand voice every translation follows, at most 2000 characters. */
92
+ tone?: string;
93
+ /**
94
+ * Extra instructions per target locale, for example the vocabulary of a
95
+ * region. Keys are target locales; at most 60 entries, each at most 2000
96
+ * characters.
97
+ */
98
+ localeGuidance?: Record<string, string>;
99
+ /** The glossaries this catalog applies, as Glossary names; at most 10. */
100
+ glossaries?: string[];
101
+ }
102
+ /** CatalogStatus is the observed state of a Catalog. */
103
+ export interface CatalogStatus {
104
+ /** The generation this status was computed from. */
105
+ readonly observedGeneration?: string;
106
+ /** Ready, Reconciling, Stalled. */
107
+ readonly conditions?: common.Condition[];
108
+ /** The number of active entries. */
109
+ readonly entryCount?: number;
110
+ /** Progress per target locale. */
111
+ readonly locales?: LocaleProgress[];
112
+ /** When `:sync` last completed. */
113
+ readonly lastSyncTime?: string;
114
+ }
115
+ /** The request of CreateCatalog. */
116
+ export interface CreateCatalogRequest {
117
+ /** The parent to create in. */
118
+ parent: string;
119
+ /**
120
+ * The catalog id, the final name segment; the server assigns one when
121
+ * empty.
122
+ */
123
+ catalogId?: string;
124
+ /** The catalog to create; only caller-writable fields are read. */
125
+ catalog: Catalog;
126
+ /** Validate and return the result without writing anything. */
127
+ validateOnly?: boolean;
128
+ }
129
+ /** The request of CreateGlossary. */
130
+ export interface CreateGlossaryRequest {
131
+ /** The parent to create in. */
132
+ parent: string;
133
+ /**
134
+ * The glossary id, the final name segment; the server assigns one when
135
+ * empty.
136
+ */
137
+ glossaryId?: string;
138
+ /** The glossary to create; only caller-writable fields are read. */
139
+ glossary: Glossary;
140
+ /** Validate and return the result without writing anything. */
141
+ validateOnly?: boolean;
142
+ }
143
+ /** The request of DeleteCatalog. */
144
+ export interface DeleteCatalogRequest {
145
+ /** The name of the catalog to delete. */
146
+ name: string;
147
+ /** Delete only if the current etag matches. */
148
+ etag?: string;
149
+ /** Succeed when the catalog does not exist. */
150
+ allowMissing?: boolean;
151
+ /** Validate without deleting anything. */
152
+ validateOnly?: boolean;
153
+ /**
154
+ * Also delete the catalog's entries; without it, a catalog that has entries
155
+ * is refused with `INVALID_STATE`.
156
+ */
157
+ force?: boolean;
158
+ }
159
+ /** The request of DeleteGlossary. */
160
+ export interface DeleteGlossaryRequest {
161
+ /** The name of the glossary to delete. */
162
+ name: string;
163
+ /** Delete only if the current etag matches. */
164
+ etag?: string;
165
+ /** Succeed when the glossary does not exist. */
166
+ allowMissing?: boolean;
167
+ /** Validate without deleting anything. */
168
+ validateOnly?: boolean;
169
+ }
170
+ /** The request of ExportCatalog. */
171
+ export interface ExportCatalogRequest {
172
+ /** The name of the catalog. */
173
+ name: string;
174
+ /** The format of the files. */
175
+ format: Format;
176
+ /** The locales to export; default every target locale and the pseudo-locales. */
177
+ locales?: string[];
178
+ /**
179
+ * Emit the source text for keys that have no passing translation, for
180
+ * runtimes that do not fall back to the source themselves.
181
+ */
182
+ sourceFallback?: boolean;
183
+ }
184
+ /** The response of ExportCatalog. */
185
+ export interface ExportCatalogResponse {
186
+ /** One file per source file per locale, with the source file's `path`. */
187
+ files?: CatalogFile[];
188
+ /** The QA report. A translation with an error is never exported. */
189
+ report?: QaReport;
190
+ /** Translations still to make. */
191
+ pending?: number;
192
+ /** The characters each locale's texts use. */
193
+ glyphSets?: GlyphSet[];
194
+ }
195
+ /** The request of GetCatalogEntry. */
196
+ export interface GetCatalogEntryRequest {
197
+ /** The name of the catalog entry to get. */
198
+ name: string;
199
+ }
200
+ /** The request of GetCatalog. */
201
+ export interface GetCatalogRequest {
202
+ /** The name of the catalog to get. */
203
+ name: string;
204
+ }
205
+ /** The request of GetGlossary. */
206
+ export interface GetGlossaryRequest {
207
+ /** The name of the glossary to get. */
208
+ name: string;
209
+ }
210
+ /**
211
+ * A Glossary is the terms shared by the catalogs that name it, one per brand
212
+ * or product family.
213
+ */
214
+ export interface Glossary {
215
+ /** `orgs/{org}/projects/{project}/envs/{env}/glossaries/{glossary}`. */
216
+ name?: string;
217
+ /** `gls_<cell><ulid>`; never reused. */
218
+ readonly uid?: string;
219
+ /** Resource metadata. */
220
+ meta?: common.ResourceMeta;
221
+ /** Desired state. */
222
+ spec?: GlossarySpec;
223
+ /** Observed state. */
224
+ readonly status?: GlossaryStatus;
225
+ }
226
+ /** GlossarySpec is the caller-writable state of a Glossary. */
227
+ export interface GlossarySpec {
228
+ /** The terms; at most 5000. */
229
+ terms?: GlossaryTerm[];
230
+ }
231
+ /** GlossaryStatus is the observed state of a Glossary. */
232
+ export interface GlossaryStatus {
233
+ /** The generation this status was computed from. */
234
+ readonly observedGeneration?: string;
235
+ /** Ready, Reconciling, Stalled. */
236
+ readonly conditions?: common.Condition[];
237
+ /** The number of terms. */
238
+ readonly termCount?: number;
239
+ }
240
+ /** A GlossaryTerm is one term and the rule for it. */
241
+ export interface GlossaryTerm {
242
+ /** The term, as written in the source. */
243
+ term?: string;
244
+ /** A note for translators, at most 500 characters. */
245
+ description?: string;
246
+ /** What to do with the term. */
247
+ rule?: TermRule;
248
+ /** Locale to the required translation; used by `TERM_RULE_TRANSLATE`. */
249
+ translations?: Record<string, string>;
250
+ /** Suggested wording; used by `TERM_RULE_FORBIDDEN`. */
251
+ replacement?: string;
252
+ /** The locales the term applies to; empty is every locale. */
253
+ locales?: string[];
254
+ /** Match the term's letter case exactly. */
255
+ caseSensitive?: boolean;
256
+ }
257
+ /** A GlyphSet is the characters one locale uses, for font atlases. */
258
+ export interface GlyphSet {
259
+ /** The locale. */
260
+ locale?: string;
261
+ /** Every distinct character the locale's texts use, sorted. */
262
+ characters?: string;
263
+ }
264
+ /** The request of ListCatalogEntries. */
265
+ export interface ListCatalogEntriesRequest {
266
+ /** The catalog to list in. */
267
+ parent: string;
268
+ /** At most this many; default 50, clamped to 1000. */
269
+ pageSize?: number;
270
+ /** `next_page_token` of the previous page. */
271
+ pageToken?: string;
272
+ /**
273
+ * AIP-160 filter, limited to `state`, `locale`, and `qa_state`; for example
274
+ * `state = ENTRY_STATE_ACTIVE AND locale = "ja" AND qa_state = QA_STATE_FAILED`.
275
+ */
276
+ filter?: string;
277
+ }
278
+ /** The response of ListCatalogEntries. */
279
+ export interface ListCatalogEntriesResponse {
280
+ /** The page. */
281
+ catalogEntries?: CatalogEntry[];
282
+ /** The token of the next page; empty on the last page. */
283
+ nextPageToken?: string;
284
+ }
285
+ /** The request of ListCatalogs. */
286
+ export interface ListCatalogsRequest {
287
+ /** The parent to list in. */
288
+ parent: string;
289
+ /** At most this many; default 50, clamped to 1000. */
290
+ pageSize?: number;
291
+ /** `next_page_token` of the previous page. */
292
+ pageToken?: string;
293
+ /** AIP-160 filter over labels and filterable fields. */
294
+ filter?: string;
295
+ /** AIP-132 ordering over filterable fields. */
296
+ orderBy?: string;
297
+ }
298
+ /** The response of ListCatalogs. */
299
+ export interface ListCatalogsResponse {
300
+ /** The page. */
301
+ catalogs?: Catalog[];
302
+ /** The token of the next page; empty on the last page. */
303
+ nextPageToken?: string;
304
+ }
305
+ /** The request of ListGlossaries. */
306
+ export interface ListGlossariesRequest {
307
+ /** The parent to list in. */
308
+ parent: string;
309
+ /** At most this many; default 50, clamped to 1000. */
310
+ pageSize?: number;
311
+ /** `next_page_token` of the previous page. */
312
+ pageToken?: string;
313
+ /** AIP-160 filter over labels and filterable fields. */
314
+ filter?: string;
315
+ /** AIP-132 ordering over filterable fields. */
316
+ orderBy?: string;
317
+ }
318
+ /** The response of ListGlossaries. */
319
+ export interface ListGlossariesResponse {
320
+ /** The page. */
321
+ glossaries?: Glossary[];
322
+ /** The token of the next page; empty on the last page. */
323
+ nextPageToken?: string;
324
+ }
325
+ /** LocaleProgress counts the active entries of one target locale by state. */
326
+ export interface LocaleProgress {
327
+ /** The target locale. */
328
+ readonly locale?: string;
329
+ /** Entries with a translation that passed QA. */
330
+ readonly translated?: number;
331
+ /** Entries still to translate. */
332
+ readonly pending?: number;
333
+ /** Entries whose translation still fails QA after repair. */
334
+ readonly failed?: number;
335
+ /** Entries with a human-pinned translation. */
336
+ readonly pinned?: number;
337
+ }
338
+ /** The request of PinTranslation. */
339
+ export interface PinTranslationRequest {
340
+ /** The name of the catalog entry. */
341
+ name: string;
342
+ /** The target locale. */
343
+ locale: string;
344
+ /** The translated message, a Unicode MessageFormat 2 pattern. */
345
+ text: string;
346
+ }
347
+ /** A QaFinding is one problem QA found in a translation. */
348
+ export interface QaFinding {
349
+ /** The Catalog Entry, as a resource name. */
350
+ readonly entry?: string;
351
+ /** The entry's key. */
352
+ readonly key?: string;
353
+ /** The target locale. */
354
+ readonly locale?: string;
355
+ /** The check that found it. */
356
+ readonly check?: QaCheck;
357
+ /** How serious it is. */
358
+ readonly severity?: QaSeverity;
359
+ /** What is wrong. */
360
+ readonly message?: string;
361
+ }
362
+ /** A QaReport is the QA result of an export. */
363
+ export interface QaReport {
364
+ /** Whether there are no errors. */
365
+ passed?: boolean;
366
+ /** The number of errors. */
367
+ errors?: number;
368
+ /** The number of warnings. */
369
+ warnings?: number;
370
+ /** The findings. */
371
+ findings?: QaFinding[];
372
+ }
373
+ /** The request of SyncCatalog. */
374
+ export interface SyncCatalogRequest {
375
+ /** The name of the catalog. */
376
+ name: string;
377
+ /** The format of the files. */
378
+ format: Format;
379
+ /** The source-locale files; 1 to 500. */
380
+ sources: CatalogFile[];
381
+ /**
382
+ * The committed target-locale files; at most 10000. A text that differs from
383
+ * the service's last export is recorded as a pinned human override.
384
+ */
385
+ translations?: CatalogFile[];
386
+ /** Validate the files and return the counts without writing or translating. */
387
+ validateOnly?: boolean;
388
+ }
389
+ /** The response of SyncCatalog. */
390
+ export interface SyncCatalogResponse {
391
+ /** The catalog after this call. */
392
+ catalog?: Catalog;
393
+ /** Entries new in the source. */
394
+ added?: number;
395
+ /** Entries whose source changed. */
396
+ changed?: number;
397
+ /** Entries no longer in the source. */
398
+ obsoleted?: number;
399
+ /** Existing translations taken from the committed files. */
400
+ adopted?: number;
401
+ /** Committed edits recorded as human overrides. */
402
+ pinned?: number;
403
+ /** Translations made by this call. */
404
+ translated?: number;
405
+ /** Translations still to make; call again until it is 0. */
406
+ pending?: number;
407
+ /** Translations still failing QA after repair. */
408
+ failed?: number;
409
+ /** What this call used. */
410
+ usage?: Usage;
411
+ }
412
+ /** A Translation is the text of one entry in one target locale. */
413
+ export interface Translation {
414
+ /** The target locale. */
415
+ readonly locale?: string;
416
+ /** The translated message, a Unicode MessageFormat 2 pattern. */
417
+ readonly text?: string;
418
+ /** Where the text came from. */
419
+ readonly origin?: TranslationOrigin;
420
+ /** A human override that AI never overwrites. */
421
+ readonly pinned?: boolean;
422
+ /** The source changed since this text was made. */
423
+ readonly stale?: boolean;
424
+ /** The result of QA on the text. */
425
+ readonly qaState?: QaState;
426
+ /** What QA found. */
427
+ readonly findings?: QaFinding[];
428
+ /** When the text last changed. */
429
+ readonly updateTime?: string;
430
+ }
431
+ /** The request of UnpinTranslation. */
432
+ export interface UnpinTranslationRequest {
433
+ /** The name of the catalog entry. */
434
+ name: string;
435
+ /** The target locale. */
436
+ locale: string;
437
+ }
438
+ /** The request of UpdateCatalog. */
439
+ export interface UpdateCatalogRequest {
440
+ /** The catalog to update; `name` identifies it. */
441
+ catalog: Catalog;
442
+ /** The fields to write; unset writes every populated field. */
443
+ updateMask?: string;
444
+ /** Create the catalog when it does not exist (declarative upsert). */
445
+ allowMissing?: boolean;
446
+ /** Validate and return the result without writing anything. */
447
+ validateOnly?: boolean;
448
+ }
449
+ /** The request of UpdateGlossary. */
450
+ export interface UpdateGlossaryRequest {
451
+ /** The glossary to update; `name` identifies it. */
452
+ glossary: Glossary;
453
+ /** The fields to write; unset writes every populated field. */
454
+ updateMask?: string;
455
+ /** Create the glossary when it does not exist (declarative upsert). */
456
+ allowMissing?: boolean;
457
+ /** Validate and return the result without writing anything. */
458
+ validateOnly?: boolean;
459
+ }
460
+ /** Usage is what one call consumed. */
461
+ export interface Usage {
462
+ /**
463
+ * Source characters translated by this call, per target locale; the billed
464
+ * quantity.
465
+ */
466
+ translatedCharacters?: string;
467
+ /** Translations reused from the translation memory, which are free. */
468
+ memoryMatches?: number;
469
+ }
470
+ /** EntryState is whether a Catalog Entry is still in the source. */
471
+ export type EntryState = 'active' | 'obsolete' | (string & {});
472
+ /**
473
+ * A file format the catalog is read from and written to. The canonical
474
+ * catalog is `FORMAT_SYLPHX_JSON`; every other format is an adapter, never a
475
+ * second store.
476
+ */
477
+ export type Format = 'sylphx_json' | 'icu_json' | 'gettext_po' | 'xliff2' | (string & {});
478
+ /** A pseudo-locale is a synthetic locale generated at export to test layout. */
479
+ export type PseudoLocale = 'accented' | 'bidi' | 'wide' | (string & {});
480
+ /** QaCheck is a QA check. */
481
+ export type QaCheck = 'syntax' | 'placeholders' | 'markup' | 'plural' | 'length' | 'glossary' | 'forbidden_term' | (string & {});
482
+ /** QaSeverity is how serious a QA finding is. */
483
+ export type QaSeverity = 'error' | 'warning' | (string & {});
484
+ /** QaState is the QA result of a translation. */
485
+ export type QaState = 'passed' | 'warning' | 'failed' | 'pending' | (string & {});
486
+ /** TermRule is what a glossary term requires. */
487
+ export type TermRule = 'translate' | 'keep' | 'forbidden' | (string & {});
488
+ /** TranslationOrigin is where a translation's text came from. */
489
+ export type TranslationOrigin = 'ai' | 'memory' | 'human' | 'imported' | (string & {});
490
+ /**
491
+ * LocalizationService is Sylphx Localization: translate an app's strings in CI
492
+ * with AI, a translation memory, and a glossary. A Catalog holds the source
493
+ * messages and their translations; `:sync` translates what is new or changed,
494
+ * and `:export` returns the files per locale with a QA report. Translation
495
+ * happens only in these calls, never at build or run time.
496
+ *
497
+ * Namespace of Sylphx Localization on `Sylphx`.
498
+ */
499
+ export declare class LocalizationApi {
500
+ /** The `catalogs` collection. */
501
+ readonly catalogs: CatalogsCollection;
502
+ /** The `entries` collection. */
503
+ readonly entries: EntriesCollection;
504
+ /** The `glossaries` collection. */
505
+ readonly glossaries: GlossariesCollection;
506
+ constructor(client: runtime.Client);
507
+ }
508
+ /** `catalogs` of Sylphx Localization: Resource type `localization.sylphx.com/Catalog`. */
509
+ export declare class CatalogsCollection {
510
+ private readonly client;
511
+ constructor(client: runtime.Client);
512
+ /**
513
+ * Gets a catalog.
514
+ *
515
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*}` · permission `localization:read` · effect `read`
516
+ *
517
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
518
+ */
519
+ get(request: GetCatalogRequest): Promise<Catalog>;
520
+ /**
521
+ * Lists catalogs.
522
+ *
523
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/catalogs` · permission `localization:read` · effect `read`
524
+ *
525
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
526
+ */
527
+ list(request: ListCatalogsRequest): Promise<ListCatalogsResponse>;
528
+ /** Every item of every page of `list`. */
529
+ listAll(request: ListCatalogsRequest): AsyncGenerator<Catalog>;
530
+ /**
531
+ * Creates a catalog.
532
+ *
533
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/catalogs` · permission `localization:write` · effect `write`
534
+ *
535
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
536
+ */
537
+ create(request: CreateCatalogRequest): Promise<Catalog>;
538
+ /**
539
+ * Updates a catalog.
540
+ *
541
+ * `PATCH /v1/{catalog.name=orgs/*\/projects/*\/envs/*\/catalogs/*}` · permission `localization:write` · effect `write`
542
+ *
543
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
544
+ */
545
+ update(request: UpdateCatalogRequest): Promise<Catalog>;
546
+ /**
547
+ * Deletes a catalog.
548
+ *
549
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*}` · permission `localization:write` · effect `destructive`
550
+ *
551
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
552
+ */
553
+ delete(request: DeleteCatalogRequest): Promise<Record<string, never>>;
554
+ /**
555
+ * Reads the source files and the committed translations into the catalog,
556
+ * then translates what is new or stale. Each call is idempotent and works
557
+ * within a bounded time; call again until `pending` is 0.
558
+ *
559
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*}:sync` · permission `localization:write` · effect `write`
560
+ *
561
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `RATE_LIMITED`, `SPEND_LIMIT_REACHED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
562
+ */
563
+ sync(request: SyncCatalogRequest): Promise<SyncCatalogResponse>;
564
+ /**
565
+ * Returns the catalog's files per locale in the requested format, with the QA
566
+ * report. A read with a request body, like a query.
567
+ *
568
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*}:export` · permission `localization:read` · effect `read`
569
+ *
570
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
571
+ */
572
+ export(request: ExportCatalogRequest): Promise<ExportCatalogResponse>;
573
+ }
574
+ /** `entries` of Sylphx Localization: Resource type `localization.sylphx.com/CatalogEntry`. */
575
+ export declare class EntriesCollection {
576
+ private readonly client;
577
+ constructor(client: runtime.Client);
578
+ /**
579
+ * Gets a catalog entry.
580
+ *
581
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*\/entries/*}` · permission `localization:read` · effect `read`
582
+ *
583
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
584
+ */
585
+ get(request: GetCatalogEntryRequest): Promise<CatalogEntry>;
586
+ /**
587
+ * Lists catalog entries. The filter is limited to `state`, `locale`, and
588
+ * `qa_state`.
589
+ *
590
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/catalogs/*}/entries` · permission `localization:read` · effect `read`
591
+ *
592
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
593
+ */
594
+ list(request: ListCatalogEntriesRequest): Promise<ListCatalogEntriesResponse>;
595
+ /** Every item of every page of `list`. */
596
+ listAll(request: ListCatalogEntriesRequest): AsyncGenerator<CatalogEntry>;
597
+ /**
598
+ * Sets the text of one locale as a human override that AI never overwrites.
599
+ * QA runs on the text first; a text with a QA error is rejected with
600
+ * `INVALID_FIELD`, and the problem lists the findings.
601
+ *
602
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*\/entries/*}:pinTranslation` · permission `localization:write` · effect `write`
603
+ *
604
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
605
+ */
606
+ pinTranslation(request: PinTranslationRequest): Promise<CatalogEntry>;
607
+ /**
608
+ * Removes the human override of one locale; the next sync may translate it
609
+ * again.
610
+ *
611
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/catalogs/*\/entries/*}:unpinTranslation` · permission `localization:write` · effect `write`
612
+ *
613
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
614
+ */
615
+ unpinTranslation(request: UnpinTranslationRequest): Promise<CatalogEntry>;
616
+ }
617
+ /** `glossaries` of Sylphx Localization: Resource type `localization.sylphx.com/Glossary`. */
618
+ export declare class GlossariesCollection {
619
+ private readonly client;
620
+ constructor(client: runtime.Client);
621
+ /**
622
+ * Gets a glossary.
623
+ *
624
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/glossaries/*}` · permission `localization:read` · effect `read`
625
+ *
626
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
627
+ */
628
+ get(request: GetGlossaryRequest): Promise<Glossary>;
629
+ /**
630
+ * Lists glossarys.
631
+ *
632
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/glossaries` · permission `localization:read` · effect `read`
633
+ *
634
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
635
+ */
636
+ list(request: ListGlossariesRequest): Promise<ListGlossariesResponse>;
637
+ /** Every item of every page of `list`. */
638
+ listAll(request: ListGlossariesRequest): AsyncGenerator<Glossary>;
639
+ /**
640
+ * Creates a glossary.
641
+ *
642
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/glossaries` · permission `localization:write` · effect `write`
643
+ *
644
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
645
+ */
646
+ create(request: CreateGlossaryRequest): Promise<Glossary>;
647
+ /**
648
+ * Updates a glossary.
649
+ *
650
+ * `PATCH /v1/{glossary.name=orgs/*\/projects/*\/envs/*\/glossaries/*}` · permission `localization:write` · effect `write`
651
+ *
652
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
653
+ */
654
+ update(request: UpdateGlossaryRequest): Promise<Glossary>;
655
+ /**
656
+ * Deletes a glossary.
657
+ *
658
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/glossaries/*}` · permission `localization:write` · effect `destructive`
659
+ *
660
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
661
+ */
662
+ delete(request: DeleteGlossaryRequest): Promise<Record<string, never>>;
663
+ }