@supernova-studio/model 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +1 -0
- package/package.json +23 -0
- package/src/auth/index.ts +1 -0
- package/src/auth/plugin-oauth-request.ts +14 -0
- package/src/billing/card.ts +12 -0
- package/src/billing/checkoutSession.ts +16 -0
- package/src/billing/customer.ts +28 -0
- package/src/billing/features.ts +43 -0
- package/src/billing/index.ts +9 -0
- package/src/billing/invoice.ts +34 -0
- package/src/billing/portalSession.ts +19 -0
- package/src/billing/price.ts +24 -0
- package/src/billing/product.ts +5 -0
- package/src/billing/subscription.ts +65 -0
- package/src/codegen/export-jobs.ts +26 -0
- package/src/codegen/exporter-workspace-membership-role.ts +4 -0
- package/src/codegen/exporter-workspace-membership.ts +14 -0
- package/src/codegen/exporter.ts +52 -0
- package/src/codegen/git-providers.ts +11 -0
- package/src/codegen/index.ts +6 -0
- package/src/codegen/pulsar.ts +59 -0
- package/src/common/entity.ts +9 -0
- package/src/common/index.ts +2 -0
- package/src/common/object-meta.ts +8 -0
- package/src/custom-domains/custom-domains.ts +24 -0
- package/src/custom-domains/index.ts +1 -0
- package/src/docs-server/index.ts +1 -0
- package/src/docs-server/session.ts +39 -0
- package/src/dsm/assets/asset-reference.ts +18 -0
- package/src/dsm/assets/asset-value.ts +3 -0
- package/src/dsm/assets/asset.ts +48 -0
- package/src/dsm/assets/index.ts +3 -0
- package/src/dsm/brand.ts +7 -0
- package/src/dsm/data-sources/data-source.ts +158 -0
- package/src/dsm/data-sources/import-job.ts +28 -0
- package/src/dsm/data-sources/import-summary.ts +70 -0
- package/src/dsm/data-sources/index.ts +3 -0
- package/src/dsm/design-system.ts +33 -0
- package/src/dsm/desing-system-create.ts +22 -0
- package/src/dsm/desing-system-update.ts +25 -0
- package/src/dsm/documentation/block-definitions/aux.ts +8 -0
- package/src/dsm/documentation/block-definitions/definition.ts +104 -0
- package/src/dsm/documentation/block-definitions/index.ts +4 -0
- package/src/dsm/documentation/block-definitions/item.ts +113 -0
- package/src/dsm/documentation/block-definitions/variant.ts +78 -0
- package/src/dsm/documentation/group.ts +19 -0
- package/src/dsm/documentation/index.ts +3 -0
- package/src/dsm/documentation/page.ts +18 -0
- package/src/dsm/elements/base.ts +49 -0
- package/src/dsm/elements/component.ts +48 -0
- package/src/dsm/elements/data/base.ts +18 -0
- package/src/dsm/elements/data/blur.ts +16 -0
- package/src/dsm/elements/data/border-radius.ts +15 -0
- package/src/dsm/elements/data/border-width.ts +15 -0
- package/src/dsm/elements/data/border.ts +21 -0
- package/src/dsm/elements/data/color.ts +13 -0
- package/src/dsm/elements/data/component.ts +23 -0
- package/src/dsm/elements/data/dimension.ts +15 -0
- package/src/dsm/elements/data/documentation-block-v1.ts +325 -0
- package/src/dsm/elements/data/documentation-block-v2.ts +57 -0
- package/src/dsm/elements/data/documentation-page-v1.ts +13 -0
- package/src/dsm/elements/data/documentation-page-v2.ts +11 -0
- package/src/dsm/elements/data/documentation.ts +8 -0
- package/src/dsm/elements/data/duration.ts +15 -0
- package/src/dsm/elements/data/figma-file-structure.ts +65 -0
- package/src/dsm/elements/data/figma-node-reference.ts +20 -0
- package/src/dsm/elements/data/font-family.ts +8 -0
- package/src/dsm/elements/data/font-size.ts +15 -0
- package/src/dsm/elements/data/font-weight.ts +8 -0
- package/src/dsm/elements/data/gradient.ts +32 -0
- package/src/dsm/elements/data/group.ts +17 -0
- package/src/dsm/elements/data/index.ts +36 -0
- package/src/dsm/elements/data/letter-spacing.ts +15 -0
- package/src/dsm/elements/data/line-height.ts +15 -0
- package/src/dsm/elements/data/opacity.ts +12 -0
- package/src/dsm/elements/data/paragraph-indent.ts +15 -0
- package/src/dsm/elements/data/paragraph-spacing.ts +15 -0
- package/src/dsm/elements/data/product-copy.ts +8 -0
- package/src/dsm/elements/data/shadow.ts +23 -0
- package/src/dsm/elements/data/size.ts +15 -0
- package/src/dsm/elements/data/space.ts +15 -0
- package/src/dsm/elements/data/string.ts +8 -0
- package/src/dsm/elements/data/text-case.ts +10 -0
- package/src/dsm/elements/data/text-decoration.ts +10 -0
- package/src/dsm/elements/data/typography.ts +28 -0
- package/src/dsm/elements/data/visibility.ts +10 -0
- package/src/dsm/elements/data/z-index.ts +15 -0
- package/src/dsm/elements/documentation-page-v1.ts +30 -0
- package/src/dsm/elements/documentation-page-v2.ts +16 -0
- package/src/dsm/elements/figma-file-structures.ts +39 -0
- package/src/dsm/elements/figma-node-reference.ts +17 -0
- package/src/dsm/elements/group.ts +59 -0
- package/src/dsm/elements/index.ts +13 -0
- package/src/dsm/elements/page-block-v2.ts +24 -0
- package/src/dsm/elements/primitives/index.ts +2 -0
- package/src/dsm/elements/primitives/point.ts +8 -0
- package/src/dsm/elements/primitives/size.ts +28 -0
- package/src/dsm/elements/raw-element.ts +126 -0
- package/src/dsm/elements/theme.ts +74 -0
- package/src/dsm/elements/tokens.ts +288 -0
- package/src/dsm/import/asset.ts +6 -0
- package/src/dsm/import/base.ts +24 -0
- package/src/dsm/import/component.ts +36 -0
- package/src/dsm/import/data-source.ts +9 -0
- package/src/dsm/import/figma-frames.ts +74 -0
- package/src/dsm/import/image.ts +72 -0
- package/src/dsm/import/index.ts +11 -0
- package/src/dsm/import/origin.ts +5 -0
- package/src/dsm/import/support/figma-files.ts +16 -0
- package/src/dsm/import/support/import-context.ts +75 -0
- package/src/dsm/import/support/import-model-collections.ts +46 -0
- package/src/dsm/import/support/index.ts +3 -0
- package/src/dsm/import/theme.ts +76 -0
- package/src/dsm/import/tokens.ts +49 -0
- package/src/dsm/import/warning.ts +28 -0
- package/src/dsm/index.ts +15 -0
- package/src/dsm/properties/index.ts +3 -0
- package/src/dsm/properties/property-definition.ts +44 -0
- package/src/dsm/properties/property-reference.ts +5 -0
- package/src/dsm/properties/property-value.ts +27 -0
- package/src/dsm/published-doc-page.ts +25 -0
- package/src/dsm/published-doc.ts +30 -0
- package/src/dsm/reference.ts +9 -0
- package/src/dsm/version.ts +14 -0
- package/src/dsm/views/column.ts +43 -0
- package/src/dsm/views/index.ts +2 -0
- package/src/dsm/views/view.ts +11 -0
- package/src/feature-flags/feature-flags.ts +14 -0
- package/src/feature-flags/index.ts +1 -0
- package/src/helpers/common.ts +1 -0
- package/src/helpers/db.ts +37 -0
- package/src/helpers/index.ts +4 -0
- package/src/helpers/nullish-to-optional.ts +9 -0
- package/src/helpers/slug-helper.ts +641 -0
- package/src/index.ts +16 -0
- package/src/integrations/external-oauth-request.ts +12 -0
- package/src/integrations/index.ts +3 -0
- package/src/integrations/oauth-providers.ts +13 -0
- package/src/integrations/oauth-token.ts +15 -0
- package/src/multiplayer/design-system-version-room.ts +13 -0
- package/src/multiplayer/documentation-page-room.ts +14 -0
- package/src/multiplayer/index.ts +2 -0
- package/src/npm/index.ts +2 -0
- package/src/npm/npm-package.ts +30 -0
- package/src/npm/npm-proxy-token-payload.ts +7 -0
- package/src/tokens/index.ts +1 -0
- package/src/tokens/personal-access-token.ts +17 -0
- package/src/users/index.ts +5 -0
- package/src/users/linked-integrations.ts +36 -0
- package/src/users/user-identity.ts +8 -0
- package/src/users/user-profile.ts +26 -0
- package/src/users/user-with-pat.ts +7 -0
- package/src/users/user.ts +17 -0
- package/src/utils/content-loader-instruction.ts +31 -0
- package/src/utils/index.ts +1 -0
- package/src/workspace/index.ts +9 -0
- package/src/workspace/npm-registry-settings.ts +45 -0
- package/src/workspace/sso-provider.ts +13 -0
- package/src/workspace/user-invite.ts +18 -0
- package/src/workspace/workspace-context.ts +10 -0
- package/src/workspace/workspace-create.ts +27 -0
- package/src/workspace/workspace-invitations.ts +14 -0
- package/src/workspace/workspace-membership.ts +11 -0
- package/src/workspace/workspace-role.ts +6 -0
- package/src/workspace/workspace.ts +48 -0
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
import slugifyImplementation from "@sindresorhus/slugify";
|
|
2
|
+
|
|
3
|
+
export function slugify(str: string, options?: slugifyImplementation.Options): string {
|
|
4
|
+
const slug = slugifyImplementation(str ?? "", options);
|
|
5
|
+
return slug?.length > 0 ? slug : "item";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Consists of lowercased letters, digits and hyphens.
|
|
9
|
+
// Can not start or end with hyphen.
|
|
10
|
+
// Warning: does not forbid consecutive hyphens
|
|
11
|
+
export const SLUG_REGEX = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
12
|
+
|
|
13
|
+
export const RESERVED_SLUGS = [
|
|
14
|
+
"workspaces",
|
|
15
|
+
"workspace",
|
|
16
|
+
"api0",
|
|
17
|
+
"api1",
|
|
18
|
+
"api2",
|
|
19
|
+
"custom",
|
|
20
|
+
"x-sn-reserved",
|
|
21
|
+
// further elements copied from https://github.com/shouldbee/reserved-usernames/blob/master/reserved-usernames.json
|
|
22
|
+
|
|
23
|
+
"0",
|
|
24
|
+
"about",
|
|
25
|
+
"access",
|
|
26
|
+
"account",
|
|
27
|
+
"accounts",
|
|
28
|
+
"activate",
|
|
29
|
+
"activities",
|
|
30
|
+
"activity",
|
|
31
|
+
"ad",
|
|
32
|
+
"add",
|
|
33
|
+
"address",
|
|
34
|
+
"adm",
|
|
35
|
+
"admin",
|
|
36
|
+
"administration",
|
|
37
|
+
"administrator",
|
|
38
|
+
"ads",
|
|
39
|
+
"adult",
|
|
40
|
+
"advertising",
|
|
41
|
+
"affiliate",
|
|
42
|
+
"affiliates",
|
|
43
|
+
"ajax",
|
|
44
|
+
"all",
|
|
45
|
+
"alpha",
|
|
46
|
+
"analysis",
|
|
47
|
+
"analytics",
|
|
48
|
+
"android",
|
|
49
|
+
"anon",
|
|
50
|
+
"anonymous",
|
|
51
|
+
"api",
|
|
52
|
+
"app",
|
|
53
|
+
"apps",
|
|
54
|
+
"archive",
|
|
55
|
+
"archives",
|
|
56
|
+
"article",
|
|
57
|
+
"asct",
|
|
58
|
+
"asset",
|
|
59
|
+
"assets",
|
|
60
|
+
"atom",
|
|
61
|
+
"auth",
|
|
62
|
+
"authentication",
|
|
63
|
+
"avatar",
|
|
64
|
+
"backup",
|
|
65
|
+
"balancer-manager",
|
|
66
|
+
"banner",
|
|
67
|
+
"banners",
|
|
68
|
+
"beta",
|
|
69
|
+
"billing",
|
|
70
|
+
"bin",
|
|
71
|
+
"blog",
|
|
72
|
+
"blogs",
|
|
73
|
+
"board",
|
|
74
|
+
"book",
|
|
75
|
+
"bookmark",
|
|
76
|
+
"bot",
|
|
77
|
+
"bots",
|
|
78
|
+
"bug",
|
|
79
|
+
"business",
|
|
80
|
+
"cache",
|
|
81
|
+
"cadastro",
|
|
82
|
+
"calendar",
|
|
83
|
+
"call",
|
|
84
|
+
"campaign",
|
|
85
|
+
"cancel",
|
|
86
|
+
"captcha",
|
|
87
|
+
"career",
|
|
88
|
+
"careers",
|
|
89
|
+
"cart",
|
|
90
|
+
"categories",
|
|
91
|
+
"category",
|
|
92
|
+
"cgi",
|
|
93
|
+
"cgi-bin",
|
|
94
|
+
"changelog",
|
|
95
|
+
"chat",
|
|
96
|
+
"check",
|
|
97
|
+
"checking",
|
|
98
|
+
"checkout",
|
|
99
|
+
"client",
|
|
100
|
+
"cliente",
|
|
101
|
+
"clients",
|
|
102
|
+
"code",
|
|
103
|
+
"codereview",
|
|
104
|
+
"comercial",
|
|
105
|
+
"comment",
|
|
106
|
+
"comments",
|
|
107
|
+
"communities",
|
|
108
|
+
"community",
|
|
109
|
+
"company",
|
|
110
|
+
"compare",
|
|
111
|
+
"compras",
|
|
112
|
+
"config",
|
|
113
|
+
"configuration",
|
|
114
|
+
"connect",
|
|
115
|
+
"contact",
|
|
116
|
+
"contact-us",
|
|
117
|
+
"contact_us",
|
|
118
|
+
"contactus",
|
|
119
|
+
"contest",
|
|
120
|
+
"contribute",
|
|
121
|
+
"corp",
|
|
122
|
+
"create",
|
|
123
|
+
"css",
|
|
124
|
+
"dashboard",
|
|
125
|
+
"data",
|
|
126
|
+
"db",
|
|
127
|
+
"default",
|
|
128
|
+
"delete",
|
|
129
|
+
"demo",
|
|
130
|
+
"design",
|
|
131
|
+
"designer",
|
|
132
|
+
"destroy",
|
|
133
|
+
"dev",
|
|
134
|
+
"devel",
|
|
135
|
+
"developer",
|
|
136
|
+
"developers",
|
|
137
|
+
"diagram",
|
|
138
|
+
"diary",
|
|
139
|
+
"dict",
|
|
140
|
+
"dictionary",
|
|
141
|
+
"die",
|
|
142
|
+
"dir",
|
|
143
|
+
"direct_messages",
|
|
144
|
+
"directory",
|
|
145
|
+
"dist",
|
|
146
|
+
"doc",
|
|
147
|
+
"docs",
|
|
148
|
+
"documentation",
|
|
149
|
+
"domain",
|
|
150
|
+
"download",
|
|
151
|
+
"downloads",
|
|
152
|
+
"ecommerce",
|
|
153
|
+
"edit",
|
|
154
|
+
"editor",
|
|
155
|
+
"edu",
|
|
156
|
+
"education",
|
|
157
|
+
"email",
|
|
158
|
+
"employment",
|
|
159
|
+
"empty",
|
|
160
|
+
"end",
|
|
161
|
+
"enterprise",
|
|
162
|
+
"entries",
|
|
163
|
+
"entry",
|
|
164
|
+
"error",
|
|
165
|
+
"errors",
|
|
166
|
+
"eval",
|
|
167
|
+
"event",
|
|
168
|
+
"exit",
|
|
169
|
+
"explore",
|
|
170
|
+
"facebook",
|
|
171
|
+
"faq",
|
|
172
|
+
"favorite",
|
|
173
|
+
"favorites",
|
|
174
|
+
"feature",
|
|
175
|
+
"features",
|
|
176
|
+
"feed",
|
|
177
|
+
"feedback",
|
|
178
|
+
"feeds",
|
|
179
|
+
"file",
|
|
180
|
+
"files",
|
|
181
|
+
"first",
|
|
182
|
+
"flash",
|
|
183
|
+
"fleet",
|
|
184
|
+
"fleets",
|
|
185
|
+
"flog",
|
|
186
|
+
"follow",
|
|
187
|
+
"followers",
|
|
188
|
+
"following",
|
|
189
|
+
"forgot",
|
|
190
|
+
"form",
|
|
191
|
+
"forum",
|
|
192
|
+
"forums",
|
|
193
|
+
"founder",
|
|
194
|
+
"free",
|
|
195
|
+
"friend",
|
|
196
|
+
"friends",
|
|
197
|
+
"ftp",
|
|
198
|
+
"gadget",
|
|
199
|
+
"gadgets",
|
|
200
|
+
"game",
|
|
201
|
+
"games",
|
|
202
|
+
"get",
|
|
203
|
+
"ghost",
|
|
204
|
+
"gift",
|
|
205
|
+
"gifts",
|
|
206
|
+
"gist",
|
|
207
|
+
"github",
|
|
208
|
+
"graph",
|
|
209
|
+
"group",
|
|
210
|
+
"groups",
|
|
211
|
+
"guest",
|
|
212
|
+
"guests",
|
|
213
|
+
"help",
|
|
214
|
+
"home",
|
|
215
|
+
"homepage",
|
|
216
|
+
"host",
|
|
217
|
+
"hosting",
|
|
218
|
+
"hostmaster",
|
|
219
|
+
"hostname",
|
|
220
|
+
"howto",
|
|
221
|
+
"hpg",
|
|
222
|
+
"html",
|
|
223
|
+
"http",
|
|
224
|
+
"httpd",
|
|
225
|
+
"https",
|
|
226
|
+
"i",
|
|
227
|
+
"iamges",
|
|
228
|
+
"icon",
|
|
229
|
+
"icons",
|
|
230
|
+
"id",
|
|
231
|
+
"idea",
|
|
232
|
+
"ideas",
|
|
233
|
+
"image",
|
|
234
|
+
"images",
|
|
235
|
+
"imap",
|
|
236
|
+
"img",
|
|
237
|
+
"index",
|
|
238
|
+
"indice",
|
|
239
|
+
"info",
|
|
240
|
+
"information",
|
|
241
|
+
"inquiry",
|
|
242
|
+
"instagram",
|
|
243
|
+
"intranet",
|
|
244
|
+
"invitations",
|
|
245
|
+
"invite",
|
|
246
|
+
"ipad",
|
|
247
|
+
"iphone",
|
|
248
|
+
"irc",
|
|
249
|
+
"is",
|
|
250
|
+
"issue",
|
|
251
|
+
"issues",
|
|
252
|
+
"it",
|
|
253
|
+
"item",
|
|
254
|
+
"items",
|
|
255
|
+
"java",
|
|
256
|
+
"javascript",
|
|
257
|
+
"job",
|
|
258
|
+
"jobs",
|
|
259
|
+
"join",
|
|
260
|
+
"js",
|
|
261
|
+
"json",
|
|
262
|
+
"jump",
|
|
263
|
+
"knowledgebase",
|
|
264
|
+
"language",
|
|
265
|
+
"languages",
|
|
266
|
+
"last",
|
|
267
|
+
"ldap-status",
|
|
268
|
+
"legal",
|
|
269
|
+
"license",
|
|
270
|
+
"link",
|
|
271
|
+
"links",
|
|
272
|
+
"linux",
|
|
273
|
+
"list",
|
|
274
|
+
"lists",
|
|
275
|
+
"log",
|
|
276
|
+
"log-in",
|
|
277
|
+
"log-out",
|
|
278
|
+
"log_in",
|
|
279
|
+
"log_out",
|
|
280
|
+
"login",
|
|
281
|
+
"logout",
|
|
282
|
+
"logs",
|
|
283
|
+
"m",
|
|
284
|
+
"mac",
|
|
285
|
+
"mail",
|
|
286
|
+
"mail1",
|
|
287
|
+
"mail2",
|
|
288
|
+
"mail3",
|
|
289
|
+
"mail4",
|
|
290
|
+
"mail5",
|
|
291
|
+
"mailer",
|
|
292
|
+
"mailing",
|
|
293
|
+
"maintenance",
|
|
294
|
+
"manager",
|
|
295
|
+
"manual",
|
|
296
|
+
"map",
|
|
297
|
+
"maps",
|
|
298
|
+
"marketing",
|
|
299
|
+
"master",
|
|
300
|
+
"me",
|
|
301
|
+
"media",
|
|
302
|
+
"member",
|
|
303
|
+
"members",
|
|
304
|
+
"message",
|
|
305
|
+
"messages",
|
|
306
|
+
"messenger",
|
|
307
|
+
"microblog",
|
|
308
|
+
"microblogs",
|
|
309
|
+
"mine",
|
|
310
|
+
"mis",
|
|
311
|
+
"mob",
|
|
312
|
+
"mobile",
|
|
313
|
+
"movie",
|
|
314
|
+
"movies",
|
|
315
|
+
"mp3",
|
|
316
|
+
"msg",
|
|
317
|
+
"msn",
|
|
318
|
+
"music",
|
|
319
|
+
"musicas",
|
|
320
|
+
"mx",
|
|
321
|
+
"my",
|
|
322
|
+
"mysql",
|
|
323
|
+
"name",
|
|
324
|
+
"named",
|
|
325
|
+
"nan",
|
|
326
|
+
"navi",
|
|
327
|
+
"navigation",
|
|
328
|
+
"net",
|
|
329
|
+
"network",
|
|
330
|
+
"new",
|
|
331
|
+
"news",
|
|
332
|
+
"newsletter",
|
|
333
|
+
"nick",
|
|
334
|
+
"nickname",
|
|
335
|
+
"notes",
|
|
336
|
+
"noticias",
|
|
337
|
+
"notification",
|
|
338
|
+
"notifications",
|
|
339
|
+
"notify",
|
|
340
|
+
"ns",
|
|
341
|
+
"ns1",
|
|
342
|
+
"ns10",
|
|
343
|
+
"ns2",
|
|
344
|
+
"ns3",
|
|
345
|
+
"ns4",
|
|
346
|
+
"ns5",
|
|
347
|
+
"ns6",
|
|
348
|
+
"ns7",
|
|
349
|
+
"ns8",
|
|
350
|
+
"ns9",
|
|
351
|
+
"null",
|
|
352
|
+
"oauth",
|
|
353
|
+
"oauth_clients",
|
|
354
|
+
"offer",
|
|
355
|
+
"offers",
|
|
356
|
+
"official",
|
|
357
|
+
"old",
|
|
358
|
+
"online",
|
|
359
|
+
"openid",
|
|
360
|
+
"operator",
|
|
361
|
+
"order",
|
|
362
|
+
"orders",
|
|
363
|
+
"organization",
|
|
364
|
+
"organizations",
|
|
365
|
+
"overview",
|
|
366
|
+
"owner",
|
|
367
|
+
"owners",
|
|
368
|
+
"page",
|
|
369
|
+
"pager",
|
|
370
|
+
"pages",
|
|
371
|
+
"panel",
|
|
372
|
+
"password",
|
|
373
|
+
"payment",
|
|
374
|
+
"perl",
|
|
375
|
+
"phone",
|
|
376
|
+
"photo",
|
|
377
|
+
"photoalbum",
|
|
378
|
+
"photos",
|
|
379
|
+
"php",
|
|
380
|
+
"phpmyadmin",
|
|
381
|
+
"phppgadmin",
|
|
382
|
+
"phpredisadmin",
|
|
383
|
+
"pic",
|
|
384
|
+
"pics",
|
|
385
|
+
"ping",
|
|
386
|
+
"plan",
|
|
387
|
+
"plans",
|
|
388
|
+
"plugin",
|
|
389
|
+
"plugins",
|
|
390
|
+
"policy",
|
|
391
|
+
"pop",
|
|
392
|
+
"pop3",
|
|
393
|
+
"popular",
|
|
394
|
+
"portal",
|
|
395
|
+
"post",
|
|
396
|
+
"postfix",
|
|
397
|
+
"postmaster",
|
|
398
|
+
"posts",
|
|
399
|
+
"pr",
|
|
400
|
+
"premium",
|
|
401
|
+
"press",
|
|
402
|
+
"price",
|
|
403
|
+
"pricing",
|
|
404
|
+
"privacy",
|
|
405
|
+
"privacy-policy",
|
|
406
|
+
"privacy_policy",
|
|
407
|
+
"privacypolicy",
|
|
408
|
+
"private",
|
|
409
|
+
"product",
|
|
410
|
+
"products",
|
|
411
|
+
"profile",
|
|
412
|
+
"project",
|
|
413
|
+
"projects",
|
|
414
|
+
"promo",
|
|
415
|
+
"pub",
|
|
416
|
+
"public",
|
|
417
|
+
"purpose",
|
|
418
|
+
"put",
|
|
419
|
+
"python",
|
|
420
|
+
"query",
|
|
421
|
+
"random",
|
|
422
|
+
"ranking",
|
|
423
|
+
"read",
|
|
424
|
+
"readme",
|
|
425
|
+
"recent",
|
|
426
|
+
"recruit",
|
|
427
|
+
"recruitment",
|
|
428
|
+
"register",
|
|
429
|
+
"registration",
|
|
430
|
+
"release",
|
|
431
|
+
"remove",
|
|
432
|
+
"replies",
|
|
433
|
+
"report",
|
|
434
|
+
"reports",
|
|
435
|
+
"repositories",
|
|
436
|
+
"repository",
|
|
437
|
+
"req",
|
|
438
|
+
"request",
|
|
439
|
+
"requests",
|
|
440
|
+
"reset",
|
|
441
|
+
"roc",
|
|
442
|
+
"root",
|
|
443
|
+
"rss",
|
|
444
|
+
"ruby",
|
|
445
|
+
"rule",
|
|
446
|
+
"sag",
|
|
447
|
+
"sale",
|
|
448
|
+
"sales",
|
|
449
|
+
"sample",
|
|
450
|
+
"samples",
|
|
451
|
+
"save",
|
|
452
|
+
"school",
|
|
453
|
+
"script",
|
|
454
|
+
"scripts",
|
|
455
|
+
"search",
|
|
456
|
+
"secure",
|
|
457
|
+
"security",
|
|
458
|
+
"self",
|
|
459
|
+
"send",
|
|
460
|
+
"server",
|
|
461
|
+
"server-info",
|
|
462
|
+
"server-status",
|
|
463
|
+
"service",
|
|
464
|
+
"services",
|
|
465
|
+
"session",
|
|
466
|
+
"sessions",
|
|
467
|
+
"setting",
|
|
468
|
+
"settings",
|
|
469
|
+
"setup",
|
|
470
|
+
"share",
|
|
471
|
+
"shop",
|
|
472
|
+
"show",
|
|
473
|
+
"sign-in",
|
|
474
|
+
"sign-up",
|
|
475
|
+
"sign_in",
|
|
476
|
+
"sign_up",
|
|
477
|
+
"signin",
|
|
478
|
+
"signout",
|
|
479
|
+
"signup",
|
|
480
|
+
"site",
|
|
481
|
+
"sitemap",
|
|
482
|
+
"sites",
|
|
483
|
+
"smartphone",
|
|
484
|
+
"smtp",
|
|
485
|
+
"soporte",
|
|
486
|
+
"source",
|
|
487
|
+
"spec",
|
|
488
|
+
"special",
|
|
489
|
+
"sql",
|
|
490
|
+
"src",
|
|
491
|
+
"ssh",
|
|
492
|
+
"ssl",
|
|
493
|
+
"ssladmin",
|
|
494
|
+
"ssladministrator",
|
|
495
|
+
"sslwebmaster",
|
|
496
|
+
"staff",
|
|
497
|
+
"stage",
|
|
498
|
+
"staging",
|
|
499
|
+
"start",
|
|
500
|
+
"stat",
|
|
501
|
+
"state",
|
|
502
|
+
"static",
|
|
503
|
+
"stats",
|
|
504
|
+
"status",
|
|
505
|
+
"store",
|
|
506
|
+
"stores",
|
|
507
|
+
"stories",
|
|
508
|
+
"style",
|
|
509
|
+
"styleguide",
|
|
510
|
+
"stylesheet",
|
|
511
|
+
"stylesheets",
|
|
512
|
+
"subdomain",
|
|
513
|
+
"subscribe",
|
|
514
|
+
"subscriptions",
|
|
515
|
+
"suporte",
|
|
516
|
+
"support",
|
|
517
|
+
"svn",
|
|
518
|
+
"swf",
|
|
519
|
+
"sys",
|
|
520
|
+
"sysadmin",
|
|
521
|
+
"sysadministrator",
|
|
522
|
+
"system",
|
|
523
|
+
"tablet",
|
|
524
|
+
"tablets",
|
|
525
|
+
"tag",
|
|
526
|
+
"talk",
|
|
527
|
+
"task",
|
|
528
|
+
"tasks",
|
|
529
|
+
"team",
|
|
530
|
+
"teams",
|
|
531
|
+
"tech",
|
|
532
|
+
"telnet",
|
|
533
|
+
"term",
|
|
534
|
+
"terms",
|
|
535
|
+
"terms-of-service",
|
|
536
|
+
"terms_of_service",
|
|
537
|
+
"termsofservice",
|
|
538
|
+
"test",
|
|
539
|
+
"test1",
|
|
540
|
+
"test2",
|
|
541
|
+
"test3",
|
|
542
|
+
"teste",
|
|
543
|
+
"testing",
|
|
544
|
+
"tests",
|
|
545
|
+
"theme",
|
|
546
|
+
"themes",
|
|
547
|
+
"thread",
|
|
548
|
+
"threads",
|
|
549
|
+
"tmp",
|
|
550
|
+
"todo",
|
|
551
|
+
"tool",
|
|
552
|
+
"tools",
|
|
553
|
+
"top",
|
|
554
|
+
"topic",
|
|
555
|
+
"topics",
|
|
556
|
+
"tos",
|
|
557
|
+
"tour",
|
|
558
|
+
"translations",
|
|
559
|
+
"trends",
|
|
560
|
+
"tutorial",
|
|
561
|
+
"tux",
|
|
562
|
+
"tv",
|
|
563
|
+
"twitter",
|
|
564
|
+
"undef",
|
|
565
|
+
"unfollow",
|
|
566
|
+
"unsubscribe",
|
|
567
|
+
"update",
|
|
568
|
+
"upload",
|
|
569
|
+
"uploads",
|
|
570
|
+
"url",
|
|
571
|
+
"usage",
|
|
572
|
+
"user",
|
|
573
|
+
"username",
|
|
574
|
+
"users",
|
|
575
|
+
"usuario",
|
|
576
|
+
"vendas",
|
|
577
|
+
"ver",
|
|
578
|
+
"version",
|
|
579
|
+
"video",
|
|
580
|
+
"videos",
|
|
581
|
+
"visitor",
|
|
582
|
+
"watch",
|
|
583
|
+
"weather",
|
|
584
|
+
"web",
|
|
585
|
+
"webhook",
|
|
586
|
+
"webhooks",
|
|
587
|
+
"webmail",
|
|
588
|
+
"webmaster",
|
|
589
|
+
"website",
|
|
590
|
+
"websites",
|
|
591
|
+
"welcome",
|
|
592
|
+
"widget",
|
|
593
|
+
"widgets",
|
|
594
|
+
"wiki",
|
|
595
|
+
"win",
|
|
596
|
+
"windows",
|
|
597
|
+
"word",
|
|
598
|
+
"work",
|
|
599
|
+
"works",
|
|
600
|
+
"workshop",
|
|
601
|
+
"ww",
|
|
602
|
+
"wws",
|
|
603
|
+
"www",
|
|
604
|
+
"www1",
|
|
605
|
+
"www2",
|
|
606
|
+
"www3",
|
|
607
|
+
"www4",
|
|
608
|
+
"www5",
|
|
609
|
+
"www6",
|
|
610
|
+
"www7",
|
|
611
|
+
"wwws",
|
|
612
|
+
"wwww",
|
|
613
|
+
"xfn",
|
|
614
|
+
"xml",
|
|
615
|
+
"xmpp",
|
|
616
|
+
"xpg",
|
|
617
|
+
"xxx",
|
|
618
|
+
"yaml",
|
|
619
|
+
"year",
|
|
620
|
+
"yml",
|
|
621
|
+
"you",
|
|
622
|
+
"yourdomain",
|
|
623
|
+
"yourname",
|
|
624
|
+
"yoursite",
|
|
625
|
+
"yourusername",
|
|
626
|
+
"latest",
|
|
627
|
+
"live",
|
|
628
|
+
"preview",
|
|
629
|
+
"learn",
|
|
630
|
+
"supernova",
|
|
631
|
+
"super-nova",
|
|
632
|
+
];
|
|
633
|
+
|
|
634
|
+
const RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
|
|
635
|
+
|
|
636
|
+
export const RESERVED_SLUG_PREFIX = "x-sn-reserved-";
|
|
637
|
+
|
|
638
|
+
const isSlugReservedInternal = (slug: string) => slug?.startsWith(RESERVED_SLUG_PREFIX);
|
|
639
|
+
export function isSlugReserved(slug: string) {
|
|
640
|
+
return RESERVED_SLUGS_SET.has(slug) || isSlugReservedInternal(slug);
|
|
641
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./auth";
|
|
2
|
+
export * from "./billing";
|
|
3
|
+
export * from "./codegen";
|
|
4
|
+
export * from "./common";
|
|
5
|
+
export * from "./custom-domains";
|
|
6
|
+
export * from "./docs-server";
|
|
7
|
+
export * from "./dsm";
|
|
8
|
+
export * from "./feature-flags";
|
|
9
|
+
export * from "./helpers";
|
|
10
|
+
export * from "./integrations";
|
|
11
|
+
export * from "./multiplayer";
|
|
12
|
+
export * from "./npm";
|
|
13
|
+
export * from "./tokens";
|
|
14
|
+
export * from "./users";
|
|
15
|
+
export * from "./utils";
|
|
16
|
+
export * from "./workspace";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { OAuthProviderSchema } from "./oauth-providers";
|
|
3
|
+
|
|
4
|
+
export const ExternalOAuthRequest = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
provider: OAuthProviderSchema,
|
|
7
|
+
userId: z.string(),
|
|
8
|
+
state: z.string(),
|
|
9
|
+
createdAt: z.date(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type ExternalOAuthRequest = z.infer<typeof ExternalOAuthRequest>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export enum OAuthProviderNames {
|
|
4
|
+
Figma = "figma",
|
|
5
|
+
Azure = "azure",
|
|
6
|
+
Github = "github",
|
|
7
|
+
Gitlab = "gitlab",
|
|
8
|
+
Bitbucket = "bitbucket",
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const OAuthProviderSchema = z.nativeEnum(OAuthProviderNames);
|
|
12
|
+
export type OAuthProvider = z.infer<typeof OAuthProviderSchema>;
|
|
13
|
+
export const OAuthProvider = OAuthProviderSchema.enum;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { OAuthProviderSchema } from "./oauth-providers";
|
|
3
|
+
|
|
4
|
+
export const IntegrationTokenSchema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
provider: OAuthProviderSchema,
|
|
7
|
+
scope: z.string(),
|
|
8
|
+
userId: z.string(),
|
|
9
|
+
accessToken: z.string(),
|
|
10
|
+
refreshToken: z.string(),
|
|
11
|
+
expiresAt: z.date(),
|
|
12
|
+
externalUserId: z.string().nullish(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type IntegrationToken = z.infer<typeof IntegrationTokenSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Entity } from "../common/entity";
|
|
3
|
+
import { DbCreateInputOmit, DbUpdate } from "../helpers";
|
|
4
|
+
|
|
5
|
+
export const DesignSystemVersionRoom = Entity.extend({
|
|
6
|
+
designSystemVersionId: z.string(),
|
|
7
|
+
liveblocksId: z.string(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type DesignSystemVersionRoom = z.infer<typeof DesignSystemVersionRoom>;
|
|
11
|
+
|
|
12
|
+
export type CreateDesignSystemVersionRoom = DbCreateInputOmit<DesignSystemVersionRoom>;
|
|
13
|
+
export type UpdateDesignSystemVersionRoom = DbUpdate<DesignSystemVersionRoom>;
|