@leaflow/sdk 0.0.0-dev.355.g42152f5 → 0.0.0-dev.358.gbb34078

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 (119) hide show
  1. package/dist/account/v1/generated/functions.d.ts +92 -1
  2. package/dist/account/v1/generated/functions.js +70 -0
  3. package/dist/account/v1/generated/models.d.ts +33 -1
  4. package/dist/account/v1/generated/models.js +5 -0
  5. package/dist/account/v1/generated/schemas.zod.d.ts +52 -0
  6. package/dist/account/v1/generated/schemas.zod.js +52 -1
  7. package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.d.ts +6 -0
  8. package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.js +6 -0
  9. package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.d.ts +6 -0
  10. package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.js +6 -0
  11. package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.d.ts +7 -0
  12. package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.js +6 -0
  13. package/dist/account/v1/generated/validators/accountResource.zod.d.ts +6 -0
  14. package/dist/account/v1/generated/validators/accountResource.zod.js +6 -0
  15. package/dist/account/v1/generated/validators/agreementListResponseBody.zod.d.ts +6 -0
  16. package/dist/account/v1/generated/validators/agreementListResponseBody.zod.js +6 -0
  17. package/dist/account/v1/generated/validators/agreementResource.zod.d.ts +6 -0
  18. package/dist/account/v1/generated/validators/agreementResource.zod.js +6 -0
  19. package/dist/account/v1/generated/validators/consentBody.zod.d.ts +6 -0
  20. package/dist/account/v1/generated/validators/consentBody.zod.js +6 -0
  21. package/dist/account/v1/generated/validators/consentListResponseBody.zod.d.ts +6 -0
  22. package/dist/account/v1/generated/validators/consentListResponseBody.zod.js +6 -0
  23. package/dist/account/v1/generated/validators/consentResource.zod.d.ts +6 -0
  24. package/dist/account/v1/generated/validators/consentResource.zod.js +6 -0
  25. package/dist/account/v1/generated/validators/countryOption.zod.d.ts +6 -0
  26. package/dist/account/v1/generated/validators/countryOption.zod.js +6 -0
  27. package/dist/account/v1/generated/validators/createProjectRequestBody.zod.d.ts +8 -0
  28. package/dist/account/v1/generated/validators/createProjectRequestBody.zod.js +12 -0
  29. package/dist/account/v1/generated/validators/cursorPagination.zod.d.ts +6 -0
  30. package/dist/account/v1/generated/validators/cursorPagination.zod.js +6 -0
  31. package/dist/account/v1/generated/validators/error.zod.d.ts +6 -0
  32. package/dist/account/v1/generated/validators/error.zod.js +6 -0
  33. package/dist/account/v1/generated/validators/grantResource.zod.d.ts +6 -0
  34. package/dist/account/v1/generated/validators/grantResource.zod.js +6 -0
  35. package/dist/account/v1/generated/validators/identityVerificationResource.zod.d.ts +6 -0
  36. package/dist/account/v1/generated/validators/identityVerificationResource.zod.js +6 -0
  37. package/dist/account/v1/generated/validators/invitationPreviewResource.zod.d.ts +6 -0
  38. package/dist/account/v1/generated/validators/invitationPreviewResource.zod.js +6 -0
  39. package/dist/account/v1/generated/validators/invitationResource.zod.d.ts +6 -0
  40. package/dist/account/v1/generated/validators/invitationResource.zod.js +6 -0
  41. package/dist/account/v1/generated/validators/languageOption.zod.d.ts +6 -0
  42. package/dist/account/v1/generated/validators/languageOption.zod.js +6 -0
  43. package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.d.ts +6 -0
  44. package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.js +6 -0
  45. package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.d.ts +7 -0
  46. package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.js +6 -0
  47. package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.d.ts +6 -0
  48. package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.js +6 -0
  49. package/dist/account/v1/generated/validators/listProjectsParams.zod.d.ts +6 -0
  50. package/dist/account/v1/generated/validators/listProjectsParams.zod.js +7 -1
  51. package/dist/account/v1/generated/validators/locale.zod.d.ts +6 -0
  52. package/dist/account/v1/generated/validators/locale.zod.js +6 -0
  53. package/dist/account/v1/generated/validators/localeOptionsResource.zod.d.ts +6 -0
  54. package/dist/account/v1/generated/validators/localeOptionsResource.zod.js +6 -0
  55. package/dist/account/v1/generated/validators/offsetPagination.zod.d.ts +6 -0
  56. package/dist/account/v1/generated/validators/offsetPagination.zod.js +6 -0
  57. package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.d.ts +6 -0
  58. package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.js +6 -0
  59. package/dist/account/v1/generated/validators/projectAccessResource.zod.d.ts +7 -0
  60. package/dist/account/v1/generated/validators/projectAccessResource.zod.js +6 -0
  61. package/dist/account/v1/generated/validators/projectResource.zod.d.ts +8 -0
  62. package/dist/account/v1/generated/validators/projectResource.zod.js +12 -0
  63. package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.d.ts +36 -0
  64. package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.js +32 -0
  65. package/dist/account/v1/generated/validators/projectTraitResource.zod.d.ts +6 -0
  66. package/dist/account/v1/generated/validators/projectTraitResource.zod.js +6 -0
  67. package/dist/account/v1/generated/validators/registerRequestBody.zod.d.ts +6 -0
  68. package/dist/account/v1/generated/validators/registerRequestBody.zod.js +6 -0
  69. package/dist/account/v1/generated/validators/resourceRefResource.zod.d.ts +6 -0
  70. package/dist/account/v1/generated/validators/resourceRefResource.zod.js +6 -0
  71. package/dist/account/v1/generated/validators/ruleResource.zod.d.ts +6 -0
  72. package/dist/account/v1/generated/validators/ruleResource.zod.js +6 -0
  73. package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.d.ts +7 -0
  74. package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.js +6 -0
  75. package/dist/account/v1/generated/validators/settingsResource.zod.d.ts +6 -0
  76. package/dist/account/v1/generated/validators/settingsResource.zod.js +6 -0
  77. package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.d.ts +6 -0
  78. package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.js +6 -0
  79. package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.d.ts +6 -0
  80. package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.js +6 -0
  81. package/dist/compute/v1/generated/validators/allocateFloatingIPResponseBody.zod.d.ts +1 -1
  82. package/dist/compute/v1/generated/validators/backupListResponseBody.zod.d.ts +1 -1
  83. package/dist/compute/v1/generated/validators/backupResource.zod.d.ts +1 -1
  84. package/dist/compute/v1/generated/validators/createDiskResponseBody.zod.d.ts +2 -2
  85. package/dist/compute/v1/generated/validators/createImageResponseBody.zod.d.ts +1 -1
  86. package/dist/compute/v1/generated/validators/diskAttachment.zod.d.ts +1 -1
  87. package/dist/compute/v1/generated/validators/diskAttachmentList.zod.d.ts +1 -1
  88. package/dist/compute/v1/generated/validators/diskListResponseBody.zod.d.ts +2 -2
  89. package/dist/compute/v1/generated/validators/diskResource.zod.d.ts +2 -2
  90. package/dist/compute/v1/generated/validators/floatingIPListResponseBody.zod.d.ts +1 -1
  91. package/dist/compute/v1/generated/validators/floatingIPResource.zod.d.ts +1 -1
  92. package/dist/compute/v1/generated/validators/imageListResponseBody.zod.d.ts +1 -1
  93. package/dist/compute/v1/generated/validators/imageResource.zod.d.ts +1 -1
  94. package/dist/compute/v1/generated/validators/portAddress.zod.d.ts +1 -1
  95. package/dist/compute/v1/generated/validators/portAttachment.zod.d.ts +1 -1
  96. package/dist/compute/v1/generated/validators/portAttachmentList.zod.d.ts +1 -1
  97. package/dist/compute/v1/generated/validators/portListResponseBody.zod.d.ts +3 -3
  98. package/dist/compute/v1/generated/validators/portResource.zod.d.ts +3 -3
  99. package/dist/compute/v1/generated/validators/resizeDiskResponseBody.zod.d.ts +2 -2
  100. package/dist/compute/v1/generated/validators/setFloatingIPBandwidthResponseBody.zod.d.ts +1 -1
  101. package/dist/compute/v1/generated/validators/snapshotListResponseBody.zod.d.ts +1 -1
  102. package/dist/compute/v1/generated/validators/snapshotResource.zod.d.ts +1 -1
  103. package/dist/iam/v1/generated/functions.d.ts +32 -1
  104. package/dist/iam/v1/generated/functions.js +43 -0
  105. package/dist/iam/v1/generated/models.d.ts +14 -0
  106. package/dist/iam/v1/generated/schemas.zod.d.ts +17 -0
  107. package/dist/iam/v1/generated/schemas.zod.js +16 -0
  108. package/dist/iam/v1/generated/validators/projectAccessResource.zod.d.ts +1 -0
  109. package/dist/iam/v1/generated/validators/projectResource.zod.d.ts +2 -0
  110. package/dist/iam/v1/generated/validators/projectResource.zod.js +6 -0
  111. package/dist/iam/v1/generated/validators/setProjectSlugRequestBody.zod.d.ts +22 -0
  112. package/dist/iam/v1/generated/validators/setProjectSlugRequestBody.zod.js +24 -0
  113. package/dist/routes.d.ts +32 -0
  114. package/dist/routes.js +36 -0
  115. package/dist/type/resource/v1/generated/validators/attachment.zod.d.ts +1 -1
  116. package/dist/type/resource/v1/generated/validators/attachmentList.zod.d.ts +1 -1
  117. package/dist/type/resource/v1/generated/validators/resourceUsage.zod.d.ts +1 -1
  118. package/dist/type/resource/v1/generated/validators/resourceUsageList.zod.d.ts +1 -1
  119. package/package.json +1 -1
