samva 0.16.0 → 0.17.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.
Files changed (127) hide show
  1. package/AGENTS.md +4 -1
  2. package/README.md +44 -1
  3. package/dist/analytics-CaqPRsry.js +207 -0
  4. package/dist/api-keys-Ce1Y4_Ip.js +274 -0
  5. package/dist/attachments-DYqVIraC.js +140 -0
  6. package/dist/brands-ZwuOGIWO.js +175 -0
  7. package/dist/campaigns-DZlz1E9E.js +522 -0
  8. package/dist/categories-CA4XIQAb.js +1011 -0
  9. package/dist/client/sdk.gen.d.ts +174 -3
  10. package/dist/client/types.gen.d.ts +1126 -11
  11. package/dist/client-DOzUrdTE.js +1115 -0
  12. package/dist/contact-groups-BLbFXnjq.js +446 -0
  13. package/dist/contacts-BbsoXXB4.js +787 -0
  14. package/dist/conversations-_sRHueML.js +494 -0
  15. package/dist/custom-fields-BHWbwlKn.js +176 -0
  16. package/dist/effect/analytics.js +2 -21
  17. package/dist/effect/api-keys.d.ts +1 -1
  18. package/dist/effect/api-keys.js +2 -28
  19. package/dist/effect/attachments.js +2 -17
  20. package/dist/effect/brands.d.ts +1 -1
  21. package/dist/effect/brands.js +3 -24
  22. package/dist/effect/campaigns.js +2 -33
  23. package/dist/effect/categories.js +1 -1
  24. package/dist/effect/client.d.ts +1 -1
  25. package/dist/effect/client.js +3 -4
  26. package/dist/effect/contact-groups.js +2 -29
  27. package/dist/effect/contacts.d.ts +52 -0
  28. package/dist/effect/contacts.js +2 -47
  29. package/dist/effect/conversations.js +2 -35
  30. package/dist/effect/custom-fields.js +2 -17
  31. package/dist/effect/email.d.ts +3 -2
  32. package/dist/effect/email.js +2 -137
  33. package/dist/effect/events.d.ts +121 -0
  34. package/dist/effect/events.js +3 -0
  35. package/dist/effect/extension-installations.js +2 -27
  36. package/dist/effect/extensions.js +2 -19
  37. package/dist/effect/feedback.d.ts +1 -1
  38. package/dist/effect/feedback.js +3 -13
  39. package/dist/effect/generated/analytics.d.ts +715 -0
  40. package/dist/effect/generated/api-keys.d.ts +1627 -0
  41. package/dist/effect/generated/attachments.d.ts +554 -0
  42. package/dist/effect/generated/brands.d.ts +1118 -0
  43. package/dist/effect/generated/campaigns.d.ts +3783 -0
  44. package/dist/effect/generated/contact-events.d.ts +158 -0
  45. package/dist/effect/generated/contact-groups.d.ts +1445 -0
  46. package/dist/effect/generated/contacts.d.ts +3789 -0
  47. package/dist/effect/generated/conversations.d.ts +2870 -0
  48. package/dist/effect/generated/custom-fields.d.ts +562 -0
  49. package/dist/effect/generated/email.d.ts +10622 -0
  50. package/dist/effect/generated/events.d.ts +463 -0
  51. package/dist/effect/generated/extension-installations.d.ts +1786 -0
  52. package/dist/effect/generated/extensions.d.ts +927 -0
  53. package/dist/effect/generated/feedback.d.ts +116 -0
  54. package/dist/effect/generated/index.d.ts +61 -0
  55. package/dist/effect/generated/journeys.d.ts +6135 -0
  56. package/dist/effect/generated/mailboxes.d.ts +13641 -0
  57. package/dist/effect/generated/media.d.ts +741 -0
  58. package/dist/effect/generated/messages.d.ts +2355 -0
  59. package/dist/effect/generated/namespaces.d.ts +654 -0
  60. package/dist/effect/generated/operations.d.ts +514 -0
  61. package/dist/effect/generated/organizations.d.ts +1111 -0
  62. package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
  63. package/dist/effect/generated/shared.d.ts +3250 -0
  64. package/dist/effect/generated/subscriptions.d.ts +188 -0
  65. package/dist/effect/generated/templates.d.ts +8177 -0
  66. package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
  67. package/dist/effect/generated/webhooks.d.ts +1697 -0
  68. package/dist/effect/generated/whoami.d.ts +291 -0
  69. package/dist/effect/generated-metadata.d.ts +1627 -0
  70. package/dist/effect/index.d.ts +3 -1
  71. package/dist/effect/index.js +29 -27
  72. package/dist/effect/internal/client.d.ts +10 -7
  73. package/dist/effect/internal/email-sender.d.ts +17 -0
  74. package/dist/effect/internal/operation.d.ts +12 -72
  75. package/dist/effect/internal/send.d.ts +60 -0
  76. package/dist/effect/journeys.d.ts +2153 -0
  77. package/dist/effect/journeys.js +2 -0
  78. package/dist/effect/mailboxes.d.ts +112 -112
  79. package/dist/effect/mailboxes.js +1 -1
  80. package/dist/effect/media.js +3 -1
  81. package/dist/effect/messages.d.ts +2 -2
  82. package/dist/effect/messages.js +3 -1
  83. package/dist/effect/namespaces.js +2 -19
  84. package/dist/effect/operations.js +2 -15
  85. package/dist/effect/organizations.js +2 -23
  86. package/dist/effect/retry.js +1 -1
  87. package/dist/effect/scheduled-messages.js +2 -19
  88. package/dist/effect/subscriptions.js +2 -9
  89. package/dist/effect/templates.d.ts +1 -1
  90. package/dist/effect/templates.js +3 -78
  91. package/dist/effect/unsubscribe-groups.js +2 -27
  92. package/dist/effect/webhooks.d.ts +9 -9
  93. package/dist/effect/webhooks.js +3 -33
  94. package/dist/effect/whoami.d.ts +8 -8
  95. package/dist/effect/whoami.js +2 -9
  96. package/dist/email-R0NAA9PW.js +2498 -0
  97. package/dist/events-CxbTUHYT.js +82 -0
  98. package/dist/extension-installations-CD94LPmk.js +407 -0
  99. package/dist/extensions-BKyNQLvu.js +220 -0
  100. package/dist/feedback-Bpa09JOS.js +52 -0
  101. package/dist/index.js +2 -2
  102. package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments-Bi1hDltp.js} +2 -2
  103. package/dist/journeys-CARo_BJT.js +499 -0
  104. package/dist/mailboxes-BRDn7BIK.js +2470 -0
  105. package/dist/media-VrrtNnft.js +181 -0
  106. package/dist/namespaces-CcvEbG-y.js +152 -0
  107. package/dist/{operation-BTXjPrwf.js → operation-n_IYgNVK.js} +75 -90
  108. package/dist/operations-CmB3FHwf.js +93 -0
  109. package/dist/organizations-A-plufWc.js +252 -0
  110. package/dist/promises/index.d.ts +7 -3
  111. package/dist/promises/index.js +2 -2
  112. package/dist/promises/types.gen.d.ts +1 -1
  113. package/dist/{promises-KrA2nSLg.js → promises---Kbh-7z.js} +467 -3
  114. package/dist/runtime-P0l1_2-C.js +25 -0
  115. package/dist/scheduled-messages-DkKZRRaN.js +207 -0
  116. package/dist/send-Bxc0XfGE.js +722 -0
  117. package/dist/service-map.d.ts +85 -0
  118. package/dist/subscriptions-DEXYtMXg.js +67 -0
  119. package/dist/templates-DZomxsG7.js +2289 -0
  120. package/dist/unsubscribe-groups-Iqk4Isf9.js +291 -0
  121. package/dist/webhooks-CPXuu8Xf.js +530 -0
  122. package/dist/whoami-Ccz0jwlt.js +59 -0
  123. package/package.json +13 -3
  124. package/dist/categories-DV51kr2H.js +0 -187
  125. package/dist/client-BMUew5Wp.js +0 -13794
  126. package/dist/effect/generated.d.ts +0 -64004
  127. package/dist/mailboxes-Thp5z0oX.js +0 -161