@@ -15,9 +15,15 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
- import type { AcceptConsentsRequestBody, AcceptInvitationByTokenRequestBody, AcceptedInvitationResponseBody, AccountResource, AgreementListResponseBody, ConsentListResponseBody, CreateProjectRequestBody, Error, IdentityVerificationResource, InvitationPreviewResource, LengthAwarePageInvitationResource, LengthAwarePageProjectAccessResource, ListMyInvitationsParams, ListProjectsParams, LocaleOptionsResource, PreviewInvitationByTokenParams, ProjectAccessResource, RegisterRequestBody, ScopedTokenResponseBody, SettingsResource, SubmitIdentityVerificationRequestBody, UpdateAccountRequestBody } from "./models.js";
26
+ import type { AcceptConsentsRequestBody, AcceptInvitationByTokenRequestBody, AcceptedInvitationResponseBody, AccountResource, AgreementListResponseBody, ConsentListResponseBody, CreateProjectRequestBody, Error, IdentityVerificationResource, InvitationPreviewResource, LengthAwarePageInvitationResource, LengthAwarePageProjectAccessResource, ListMyInvitationsParams, ListProjectsParams, LocaleOptionsResource, PreviewInvitationByTokenParams, ProjectAccessResource, ProjectSlugAvailabilityResource, RegisterRequestBody, ScopedTokenResponseBody, SettingsResource, SubmitIdentityVerificationRequestBody, UpdateAccountRequestBody } from "./models.js";
21
27
  export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