@@ -0,0 +1,2289 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { $t as UserId, D as Cursor, Ft as RenderLocale, Gt as TemplateInputContractId, Ht as SuccessResponse, It as RenderTimeZone, Jt as UnauthorizedError, K as ForbiddenError, Kt as TemplatePublicationId, Lt as ResourceNotFoundError, Mt as OrganizationId, T as CreateTemplatePayload, Ut as TemplateFromDefault, Wt as TemplateId, Y as InternalError, Zt as UpdateTemplatePayload, d as BrandAssets, en as ValidationError, et as JsonValue, f as BrandFooter, m as ConflictError, q as GatewayTimeoutError, s as ApiKeySecurityMiddleware } from "./client-DOzUrdTE.js";
3
+ import { n as forGroup } from "./operation-n_IYgNVK.js";
4
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
5
+ import * as Schema from "effect/Schema";
6
+ //#region src/effect/generated/templates.ts
7
+ const TemplateProjectId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
8
+ expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
9
+ identifier: "TemplateProjectId"
10
+ })).pipe(Schema.brand("TemplateProjectId"));
11
+ const TemplatePublicationBrand = /* @__PURE__ */ Schema.Struct({
12
+ slug: Schema.String.annotate({ description: "The brand the publication imports." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
13
+ digest: Schema.String.annotate({ description: "The brand's digest when the publication was built." }),
14
+ stale: Schema.Boolean.annotate({ description: "Whether the brand has changed since this publication was built. Publishing the same commit again picks up the change." })
15
+ }).annotate({ identifier: "TemplatePublicationBrand" });
16
+ const TemplateFamilyId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tfam_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
17
+ expected: "a string matching the RegExp ^tfam_[0-9a-hjkmnp-tv-z]{16,24}$",
18
+ identifier: "TemplateFamilyId"
19
+ })).pipe(Schema.brand("TemplateFamilyId"));
20
+ const VersionCursor = /* @__PURE__ */ Schema.String.annotate({ identifier: "VersionCursor" });
21
+ const BrandFooterBlock = /* @__PURE__ */ Schema.Struct({
22
+ html: Schema.String,
23
+ text: Schema.String
24
+ }).annotate({ identifier: "BrandFooterBlock" });
25
+ const TemplatePublicationRender = /* @__PURE__ */ Schema.Struct({
26
+ subject: Schema.String,
27
+ preheader: Schema.optionalKey(Schema.String),
28
+ html: Schema.String.check(Schema.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" })),
29
+ text: Schema.String.check(Schema.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" }))
30
+ }).annotate({ identifier: "TemplatePublicationRender" });
31
+ const TemplateInputContractPage = /* @__PURE__ */ Schema.Struct({
32
+ items: Schema.Array(Schema.Struct({
33
+ id: TemplateInputContractId,
34
+ organizationId: OrganizationId,
35
+ templateId: TemplateId,
36
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
37
+ validationDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
38
+ schema: Schema.Record(Schema.String, JsonValue),
39
+ createdAt: Schema.String
40
+ })),
41
+ nextCursor: Schema.Union([Schema.String, Schema.Null])
42
+ }).annotate({ identifier: "TemplateInputContractPage" });
43
+ const TemplateFamilyMember = /* @__PURE__ */ Schema.Struct({
44
+ id: TemplateId,
45
+ name: Schema.String,
46
+ slug: Schema.String,
47
+ channel: Schema.Literal("email"),
48
+ status: Schema.Union([
49
+ Schema.Literal("draft"),
50
+ Schema.Literal("pending"),
51
+ Schema.Literal("approved"),
52
+ Schema.Literal("published"),
53
+ Schema.Literal("rejected"),
54
+ Schema.Literal("archived")
55
+ ]),
56
+ isActive: Schema.Boolean,
57
+ createdAt: Schema.String,
58
+ updatedAt: Schema.String
59
+ }).annotate({ identifier: "TemplateFamilyMember" });
60
+ const TemplateSummary = /* @__PURE__ */ Schema.Struct({
61
+ id: TemplateId,
62
+ slug: Schema.String,
63
+ name: Schema.String,
64
+ channel: Schema.Literal("email"),
65
+ projectId: TemplateProjectId,
66
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
67
+ status: Schema.Union([
68
+ Schema.Literal("draft"),
69
+ Schema.Literal("pending"),
70
+ Schema.Literal("approved"),
71
+ Schema.Literal("published"),
72
+ Schema.Literal("rejected"),
73
+ Schema.Literal("archived")
74
+ ]),
75
+ isActive: Schema.Boolean,
76
+ publishedAt: Schema.Union([Schema.String, Schema.Null]),
77
+ brand: Schema.Union([TemplatePublicationBrand, Schema.Null]),
78
+ fromDefault: Schema.Union([TemplateFromDefault, Schema.Null]),
79
+ usageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
80
+ lastUsedAt: Schema.Union([Schema.String, Schema.Null]),
81
+ createdAt: Schema.String,
82
+ updatedAt: Schema.String
83
+ }).annotate({ identifier: "TemplateSummary" });
84
+ const Template = /* @__PURE__ */ Schema.Struct({
85
+ id: TemplateId,
86
+ slug: Schema.String,
87
+ name: Schema.String,
88
+ channel: Schema.Literal("email"),
89
+ projectId: TemplateProjectId,
90
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
91
+ status: Schema.Union([
92
+ Schema.Literal("draft"),
93
+ Schema.Literal("pending"),
94
+ Schema.Literal("approved"),
95
+ Schema.Literal("published"),
96
+ Schema.Literal("rejected"),
97
+ Schema.Literal("archived")
98
+ ]),
99
+ isActive: Schema.Boolean,
100
+ publishedAt: Schema.Union([Schema.String, Schema.Null]),
101
+ brand: Schema.Union([TemplatePublicationBrand, Schema.Null]),
102
+ fromDefault: Schema.Union([TemplateFromDefault, Schema.Null]),
103
+ usageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
104
+ lastUsedAt: Schema.Union([Schema.String, Schema.Null]),
105
+ createdAt: Schema.String,
106
+ updatedAt: Schema.String,
107
+ familyId: Schema.Union([TemplateFamilyId, Schema.Null]),
108
+ description: Schema.Union([Schema.String, Schema.Null]),
109
+ category: Schema.Union([Schema.Union([
110
+ Schema.Literal("transactional"),
111
+ Schema.Literal("marketing"),
112
+ Schema.Literal("support"),
113
+ Schema.Literal("notification"),
114
+ Schema.Literal("verification"),
115
+ Schema.Literal("reminder"),
116
+ Schema.Literal("alert")
117
+ ]), Schema.Null]),
118
+ replyToDefault: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
119
+ trackingDefault: Schema.Union([Schema.Struct({
120
+ opens: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
121
+ clicks: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
122
+ }), Schema.Null]),
123
+ email: Schema.Union([Schema.Struct({
124
+ subject: Schema.String,
125
+ preheader: Schema.Union([Schema.String, Schema.Null]),
126
+ headers: Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])
127
+ }), Schema.Null]),
128
+ publicationId: Schema.Union([TemplatePublicationId, Schema.Null]),
129
+ inputContractId: Schema.Union([TemplateInputContractId, Schema.Null]),
130
+ inputSchema: Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])
131
+ }).annotate({ identifier: "Template" });
132
+ const BrandRenderedFooter = /* @__PURE__ */ Schema.Struct({
133
+ withUnsubscribe: BrandFooterBlock,
134
+ withoutUnsubscribe: BrandFooterBlock
135
+ }).annotate({ identifier: "BrandRenderedFooter" });
136
+ const TemplateFamily = /* @__PURE__ */ Schema.Struct({
137
+ id: TemplateFamilyId,
138
+ name: Schema.String,
139
+ members: Schema.Array(TemplateFamilyMember),
140
+ createdAt: Schema.String,
141
+ updatedAt: Schema.String
142
+ }).annotate({ identifier: "TemplateFamily" });
143
+ const TemplatePage = /* @__PURE__ */ Schema.Struct({
144
+ items: Schema.Array(TemplateSummary),
145
+ nextCursor: Schema.Union([Schema.String, Schema.Null])
146
+ }).annotate({ identifier: "TemplatePage" });
147
+ const TemplateFamilyPage = /* @__PURE__ */ Schema.Struct({
148
+ items: Schema.Array(TemplateFamily),
149
+ nextCursor: Schema.Union([Schema.String, Schema.Null])
150
+ }).annotate({ identifier: "TemplateFamilyPage" });
151
+ const TemplatesListQuery = /* @__PURE__ */ Schema.Struct({
152
+ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
153
+ cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
154
+ category: Schema.optionalKey(Schema.Union([Schema.Union([
155
+ Schema.Literal("transactional"),
156
+ Schema.Literal("marketing"),
157
+ Schema.Literal("support"),
158
+ Schema.Literal("notification"),
159
+ Schema.Literal("verification"),
160
+ Schema.Literal("reminder"),
161
+ Schema.Literal("alert")
162
+ ]), Schema.Null])),
163
+ channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
164
+ status: Schema.optionalKey(Schema.Union([Schema.Union([
165
+ Schema.Literal("draft"),
166
+ Schema.Literal("pending"),
167
+ Schema.Literal("approved"),
168
+ Schema.Literal("published"),
169
+ Schema.Literal("rejected"),
170
+ Schema.Literal("archived")
171
+ ]), Schema.Null])),
172
+ search: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
173
+ projectId: Schema.optionalKey(Schema.Union([TemplateProjectId, Schema.Null]))
174
+ });
175
+ const TemplatesList200 = TemplatePage;
176
+ const TemplatesList401 = UnauthorizedError;
177
+ const TemplatesList403 = ForbiddenError;
178
+ const TemplatesList422 = ValidationError;
179
+ const TemplatesList500 = InternalError;
180
+ const TemplatesList504 = GatewayTimeoutError;
181
+ const TemplatesCreateRequestJson = /* @__PURE__ */ Schema.Struct({
182
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
183
+ projectName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
184
+ slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
185
+ galleryTemplateId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema.Null])),
186
+ useBrand: Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ description: "With `galleryTemplateId`: whether the new project's `theme.css` imports the organization's default brand (`@import \"samva:brand\";`) over the starter's look. Defaults to false." }), Schema.Null])),
187
+ description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
188
+ category: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Union([
189
+ Schema.Literal("transactional"),
190
+ Schema.Literal("marketing"),
191
+ Schema.Literal("support"),
192
+ Schema.Literal("notification"),
193
+ Schema.Literal("verification"),
194
+ Schema.Literal("reminder"),
195
+ Schema.Literal("alert")
196
+ ]), Schema.Null]), Schema.Null])),
197
+ isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
198
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
199
+ });
200
+ const TemplatesCreate201 = Template;
201
+ const TemplatesCreate401 = UnauthorizedError;
202
+ const TemplatesCreate403 = ForbiddenError;
203
+ const TemplatesCreate409 = ConflictError;
204
+ const TemplatesCreate422 = ValidationError;
205
+ const TemplatesCreate500 = InternalError;
206
+ const TemplatesCreate504 = GatewayTimeoutError;
207
+ const TemplatesGetByIdPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
208
+ const TemplatesGetById200 = Template;
209
+ const TemplatesGetById401 = UnauthorizedError;
210
+ const TemplatesGetById403 = ForbiddenError;
211
+ const TemplatesGetById404 = ResourceNotFoundError;
212
+ const TemplatesGetById422 = ValidationError;
213
+ const TemplatesGetById500 = InternalError;
214
+ const TemplatesGetById504 = GatewayTimeoutError;
215
+ const TemplatesRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
216
+ const TemplatesRemove200 = SuccessResponse;
217
+ const TemplatesRemove401 = UnauthorizedError;
218
+ const TemplatesRemove403 = ForbiddenError;
219
+ const TemplatesRemove404 = ResourceNotFoundError;
220
+ const TemplatesRemove422 = ValidationError;
221
+ const TemplatesRemove500 = InternalError;
222
+ const TemplatesRemove504 = GatewayTimeoutError;
223
+ const TemplatesUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
224
+ const TemplatesUpdateRequestJson = /* @__PURE__ */ Schema.Struct({ data: Schema.Struct({
225
+ name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
226
+ slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
227
+ entryPath: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })), Schema.Null])),
228
+ description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
229
+ category: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Union([
230
+ Schema.Literal("transactional"),
231
+ Schema.Literal("marketing"),
232
+ Schema.Literal("support"),
233
+ Schema.Literal("notification"),
234
+ Schema.Literal("verification"),
235
+ Schema.Literal("reminder"),
236
+ Schema.Literal("alert")
237
+ ]), Schema.Null]), Schema.Null])),
238
+ fromDefault: Schema.optionalKey(Schema.Union([Schema.Union([TemplateFromDefault, Schema.Null]), Schema.Null])),
239
+ replyToDefault: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null])),
240
+ isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
241
+ }) });
242
+ const TemplatesUpdate200 = Template;
243
+ const TemplatesUpdate401 = UnauthorizedError;
244
+ const TemplatesUpdate403 = ForbiddenError;
245
+ const TemplatesUpdate404 = ResourceNotFoundError;
246
+ const TemplatesUpdate409 = ConflictError;
247
+ const TemplatesUpdate422 = ValidationError;
248
+ const TemplatesUpdate500 = InternalError;
249
+ const TemplatesUpdate504 = GatewayTimeoutError;
250
+ const TemplatesListInputContractsPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
251
+ const TemplatesListInputContractsQuery = /* @__PURE__ */ Schema.Struct({
252
+ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
253
+ cursor: Schema.optionalKey(Schema.Union([VersionCursor, Schema.Null]))
254
+ });
255
+ const TemplatesListInputContracts200 = TemplateInputContractPage;
256
+ const TemplatesListInputContracts401 = UnauthorizedError;
257
+ const TemplatesListInputContracts403 = ForbiddenError;
258
+ const TemplatesListInputContracts404 = ResourceNotFoundError;
259
+ const TemplatesListInputContracts422 = ValidationError;
260
+ const TemplatesListInputContracts500 = InternalError;
261
+ const TemplatesListInputContracts504 = GatewayTimeoutError;
262
+ const TemplatesGetInputContractPathParams = /* @__PURE__ */ Schema.Struct({
263
+ id: TemplateId,
264
+ inputContractId: TemplateInputContractId
265
+ });
266
+ const TemplatesGetInputContract200 = /* @__PURE__ */ Schema.Struct({
267
+ id: TemplateInputContractId,
268
+ organizationId: OrganizationId,
269
+ templateId: TemplateId,
270
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
271
+ validationDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
272
+ schema: Schema.Record(Schema.String, JsonValue),
273
+ createdAt: Schema.String
274
+ });
275
+ const TemplatesGetInputContract401 = UnauthorizedError;
276
+ const TemplatesGetInputContract403 = ForbiddenError;
277
+ const TemplatesGetInputContract404 = ResourceNotFoundError;
278
+ const TemplatesGetInputContract422 = ValidationError;
279
+ const TemplatesGetInputContract500 = InternalError;
280
+ const TemplatesGetInputContract504 = GatewayTimeoutError;
281
+ const TemplatesPublishPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
282
+ const TemplatesPublishRequestJson = /* @__PURE__ */ Schema.Struct({
283
+ projectId: TemplateProjectId,
284
+ commitSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
285
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
286
+ expectedWorkspaceRevision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
287
+ ifCurrentPublicationId: Schema.optionalKey(Schema.Union([TemplatePublicationId, Schema.Null]))
288
+ });
289
+ const TemplatesPublish201 = /* @__PURE__ */ Schema.Struct({
290
+ id: TemplatePublicationId,
291
+ organizationId: OrganizationId,
292
+ projectId: TemplateProjectId,
293
+ templateId: TemplateId,
294
+ inputContractId: TemplateInputContractId,
295
+ commitSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
296
+ treeSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
297
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
298
+ buildIdentity: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
299
+ manifest: Schema.Struct({
300
+ templateKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
301
+ ir: Schema.Struct({
302
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
303
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
304
+ bytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
305
+ }),
306
+ compiler: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
307
+ input: Schema.Struct({
308
+ schemaDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
309
+ contractDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
310
+ }),
311
+ assets: Schema.Struct({
312
+ base: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https?:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https?:\\/\\/" })),
313
+ entries: Schema.Array(Schema.Struct({
314
+ path: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
315
+ fileName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$" })),
316
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
317
+ bytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
318
+ contentType: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
319
+ url: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https?:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https?:\\/\\/" }))
320
+ })).check(Schema.isMaxLength(32).annotate({ expected: "a value with a length of at most 32" }))
321
+ }),
322
+ source: Schema.Struct({
323
+ commitSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
324
+ treeSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
325
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
326
+ treeDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
327
+ }),
328
+ brand: Schema.optionalKey(Schema.Struct({
329
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
330
+ css: Schema.String,
331
+ assets: BrandAssets,
332
+ footer: BrandFooter,
333
+ renderedFooter: BrandRenderedFooter,
334
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
335
+ rendersFooter: Schema.Union([
336
+ Schema.Literal("every"),
337
+ Schema.Literal("some"),
338
+ Schema.Literal("none")
339
+ ])
340
+ }))
341
+ }),
342
+ ir: Schema.Struct({
343
+ key: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
344
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
345
+ }),
346
+ assets: Schema.Array(Schema.Struct({
347
+ path: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
348
+ fileName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$" })),
349
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
350
+ bytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
351
+ contentType: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
352
+ url: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https?:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https?:\\/\\/" }))
353
+ })),
354
+ warnings: Schema.Array(Schema.Struct({
355
+ code: Schema.String,
356
+ severity: Schema.Union([
357
+ Schema.Literal("error"),
358
+ Schema.Literal("warning"),
359
+ Schema.Literal("info")
360
+ ]),
361
+ message: Schema.String,
362
+ origins: Schema.Array(Schema.Struct({
363
+ fileName: Schema.String,
364
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
365
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
366
+ })),
367
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
368
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
369
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
370
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
371
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
372
+ fileName: Schema.String,
373
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
374
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
375
+ }))), Schema.Null])),
376
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
377
+ assessment: Schema.Union([
378
+ Schema.Literal("risk"),
379
+ Schema.Literal("degradation"),
380
+ Schema.Literal("unverified"),
381
+ Schema.Literal("not-applicable")
382
+ ]),
383
+ title: Schema.String
384
+ }), Schema.Null]))
385
+ })),
386
+ incompatibilities: Schema.Array(Schema.Struct({
387
+ code: Schema.String,
388
+ severity: Schema.Union([
389
+ Schema.Literal("error"),
390
+ Schema.Literal("warning"),
391
+ Schema.Literal("info")
392
+ ]),
393
+ message: Schema.String,
394
+ origins: Schema.Array(Schema.Struct({
395
+ fileName: Schema.String,
396
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
397
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
398
+ })),
399
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
400
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
401
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
402
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
403
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
404
+ fileName: Schema.String,
405
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
406
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
407
+ }))), Schema.Null])),
408
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
409
+ assessment: Schema.Union([
410
+ Schema.Literal("risk"),
411
+ Schema.Literal("degradation"),
412
+ Schema.Literal("unverified"),
413
+ Schema.Literal("not-applicable")
414
+ ]),
415
+ title: Schema.String
416
+ }), Schema.Null]))
417
+ })),
418
+ status: Schema.String,
419
+ publishedAt: Schema.String,
420
+ publishedBy: Schema.Union([Schema.String, Schema.Null]),
421
+ createdAt: Schema.String
422
+ });
423
+ const TemplatesPublish401 = UnauthorizedError;
424
+ const TemplatesPublish403 = ForbiddenError;
425
+ const TemplatesPublish404 = ResourceNotFoundError;
426
+ const TemplatesPublish409 = ConflictError;
427
+ const TemplatesPublish422 = ValidationError;
428
+ const TemplatesPublish500 = InternalError;
429
+ const TemplatesPublish504 = GatewayTimeoutError;
430
+ const TemplatesGetPublicationPathParams = /* @__PURE__ */ Schema.Struct({
431
+ id: TemplateId,
432
+ publicationId: TemplatePublicationId
433
+ });
434
+ const TemplatesGetPublication200 = /* @__PURE__ */ Schema.Struct({
435
+ id: TemplatePublicationId,
436
+ organizationId: OrganizationId,
437
+ projectId: TemplateProjectId,
438
+ templateId: TemplateId,
439
+ inputContractId: TemplateInputContractId,
440
+ commitSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
441
+ treeSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
442
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
443
+ buildIdentity: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
444
+ manifest: Schema.Struct({
445
+ templateKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
446
+ ir: Schema.Struct({
447
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
448
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
449
+ bytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
450
+ }),
451
+ compiler: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
452
+ input: Schema.Struct({
453
+ schemaDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
454
+ contractDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
455
+ }),
456
+ assets: Schema.Struct({
457
+ base: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https?:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https?:\\/\\/" })),
458
+ entries: Schema.Array(Schema.Struct({
459
+ path: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
460
+ fileName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$" })),
461
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
462
+ bytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
463
+ contentType: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
464
+ url: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https?:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https?:\\/\\/" }))
465
+ })).check(Schema.isMaxLength(32).annotate({ expected: "a value with a length of at most 32" }))
466
+ }),
467
+ source: Schema.Struct({
468
+ commitSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
469
+ treeSha: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
470
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
471
+ treeDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
472
+ }),
473
+ brand: Schema.optionalKey(Schema.Struct({
474
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
475
+ css: Schema.String,
476
+ assets: BrandAssets,
477
+ footer: BrandFooter,
478
+ renderedFooter: BrandRenderedFooter,
479
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
480
+ rendersFooter: Schema.Union([
481
+ Schema.Literal("every"),
482
+ Schema.Literal("some"),
483
+ Schema.Literal("none")
484
+ ])
485
+ }))
486
+ }),
487
+ ir: Schema.Struct({
488
+ key: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
489
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
490
+ }),
491
+ assets: Schema.Array(Schema.Struct({
492
+ path: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
493
+ fileName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}(?:\\.[A-Za-z0-9]+)?$" })),
494
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
495
+ bytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
496
+ contentType: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
497
+ url: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https?:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https?:\\/\\/" }))
498
+ })),
499
+ warnings: Schema.Array(Schema.Struct({
500
+ code: Schema.String,
501
+ severity: Schema.Union([
502
+ Schema.Literal("error"),
503
+ Schema.Literal("warning"),
504
+ Schema.Literal("info")
505
+ ]),
506
+ message: Schema.String,
507
+ origins: Schema.Array(Schema.Struct({
508
+ fileName: Schema.String,
509
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
510
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
511
+ })),
512
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
513
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
514
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
515
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
516
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
517
+ fileName: Schema.String,
518
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
519
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
520
+ }))), Schema.Null])),
521
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
522
+ assessment: Schema.Union([
523
+ Schema.Literal("risk"),
524
+ Schema.Literal("degradation"),
525
+ Schema.Literal("unverified"),
526
+ Schema.Literal("not-applicable")
527
+ ]),
528
+ title: Schema.String
529
+ }), Schema.Null]))
530
+ })),
531
+ incompatibilities: Schema.Array(Schema.Struct({
532
+ code: Schema.String,
533
+ severity: Schema.Union([
534
+ Schema.Literal("error"),
535
+ Schema.Literal("warning"),
536
+ Schema.Literal("info")
537
+ ]),
538
+ message: Schema.String,
539
+ origins: Schema.Array(Schema.Struct({
540
+ fileName: Schema.String,
541
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
542
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
543
+ })),
544
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
545
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
546
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
547
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
548
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
549
+ fileName: Schema.String,
550
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
551
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
552
+ }))), Schema.Null])),
553
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
554
+ assessment: Schema.Union([
555
+ Schema.Literal("risk"),
556
+ Schema.Literal("degradation"),
557
+ Schema.Literal("unverified"),
558
+ Schema.Literal("not-applicable")
559
+ ]),
560
+ title: Schema.String
561
+ }), Schema.Null]))
562
+ })),
563
+ status: Schema.String,
564
+ publishedAt: Schema.String,
565
+ publishedBy: Schema.Union([Schema.String, Schema.Null]),
566
+ createdAt: Schema.String
567
+ });
568
+ const TemplatesGetPublication401 = UnauthorizedError;
569
+ const TemplatesGetPublication403 = ForbiddenError;
570
+ const TemplatesGetPublication404 = ResourceNotFoundError;
571
+ const TemplatesGetPublication422 = ValidationError;
572
+ const TemplatesGetPublication500 = InternalError;
573
+ const TemplatesGetPublication504 = GatewayTimeoutError;
574
+ const TemplatesRenderPublicationPathParams = /* @__PURE__ */ Schema.Struct({
575
+ id: TemplateId,
576
+ publicationId: TemplatePublicationId
577
+ });
578
+ const TemplatesRenderPublicationRequestJson = /* @__PURE__ */ Schema.Struct({
579
+ data: Schema.Record(Schema.String, JsonValue).annotate({ description: "The input to render with, validated against the publication's input schema." }),
580
+ locale: Schema.optionalKey(RenderLocale),
581
+ timeZone: Schema.optionalKey(RenderTimeZone)
582
+ });
583
+ const TemplatesRenderPublication200 = TemplatePublicationRender;
584
+ const TemplatesRenderPublication401 = UnauthorizedError;
585
+ const TemplatesRenderPublication403 = ForbiddenError;
586
+ const TemplatesRenderPublication404 = ResourceNotFoundError;
587
+ const TemplatesRenderPublication409 = ConflictError;
588
+ const TemplatesRenderPublication422 = ValidationError;
589
+ const TemplatesRenderPublication500 = InternalError;
590
+ const TemplatesRenderPublication504 = GatewayTimeoutError;
591
+ const TemplatesGetGitRepositoryPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
592
+ const TemplatesGetGitRepository200 = /* @__PURE__ */ Schema.Struct({
593
+ remote: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })),
594
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
595
+ });
596
+ const TemplatesGetGitRepository401 = UnauthorizedError;
597
+ const TemplatesGetGitRepository403 = ForbiddenError;
598
+ const TemplatesGetGitRepository404 = ResourceNotFoundError;
599
+ const TemplatesGetGitRepository409 = ConflictError;
600
+ const TemplatesGetGitRepository422 = ValidationError;
601
+ const TemplatesGetGitRepository500 = InternalError;
602
+ const TemplatesGetGitRepository504 = GatewayTimeoutError;
603
+ const TemplatesIssueGitCredentialPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
604
+ const TemplatesIssueGitCredentialRequestJson = /* @__PURE__ */ Schema.Struct({ scope: Schema.Union([Schema.Literal("read"), Schema.Literal("write")]) });
605
+ const TemplatesIssueGitCredential200 = /* @__PURE__ */ Schema.Struct({
606
+ remote: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })),
607
+ username: Schema.Literal("x-access-token"),
608
+ password: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
609
+ expiresAt: Schema.String
610
+ });
611
+ const TemplatesIssueGitCredential401 = UnauthorizedError;
612
+ const TemplatesIssueGitCredential403 = ForbiddenError;
613
+ const TemplatesIssueGitCredential404 = ResourceNotFoundError;
614
+ const TemplatesIssueGitCredential409 = ConflictError;
615
+ const TemplatesIssueGitCredential422 = ValidationError;
616
+ const TemplatesIssueGitCredential500 = InternalError;
617
+ const TemplatesIssueGitCredential504 = GatewayTimeoutError;
618
+ const TemplatesOpenWorkspacePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
619
+ const TemplatesOpenWorkspace200 = /* @__PURE__ */ Schema.Struct({
620
+ workspace: Schema.Struct({
621
+ projectId: TemplateProjectId,
622
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
623
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
624
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
625
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
626
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
627
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
628
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
629
+ revision: Schema.String,
630
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
631
+ assetChanges: Schema.Array(Schema.Struct({
632
+ path: Schema.String,
633
+ status: Schema.Union([
634
+ Schema.Literal("added"),
635
+ Schema.Literal("modified"),
636
+ Schema.Literal("deleted")
637
+ ])
638
+ })),
639
+ conflicts: Schema.Array(Schema.Struct({
640
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
641
+ base: Schema.Union([Schema.String, Schema.Null]),
642
+ draft: Schema.Union([Schema.String, Schema.Null]),
643
+ main: Schema.Union([Schema.String, Schema.Null])
644
+ })),
645
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
646
+ kind: Schema.String,
647
+ digest: Schema.String,
648
+ locator: Schema.optionalKey(Schema.String)
649
+ })) }),
650
+ mounts: Schema.Array(Schema.Union([
651
+ Schema.Struct({
652
+ kind: Schema.Literal("project"),
653
+ root: Schema.Literal("/project"),
654
+ access: Schema.Literal("read-write")
655
+ }),
656
+ Schema.Struct({
657
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
658
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
659
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
660
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
661
+ kind: Schema.Literal("started-from"),
662
+ access: Schema.Literal("read-only"),
663
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
664
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
665
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
666
+ }),
667
+ Schema.Struct({
668
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
669
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
670
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
671
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
672
+ kind: Schema.Literal("resource"),
673
+ access: Schema.Literal("read-only"),
674
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
675
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
676
+ }),
677
+ Schema.Struct({
678
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
679
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
680
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
681
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
682
+ kind: Schema.Literal("library-template"),
683
+ access: Schema.Literal("read-only"),
684
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
685
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
686
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
687
+ })
688
+ ])),
689
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
690
+ createdAt: Schema.String,
691
+ updatedAt: Schema.String,
692
+ createdBy: Schema.Struct({
693
+ userId: UserId,
694
+ via: Schema.Union([
695
+ Schema.Literal("api"),
696
+ Schema.Literal("mcp"),
697
+ Schema.Literal("agent")
698
+ ])
699
+ }),
700
+ updatedBy: Schema.Struct({
701
+ userId: UserId,
702
+ via: Schema.Union([
703
+ Schema.Literal("api"),
704
+ Schema.Literal("mcp"),
705
+ Schema.Literal("agent")
706
+ ])
707
+ })
708
+ }),
709
+ files: Schema.Record(Schema.String, Schema.String)
710
+ });
711
+ const TemplatesOpenWorkspace401 = UnauthorizedError;
712
+ const TemplatesOpenWorkspace403 = ForbiddenError;
713
+ const TemplatesOpenWorkspace404 = ResourceNotFoundError;
714
+ const TemplatesOpenWorkspace409 = ConflictError;
715
+ const TemplatesOpenWorkspace422 = ValidationError;
716
+ const TemplatesOpenWorkspace500 = InternalError;
717
+ const TemplatesOpenWorkspace504 = GatewayTimeoutError;
718
+ const TemplatesPatchWorkspacePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
719
+ const TemplatesPatchWorkspaceRequestJson = /* @__PURE__ */ Schema.Struct({
720
+ expectedRevision: Schema.String,
721
+ patches: Schema.Array(Schema.Struct({
722
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
723
+ content: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1048576).annotate({ expected: "a string with at most 1048576 code points" })).check(Schema.isMaxLength(1048576).annotate({ expected: "a value with a length of at most 1048576" })), Schema.Null])
724
+ })).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })),
725
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
726
+ });
727
+ const TemplatesPatchWorkspace200 = /* @__PURE__ */ Schema.Struct({
728
+ workspace: Schema.Struct({
729
+ projectId: TemplateProjectId,
730
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
731
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
732
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
733
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
734
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
735
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
736
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
737
+ revision: Schema.String,
738
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
739
+ assetChanges: Schema.Array(Schema.Struct({
740
+ path: Schema.String,
741
+ status: Schema.Union([
742
+ Schema.Literal("added"),
743
+ Schema.Literal("modified"),
744
+ Schema.Literal("deleted")
745
+ ])
746
+ })),
747
+ conflicts: Schema.Array(Schema.Struct({
748
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
749
+ base: Schema.Union([Schema.String, Schema.Null]),
750
+ draft: Schema.Union([Schema.String, Schema.Null]),
751
+ main: Schema.Union([Schema.String, Schema.Null])
752
+ })),
753
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
754
+ kind: Schema.String,
755
+ digest: Schema.String,
756
+ locator: Schema.optionalKey(Schema.String)
757
+ })) }),
758
+ mounts: Schema.Array(Schema.Union([
759
+ Schema.Struct({
760
+ kind: Schema.Literal("project"),
761
+ root: Schema.Literal("/project"),
762
+ access: Schema.Literal("read-write")
763
+ }),
764
+ Schema.Struct({
765
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
766
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
767
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
768
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
769
+ kind: Schema.Literal("started-from"),
770
+ access: Schema.Literal("read-only"),
771
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
772
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
773
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
774
+ }),
775
+ Schema.Struct({
776
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
777
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
778
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
779
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
780
+ kind: Schema.Literal("resource"),
781
+ access: Schema.Literal("read-only"),
782
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
783
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
784
+ }),
785
+ Schema.Struct({
786
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
787
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
788
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
789
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
790
+ kind: Schema.Literal("library-template"),
791
+ access: Schema.Literal("read-only"),
792
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
793
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
794
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
795
+ })
796
+ ])),
797
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
798
+ createdAt: Schema.String,
799
+ updatedAt: Schema.String,
800
+ createdBy: Schema.Struct({
801
+ userId: UserId,
802
+ via: Schema.Union([
803
+ Schema.Literal("api"),
804
+ Schema.Literal("mcp"),
805
+ Schema.Literal("agent")
806
+ ])
807
+ }),
808
+ updatedBy: Schema.Struct({
809
+ userId: UserId,
810
+ via: Schema.Union([
811
+ Schema.Literal("api"),
812
+ Schema.Literal("mcp"),
813
+ Schema.Literal("agent")
814
+ ])
815
+ })
816
+ }),
817
+ files: Schema.Record(Schema.String, Schema.String)
818
+ });
819
+ const TemplatesPatchWorkspace401 = UnauthorizedError;
820
+ const TemplatesPatchWorkspace403 = ForbiddenError;
821
+ const TemplatesPatchWorkspace404 = ResourceNotFoundError;
822
+ const TemplatesPatchWorkspace409 = ConflictError;
823
+ const TemplatesPatchWorkspace422 = ValidationError;
824
+ const TemplatesPatchWorkspace500 = InternalError;
825
+ const TemplatesPatchWorkspace504 = GatewayTimeoutError;
826
+ const TemplatesPutWorkspaceAssetPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
827
+ const TemplatesPutWorkspaceAssetRequestJson = /* @__PURE__ */ Schema.Struct({
828
+ expectedRevision: Schema.String,
829
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
830
+ contentBase64: Schema.String,
831
+ replace: Schema.Boolean,
832
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
833
+ });
834
+ const TemplatesPutWorkspaceAsset200 = /* @__PURE__ */ Schema.Struct({
835
+ workspace: Schema.Struct({
836
+ projectId: TemplateProjectId,
837
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
838
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
839
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
840
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
841
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
842
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
843
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
844
+ revision: Schema.String,
845
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
846
+ assetChanges: Schema.Array(Schema.Struct({
847
+ path: Schema.String,
848
+ status: Schema.Union([
849
+ Schema.Literal("added"),
850
+ Schema.Literal("modified"),
851
+ Schema.Literal("deleted")
852
+ ])
853
+ })),
854
+ conflicts: Schema.Array(Schema.Struct({
855
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
856
+ base: Schema.Union([Schema.String, Schema.Null]),
857
+ draft: Schema.Union([Schema.String, Schema.Null]),
858
+ main: Schema.Union([Schema.String, Schema.Null])
859
+ })),
860
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
861
+ kind: Schema.String,
862
+ digest: Schema.String,
863
+ locator: Schema.optionalKey(Schema.String)
864
+ })) }),
865
+ mounts: Schema.Array(Schema.Union([
866
+ Schema.Struct({
867
+ kind: Schema.Literal("project"),
868
+ root: Schema.Literal("/project"),
869
+ access: Schema.Literal("read-write")
870
+ }),
871
+ Schema.Struct({
872
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
873
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
874
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
875
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
876
+ kind: Schema.Literal("started-from"),
877
+ access: Schema.Literal("read-only"),
878
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
879
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
880
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
881
+ }),
882
+ Schema.Struct({
883
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
884
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
885
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
886
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
887
+ kind: Schema.Literal("resource"),
888
+ access: Schema.Literal("read-only"),
889
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
890
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
891
+ }),
892
+ Schema.Struct({
893
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
894
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
895
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
896
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
897
+ kind: Schema.Literal("library-template"),
898
+ access: Schema.Literal("read-only"),
899
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
900
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
901
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
902
+ })
903
+ ])),
904
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
905
+ createdAt: Schema.String,
906
+ updatedAt: Schema.String,
907
+ createdBy: Schema.Struct({
908
+ userId: UserId,
909
+ via: Schema.Union([
910
+ Schema.Literal("api"),
911
+ Schema.Literal("mcp"),
912
+ Schema.Literal("agent")
913
+ ])
914
+ }),
915
+ updatedBy: Schema.Struct({
916
+ userId: UserId,
917
+ via: Schema.Union([
918
+ Schema.Literal("api"),
919
+ Schema.Literal("mcp"),
920
+ Schema.Literal("agent")
921
+ ])
922
+ })
923
+ }),
924
+ files: Schema.Record(Schema.String, Schema.String)
925
+ });
926
+ const TemplatesPutWorkspaceAsset401 = UnauthorizedError;
927
+ const TemplatesPutWorkspaceAsset403 = ForbiddenError;
928
+ const TemplatesPutWorkspaceAsset404 = ResourceNotFoundError;
929
+ const TemplatesPutWorkspaceAsset409 = ConflictError;
930
+ const TemplatesPutWorkspaceAsset422 = ValidationError;
931
+ const TemplatesPutWorkspaceAsset500 = InternalError;
932
+ const TemplatesPutWorkspaceAsset504 = GatewayTimeoutError;
933
+ const TemplatesCheckWorkspacePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
934
+ const TemplatesCheckWorkspaceRequestJson = /* @__PURE__ */ Schema.Struct({ expectedRevision: Schema.String });
935
+ const TemplatesCheckWorkspace200 = /* @__PURE__ */ Schema.Struct({
936
+ projectId: TemplateProjectId,
937
+ revision: Schema.String,
938
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
939
+ declaration: Schema.Union([Schema.Struct({
940
+ codeDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
941
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
942
+ input: Schema.Struct({
943
+ schema: Schema.Record(Schema.String, JsonValue),
944
+ schemaDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
945
+ contractDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
946
+ }),
947
+ fixtures: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })))
948
+ }), Schema.Null]),
949
+ diagnostics: Schema.Array(Schema.Struct({
950
+ code: Schema.String,
951
+ severity: Schema.Union([
952
+ Schema.Literal("error"),
953
+ Schema.Literal("warning"),
954
+ Schema.Literal("info")
955
+ ]),
956
+ message: Schema.String,
957
+ origins: Schema.Array(Schema.Struct({
958
+ fileName: Schema.String,
959
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
960
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
961
+ })),
962
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
963
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
964
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
965
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
966
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
967
+ fileName: Schema.String,
968
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
969
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
970
+ }))), Schema.Null])),
971
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
972
+ assessment: Schema.Union([
973
+ Schema.Literal("risk"),
974
+ Schema.Literal("degradation"),
975
+ Schema.Literal("unverified"),
976
+ Schema.Literal("not-applicable")
977
+ ]),
978
+ title: Schema.String
979
+ }), Schema.Null]))
980
+ })),
981
+ incompatibilities: Schema.Array(Schema.Struct({
982
+ code: Schema.String,
983
+ severity: Schema.Union([
984
+ Schema.Literal("error"),
985
+ Schema.Literal("warning"),
986
+ Schema.Literal("info")
987
+ ]),
988
+ message: Schema.String,
989
+ origins: Schema.Array(Schema.Struct({
990
+ fileName: Schema.String,
991
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
992
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
993
+ })),
994
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
995
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
996
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
997
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
998
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
999
+ fileName: Schema.String,
1000
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1001
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1002
+ }))), Schema.Null])),
1003
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
1004
+ assessment: Schema.Union([
1005
+ Schema.Literal("risk"),
1006
+ Schema.Literal("degradation"),
1007
+ Schema.Literal("unverified"),
1008
+ Schema.Literal("not-applicable")
1009
+ ]),
1010
+ title: Schema.String
1011
+ }), Schema.Null]))
1012
+ }))
1013
+ });
1014
+ const TemplatesCheckWorkspace401 = UnauthorizedError;
1015
+ const TemplatesCheckWorkspace403 = ForbiddenError;
1016
+ const TemplatesCheckWorkspace404 = ResourceNotFoundError;
1017
+ const TemplatesCheckWorkspace409 = ConflictError;
1018
+ const TemplatesCheckWorkspace422 = ValidationError;
1019
+ const TemplatesCheckWorkspace500 = InternalError;
1020
+ const TemplatesCheckWorkspace504 = GatewayTimeoutError;
1021
+ const TemplatesResolveWorkspaceConflictPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1022
+ const TemplatesResolveWorkspaceConflictRequestJson = /* @__PURE__ */ Schema.Struct({
1023
+ expectedRevision: Schema.String,
1024
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1025
+ resolution: Schema.Union([
1026
+ Schema.Literal("draft"),
1027
+ Schema.Literal("main"),
1028
+ Schema.Struct({ content: Schema.Union([Schema.String, Schema.Null]) })
1029
+ ]),
1030
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
1031
+ });
1032
+ const TemplatesResolveWorkspaceConflict200 = /* @__PURE__ */ Schema.Struct({
1033
+ workspace: Schema.Struct({
1034
+ projectId: TemplateProjectId,
1035
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
1036
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1037
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
1038
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
1039
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1040
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1041
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
1042
+ revision: Schema.String,
1043
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
1044
+ assetChanges: Schema.Array(Schema.Struct({
1045
+ path: Schema.String,
1046
+ status: Schema.Union([
1047
+ Schema.Literal("added"),
1048
+ Schema.Literal("modified"),
1049
+ Schema.Literal("deleted")
1050
+ ])
1051
+ })),
1052
+ conflicts: Schema.Array(Schema.Struct({
1053
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1054
+ base: Schema.Union([Schema.String, Schema.Null]),
1055
+ draft: Schema.Union([Schema.String, Schema.Null]),
1056
+ main: Schema.Union([Schema.String, Schema.Null])
1057
+ })),
1058
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
1059
+ kind: Schema.String,
1060
+ digest: Schema.String,
1061
+ locator: Schema.optionalKey(Schema.String)
1062
+ })) }),
1063
+ mounts: Schema.Array(Schema.Union([
1064
+ Schema.Struct({
1065
+ kind: Schema.Literal("project"),
1066
+ root: Schema.Literal("/project"),
1067
+ access: Schema.Literal("read-write")
1068
+ }),
1069
+ Schema.Struct({
1070
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1071
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1072
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1073
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1074
+ kind: Schema.Literal("started-from"),
1075
+ access: Schema.Literal("read-only"),
1076
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1077
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1078
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1079
+ }),
1080
+ Schema.Struct({
1081
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1082
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1083
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1084
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1085
+ kind: Schema.Literal("resource"),
1086
+ access: Schema.Literal("read-only"),
1087
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
1088
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1089
+ }),
1090
+ Schema.Struct({
1091
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1092
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1093
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1094
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1095
+ kind: Schema.Literal("library-template"),
1096
+ access: Schema.Literal("read-only"),
1097
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1098
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1099
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1100
+ })
1101
+ ])),
1102
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1103
+ createdAt: Schema.String,
1104
+ updatedAt: Schema.String,
1105
+ createdBy: Schema.Struct({
1106
+ userId: UserId,
1107
+ via: Schema.Union([
1108
+ Schema.Literal("api"),
1109
+ Schema.Literal("mcp"),
1110
+ Schema.Literal("agent")
1111
+ ])
1112
+ }),
1113
+ updatedBy: Schema.Struct({
1114
+ userId: UserId,
1115
+ via: Schema.Union([
1116
+ Schema.Literal("api"),
1117
+ Schema.Literal("mcp"),
1118
+ Schema.Literal("agent")
1119
+ ])
1120
+ })
1121
+ }),
1122
+ files: Schema.Record(Schema.String, Schema.String)
1123
+ });
1124
+ const TemplatesResolveWorkspaceConflict401 = UnauthorizedError;
1125
+ const TemplatesResolveWorkspaceConflict403 = ForbiddenError;
1126
+ const TemplatesResolveWorkspaceConflict404 = ResourceNotFoundError;
1127
+ const TemplatesResolveWorkspaceConflict409 = ConflictError;
1128
+ const TemplatesResolveWorkspaceConflict422 = ValidationError;
1129
+ const TemplatesResolveWorkspaceConflict500 = InternalError;
1130
+ const TemplatesResolveWorkspaceConflict504 = GatewayTimeoutError;
1131
+ const TemplatesDiffWorkspacePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1132
+ const TemplatesDiffWorkspaceRequestJson = /* @__PURE__ */ Schema.Struct({ expectedRevision: Schema.String });
1133
+ const TemplatesDiffWorkspace200 = /* @__PURE__ */ Schema.Struct({
1134
+ projectId: TemplateProjectId,
1135
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1136
+ revision: Schema.String,
1137
+ changes: Schema.Array(Schema.Struct({
1138
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1139
+ before: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1048576).annotate({ expected: "a string with at most 1048576 code points" })).check(Schema.isMaxLength(1048576).annotate({ expected: "a value with a length of at most 1048576" })), Schema.Null]),
1140
+ after: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1048576).annotate({ expected: "a string with at most 1048576 code points" })).check(Schema.isMaxLength(1048576).annotate({ expected: "a value with a length of at most 1048576" })), Schema.Null]),
1141
+ status: Schema.Union([
1142
+ Schema.Literal("added"),
1143
+ Schema.Literal("modified"),
1144
+ Schema.Literal("deleted")
1145
+ ])
1146
+ })),
1147
+ assetChanges: Schema.Array(Schema.Struct({
1148
+ path: Schema.String,
1149
+ status: Schema.Union([
1150
+ Schema.Literal("added"),
1151
+ Schema.Literal("modified"),
1152
+ Schema.Literal("deleted")
1153
+ ])
1154
+ }))
1155
+ });
1156
+ const TemplatesDiffWorkspace401 = UnauthorizedError;
1157
+ const TemplatesDiffWorkspace403 = ForbiddenError;
1158
+ const TemplatesDiffWorkspace404 = ResourceNotFoundError;
1159
+ const TemplatesDiffWorkspace409 = ConflictError;
1160
+ const TemplatesDiffWorkspace422 = ValidationError;
1161
+ const TemplatesDiffWorkspace500 = InternalError;
1162
+ const TemplatesDiffWorkspace504 = GatewayTimeoutError;
1163
+ const TemplatesRenderWorkspaceFixturePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1164
+ const TemplatesRenderWorkspaceFixtureRequestJson = /* @__PURE__ */ Schema.Struct({
1165
+ expectedRevision: Schema.String,
1166
+ fixture: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" }))
1167
+ });
1168
+ const TemplatesRenderWorkspaceFixture200 = /* @__PURE__ */ Schema.Struct({
1169
+ projectId: TemplateProjectId,
1170
+ revision: Schema.String,
1171
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
1172
+ declaration: Schema.Union([Schema.Struct({
1173
+ codeDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1174
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1175
+ input: Schema.Struct({
1176
+ schema: Schema.Record(Schema.String, JsonValue),
1177
+ schemaDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1178
+ contractDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" }))
1179
+ }),
1180
+ fixtures: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })))
1181
+ }), Schema.Null]),
1182
+ diagnostics: Schema.Array(Schema.Struct({
1183
+ code: Schema.String,
1184
+ severity: Schema.Union([
1185
+ Schema.Literal("error"),
1186
+ Schema.Literal("warning"),
1187
+ Schema.Literal("info")
1188
+ ]),
1189
+ message: Schema.String,
1190
+ origins: Schema.Array(Schema.Struct({
1191
+ fileName: Schema.String,
1192
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1193
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1194
+ })),
1195
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1196
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1197
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1198
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1199
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
1200
+ fileName: Schema.String,
1201
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1202
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1203
+ }))), Schema.Null])),
1204
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
1205
+ assessment: Schema.Union([
1206
+ Schema.Literal("risk"),
1207
+ Schema.Literal("degradation"),
1208
+ Schema.Literal("unverified"),
1209
+ Schema.Literal("not-applicable")
1210
+ ]),
1211
+ title: Schema.String
1212
+ }), Schema.Null]))
1213
+ })),
1214
+ incompatibilities: Schema.Array(Schema.Struct({
1215
+ code: Schema.String,
1216
+ severity: Schema.Union([
1217
+ Schema.Literal("error"),
1218
+ Schema.Literal("warning"),
1219
+ Schema.Literal("info")
1220
+ ]),
1221
+ message: Schema.String,
1222
+ origins: Schema.Array(Schema.Struct({
1223
+ fileName: Schema.String,
1224
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1225
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1226
+ })),
1227
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1228
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1229
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1230
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1231
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
1232
+ fileName: Schema.String,
1233
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1234
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1235
+ }))), Schema.Null])),
1236
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
1237
+ assessment: Schema.Union([
1238
+ Schema.Literal("risk"),
1239
+ Schema.Literal("degradation"),
1240
+ Schema.Literal("unverified"),
1241
+ Schema.Literal("not-applicable")
1242
+ ]),
1243
+ title: Schema.String
1244
+ }), Schema.Null]))
1245
+ })),
1246
+ fixture: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1247
+ rendered: Schema.Union([Schema.Struct({
1248
+ subject: Schema.String,
1249
+ preheader: Schema.optionalKey(Schema.String),
1250
+ html: Schema.String.check(Schema.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" })),
1251
+ text: Schema.String.check(Schema.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" })),
1252
+ selections: Schema.Array(Schema.Struct({
1253
+ instancePath: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1254
+ tag: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1255
+ origins: Schema.Array(Schema.Struct({
1256
+ fileName: Schema.String,
1257
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1258
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1259
+ })),
1260
+ authored: Schema.Boolean,
1261
+ occurrence: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1262
+ occurrences: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1263
+ parentPath: Schema.optionalKey(Schema.String),
1264
+ start: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1265
+ end: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
1266
+ }))
1267
+ }), Schema.Null])
1268
+ });
1269
+ const TemplatesRenderWorkspaceFixture401 = UnauthorizedError;
1270
+ const TemplatesRenderWorkspaceFixture403 = ForbiddenError;
1271
+ const TemplatesRenderWorkspaceFixture404 = ResourceNotFoundError;
1272
+ const TemplatesRenderWorkspaceFixture409 = ConflictError;
1273
+ const TemplatesRenderWorkspaceFixture422 = ValidationError;
1274
+ const TemplatesRenderWorkspaceFixture500 = InternalError;
1275
+ const TemplatesRenderWorkspaceFixture504 = GatewayTimeoutError;
1276
+ const TemplatesWorkspaceHistoryPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1277
+ const TemplatesWorkspaceHistoryQuery = /* @__PURE__ */ Schema.Struct({ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) });
1278
+ const TemplatesWorkspaceHistory200 = /* @__PURE__ */ Schema.Struct({
1279
+ projectId: TemplateProjectId,
1280
+ head: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1281
+ commits: Schema.Array(Schema.Struct({
1282
+ commit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1283
+ tree: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1284
+ parentCommit: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
1285
+ message: Schema.String,
1286
+ committedAt: Schema.String
1287
+ })),
1288
+ publication: Schema.Union([Schema.Struct({
1289
+ id: TemplatePublicationId,
1290
+ commit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" }))
1291
+ }), Schema.Null])
1292
+ });
1293
+ const TemplatesWorkspaceHistory401 = UnauthorizedError;
1294
+ const TemplatesWorkspaceHistory403 = ForbiddenError;
1295
+ const TemplatesWorkspaceHistory404 = ResourceNotFoundError;
1296
+ const TemplatesWorkspaceHistory409 = ConflictError;
1297
+ const TemplatesWorkspaceHistory422 = ValidationError;
1298
+ const TemplatesWorkspaceHistory500 = InternalError;
1299
+ const TemplatesWorkspaceHistory504 = GatewayTimeoutError;
1300
+ const TemplatesAttachWorkspaceResourcePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1301
+ const TemplatesAttachWorkspaceResourceRequestJson = /* @__PURE__ */ Schema.Struct({
1302
+ expectedRevision: Schema.String,
1303
+ resource: Schema.Struct({
1304
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
1305
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" })),
1306
+ files: Schema.Array(Schema.Struct({
1307
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1308
+ mediaType: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
1309
+ contentBase64: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "u")).annotate({ expected: "a string matching the RegExp ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" }))
1310
+ })).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(32).annotate({ expected: "a value with a length of at most 32" }))
1311
+ }),
1312
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
1313
+ });
1314
+ const TemplatesAttachWorkspaceResource200 = /* @__PURE__ */ Schema.Struct({
1315
+ projectId: TemplateProjectId,
1316
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
1317
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1318
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
1319
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
1320
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1321
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1322
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
1323
+ revision: Schema.String,
1324
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
1325
+ assetChanges: Schema.Array(Schema.Struct({
1326
+ path: Schema.String,
1327
+ status: Schema.Union([
1328
+ Schema.Literal("added"),
1329
+ Schema.Literal("modified"),
1330
+ Schema.Literal("deleted")
1331
+ ])
1332
+ })),
1333
+ conflicts: Schema.Array(Schema.Struct({
1334
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1335
+ base: Schema.Union([Schema.String, Schema.Null]),
1336
+ draft: Schema.Union([Schema.String, Schema.Null]),
1337
+ main: Schema.Union([Schema.String, Schema.Null])
1338
+ })),
1339
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
1340
+ kind: Schema.String,
1341
+ digest: Schema.String,
1342
+ locator: Schema.optionalKey(Schema.String)
1343
+ })) }),
1344
+ mounts: Schema.Array(Schema.Union([
1345
+ Schema.Struct({
1346
+ kind: Schema.Literal("project"),
1347
+ root: Schema.Literal("/project"),
1348
+ access: Schema.Literal("read-write")
1349
+ }),
1350
+ Schema.Struct({
1351
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1352
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1353
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1354
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1355
+ kind: Schema.Literal("started-from"),
1356
+ access: Schema.Literal("read-only"),
1357
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1358
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1359
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1360
+ }),
1361
+ Schema.Struct({
1362
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1363
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1364
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1365
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1366
+ kind: Schema.Literal("resource"),
1367
+ access: Schema.Literal("read-only"),
1368
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
1369
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1370
+ }),
1371
+ Schema.Struct({
1372
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1373
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1374
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1375
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1376
+ kind: Schema.Literal("library-template"),
1377
+ access: Schema.Literal("read-only"),
1378
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1379
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1380
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1381
+ })
1382
+ ])),
1383
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1384
+ createdAt: Schema.String,
1385
+ updatedAt: Schema.String,
1386
+ createdBy: Schema.Struct({
1387
+ userId: UserId,
1388
+ via: Schema.Union([
1389
+ Schema.Literal("api"),
1390
+ Schema.Literal("mcp"),
1391
+ Schema.Literal("agent")
1392
+ ])
1393
+ }),
1394
+ updatedBy: Schema.Struct({
1395
+ userId: UserId,
1396
+ via: Schema.Union([
1397
+ Schema.Literal("api"),
1398
+ Schema.Literal("mcp"),
1399
+ Schema.Literal("agent")
1400
+ ])
1401
+ })
1402
+ });
1403
+ const TemplatesAttachWorkspaceResource401 = UnauthorizedError;
1404
+ const TemplatesAttachWorkspaceResource403 = ForbiddenError;
1405
+ const TemplatesAttachWorkspaceResource404 = ResourceNotFoundError;
1406
+ const TemplatesAttachWorkspaceResource409 = ConflictError;
1407
+ const TemplatesAttachWorkspaceResource422 = ValidationError;
1408
+ const TemplatesAttachWorkspaceResource500 = InternalError;
1409
+ const TemplatesAttachWorkspaceResource504 = GatewayTimeoutError;
1410
+ const TemplatesRemoveWorkspaceResourcePathParams = /* @__PURE__ */ Schema.Struct({
1411
+ id: TemplateId,
1412
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" }))
1413
+ });
1414
+ const TemplatesRemoveWorkspaceResourceRequestJson = /* @__PURE__ */ Schema.Struct({
1415
+ expectedRevision: Schema.String,
1416
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
1417
+ });
1418
+ const TemplatesRemoveWorkspaceResource200 = /* @__PURE__ */ Schema.Struct({
1419
+ projectId: TemplateProjectId,
1420
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
1421
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1422
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
1423
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
1424
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1425
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1426
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
1427
+ revision: Schema.String,
1428
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
1429
+ assetChanges: Schema.Array(Schema.Struct({
1430
+ path: Schema.String,
1431
+ status: Schema.Union([
1432
+ Schema.Literal("added"),
1433
+ Schema.Literal("modified"),
1434
+ Schema.Literal("deleted")
1435
+ ])
1436
+ })),
1437
+ conflicts: Schema.Array(Schema.Struct({
1438
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1439
+ base: Schema.Union([Schema.String, Schema.Null]),
1440
+ draft: Schema.Union([Schema.String, Schema.Null]),
1441
+ main: Schema.Union([Schema.String, Schema.Null])
1442
+ })),
1443
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
1444
+ kind: Schema.String,
1445
+ digest: Schema.String,
1446
+ locator: Schema.optionalKey(Schema.String)
1447
+ })) }),
1448
+ mounts: Schema.Array(Schema.Union([
1449
+ Schema.Struct({
1450
+ kind: Schema.Literal("project"),
1451
+ root: Schema.Literal("/project"),
1452
+ access: Schema.Literal("read-write")
1453
+ }),
1454
+ Schema.Struct({
1455
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1456
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1457
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1458
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1459
+ kind: Schema.Literal("started-from"),
1460
+ access: Schema.Literal("read-only"),
1461
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1462
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1463
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1464
+ }),
1465
+ Schema.Struct({
1466
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1467
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1468
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1469
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1470
+ kind: Schema.Literal("resource"),
1471
+ access: Schema.Literal("read-only"),
1472
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
1473
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1474
+ }),
1475
+ Schema.Struct({
1476
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1477
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1478
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1479
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1480
+ kind: Schema.Literal("library-template"),
1481
+ access: Schema.Literal("read-only"),
1482
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1483
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1484
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1485
+ })
1486
+ ])),
1487
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1488
+ createdAt: Schema.String,
1489
+ updatedAt: Schema.String,
1490
+ createdBy: Schema.Struct({
1491
+ userId: UserId,
1492
+ via: Schema.Union([
1493
+ Schema.Literal("api"),
1494
+ Schema.Literal("mcp"),
1495
+ Schema.Literal("agent")
1496
+ ])
1497
+ }),
1498
+ updatedBy: Schema.Struct({
1499
+ userId: UserId,
1500
+ via: Schema.Union([
1501
+ Schema.Literal("api"),
1502
+ Schema.Literal("mcp"),
1503
+ Schema.Literal("agent")
1504
+ ])
1505
+ })
1506
+ });
1507
+ const TemplatesRemoveWorkspaceResource401 = UnauthorizedError;
1508
+ const TemplatesRemoveWorkspaceResource403 = ForbiddenError;
1509
+ const TemplatesRemoveWorkspaceResource404 = ResourceNotFoundError;
1510
+ const TemplatesRemoveWorkspaceResource409 = ConflictError;
1511
+ const TemplatesRemoveWorkspaceResource422 = ValidationError;
1512
+ const TemplatesRemoveWorkspaceResource500 = InternalError;
1513
+ const TemplatesRemoveWorkspaceResource504 = GatewayTimeoutError;
1514
+ const TemplatesRestoreWorkspacePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1515
+ const TemplatesRestoreWorkspaceRequestJson = /* @__PURE__ */ Schema.Struct({
1516
+ expectedRevision: Schema.String,
1517
+ commit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1518
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
1519
+ });
1520
+ const TemplatesRestoreWorkspace200 = /* @__PURE__ */ Schema.Struct({
1521
+ view: Schema.Struct({
1522
+ workspace: Schema.Struct({
1523
+ projectId: TemplateProjectId,
1524
+ organizationId: Schema.Union([OrganizationId, Schema.Null]),
1525
+ ownerEpoch: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1526
+ repositoryName: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" })),
1527
+ defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })),
1528
+ baseCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1529
+ remoteHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1530
+ pendingRemoteHead: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })), Schema.Null]),
1531
+ revision: Schema.String,
1532
+ overlay: Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])),
1533
+ assetChanges: Schema.Array(Schema.Struct({
1534
+ path: Schema.String,
1535
+ status: Schema.Union([
1536
+ Schema.Literal("added"),
1537
+ Schema.Literal("modified"),
1538
+ Schema.Literal("deleted")
1539
+ ])
1540
+ })),
1541
+ conflicts: Schema.Array(Schema.Struct({
1542
+ path: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" })),
1543
+ base: Schema.Union([Schema.String, Schema.Null]),
1544
+ draft: Schema.Union([Schema.String, Schema.Null]),
1545
+ main: Schema.Union([Schema.String, Schema.Null])
1546
+ })),
1547
+ provenance: Schema.Struct({ references: Schema.Array(Schema.Struct({
1548
+ kind: Schema.String,
1549
+ digest: Schema.String,
1550
+ locator: Schema.optionalKey(Schema.String)
1551
+ })) }),
1552
+ mounts: Schema.Array(Schema.Union([
1553
+ Schema.Struct({
1554
+ kind: Schema.Literal("project"),
1555
+ root: Schema.Literal("/project"),
1556
+ access: Schema.Literal("read-write")
1557
+ }),
1558
+ Schema.Struct({
1559
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1560
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1561
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1562
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1563
+ kind: Schema.Literal("started-from"),
1564
+ access: Schema.Literal("read-only"),
1565
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1566
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1567
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1568
+ }),
1569
+ Schema.Struct({
1570
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1571
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1572
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1573
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1574
+ kind: Schema.Literal("resource"),
1575
+ access: Schema.Literal("read-only"),
1576
+ resourceId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z0-9._-]{1,128}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z0-9._-]{1,128}$" })),
1577
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1578
+ }),
1579
+ Schema.Struct({
1580
+ root: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^\\/(?:project|references\\/started-from\\/[a-f0-9]{64}|resources\\/[A-Za-z0-9._-]+\\/[a-f0-9]{64}|library\\/templates\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-f0-9]{64})(?:\\/(?!\\.{1,2}(?:\\/|$)|\\.git(?:\\/|$))[^\\\\/]+)*$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })),
1581
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1582
+ fileCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1583
+ byteSize: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1584
+ kind: Schema.Literal("library-template"),
1585
+ access: Schema.Literal("read-only"),
1586
+ templateId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
1587
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1588
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" }))
1589
+ })
1590
+ ])),
1591
+ libraryManifestDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1592
+ createdAt: Schema.String,
1593
+ updatedAt: Schema.String,
1594
+ createdBy: Schema.Struct({
1595
+ userId: UserId,
1596
+ via: Schema.Union([
1597
+ Schema.Literal("api"),
1598
+ Schema.Literal("mcp"),
1599
+ Schema.Literal("agent")
1600
+ ])
1601
+ }),
1602
+ updatedBy: Schema.Struct({
1603
+ userId: UserId,
1604
+ via: Schema.Union([
1605
+ Schema.Literal("api"),
1606
+ Schema.Literal("mcp"),
1607
+ Schema.Literal("agent")
1608
+ ])
1609
+ })
1610
+ }),
1611
+ files: Schema.Record(Schema.String, Schema.String)
1612
+ }),
1613
+ source: Schema.Struct({
1614
+ digest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1615
+ content: Schema.String.check(Schema.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" }))
1616
+ })
1617
+ });
1618
+ const TemplatesRestoreWorkspace401 = UnauthorizedError;
1619
+ const TemplatesRestoreWorkspace403 = ForbiddenError;
1620
+ const TemplatesRestoreWorkspace404 = ResourceNotFoundError;
1621
+ const TemplatesRestoreWorkspace409 = ConflictError;
1622
+ const TemplatesRestoreWorkspace422 = ValidationError;
1623
+ const TemplatesRestoreWorkspace500 = InternalError;
1624
+ const TemplatesRestoreWorkspace504 = GatewayTimeoutError;
1625
+ const TemplatesSaveWorkspacePathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateId });
1626
+ const TemplatesSaveWorkspaceRequestJson = /* @__PURE__ */ Schema.Struct({
1627
+ expectedRevision: Schema.String,
1628
+ expectedHead: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1629
+ message: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })),
1630
+ idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
1631
+ });
1632
+ const TemplatesSaveWorkspace200 = /* @__PURE__ */ Schema.Struct({
1633
+ commit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1634
+ parentCommit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1635
+ tree: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
1636
+ revision: Schema.String,
1637
+ changedPaths: Schema.Array(Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$)).{1,1024}$" }))),
1638
+ sourceDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1639
+ buildDigest: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{64}$" })),
1640
+ warnings: Schema.Array(Schema.Struct({
1641
+ code: Schema.String,
1642
+ severity: Schema.Union([
1643
+ Schema.Literal("error"),
1644
+ Schema.Literal("warning"),
1645
+ Schema.Literal("info")
1646
+ ]),
1647
+ message: Schema.String,
1648
+ origins: Schema.Array(Schema.Struct({
1649
+ fileName: Schema.String,
1650
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1651
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1652
+ })),
1653
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1654
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1655
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1656
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1657
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
1658
+ fileName: Schema.String,
1659
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1660
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1661
+ }))), Schema.Null])),
1662
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
1663
+ assessment: Schema.Union([
1664
+ Schema.Literal("risk"),
1665
+ Schema.Literal("degradation"),
1666
+ Schema.Literal("unverified"),
1667
+ Schema.Literal("not-applicable")
1668
+ ]),
1669
+ title: Schema.String
1670
+ }), Schema.Null]))
1671
+ })),
1672
+ incompatibilities: Schema.Array(Schema.Struct({
1673
+ code: Schema.String,
1674
+ severity: Schema.Union([
1675
+ Schema.Literal("error"),
1676
+ Schema.Literal("warning"),
1677
+ Schema.Literal("info")
1678
+ ]),
1679
+ message: Schema.String,
1680
+ origins: Schema.Array(Schema.Struct({
1681
+ fileName: Schema.String,
1682
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1683
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1684
+ })),
1685
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1686
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1687
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1688
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1689
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
1690
+ fileName: Schema.String,
1691
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })),
1692
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" }))
1693
+ }))), Schema.Null])),
1694
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
1695
+ assessment: Schema.Union([
1696
+ Schema.Literal("risk"),
1697
+ Schema.Literal("degradation"),
1698
+ Schema.Literal("unverified"),
1699
+ Schema.Literal("not-applicable")
1700
+ ]),
1701
+ title: Schema.String
1702
+ }), Schema.Null]))
1703
+ }))
1704
+ });
1705
+ const TemplatesSaveWorkspace401 = UnauthorizedError;
1706
+ const TemplatesSaveWorkspace403 = ForbiddenError;
1707
+ const TemplatesSaveWorkspace404 = ResourceNotFoundError;
1708
+ const TemplatesSaveWorkspace409 = ConflictError;
1709
+ const TemplatesSaveWorkspace422 = ValidationError;
1710
+ const TemplatesSaveWorkspace500 = InternalError;
1711
+ const TemplatesSaveWorkspace504 = GatewayTimeoutError;
1712
+ const TemplatesListFamiliesQuery = /* @__PURE__ */ Schema.Struct({
1713
+ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1714
+ cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
1715
+ });
1716
+ const TemplatesListFamilies200 = TemplateFamilyPage;
1717
+ const TemplatesListFamilies401 = UnauthorizedError;
1718
+ const TemplatesListFamilies403 = ForbiddenError;
1719
+ const TemplatesListFamilies422 = ValidationError;
1720
+ const TemplatesListFamilies500 = InternalError;
1721
+ const TemplatesListFamilies504 = GatewayTimeoutError;
1722
+ const TemplatesCreateFamilyRequestJson = /* @__PURE__ */ Schema.Struct({ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
1723
+ const TemplatesCreateFamily201 = TemplateFamily;
1724
+ const TemplatesCreateFamily401 = UnauthorizedError;
1725
+ const TemplatesCreateFamily403 = ForbiddenError;
1726
+ const TemplatesCreateFamily422 = ValidationError;
1727
+ const TemplatesCreateFamily500 = InternalError;
1728
+ const TemplatesCreateFamily504 = GatewayTimeoutError;
1729
+ const TemplatesGetFamilyPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateFamilyId });
1730
+ const TemplatesGetFamily200 = TemplateFamily;
1731
+ const TemplatesGetFamily401 = UnauthorizedError;
1732
+ const TemplatesGetFamily403 = ForbiddenError;
1733
+ const TemplatesGetFamily404 = ResourceNotFoundError;
1734
+ const TemplatesGetFamily422 = ValidationError;
1735
+ const TemplatesGetFamily500 = InternalError;
1736
+ const TemplatesGetFamily504 = GatewayTimeoutError;
1737
+ const TemplatesDeleteFamilyPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateFamilyId });
1738
+ const TemplatesDeleteFamily200 = SuccessResponse;
1739
+ const TemplatesDeleteFamily401 = UnauthorizedError;
1740
+ const TemplatesDeleteFamily403 = ForbiddenError;
1741
+ const TemplatesDeleteFamily404 = ResourceNotFoundError;
1742
+ const TemplatesDeleteFamily422 = ValidationError;
1743
+ const TemplatesDeleteFamily500 = InternalError;
1744
+ const TemplatesDeleteFamily504 = GatewayTimeoutError;
1745
+ const TemplatesRenameFamilyPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateFamilyId });
1746
+ const TemplatesRenameFamilyRequestJson = /* @__PURE__ */ Schema.Struct({ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
1747
+ const TemplatesRenameFamily200 = TemplateFamily;
1748
+ const TemplatesRenameFamily401 = UnauthorizedError;
1749
+ const TemplatesRenameFamily403 = ForbiddenError;
1750
+ const TemplatesRenameFamily404 = ResourceNotFoundError;
1751
+ const TemplatesRenameFamily422 = ValidationError;
1752
+ const TemplatesRenameFamily500 = InternalError;
1753
+ const TemplatesRenameFamily504 = GatewayTimeoutError;
1754
+ const TemplatesAttachFamilyMemberPathParams = /* @__PURE__ */ Schema.Struct({
1755
+ id: TemplateFamilyId,
1756
+ templateId: TemplateId
1757
+ });
1758
+ const TemplatesAttachFamilyMember200 = TemplateFamily;
1759
+ const TemplatesAttachFamilyMember401 = UnauthorizedError;
1760
+ const TemplatesAttachFamilyMember403 = ForbiddenError;
1761
+ const TemplatesAttachFamilyMember404 = ResourceNotFoundError;
1762
+ const TemplatesAttachFamilyMember409 = ConflictError;
1763
+ const TemplatesAttachFamilyMember422 = ValidationError;
1764
+ const TemplatesAttachFamilyMember500 = InternalError;
1765
+ const TemplatesAttachFamilyMember504 = GatewayTimeoutError;
1766
+ const TemplatesDetachFamilyMemberPathParams = /* @__PURE__ */ Schema.Struct({
1767
+ id: TemplateFamilyId,
1768
+ templateId: TemplateId
1769
+ });
1770
+ const TemplatesDetachFamilyMember200 = TemplateFamily;
1771
+ const TemplatesDetachFamilyMember401 = UnauthorizedError;
1772
+ const TemplatesDetachFamilyMember403 = ForbiddenError;
1773
+ const TemplatesDetachFamilyMember404 = ResourceNotFoundError;
1774
+ const TemplatesDetachFamilyMember409 = ConflictError;
1775
+ const TemplatesDetachFamilyMember422 = ValidationError;
1776
+ const TemplatesDetachFamilyMember500 = InternalError;
1777
+ const TemplatesDetachFamilyMember504 = GatewayTimeoutError;
1778
+ const TemplatesCreateFamilyFromTemplatePathParams = /* @__PURE__ */ Schema.Struct({ templateId: TemplateId });
1779
+ const TemplatesCreateFamilyFromTemplateRequestJson = /* @__PURE__ */ Schema.Struct({ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
1780
+ const TemplatesCreateFamilyFromTemplate201 = TemplateFamily;
1781
+ const TemplatesCreateFamilyFromTemplate401 = UnauthorizedError;
1782
+ const TemplatesCreateFamilyFromTemplate403 = ForbiddenError;
1783
+ const TemplatesCreateFamilyFromTemplate404 = ResourceNotFoundError;
1784
+ const TemplatesCreateFamilyFromTemplate409 = ConflictError;
1785
+ const TemplatesCreateFamilyFromTemplate422 = ValidationError;
1786
+ const TemplatesCreateFamilyFromTemplate500 = InternalError;
1787
+ const TemplatesCreateFamilyFromTemplate504 = GatewayTimeoutError;
1788
+ const TemplatesAddEntryPathParams = /* @__PURE__ */ Schema.Struct({ id: TemplateProjectId });
1789
+ const TemplatesAddEntryRequestJson = /* @__PURE__ */ Schema.Struct({
1790
+ entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
1791
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
1792
+ slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1793
+ description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
1794
+ category: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Union([
1795
+ Schema.Literal("transactional"),
1796
+ Schema.Literal("marketing"),
1797
+ Schema.Literal("support"),
1798
+ Schema.Literal("notification"),
1799
+ Schema.Literal("verification"),
1800
+ Schema.Literal("reminder"),
1801
+ Schema.Literal("alert")
1802
+ ]), Schema.Null]), Schema.Null]))
1803
+ });
1804
+ const TemplatesAddEntry201 = Template;
1805
+ const TemplatesAddEntry401 = UnauthorizedError;
1806
+ const TemplatesAddEntry403 = ForbiddenError;
1807
+ const TemplatesAddEntry404 = ResourceNotFoundError;
1808
+ const TemplatesAddEntry409 = ConflictError;
1809
+ const TemplatesAddEntry422 = ValidationError;
1810
+ const TemplatesAddEntry500 = InternalError;
1811
+ const TemplatesAddEntry504 = GatewayTimeoutError;
1812
+ var TemplatesGroup = class extends HttpApiGroup.make("Templates").add(HttpApiEndpoint.get("templatesList", "/v1/templates", {
1813
+ query: TemplatesListQuery,
1814
+ success: TemplatesList200,
1815
+ error: [
1816
+ TemplatesList401.pipe(HttpApiSchema.status(401)),
1817
+ TemplatesList403.pipe(HttpApiSchema.status(403)),
1818
+ TemplatesList422.pipe(HttpApiSchema.status(422)),
1819
+ TemplatesList500,
1820
+ TemplatesList504.pipe(HttpApiSchema.status(504))
1821
+ ]
1822
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.list").annotate(OpenApi.Summary, "List templates").annotate(OpenApi.Description, "Returns template summaries, newest first, filterable by category, channel, status, project, and search. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a template's compiled content, current publication, and input schema with `GET /v1/templates/{id}`."), HttpApiEndpoint.post("templatesCreate", "/v1/templates", {
1823
+ payload: TemplatesCreateRequestJson,
1824
+ success: TemplatesCreate201.pipe(HttpApiSchema.status(201)),
1825
+ error: [
1826
+ TemplatesCreate401.pipe(HttpApiSchema.status(401)),
1827
+ TemplatesCreate403.pipe(HttpApiSchema.status(403)),
1828
+ TemplatesCreate409.pipe(HttpApiSchema.status(409)),
1829
+ TemplatesCreate422.pipe(HttpApiSchema.status(422)),
1830
+ TemplatesCreate500,
1831
+ TemplatesCreate504.pipe(HttpApiSchema.status(504))
1832
+ ]
1833
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.create").annotate(OpenApi.Summary, "Create a template").annotate(OpenApi.Description, "Creates an email template project from Samva's canonical TSX starter and returns its template entry with status 201."), HttpApiEndpoint.get("templatesGetById", "/v1/templates/:id", {
1834
+ params: TemplatesGetByIdPathParams,
1835
+ success: TemplatesGetById200,
1836
+ error: [
1837
+ TemplatesGetById401.pipe(HttpApiSchema.status(401)),
1838
+ TemplatesGetById403.pipe(HttpApiSchema.status(403)),
1839
+ TemplatesGetById404.pipe(HttpApiSchema.status(404)),
1840
+ TemplatesGetById422.pipe(HttpApiSchema.status(422)),
1841
+ TemplatesGetById500,
1842
+ TemplatesGetById504.pipe(HttpApiSchema.status(504))
1843
+ ]
1844
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getById").annotate(OpenApi.Summary, "Get a template").annotate(OpenApi.Description, "Returns the template with its project entry path, delivery defaults, compiled channel content, current publication, and the input schema that publication validates against. Open live project files through the workspace API."), HttpApiEndpoint.delete("templatesRemove", "/v1/templates/:id", {
1845
+ params: TemplatesRemovePathParams,
1846
+ success: TemplatesRemove200,
1847
+ error: [
1848
+ TemplatesRemove401.pipe(HttpApiSchema.status(401)),
1849
+ TemplatesRemove403.pipe(HttpApiSchema.status(403)),
1850
+ TemplatesRemove404.pipe(HttpApiSchema.status(404)),
1851
+ TemplatesRemove422.pipe(HttpApiSchema.status(422)),
1852
+ TemplatesRemove500,
1853
+ TemplatesRemove504.pipe(HttpApiSchema.status(504))
1854
+ ]
1855
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.remove").annotate(OpenApi.Summary, "Delete a template").annotate(OpenApi.Description, "Deletes a template from the organization and returns a success flag."), HttpApiEndpoint.patch("templatesUpdate", "/v1/templates/:id", {
1856
+ params: TemplatesUpdatePathParams,
1857
+ payload: TemplatesUpdateRequestJson,
1858
+ success: TemplatesUpdate200,
1859
+ error: [
1860
+ TemplatesUpdate401.pipe(HttpApiSchema.status(401)),
1861
+ TemplatesUpdate403.pipe(HttpApiSchema.status(403)),
1862
+ TemplatesUpdate404.pipe(HttpApiSchema.status(404)),
1863
+ TemplatesUpdate409.pipe(HttpApiSchema.status(409)),
1864
+ TemplatesUpdate422.pipe(HttpApiSchema.status(422)),
1865
+ TemplatesUpdate500,
1866
+ TemplatesUpdate504.pipe(HttpApiSchema.status(504))
1867
+ ]
1868
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.update").annotate(OpenApi.Summary, "Update a template").annotate(OpenApi.Description, "Updates template metadata. Setting `entryPath` points the template at another file in its project and keeps its id, slug, and publications; move the file in Git separately. Source changes use the project workspace API."), HttpApiEndpoint.get("templatesListInputContracts", "/v1/templates/:id/input-contracts", {
1869
+ params: TemplatesListInputContractsPathParams,
1870
+ query: TemplatesListInputContractsQuery,
1871
+ success: TemplatesListInputContracts200,
1872
+ error: [
1873
+ TemplatesListInputContracts401.pipe(HttpApiSchema.status(401)),
1874
+ TemplatesListInputContracts403.pipe(HttpApiSchema.status(403)),
1875
+ TemplatesListInputContracts404.pipe(HttpApiSchema.status(404)),
1876
+ TemplatesListInputContracts422.pipe(HttpApiSchema.status(422)),
1877
+ TemplatesListInputContracts500,
1878
+ TemplatesListInputContracts504.pipe(HttpApiSchema.status(504))
1879
+ ]
1880
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.listInputContracts").annotate(OpenApi.Summary, "List a template's input contracts").annotate(OpenApi.Description, "Returns the immutable input contracts this template has published under, newest version first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Send against a contract to follow later publications that validate input identically."), HttpApiEndpoint.get("templatesGetInputContract", "/v1/templates/:id/input-contracts/:inputContractId", {
1881
+ params: TemplatesGetInputContractPathParams,
1882
+ success: TemplatesGetInputContract200,
1883
+ error: [
1884
+ TemplatesGetInputContract401.pipe(HttpApiSchema.status(401)),
1885
+ TemplatesGetInputContract403.pipe(HttpApiSchema.status(403)),
1886
+ TemplatesGetInputContract404.pipe(HttpApiSchema.status(404)),
1887
+ TemplatesGetInputContract422.pipe(HttpApiSchema.status(422)),
1888
+ TemplatesGetInputContract500,
1889
+ TemplatesGetInputContract504.pipe(HttpApiSchema.status(504))
1890
+ ]
1891
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getInputContract").annotate(OpenApi.Summary, "Get a template input contract").annotate(OpenApi.Description, "Returns one immutable input contract and the published schema it validates against."), HttpApiEndpoint.post("templatesPublish", "/v1/templates/:id/publications", {
1892
+ params: TemplatesPublishPathParams,
1893
+ payload: TemplatesPublishRequestJson,
1894
+ success: TemplatesPublish201.pipe(HttpApiSchema.status(201)),
1895
+ error: [
1896
+ TemplatesPublish401.pipe(HttpApiSchema.status(401)),
1897
+ TemplatesPublish403.pipe(HttpApiSchema.status(403)),
1898
+ TemplatesPublish404.pipe(HttpApiSchema.status(404)),
1899
+ TemplatesPublish409.pipe(HttpApiSchema.status(409)),
1900
+ TemplatesPublish422.pipe(HttpApiSchema.status(422)),
1901
+ TemplatesPublish500,
1902
+ TemplatesPublish504.pipe(HttpApiSchema.status(504))
1903
+ ]
1904
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.publish").annotate(OpenApi.Summary, "Publish an exact template commit").annotate(OpenApi.Description, "Builds an exact Git commit and entry path, stores the immutable compiled IR and its assets, records the input contract it validates against, and makes that publication current."), HttpApiEndpoint.get("templatesGetPublication", "/v1/templates/:id/publications/:publicationId", {
1905
+ params: TemplatesGetPublicationPathParams,
1906
+ success: TemplatesGetPublication200,
1907
+ error: [
1908
+ TemplatesGetPublication401.pipe(HttpApiSchema.status(401)),
1909
+ TemplatesGetPublication403.pipe(HttpApiSchema.status(403)),
1910
+ TemplatesGetPublication404.pipe(HttpApiSchema.status(404)),
1911
+ TemplatesGetPublication422.pipe(HttpApiSchema.status(422)),
1912
+ TemplatesGetPublication500,
1913
+ TemplatesGetPublication504.pipe(HttpApiSchema.status(504))
1914
+ ]
1915
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getPublication").annotate(OpenApi.Summary, "Get a template publication").annotate(OpenApi.Description, "Returns one immutable publication and its exact build receipt."), HttpApiEndpoint.post("templatesRenderPublication", "/v1/templates/:id/publications/:publicationId/render", {
1916
+ params: TemplatesRenderPublicationPathParams,
1917
+ payload: TemplatesRenderPublicationRequestJson,
1918
+ success: TemplatesRenderPublication200,
1919
+ error: [
1920
+ TemplatesRenderPublication401.pipe(HttpApiSchema.status(401)),
1921
+ TemplatesRenderPublication403.pipe(HttpApiSchema.status(403)),
1922
+ TemplatesRenderPublication404.pipe(HttpApiSchema.status(404)),
1923
+ TemplatesRenderPublication409.pipe(HttpApiSchema.status(409)),
1924
+ TemplatesRenderPublication422.pipe(HttpApiSchema.status(422)),
1925
+ TemplatesRenderPublication500,
1926
+ TemplatesRenderPublication504.pipe(HttpApiSchema.status(504))
1927
+ ]
1928
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.renderPublication").annotate(OpenApi.Summary, "Render a template publication").annotate(OpenApi.Description, "Renders one immutable publication against the `data` you pass, formatted in the `locale` and `timeZone` you name as a send formats them, and returns the subject, preheader, HTML and plain text a send would produce. `data` is validated against the publication's input schema exactly as a send validates it; invalid input returns a validation error that names each failing field. Nothing is sent or stored. Unpublished workspace edits are never rendered: only a publication id renders."), HttpApiEndpoint.get("templatesGetGitRepository", "/v1/templates/:id/repository", {
1929
+ params: TemplatesGetGitRepositoryPathParams,
1930
+ success: TemplatesGetGitRepository200,
1931
+ error: [
1932
+ TemplatesGetGitRepository401.pipe(HttpApiSchema.status(401)),
1933
+ TemplatesGetGitRepository403.pipe(HttpApiSchema.status(403)),
1934
+ TemplatesGetGitRepository404.pipe(HttpApiSchema.status(404)),
1935
+ TemplatesGetGitRepository409.pipe(HttpApiSchema.status(409)),
1936
+ TemplatesGetGitRepository422.pipe(HttpApiSchema.status(422)),
1937
+ TemplatesGetGitRepository500,
1938
+ TemplatesGetGitRepository504.pipe(HttpApiSchema.status(504))
1939
+ ]
1940
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getGitRepository").annotate(OpenApi.Summary, "Get a template project Git repository").annotate(OpenApi.Description, "Returns the credential-free HTTPS remote and default branch for the template project repository."), HttpApiEndpoint.post("templatesIssueGitCredential", "/v1/templates/:id/repository/credentials", {
1941
+ params: TemplatesIssueGitCredentialPathParams,
1942
+ payload: TemplatesIssueGitCredentialRequestJson,
1943
+ success: TemplatesIssueGitCredential200,
1944
+ error: [
1945
+ TemplatesIssueGitCredential401.pipe(HttpApiSchema.status(401)),
1946
+ TemplatesIssueGitCredential403.pipe(HttpApiSchema.status(403)),
1947
+ TemplatesIssueGitCredential404.pipe(HttpApiSchema.status(404)),
1948
+ TemplatesIssueGitCredential409.pipe(HttpApiSchema.status(409)),
1949
+ TemplatesIssueGitCredential422.pipe(HttpApiSchema.status(422)),
1950
+ TemplatesIssueGitCredential500,
1951
+ TemplatesIssueGitCredential504.pipe(HttpApiSchema.status(504))
1952
+ ]
1953
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.issueGitCredential").annotate(OpenApi.Summary, "Issue a template project Git credential").annotate(OpenApi.Description, "Exchanges the caller's Samva authorization for a one-hour Git credential scoped to the template repository."), HttpApiEndpoint.post("templatesOpenWorkspace", "/v1/templates/:id/workspace", {
1954
+ params: TemplatesOpenWorkspacePathParams,
1955
+ success: TemplatesOpenWorkspace200,
1956
+ error: [
1957
+ TemplatesOpenWorkspace401.pipe(HttpApiSchema.status(401)),
1958
+ TemplatesOpenWorkspace403.pipe(HttpApiSchema.status(403)),
1959
+ TemplatesOpenWorkspace404.pipe(HttpApiSchema.status(404)),
1960
+ TemplatesOpenWorkspace409.pipe(HttpApiSchema.status(409)),
1961
+ TemplatesOpenWorkspace422.pipe(HttpApiSchema.status(422)),
1962
+ TemplatesOpenWorkspace500,
1963
+ TemplatesOpenWorkspace504.pipe(HttpApiSchema.status(504))
1964
+ ]
1965
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.openWorkspace").annotate(OpenApi.Summary, "Open a template project workspace").annotate(OpenApi.Description, "Creates or opens the shared project workspace at the latest saved version and returns its effective files."), HttpApiEndpoint.patch("templatesPatchWorkspace", "/v1/templates/:id/workspace", {
1966
+ params: TemplatesPatchWorkspacePathParams,
1967
+ payload: TemplatesPatchWorkspaceRequestJson,
1968
+ success: TemplatesPatchWorkspace200,
1969
+ error: [
1970
+ TemplatesPatchWorkspace401.pipe(HttpApiSchema.status(401)),
1971
+ TemplatesPatchWorkspace403.pipe(HttpApiSchema.status(403)),
1972
+ TemplatesPatchWorkspace404.pipe(HttpApiSchema.status(404)),
1973
+ TemplatesPatchWorkspace409.pipe(HttpApiSchema.status(409)),
1974
+ TemplatesPatchWorkspace422.pipe(HttpApiSchema.status(422)),
1975
+ TemplatesPatchWorkspace500,
1976
+ TemplatesPatchWorkspace504.pipe(HttpApiSchema.status(504))
1977
+ ]
1978
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.patchWorkspace").annotate(OpenApi.Summary, "Patch template project files").annotate(OpenApi.Description, "Applies revision-checked file patches to the shared project workspace overlay."), HttpApiEndpoint.put("templatesPutWorkspaceAsset", "/v1/templates/:id/workspace/assets", {
1979
+ params: TemplatesPutWorkspaceAssetPathParams,
1980
+ payload: TemplatesPutWorkspaceAssetRequestJson,
1981
+ success: TemplatesPutWorkspaceAsset200,
1982
+ error: [
1983
+ TemplatesPutWorkspaceAsset401.pipe(HttpApiSchema.status(401)),
1984
+ TemplatesPutWorkspaceAsset403.pipe(HttpApiSchema.status(403)),
1985
+ TemplatesPutWorkspaceAsset404.pipe(HttpApiSchema.status(404)),
1986
+ TemplatesPutWorkspaceAsset409.pipe(HttpApiSchema.status(409)),
1987
+ TemplatesPutWorkspaceAsset422.pipe(HttpApiSchema.status(422)),
1988
+ TemplatesPutWorkspaceAsset500,
1989
+ TemplatesPutWorkspaceAsset504.pipe(HttpApiSchema.status(504))
1990
+ ]
1991
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.putWorkspaceAsset").annotate(OpenApi.Summary, "Put a template project asset").annotate(OpenApi.Description, "Writes one image or font (png, jpg, jpeg, gif, webp, or woff2) into the shared project workspace as an unsaved file; Save commits it. The JSON body carries the file as canonical base64 in `contentBase64`, at most 1 MiB decoded, and the bytes must match the extension in `path`. `replace` must be `false` to add a new file and `true` to change an existing one."), HttpApiEndpoint.post("templatesCheckWorkspace", "/v1/templates/:id/workspace/check", {
1992
+ params: TemplatesCheckWorkspacePathParams,
1993
+ payload: TemplatesCheckWorkspaceRequestJson,
1994
+ success: TemplatesCheckWorkspace200,
1995
+ error: [
1996
+ TemplatesCheckWorkspace401.pipe(HttpApiSchema.status(401)),
1997
+ TemplatesCheckWorkspace403.pipe(HttpApiSchema.status(403)),
1998
+ TemplatesCheckWorkspace404.pipe(HttpApiSchema.status(404)),
1999
+ TemplatesCheckWorkspace409.pipe(HttpApiSchema.status(409)),
2000
+ TemplatesCheckWorkspace422.pipe(HttpApiSchema.status(422)),
2001
+ TemplatesCheckWorkspace500,
2002
+ TemplatesCheckWorkspace504.pipe(HttpApiSchema.status(504))
2003
+ ]
2004
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.checkWorkspace").annotate(OpenApi.Summary, "Check a template project workspace").annotate(OpenApi.Description, "Builds the template entry from the current effective workspace tree, including unsaved file patches, and returns what the template declares plus every compile and target-client finding. Nothing is written and no message is rendered."), HttpApiEndpoint.post("templatesResolveWorkspaceConflict", "/v1/templates/:id/workspace/conflicts", {
2005
+ params: TemplatesResolveWorkspaceConflictPathParams,
2006
+ payload: TemplatesResolveWorkspaceConflictRequestJson,
2007
+ success: TemplatesResolveWorkspaceConflict200,
2008
+ error: [
2009
+ TemplatesResolveWorkspaceConflict401.pipe(HttpApiSchema.status(401)),
2010
+ TemplatesResolveWorkspaceConflict403.pipe(HttpApiSchema.status(403)),
2011
+ TemplatesResolveWorkspaceConflict404.pipe(HttpApiSchema.status(404)),
2012
+ TemplatesResolveWorkspaceConflict409.pipe(HttpApiSchema.status(409)),
2013
+ TemplatesResolveWorkspaceConflict422.pipe(HttpApiSchema.status(422)),
2014
+ TemplatesResolveWorkspaceConflict500,
2015
+ TemplatesResolveWorkspaceConflict504.pipe(HttpApiSchema.status(504))
2016
+ ]
2017
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.resolveWorkspaceConflict").annotate(OpenApi.Summary, "Resolve a template workspace conflict").annotate(OpenApi.Description, "Resolves one conflicted file by keeping the draft, using main, or supplying edited source."), HttpApiEndpoint.post("templatesDiffWorkspace", "/v1/templates/:id/workspace/diff", {
2018
+ params: TemplatesDiffWorkspacePathParams,
2019
+ payload: TemplatesDiffWorkspaceRequestJson,
2020
+ success: TemplatesDiffWorkspace200,
2021
+ error: [
2022
+ TemplatesDiffWorkspace401.pipe(HttpApiSchema.status(401)),
2023
+ TemplatesDiffWorkspace403.pipe(HttpApiSchema.status(403)),
2024
+ TemplatesDiffWorkspace404.pipe(HttpApiSchema.status(404)),
2025
+ TemplatesDiffWorkspace409.pipe(HttpApiSchema.status(409)),
2026
+ TemplatesDiffWorkspace422.pipe(HttpApiSchema.status(422)),
2027
+ TemplatesDiffWorkspace500,
2028
+ TemplatesDiffWorkspace504.pipe(HttpApiSchema.status(504))
2029
+ ]
2030
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.diffWorkspace").annotate(OpenApi.Summary, "Diff a template project workspace").annotate(OpenApi.Description, "Returns exact added, modified, and deleted project files against the current Git base commit."), HttpApiEndpoint.post("templatesRenderWorkspaceFixture", "/v1/templates/:id/workspace/fixtures", {
2031
+ params: TemplatesRenderWorkspaceFixturePathParams,
2032
+ payload: TemplatesRenderWorkspaceFixtureRequestJson,
2033
+ success: TemplatesRenderWorkspaceFixture200,
2034
+ error: [
2035
+ TemplatesRenderWorkspaceFixture401.pipe(HttpApiSchema.status(401)),
2036
+ TemplatesRenderWorkspaceFixture403.pipe(HttpApiSchema.status(403)),
2037
+ TemplatesRenderWorkspaceFixture404.pipe(HttpApiSchema.status(404)),
2038
+ TemplatesRenderWorkspaceFixture409.pipe(HttpApiSchema.status(409)),
2039
+ TemplatesRenderWorkspaceFixture422.pipe(HttpApiSchema.status(422)),
2040
+ TemplatesRenderWorkspaceFixture500,
2041
+ TemplatesRenderWorkspaceFixture504.pipe(HttpApiSchema.status(504))
2042
+ ]
2043
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.renderWorkspaceFixture").annotate(OpenApi.Summary, "Render a declared template workspace fixture").annotate(OpenApi.Description, "Renders one of the named inputs the template declares against the current effective workspace tree. Only declared fixtures render here; arbitrary input renders against a publication."), HttpApiEndpoint.get("templatesWorkspaceHistory", "/v1/templates/:id/workspace/history", {
2044
+ params: TemplatesWorkspaceHistoryPathParams,
2045
+ query: TemplatesWorkspaceHistoryQuery,
2046
+ success: TemplatesWorkspaceHistory200,
2047
+ error: [
2048
+ TemplatesWorkspaceHistory401.pipe(HttpApiSchema.status(401)),
2049
+ TemplatesWorkspaceHistory403.pipe(HttpApiSchema.status(403)),
2050
+ TemplatesWorkspaceHistory404.pipe(HttpApiSchema.status(404)),
2051
+ TemplatesWorkspaceHistory409.pipe(HttpApiSchema.status(409)),
2052
+ TemplatesWorkspaceHistory422.pipe(HttpApiSchema.status(422)),
2053
+ TemplatesWorkspaceHistory500,
2054
+ TemplatesWorkspaceHistory504.pipe(HttpApiSchema.status(504))
2055
+ ]
2056
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.workspaceHistory").annotate(OpenApi.Summary, "List template project commit history").annotate(OpenApi.Description, "Returns recent history from the template repository's default branch."), HttpApiEndpoint.post("templatesAttachWorkspaceResource", "/v1/templates/:id/workspace/resources", {
2057
+ params: TemplatesAttachWorkspaceResourcePathParams,
2058
+ payload: TemplatesAttachWorkspaceResourceRequestJson,
2059
+ success: TemplatesAttachWorkspaceResource200,
2060
+ error: [
2061
+ TemplatesAttachWorkspaceResource401.pipe(HttpApiSchema.status(401)),
2062
+ TemplatesAttachWorkspaceResource403.pipe(HttpApiSchema.status(403)),
2063
+ TemplatesAttachWorkspaceResource404.pipe(HttpApiSchema.status(404)),
2064
+ TemplatesAttachWorkspaceResource409.pipe(HttpApiSchema.status(409)),
2065
+ TemplatesAttachWorkspaceResource422.pipe(HttpApiSchema.status(422)),
2066
+ TemplatesAttachWorkspaceResource500,
2067
+ TemplatesAttachWorkspaceResource504.pipe(HttpApiSchema.status(504))
2068
+ ]
2069
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.attachWorkspaceResource").annotate(OpenApi.Summary, "Attach a template workspace resource").annotate(OpenApi.Description, "Adds or replaces one bounded persistent read-only resource and advances the workspace revision."), HttpApiEndpoint.post("templatesRemoveWorkspaceResource", "/v1/templates/:id/workspace/resources/:resourceId/remove", {
2070
+ params: TemplatesRemoveWorkspaceResourcePathParams,
2071
+ payload: TemplatesRemoveWorkspaceResourceRequestJson,
2072
+ success: TemplatesRemoveWorkspaceResource200,
2073
+ error: [
2074
+ TemplatesRemoveWorkspaceResource401.pipe(HttpApiSchema.status(401)),
2075
+ TemplatesRemoveWorkspaceResource403.pipe(HttpApiSchema.status(403)),
2076
+ TemplatesRemoveWorkspaceResource404.pipe(HttpApiSchema.status(404)),
2077
+ TemplatesRemoveWorkspaceResource409.pipe(HttpApiSchema.status(409)),
2078
+ TemplatesRemoveWorkspaceResource422.pipe(HttpApiSchema.status(422)),
2079
+ TemplatesRemoveWorkspaceResource500,
2080
+ TemplatesRemoveWorkspaceResource504.pipe(HttpApiSchema.status(504))
2081
+ ]
2082
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.removeWorkspaceResource").annotate(OpenApi.Summary, "Remove a template workspace resource").annotate(OpenApi.Description, "Removes one persistent resource from mounted context and advances the workspace revision."), HttpApiEndpoint.post("templatesRestoreWorkspace", "/v1/templates/:id/workspace/restore", {
2083
+ params: TemplatesRestoreWorkspacePathParams,
2084
+ payload: TemplatesRestoreWorkspaceRequestJson,
2085
+ success: TemplatesRestoreWorkspace200,
2086
+ error: [
2087
+ TemplatesRestoreWorkspace401.pipe(HttpApiSchema.status(401)),
2088
+ TemplatesRestoreWorkspace403.pipe(HttpApiSchema.status(403)),
2089
+ TemplatesRestoreWorkspace404.pipe(HttpApiSchema.status(404)),
2090
+ TemplatesRestoreWorkspace409.pipe(HttpApiSchema.status(409)),
2091
+ TemplatesRestoreWorkspace422.pipe(HttpApiSchema.status(422)),
2092
+ TemplatesRestoreWorkspace500,
2093
+ TemplatesRestoreWorkspace504.pipe(HttpApiSchema.status(504))
2094
+ ]
2095
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.restoreWorkspace").annotate(OpenApi.Summary, "Stage a historical template project tree").annotate(OpenApi.Description, "Builds the template entry before atomically staging a reachable historical commit and its emitted source; a later Save appends a new commit without rewriting branch history."), HttpApiEndpoint.post("templatesSaveWorkspace", "/v1/templates/:id/workspace/save", {
2096
+ params: TemplatesSaveWorkspacePathParams,
2097
+ payload: TemplatesSaveWorkspaceRequestJson,
2098
+ success: TemplatesSaveWorkspace200,
2099
+ error: [
2100
+ TemplatesSaveWorkspace401.pipe(HttpApiSchema.status(401)),
2101
+ TemplatesSaveWorkspace403.pipe(HttpApiSchema.status(403)),
2102
+ TemplatesSaveWorkspace404.pipe(HttpApiSchema.status(404)),
2103
+ TemplatesSaveWorkspace409.pipe(HttpApiSchema.status(409)),
2104
+ TemplatesSaveWorkspace422.pipe(HttpApiSchema.status(422)),
2105
+ TemplatesSaveWorkspace500,
2106
+ TemplatesSaveWorkspace504.pipe(HttpApiSchema.status(504))
2107
+ ]
2108
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.saveWorkspace").annotate(OpenApi.Summary, "Save a template project workspace").annotate(OpenApi.Description, "Validates the effective project tree and saves it as one Git commit on the template repository's default branch."), HttpApiEndpoint.get("templatesListFamilies", "/v1/templates/families", {
2109
+ query: TemplatesListFamiliesQuery,
2110
+ success: TemplatesListFamilies200,
2111
+ error: [
2112
+ TemplatesListFamilies401.pipe(HttpApiSchema.status(401)),
2113
+ TemplatesListFamilies403.pipe(HttpApiSchema.status(403)),
2114
+ TemplatesListFamilies422.pipe(HttpApiSchema.status(422)),
2115
+ TemplatesListFamilies500,
2116
+ TemplatesListFamilies504.pipe(HttpApiSchema.status(504))
2117
+ ]
2118
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.listFamilies").annotate(OpenApi.Summary, "List template families").annotate(OpenApi.Description, "Returns the organization's template families with their members, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("templatesCreateFamily", "/v1/templates/families", {
2119
+ payload: TemplatesCreateFamilyRequestJson,
2120
+ success: TemplatesCreateFamily201.pipe(HttpApiSchema.status(201)),
2121
+ error: [
2122
+ TemplatesCreateFamily401.pipe(HttpApiSchema.status(401)),
2123
+ TemplatesCreateFamily403.pipe(HttpApiSchema.status(403)),
2124
+ TemplatesCreateFamily422.pipe(HttpApiSchema.status(422)),
2125
+ TemplatesCreateFamily500,
2126
+ TemplatesCreateFamily504.pipe(HttpApiSchema.status(504))
2127
+ ]
2128
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.createFamily").annotate(OpenApi.Summary, "Create a template family").annotate(OpenApi.Description, "Creates an empty template family with the supplied name and returns it with status 201."), HttpApiEndpoint.get("templatesGetFamily", "/v1/templates/families/:id", {
2129
+ params: TemplatesGetFamilyPathParams,
2130
+ success: TemplatesGetFamily200,
2131
+ error: [
2132
+ TemplatesGetFamily401.pipe(HttpApiSchema.status(401)),
2133
+ TemplatesGetFamily403.pipe(HttpApiSchema.status(403)),
2134
+ TemplatesGetFamily404.pipe(HttpApiSchema.status(404)),
2135
+ TemplatesGetFamily422.pipe(HttpApiSchema.status(422)),
2136
+ TemplatesGetFamily500,
2137
+ TemplatesGetFamily504.pipe(HttpApiSchema.status(504))
2138
+ ]
2139
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getFamily").annotate(OpenApi.Summary, "Get a template family").annotate(OpenApi.Description, "Returns a template family and its channel-specific member templates."), HttpApiEndpoint.delete("templatesDeleteFamily", "/v1/templates/families/:id", {
2140
+ params: TemplatesDeleteFamilyPathParams,
2141
+ success: TemplatesDeleteFamily200,
2142
+ error: [
2143
+ TemplatesDeleteFamily401.pipe(HttpApiSchema.status(401)),
2144
+ TemplatesDeleteFamily403.pipe(HttpApiSchema.status(403)),
2145
+ TemplatesDeleteFamily404.pipe(HttpApiSchema.status(404)),
2146
+ TemplatesDeleteFamily422.pipe(HttpApiSchema.status(422)),
2147
+ TemplatesDeleteFamily500,
2148
+ TemplatesDeleteFamily504.pipe(HttpApiSchema.status(504))
2149
+ ]
2150
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.deleteFamily").annotate(OpenApi.Summary, "Delete a template family").annotate(OpenApi.Description, "Deletes a template family without deleting its member templates."), HttpApiEndpoint.patch("templatesRenameFamily", "/v1/templates/families/:id", {
2151
+ params: TemplatesRenameFamilyPathParams,
2152
+ payload: TemplatesRenameFamilyRequestJson,
2153
+ success: TemplatesRenameFamily200,
2154
+ error: [
2155
+ TemplatesRenameFamily401.pipe(HttpApiSchema.status(401)),
2156
+ TemplatesRenameFamily403.pipe(HttpApiSchema.status(403)),
2157
+ TemplatesRenameFamily404.pipe(HttpApiSchema.status(404)),
2158
+ TemplatesRenameFamily422.pipe(HttpApiSchema.status(422)),
2159
+ TemplatesRenameFamily500,
2160
+ TemplatesRenameFamily504.pipe(HttpApiSchema.status(504))
2161
+ ]
2162
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.renameFamily").annotate(OpenApi.Summary, "Rename a template family").annotate(OpenApi.Description, "Changes a template family's name and returns the updated family."), HttpApiEndpoint.post("templatesAttachFamilyMember", "/v1/templates/families/:id/members/:templateId", {
2163
+ params: TemplatesAttachFamilyMemberPathParams,
2164
+ success: TemplatesAttachFamilyMember200,
2165
+ error: [
2166
+ TemplatesAttachFamilyMember401.pipe(HttpApiSchema.status(401)),
2167
+ TemplatesAttachFamilyMember403.pipe(HttpApiSchema.status(403)),
2168
+ TemplatesAttachFamilyMember404.pipe(HttpApiSchema.status(404)),
2169
+ TemplatesAttachFamilyMember409.pipe(HttpApiSchema.status(409)),
2170
+ TemplatesAttachFamilyMember422.pipe(HttpApiSchema.status(422)),
2171
+ TemplatesAttachFamilyMember500,
2172
+ TemplatesAttachFamilyMember504.pipe(HttpApiSchema.status(504))
2173
+ ]
2174
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.attachFamilyMember").annotate(OpenApi.Summary, "Attach a template to a family").annotate(OpenApi.Description, "Adds an existing template as a channel member of the family and returns the updated family."), HttpApiEndpoint.delete("templatesDetachFamilyMember", "/v1/templates/families/:id/members/:templateId", {
2175
+ params: TemplatesDetachFamilyMemberPathParams,
2176
+ success: TemplatesDetachFamilyMember200,
2177
+ error: [
2178
+ TemplatesDetachFamilyMember401.pipe(HttpApiSchema.status(401)),
2179
+ TemplatesDetachFamilyMember403.pipe(HttpApiSchema.status(403)),
2180
+ TemplatesDetachFamilyMember404.pipe(HttpApiSchema.status(404)),
2181
+ TemplatesDetachFamilyMember409.pipe(HttpApiSchema.status(409)),
2182
+ TemplatesDetachFamilyMember422.pipe(HttpApiSchema.status(422)),
2183
+ TemplatesDetachFamilyMember500,
2184
+ TemplatesDetachFamilyMember504.pipe(HttpApiSchema.status(504))
2185
+ ]
2186
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.detachFamilyMember").annotate(OpenApi.Summary, "Detach a template from a family").annotate(OpenApi.Description, "Removes a member template from the family without deleting the template."), HttpApiEndpoint.post("templatesCreateFamilyFromTemplate", "/v1/templates/families/from-template/:templateId", {
2187
+ params: TemplatesCreateFamilyFromTemplatePathParams,
2188
+ payload: TemplatesCreateFamilyFromTemplateRequestJson,
2189
+ success: TemplatesCreateFamilyFromTemplate201.pipe(HttpApiSchema.status(201)),
2190
+ error: [
2191
+ TemplatesCreateFamilyFromTemplate401.pipe(HttpApiSchema.status(401)),
2192
+ TemplatesCreateFamilyFromTemplate403.pipe(HttpApiSchema.status(403)),
2193
+ TemplatesCreateFamilyFromTemplate404.pipe(HttpApiSchema.status(404)),
2194
+ TemplatesCreateFamilyFromTemplate409.pipe(HttpApiSchema.status(409)),
2195
+ TemplatesCreateFamilyFromTemplate422.pipe(HttpApiSchema.status(422)),
2196
+ TemplatesCreateFamilyFromTemplate500,
2197
+ TemplatesCreateFamilyFromTemplate504.pipe(HttpApiSchema.status(504))
2198
+ ]
2199
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.createFamilyFromTemplate").annotate(OpenApi.Summary, "Create a family from a template").annotate(OpenApi.Description, "Creates a template family containing the specified template and returns the new family with status 201."), HttpApiEndpoint.post("templatesAddEntry", "/v1/templates/projects/:id/entries", {
2200
+ params: TemplatesAddEntryPathParams,
2201
+ payload: TemplatesAddEntryRequestJson,
2202
+ success: TemplatesAddEntry201.pipe(HttpApiSchema.status(201)),
2203
+ error: [
2204
+ TemplatesAddEntry401.pipe(HttpApiSchema.status(401)),
2205
+ TemplatesAddEntry403.pipe(HttpApiSchema.status(403)),
2206
+ TemplatesAddEntry404.pipe(HttpApiSchema.status(404)),
2207
+ TemplatesAddEntry409.pipe(HttpApiSchema.status(409)),
2208
+ TemplatesAddEntry422.pipe(HttpApiSchema.status(422)),
2209
+ TemplatesAddEntry500,
2210
+ TemplatesAddEntry504.pipe(HttpApiSchema.status(504))
2211
+ ]
2212
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.addEntry").annotate(OpenApi.Summary, "Add a template entry").annotate(OpenApi.Description, "Registers a `.tsx` file under `templates/` or `emails/` in an existing template project as its own template and returns it with status 201. The file does not need to exist yet; publishing fails until a commit contains it. Repeating the call with the same entry path, name, and slug returns the existing template.")).annotate(OpenApi.Description, "Git-backed email template projects, workspace editing, immutable publications, and delivery defaults") {};
2213
+ //#endregion
2214
+ //#region src/effect/templates.ts
2215
+ var templates_exports = /* @__PURE__ */ __exportAll({
2216
+ CreatePayload: () => CreateTemplatePayload,
2217
+ UpdatePayload: () => UpdateTemplatePayload,
2218
+ addEntry: () => addEntry,
2219
+ attachFamilyMember: () => attachFamilyMember,
2220
+ attachWorkspaceResource: () => attachWorkspaceResource,
2221
+ checkWorkspace: () => checkWorkspace,
2222
+ create: () => create,
2223
+ createFamily: () => createFamily,
2224
+ createFamilyFromTemplate: () => createFamilyFromTemplate,
2225
+ deleteFamily: () => deleteFamily,
2226
+ detachFamilyMember: () => detachFamilyMember,
2227
+ diffWorkspace: () => diffWorkspace,
2228
+ getById: () => getById,
2229
+ getFamily: () => getFamily,
2230
+ getGitRepository: () => getGitRepository,
2231
+ getInputContract: () => getInputContract,
2232
+ getPublication: () => getPublication,
2233
+ issueGitCredential: () => issueGitCredential,
2234
+ list: () => list,
2235
+ listFamilies: () => listFamilies,
2236
+ listInputContracts: () => listInputContracts,
2237
+ openWorkspace: () => openWorkspace,
2238
+ patchWorkspace: () => patchWorkspace,
2239
+ publish: () => publish,
2240
+ putWorkspaceAsset: () => putWorkspaceAsset,
2241
+ remove: () => remove,
2242
+ removeWorkspaceResource: () => removeWorkspaceResource,
2243
+ renameFamily: () => renameFamily,
2244
+ renderPublication: () => renderPublication,
2245
+ renderWorkspaceFixture: () => renderWorkspaceFixture,
2246
+ resolveWorkspaceConflict: () => resolveWorkspaceConflict,
2247
+ restoreWorkspace: () => restoreWorkspace,
2248
+ saveWorkspace: () => saveWorkspace,
2249
+ update: () => update,
2250
+ workspaceHistory: () => workspaceHistory
2251
+ });
2252
+ const make = forGroup(TemplatesGroup);
2253
+ const list = make("templatesList");
2254
+ const create = make("templatesCreate");
2255
+ const addEntry = make("templatesAddEntry");
2256
+ const listFamilies = make("templatesListFamilies");
2257
+ const createFamily = make("templatesCreateFamily");
2258
+ const getFamily = make("templatesGetFamily");
2259
+ const deleteFamily = make("templatesDeleteFamily");
2260
+ const renameFamily = make("templatesRenameFamily");
2261
+ const createFamilyFromTemplate = make("templatesCreateFamilyFromTemplate");
2262
+ const attachFamilyMember = make("templatesAttachFamilyMember");
2263
+ const detachFamilyMember = make("templatesDetachFamilyMember");
2264
+ const getById = make("templatesGetById");
2265
+ const remove = make("templatesRemove");
2266
+ const update = make("templatesUpdate");
2267
+ const openWorkspace = make("templatesOpenWorkspace");
2268
+ const getGitRepository = make("templatesGetGitRepository");
2269
+ const issueGitCredential = make("templatesIssueGitCredential");
2270
+ const patchWorkspace = make("templatesPatchWorkspace");
2271
+ const putWorkspaceAsset = make("templatesPutWorkspaceAsset");
2272
+ const resolveWorkspaceConflict = make("templatesResolveWorkspaceConflict");
2273
+ const attachWorkspaceResource = make("templatesAttachWorkspaceResource");
2274
+ const removeWorkspaceResource = make("templatesRemoveWorkspaceResource");
2275
+ const restoreWorkspace = make("templatesRestoreWorkspace");
2276
+ const saveWorkspace = make("templatesSaveWorkspace");
2277
+ const checkWorkspace = make("templatesCheckWorkspace");
2278
+ const renderWorkspaceFixture = make("templatesRenderWorkspaceFixture");
2279
+ const publish = make("templatesPublish");
2280
+ const getPublication = make("templatesGetPublication");
2281
+ const renderPublication = make("templatesRenderPublication");
2282
+ const listInputContracts = make("templatesListInputContracts");
2283
+ const getInputContract = make("templatesGetInputContract");
2284
+ const diffWorkspace = make("templatesDiffWorkspace");
2285
+ const workspaceHistory = make("templatesWorkspaceHistory");
2286
+ //#endregion
2287
+ export { restoreWorkspace as A, putWorkspaceAsset as C, renderPublication as D, renameFamily as E, templates_exports as M, update as N, renderWorkspaceFixture as O, workspaceHistory as P, publish as S, removeWorkspaceResource as T, list as _, create as a, openWorkspace as b, deleteFamily as c, getById as d, getFamily as f, issueGitCredential as g, getPublication as h, checkWorkspace as i, saveWorkspace as j, resolveWorkspaceConflict as k, detachFamilyMember as l, getInputContract as m, attachFamilyMember as n, createFamily as o, getGitRepository as p, attachWorkspaceResource as r, createFamilyFromTemplate as s, addEntry as t, diffWorkspace as u, listFamilies as v, remove as w, patchWorkspace as x, listInputContracts as y };
2288
+
2289
+ //# sourceMappingURL=templates-DZomxsG7.js.map