22
28
  export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
23
29
  export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
@@ -375,9 +381,94 @@ export type createProjectResponse = createProjectResponseSuccess | createProject
375
381
  export declare const getCreateProjectUrl: () => string;
376
382
  /**
377
383
  * The caller becomes its owner. The project is created with the built-in `OWNER` and `ADMIN` roles and a `member` role carrying no permissions.
384
+ *
385
+ * A custom `slug` may be chosen here; without one the slug is the new project's `id`. A custom slug is refused with:
386
+ *
387
+ * - 400 `PROJECT_SLUG_INVALID` when it does not follow the format described on `slug`;
388
+ * - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
389
+ * - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
390
+ * - 429 `PROJECT_SLUG_CLAIM_RATE_LIMITED` when the account has attempted to claim custom slugs too often. Attempts count whether or not they succeed; creating a project without a custom slug does not count.
378
391
  * @summary Create a project
379
392
  */
380
393
  export declare const createProject: (createProjectRequestBody: CreateProjectRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createProjectResponse>;
394
+ export type getProjectBySlugResponse200 = {
395
+ data: ProjectAccessResource;
396
+ status: 200;
397
+ };
398
+ export type getProjectBySlugResponseDefault = {
399
+ data: Error;
400
+ status: Exclude<HTTPStatusCodes, 200>;
401
+ };
402
+ export type getProjectBySlugResponseSuccess = getProjectBySlugResponse200 & {
403
+ headers: Headers;
404
+ };
405
+ export type getProjectBySlugResponseError = getProjectBySlugResponseDefault & {
406
+ headers: Headers;
407
+ };
408
+ export type getProjectBySlugResponse = getProjectBySlugResponseSuccess | getProjectBySlugResponseError;
409
+ export declare const getGetProjectBySlugUrl: (slug: string) => string;
410
+ /**
411
+ * Returns a project the caller belongs to, found by an address label: a custom slug is compared exactly, and a label in the form of a project id finds the project with that id, whether or not it has since chosen a custom slug.
412
+ *
413
+ * A deleted project is returned, answering that it is gone. Fails with:
414
+ *
415
+ * - 400 `PROJECT_SLUG_INVALID` when the value cannot be a slug;
416
+ * - 404 `PROJECT_NOT_FOUND` when no project holds the slug;
417
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project;
418
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/project-slugs/{slug}/availability`.
419
+ * @summary Get a project by its slug
420
+ */
421
+ export declare const getProjectBySlug: (slug: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getProjectBySlugResponse>;
422
+ export type getProjectResponse200 = {
423
+ data: ProjectAccessResource;
424
+ status: 200;
425
+ };
426
+ export type getProjectResponseDefault = {
427
+ data: Error;
428
+ status: Exclude<HTTPStatusCodes, 200>;
429
+ };
430
+ export type getProjectResponseSuccess = getProjectResponse200 & {
431
+ headers: Headers;
432
+ };
433
+ export type getProjectResponseError = getProjectResponseDefault & {
434
+ headers: Headers;
435
+ };
436
+ export type getProjectResponse = getProjectResponseSuccess | getProjectResponseError;
437
+ export declare const getGetProjectUrl: (projectId: string) => string;
438
+ /**
439
+ * Returns a project the caller belongs to. A deleted project is returned, answering that it is gone. Fails with:
440
+ *
441
+ * - 404 `PROJECT_NOT_FOUND` when no project has the id;
442
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project.
443
+ * @summary Get a project
444
+ */
445
+ export declare const getProject: (projectId: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getProjectResponse>;
446
+ export type getProjectSlugAvailabilityResponse200 = {
447
+ data: ProjectSlugAvailabilityResource;
448
+ status: 200;
449
+ };
450
+ export type getProjectSlugAvailabilityResponseDefault = {
451
+ data: Error;
452
+ status: Exclude<HTTPStatusCodes, 200>;
453
+ };
454
+ export type getProjectSlugAvailabilityResponseSuccess = getProjectSlugAvailabilityResponse200 & {
455
+ headers: Headers;
456
+ };
457
+ export type getProjectSlugAvailabilityResponseError = getProjectSlugAvailabilityResponseDefault & {
458
+ headers: Headers;
459
+ };
460
+ export type getProjectSlugAvailabilityResponse = getProjectSlugAvailabilityResponseSuccess | getProjectSlugAvailabilityResponseError;
461
+ export declare const getGetProjectSlugAvailabilityUrl: (slug: string) => string;
462
+ /**
463
+ * Reports whether a custom slug can be chosen now. Nothing is reserved by asking: the slug is claimed only by creating a project with it or by setting it, either of which may still fail with 409 `PROJECT_SLUG_TAKEN`.
464
+ *
465
+ * Fails with:
466
+ *
467
+ * - 400 `PROJECT_SLUG_INVALID` when the value does not follow the format of a custom slug;
468
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/projects/by-slug/{slug}`.
469
+ * @summary Check whether a custom slug can be chosen
470
+ */
471
+ export declare const getProjectSlugAvailability: (slug: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getProjectSlugAvailabilityResponse>;
381
472
  export type createScopedTokenResponse201 = {
382
473
  data: ScopedTokenResponseBody;
383
474
  status: 201;
@@ -373,6 +373,13 @@ export const getCreateProjectUrl = () => {
373
373
  };
374
374
  /**
375
375
  * The caller becomes its owner. The project is created with the built-in `OWNER` and `ADMIN` roles and a `member` role carrying no permissions.
376
+ *
377
+ * A custom `slug` may be chosen here; without one the slug is the new project's `id`. A custom slug is refused with:
378
+ *
379
+ * - 400 `PROJECT_SLUG_INVALID` when it does not follow the format described on `slug`;
380
+ * - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
381
+ * - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
382
+ * - 429 `PROJECT_SLUG_CLAIM_RATE_LIMITED` when the account has attempted to claim custom slugs too often. Attempts count whether or not they succeed; creating a project without a custom slug does not count.
376
383
  * @summary Create a project
377
384
  */
378
385
  export const createProject = async (createProjectRequestBody, options, fetchFn) => {
@@ -401,6 +408,69 @@ export const createProject = async (createProjectRequestBody, options, fetchFn)
401
408
  const data = body ? JSON.parse(body) : {};
402
409
  return { data, status: res.status, headers: res.headers };
403
410
  };
411
+ export const getGetProjectBySlugUrl = (slug) => {
412
+ return `https://account.leaflow.cloud/account/v1/projects/by-slug/${encodeURIComponent(String(slug))}`;
413
+ };
414
+ /**
415
+ * Returns a project the caller belongs to, found by an address label: a custom slug is compared exactly, and a label in the form of a project id finds the project with that id, whether or not it has since chosen a custom slug.
416
+ *
417
+ * A deleted project is returned, answering that it is gone. Fails with:
418
+ *
419
+ * - 400 `PROJECT_SLUG_INVALID` when the value cannot be a slug;
420
+ * - 404 `PROJECT_NOT_FOUND` when no project holds the slug;
421
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project;
422
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/project-slugs/{slug}/availability`.
423
+ * @summary Get a project by its slug
424
+ */
425
+ export const getProjectBySlug = async (slug, options, fetchFn) => {
426
+ const res = await (fetchFn ?? fetch)(getGetProjectBySlugUrl(slug), {
427
+ ...options,
428
+ method: "GET",
429
+ });
430
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
431
+ const data = body ? JSON.parse(body) : {};
432
+ return { data, status: res.status, headers: res.headers };
433
+ };
434
+ export const getGetProjectUrl = (projectId) => {
435
+ return `https://account.leaflow.cloud/account/v1/projects/${encodeURIComponent(String(projectId))}`;
436
+ };
437
+ /**
438
+ * Returns a project the caller belongs to. A deleted project is returned, answering that it is gone. Fails with:
439
+ *
440
+ * - 404 `PROJECT_NOT_FOUND` when no project has the id;
441
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project.
442
+ * @summary Get a project
443
+ */
444
+ export const getProject = async (projectId, options, fetchFn) => {
445
+ const res = await (fetchFn ?? fetch)(getGetProjectUrl(projectId), {
446
+ ...options,
447
+ method: "GET",
448
+ });
449
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
450
+ const data = body ? JSON.parse(body) : {};
451
+ return { data, status: res.status, headers: res.headers };
452
+ };
453
+ export const getGetProjectSlugAvailabilityUrl = (slug) => {
454
+ return `https://account.leaflow.cloud/account/v1/project-slugs/${encodeURIComponent(String(slug))}/availability`;
455
+ };
456
+ /**
457
+ * Reports whether a custom slug can be chosen now. Nothing is reserved by asking: the slug is claimed only by creating a project with it or by setting it, either of which may still fail with 409 `PROJECT_SLUG_TAKEN`.
458
+ *
459
+ * Fails with:
460
+ *
461
+ * - 400 `PROJECT_SLUG_INVALID` when the value does not follow the format of a custom slug;
462
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/projects/by-slug/{slug}`.
463
+ * @summary Check whether a custom slug can be chosen
464
+ */
465
+ export const getProjectSlugAvailability = async (slug, options, fetchFn) => {
466
+ const res = await (fetchFn ?? fetch)(getGetProjectSlugAvailabilityUrl(slug), {
467
+ ...options,
468
+ method: "GET",
469
+ });
470
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
471
+ const data = body ? JSON.parse(body) : {};
472
+ return { data, status: res.status, headers: res.headers };
473
+ };
404
474
  export const getCreateScopedTokenUrl = (projectId) => {
405
475
  return `https://account.leaflow.cloud/account/v1/projects/${encodeURIComponent(String(projectId))}/scoped-tokens`;
406
476
  };
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  /**
@@ -315,6 +321,12 @@ export interface ProjectResource {
315
321
  deleted_at: string | null;
316
322
  description: string;
317
323
  id: string;
324
+ /**
325
+ * The label naming the project in its address. It equals `id` until a custom slug is chosen. A custom slug does not change once set, and stays with the project after deletion
326
+ * @minLength 1
327
+ * @maxLength 36
328
+ */
329
+ slug: string;
318
330
  name: string;
319
331
  updated_at: string;
320
332
  }
@@ -381,6 +393,26 @@ export interface CreateProjectRequestBody {
381
393
  * @maxLength 128
382
394
  */
383
395
  name: string;
396
+ /**
397
+ * A custom slug of 6 to 32 characters made of lower-case letters, digits and single hyphens, beginning with a letter and ending with a letter or digit. Omitted or empty, the slug is the new project's `id`, and a custom slug can be set once later
398
+ * @maxLength 32
399
+ */
400
+ slug?: string;
401
+ }
402
+ /**
403
+ * `available` when the slug can be chosen now, `reserved` when the name is reserved, and `taken` when a project, including a deleted one, holds it
404
+ */
405
+ export type ProjectSlugAvailabilityResourceStatus = (typeof ProjectSlugAvailabilityResourceStatus)[keyof typeof ProjectSlugAvailabilityResourceStatus];
406
+ export declare const ProjectSlugAvailabilityResourceStatus: {
407
+ readonly available: "available";
408
+ readonly reserved: "reserved";
409
+ readonly taken: "taken";
410
+ };
411
+ export interface ProjectSlugAvailabilityResource {
412
+ /** The slug asked about */
413
+ slug: string;
414
+ /** `available` when the slug can be chosen now, `reserved` when the name is reserved, and `taken` when a project, including a deleted one, holds it */
415
+ status: ProjectSlugAvailabilityResourceStatus;
384
416
  }
385
417
  export interface ScopedTokenResponseBody {
386
418
  /** When the token expires. Exchange for a new one before then rather than waiting for the first 401 */
@@ -452,7 +484,7 @@ export type ListProjectsParams = {
452
484
  */
453
485
  offset?: number;
454
486
  /**
455
- * Matches against name or description
487
+ * Matches against name, slug or description, and against the id when it is a complete project id
456
488
  * @maxLength 128
457
489
  */
458
490
  keyword?: string;
@@ -53,3 +53,8 @@ export const RuleResourceEffect = {
53
53
  allow: "allow",
54
54
  deny: "deny",
55
55
  };
56
+ export const ProjectSlugAvailabilityResourceStatus = {
57
+ available: "available",
58
+ reserved: "reserved",
59
+ taken: "taken",
60
+ };
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -134,11 +140,57 @@ export declare const ListProjectsQueryParams: zod.ZodObject<{
134
140
  }, zod.z.core.$strict>;
135
141
  /**
136
142
  * The caller becomes its owner. The project is created with the built-in `OWNER` and `ADMIN` roles and a `member` role carrying no permissions.
143
+ *
144
+ * A custom `slug` may be chosen here; without one the slug is the new project's `id`. A custom slug is refused with:
145
+ *
146
+ * - 400 `PROJECT_SLUG_INVALID` when it does not follow the format described on `slug`;
147
+ * - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
148
+ * - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
149
+ * - 429 `PROJECT_SLUG_CLAIM_RATE_LIMITED` when the account has attempted to claim custom slugs too often. Attempts count whether or not they succeed; creating a project without a custom slug does not count.
137
150
  * @summary Create a project
138
151
  */
139
152
  export declare const CreateProjectBody: zod.ZodObject<{
140
153
  description: zod.ZodOptional<zod.ZodString>;
141
154
  name: zod.ZodString;
155
+ slug: zod.ZodOptional<zod.ZodString>;
156
+ }, zod.z.core.$strict>;
157
+ /**
158
+ * Returns a project the caller belongs to, found by an address label: a custom slug is compared exactly, and a label in the form of a project id finds the project with that id, whether or not it has since chosen a custom slug.
159
+ *
160
+ * A deleted project is returned, answering that it is gone. Fails with:
161
+ *
162
+ * - 400 `PROJECT_SLUG_INVALID` when the value cannot be a slug;
163
+ * - 404 `PROJECT_NOT_FOUND` when no project holds the slug;
164
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project;
165
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/project-slugs/{slug}/availability`.
166
+ * @summary Get a project by its slug
167
+ */
168
+ export declare const getProjectBySlugPathSlugMax = 63;
169
+ export declare const GetProjectBySlugParams: zod.ZodObject<{
170
+ slug: zod.ZodString;
171
+ }, zod.z.core.$strict>;
172
+ /**
173
+ * Returns a project the caller belongs to. A deleted project is returned, answering that it is gone. Fails with:
174
+ *
175
+ * - 404 `PROJECT_NOT_FOUND` when no project has the id;
176
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project.
177
+ * @summary Get a project
178
+ */
179
+ export declare const GetProjectParams: zod.ZodObject<{
180
+ projectId: zod.ZodUUID;
181
+ }, zod.z.core.$strict>;
182
+ /**
183
+ * Reports whether a custom slug can be chosen now. Nothing is reserved by asking: the slug is claimed only by creating a project with it or by setting it, either of which may still fail with 409 `PROJECT_SLUG_TAKEN`.
184
+ *
185
+ * Fails with:
186
+ *
187
+ * - 400 `PROJECT_SLUG_INVALID` when the value does not follow the format of a custom slug;
188
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/projects/by-slug/{slug}`.
189
+ * @summary Check whether a custom slug can be chosen
190
+ */
191
+ export declare const getProjectSlugAvailabilityPathSlugMax = 63;
192
+ export declare const GetProjectSlugAvailabilityParams: zod.ZodObject<{
193
+ slug: zod.ZodString;
142
194
  }, zod.z.core.$strict>;
143
195
  /**
144
196
  * Once a project has been chosen, exchange the access token for a scoped token for that project.
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -127,14 +133,59 @@ export const ListProjectsQueryParams = zod.strictObject({
127
133
  .string()
128
134
  .max(listProjectsQueryKeywordMax)
129
135
  .optional()
130
- .describe("Matches against name or description"),
136
+ .describe("Matches against name, slug or description, and against the id when it is a complete project id"),
131
137
  include_deleted: zod.boolean().default(listProjectsQueryIncludeDeletedDefault),
132
138
  });
133
139
  /**
134
140
  * The caller becomes its owner. The project is created with the built-in `OWNER` and `ADMIN` roles and a `member` role carrying no permissions.
141
+ *
142
+ * A custom `slug` may be chosen here; without one the slug is the new project's `id`. A custom slug is refused with:
143
+ *
144
+ * - 400 `PROJECT_SLUG_INVALID` when it does not follow the format described on `slug`;
145
+ * - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
146
+ * - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
147
+ * - 429 `PROJECT_SLUG_CLAIM_RATE_LIMITED` when the account has attempted to claim custom slugs too often. Attempts count whether or not they succeed; creating a project without a custom slug does not count.
135
148
  * @summary Create a project
136
149
  */
137
150
  export const CreateProjectBody = CreateProjectRequestBody;
151
+ /**
152
+ * Returns a project the caller belongs to, found by an address label: a custom slug is compared exactly, and a label in the form of a project id finds the project with that id, whether or not it has since chosen a custom slug.
153
+ *
154
+ * A deleted project is returned, answering that it is gone. Fails with:
155
+ *
156
+ * - 400 `PROJECT_SLUG_INVALID` when the value cannot be a slug;
157
+ * - 404 `PROJECT_NOT_FOUND` when no project holds the slug;
158
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project;
159
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/project-slugs/{slug}/availability`.
160
+ * @summary Get a project by its slug
161
+ */
162
+ export const getProjectBySlugPathSlugMax = 63;
163
+ export const GetProjectBySlugParams = zod.strictObject({
164
+ slug: zod.string().min(1).max(getProjectBySlugPathSlugMax),
165
+ });
166
+ /**
167
+ * Returns a project the caller belongs to. A deleted project is returned, answering that it is gone. Fails with:
168
+ *
169
+ * - 404 `PROJECT_NOT_FOUND` when no project has the id;
170
+ * - 403 `PROJECT_MEMBERSHIP_REQUIRED` when the caller is not a member of the project.
171
+ * @summary Get a project
172
+ */
173
+ export const GetProjectParams = zod.strictObject({
174
+ projectId: zod.uuid(),
175
+ });
176
+ /**
177
+ * Reports whether a custom slug can be chosen now. Nothing is reserved by asking: the slug is claimed only by creating a project with it or by setting it, either of which may still fail with 409 `PROJECT_SLUG_TAKEN`.
178
+ *
179
+ * Fails with:
180
+ *
181
+ * - 400 `PROJECT_SLUG_INVALID` when the value does not follow the format of a custom slug;
182
+ * - 429 `PROJECT_SLUG_LOOKUP_RATE_LIMITED` when the account has looked up slugs too often. This operation shares its limit with `GET /account/v1/projects/by-slug/{slug}`.
183
+ * @summary Check whether a custom slug can be chosen
184
+ */
185
+ export const getProjectSlugAvailabilityPathSlugMax = 63;
186
+ export const GetProjectSlugAvailabilityParams = zod.strictObject({
187
+ slug: zod.string().min(1).max(getProjectSlugAvailabilityPathSlugMax),
188
+ });
138
189
  /**
139
190
  * Once a project has been chosen, exchange the access token for a scoped token for that project.
140
191
  *
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -35,6 +41,7 @@ export declare const AcceptedInvitationResponseBody: zod.ZodObject<{
35
41
  deleted_at: zod.ZodNullable<zod.z.ZodISODateTime>;
36
42
  description: zod.ZodString;
37
43
  id: zod.ZodUUID;
44
+ slug: zod.ZodString;
38
45
  name: zod.ZodString;
39
46
  updated_at: zod.z.ZodISODateTime;
40
47
  }, zod.z.core.$strict>;
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";
@@ -15,6 +15,12 @@
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
18
24
  * OpenAPI spec version: 1.0.0
19
25
  */
20
26
  import * as zod from "zod";