@leaflow/sdk 0.163.1 → 0.165.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 (35) hide show
  1. package/dist/account/v1/generated/functions.d.ts +29 -29
  2. package/dist/account/v1/generated/functions.js +36 -44
  3. package/dist/account/v1/generated/models.d.ts +6 -5
  4. package/dist/account/v1/generated/models.js +0 -4
  5. package/dist/account/v1/generated/schemas.zod.d.ts +2 -2
  6. package/dist/account/v1/generated/schemas.zod.js +6 -3
  7. package/dist/account/v1/generated/validators/{requestAccountDeletionRequestBody.zod.d.ts → requestAccountDeletionParams.zod.d.ts} +3 -3
  8. package/dist/account/v1/generated/validators/{requestAccountDeletionRequestBody.zod.js → requestAccountDeletionParams.zod.js} +2 -4
  9. package/dist/assistant/v1/generated/functions.js +17 -17
  10. package/dist/billing/v1/generated/functions.d.ts +3 -23
  11. package/dist/billing/v1/generated/functions.js +18 -50
  12. package/dist/billing/v1/generated/models.d.ts +51 -52
  13. package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +1 -1
  14. package/dist/billing/v1/generated/validators/quote.zod.d.ts +39 -0
  15. package/dist/billing/v1/generated/validators/quote.zod.js +7 -3
  16. package/dist/billing/v1/generated/validators/{cancellationPreviewRequest.zod.d.ts → quoteCancellation.zod.d.ts} +4 -5
  17. package/dist/billing/v1/generated/validators/{cancellationPreviewRequest.zod.js → quoteCancellation.zod.js} +4 -8
  18. package/dist/billing/v1/generated/validators/{cancellationRefundPreviewItem.zod.d.ts → quoteCancellationItem.zod.d.ts} +3 -3
  19. package/dist/billing/v1/generated/validators/{cancellationRefundPreviewItem.zod.js → quoteCancellationItem.zod.js} +2 -2
  20. package/dist/billing/v1/generated/validators/{cancellationRefundPreview.zod.d.ts → quoteCancellationResult.zod.d.ts} +3 -5
  21. package/dist/billing/v1/generated/validators/{cancellationRefundPreview.zod.js → quoteCancellationResult.zod.js} +4 -9
  22. package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +7 -0
  23. package/dist/billing/v1/generated/validators/quoteRequest.zod.js +4 -2
  24. package/dist/canopy/v1/generated/functions.js +3 -3
  25. package/dist/canopy/v1/generated/models.d.ts +2 -0
  26. package/dist/canopy/v1/generated/validators/modelBilling.zod.js +1 -1
  27. package/dist/compute/v1/generated/functions.js +14 -14
  28. package/dist/iam/v1/generated/functions.js +1 -1
  29. package/dist/membership/v1/generated/functions.js +4 -4
  30. package/dist/monitoring/v1/generated/functions.js +6 -6
  31. package/dist/notification/v1/generated/functions.js +12 -12
  32. package/dist/routes.d.ts +81 -89
  33. package/dist/routes.js +81 -90
  34. package/dist/support/v1/generated/functions.js +1 -1
  35. package/package.json +1 -1
@@ -381,7 +381,7 @@ export const updateApiKey = async (keyId, updateAPIKeyRequestBody, options, fetc
381
381
  return { data, status: res.status, headers: res.headers };
382
382
  };
383
383
  export const getDisableApiKeyUrl = (keyId) => {
384
- return `https://canopy.leaflow.cloud/api/v1/keys/${encodeURIComponent(String(keyId))}/disable`;
384
+ return `https://canopy.leaflow.cloud/api/v1/keys/${encodeURIComponent(String(keyId))}:disable`;
385
385
  };
386
386
  /**
387
387
  * A temporary measure; the key may be enabled again at any time. Use revocation to invalidate it permanently.
@@ -397,7 +397,7 @@ export const disableApiKey = async (keyId, options, fetchFn) => {
397
397
  return { data, status: res.status, headers: res.headers };
398
398
  };
399
399
  export const getEnableApiKeyUrl = (keyId) => {
400
- return `https://canopy.leaflow.cloud/api/v1/keys/${encodeURIComponent(String(keyId))}/enable`;
400
+ return `https://canopy.leaflow.cloud/api/v1/keys/${encodeURIComponent(String(keyId))}:enable`;
401
401
  };
402
402
  /**
403
403
  * Two cases cannot be enabled again. A revoked key answers `API_KEY_REVOKED`, and a key disabled because its project is suspended answers `API_KEY_PROJECT_SUSPENDED` with `suspended` set to true; the latter requires the project to be restored first.
@@ -413,7 +413,7 @@ export const enableApiKey = async (keyId, options, fetchFn) => {
413
413
  return { data, status: res.status, headers: res.headers };
414
414
  };
415
415
  export const getRevokeApiKeyUrl = (keyId) => {
416
- return `https://canopy.leaflow.cloud/api/v1/keys/${encodeURIComponent(String(keyId))}/revoke`;
416
+ return `https://canopy.leaflow.cloud/api/v1/keys/${encodeURIComponent(String(keyId))}:revoke`;
417
417
  };
418
418
  /**
419
419
  * **Irreversible.** It is intended for a key that has been exposed, such as one committed to a repository.
@@ -349,6 +349,8 @@ export interface ModelMeter {
349
349
  * How requests to a model are billed: under the service's subscription, on the Billing plan `plan_id`, one rate for each token kind. Read the rates from Billing with `search-prices` for the plan, narrowing each price's `rates` with each meter's `dimensions`.
350
350
  *
351
351
  * Each token kind is priced on its own. `input` excludes cached input, which is `cache_read`, and `output` excludes reasoning the provider reports separately, which is `reasoning`; a request is billed for each kind it used.
352
+ *
353
+ * Rates are set per currency, and a currency may not offer a model at all. A model is offered in the currency of the project's billing account when at least one of its token kinds has a rate there; a token kind without a rate in that currency is not charged. Requests to a model with no rate in that currency are refused with 403 `BILLING_MODEL_NOT_OFFERED`.
352
354
  */
353
355
  export interface ModelBilling {
354
356
  /**
@@ -50,4 +50,4 @@ export const ModelBilling = zod
50
50
  .array(ModelMeter)
51
51
  .describe("One entry for each of the five token kinds, in the order input, output, cache_read, cache_write, reasoning."),
52
52
  })
53
- .describe("How requests to a model are billed: under the service's subscription, on the Billing plan `plan_id`, one rate for each token kind. Read the rates from Billing with `search-prices` for the plan, narrowing each price's `rates` with each meter's `dimensions`.\n\nEach token kind is priced on its own. `input` excludes cached input, which is `cache_read`, and `output` excludes reasoning the provider reports separately, which is `reasoning`; a request is billed for each kind it used.");
53
+ .describe("How requests to a model are billed: under the service's subscription, on the Billing plan `plan_id`, one rate for each token kind. Read the rates from Billing with `search-prices` for the plan, narrowing each price's `rates` with each meter's `dimensions`.\n\nEach token kind is priced on its own. `input` excludes cached input, which is `cache_read`, and `output` excludes reasoning the provider reports separately, which is `reasoning`; a request is billed for each kind it used.\n\nRates are set per currency, and a currency may not offer a model at all. A model is offered in the currency of the project's billing account when at least one of its token kinds has a rate there; a token kind without a rate in that currency is not charged. Requests to a model with no rate in that currency are refused with 403 `BILLING_MODEL_NOT_OFFERED`.");
@@ -126,7 +126,7 @@ export const deleteBackup = async (backupId, options, fetchFn) => {
126
126
  return { data, status: res.status, headers: res.headers };
127
127
  };
128
128
  export const getRestoreBackupUrl = (backupId) => {
129
- return `https://compute.leaflow.cloud/api/v1/backups/${encodeURIComponent(String(backupId))}/restore`;
129
+ return `https://compute.leaflow.cloud/api/v1/backups/${encodeURIComponent(String(backupId))}:restore`;
130
130
  };
131
131
  /**
132
132
  * Restores onto a **newly created** disk. The source disk is unaffected and need not still exist.
@@ -569,7 +569,7 @@ export const deleteDisk = async (diskId, params, options, fetchFn) => {
569
569
  return { data, status: res.status, headers: res.headers };
570
570
  };
571
571
  export const getResizeDiskUrl = (diskId) => {
572
- return `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}/resize`;
572
+ return `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}:resize`;
573
573
  };
574
574
  /**
575
575
  * Capacity can only be increased; shrinking is not supported. Returns the disk with the Checkout Session for the resize, which keeps the disk's usage type and period. The disk shows the `resize` operation until the resize is applied, its Checkout Session expires or its order is canceled, so other operations and a second resize are refused with `COMPUTE_RESOURCE_BUSY` meanwhile. The disk keeps its current size until the resize is applied; once `size_gb` shows the new size, extend the file system inside the instance. If checkout is not completed, the order is not accepted or the resize fails, the disk keeps its size and Billing shows the outcome.
@@ -608,7 +608,7 @@ export const resizeDisk = async (diskId, resizeDiskRequestBody, options, fetchFn
608
608
  return { data, status: res.status, headers: res.headers };
609
609
  };
610
610
  export const getRevertDiskUrl = (diskId) => {
611
- return `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}/revert`;
611
+ return `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}:revert`;
612
612
  };
613
613
  /**
614
614
  * Restores the contents of the disk to the moment the snapshot was taken. **All data written after that moment is lost and cannot be recovered.**
@@ -785,7 +785,7 @@ export const setFloatingIpBandwidth = async (floatingIpId, setFloatingIPBandwidt
785
785
  return { data, status: res.status, headers: res.headers };
786
786
  };
787
787
  export const getBindFloatingIpUrl = (floatingIpId) => {
788
- return `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}/binding`;
788
+ return `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}:bind`;
789
789
  };
790
790
  /**
791
791
  * The floating IP shows the `bind` operation until the binding is confirmed.
@@ -809,7 +809,7 @@ export const bindFloatingIp = async (floatingIpId, bindFloatingIPRequestBody, op
809
809
  };
810
810
  const res = await (fetchFn ?? fetch)(getBindFloatingIpUrl(floatingIpId), {
811
811
  ...options,
812
- method: "PUT",
812
+ method: "POST",
813
813
  headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
814
814
  body: JSON.stringify(bindFloatingIPRequestBody),
815
815
  });
@@ -818,7 +818,7 @@ export const bindFloatingIp = async (floatingIpId, bindFloatingIPRequestBody, op
818
818
  return { data, status: res.status, headers: res.headers };
819
819
  };
820
820
  export const getUnbindFloatingIpUrl = (floatingIpId) => {
821
- return `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}/binding`;
821
+ return `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}:unbind`;
822
822
  };
823
823
  /**
824
824
  * The address remains held by the project and simply no longer points at any network interface. The floating IP shows the `unbind` operation until the change is confirmed.
@@ -827,7 +827,7 @@ export const getUnbindFloatingIpUrl = (floatingIpId) => {
827
827
  export const unbindFloatingIp = async (floatingIpId, options, fetchFn) => {
828
828
  const res = await (fetchFn ?? fetch)(getUnbindFloatingIpUrl(floatingIpId), {
829
829
  ...options,
830
- method: "DELETE",
830
+ method: "POST",
831
831
  });
832
832
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
833
833
  const data = body ? JSON.parse(body) : {};
@@ -1183,7 +1183,7 @@ export const resetInstancePassword = async (instanceId, resetPasswordRequestBody
1183
1183
  return { data, status: res.status, headers: res.headers };
1184
1184
  };
1185
1185
  export const getRebootInstanceUrl = (instanceId) => {
1186
- return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}/reboot`;
1186
+ return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}:reboot`;
1187
1187
  };
1188
1188
  /**
1189
1189
  * A reboot defaults to soft, in which the operating system shuts down normally before starting again.
@@ -1224,7 +1224,7 @@ export const rebootInstance = async (instanceId, rebootInstanceRequestBody, opti
1224
1224
  return { data, status: res.status, headers: res.headers };
1225
1225
  };
1226
1226
  export const getRebuildInstanceUrl = (instanceId) => {
1227
- return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}/rebuild`;
1227
+ return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}:rebuild`;
1228
1228
  };
1229
1229
  /**
1230
1230
  * **All data on the system disk is erased and cannot be recovered.** Attached data disks are unaffected.
@@ -1261,7 +1261,7 @@ export const rebuildInstance = async (instanceId, rebuildInstanceRequestBody, op
1261
1261
  return { data, status: res.status, headers: res.headers };
1262
1262
  };
1263
1263
  export const getResizeInstanceUrl = (instanceId) => {
1264
- return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}/resize`;
1264
+ return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}:resize`;
1265
1265
  };
1266
1266
  /**
1267
1267
  * Creates a Billing Checkout Session for the change, including for metered pricing, and returns the instance with it. The instance keeps its usage type and period, priced with the target type's matching option; a target type without that option is refused with 409 `BILLING_OPTION_UNAVAILABLE`. Do not submit a new purchase after paying. After an uncertain response, look the Checkout Session up in Billing before submitting again.
@@ -1296,7 +1296,7 @@ export const resizeInstance = async (instanceId, resizeInstanceRequestBody, opti
1296
1296
  return { data, status: res.status, headers: res.headers };
1297
1297
  };
1298
1298
  export const getStartInstanceUrl = (instanceId) => {
1299
- return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}/start`;
1299
+ return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}:start`;
1300
1300
  };
1301
1301
  /**
1302
1302
  * Outstanding restrictions can prevent starting. The instance shows the `start` operation until it is running or the start has failed.
@@ -1329,7 +1329,7 @@ export const startInstance = async (instanceId, powerRequest, options, fetchFn)
1329
1329
  return { data, status: res.status, headers: res.headers };
1330
1330
  };
1331
1331
  export const getStopInstanceUrl = (instanceId) => {
1332
- return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}/stop`;
1332
+ return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}:stop`;
1333
1333
  };
1334
1334
  /**
1335
1335
  * A stopped instance keeps its disks, network attachments and sellable quota. The instance shows the `stop` operation until it is stopped or the stop has failed.
@@ -2705,7 +2705,7 @@ export const deletePeering = async (peeringId, options, fetchFn) => {
2705
2705
  return { data, status: res.status, headers: res.headers };
2706
2706
  };
2707
2707
  export const getAcceptPeeringUrl = (peeringId) => {
2708
- return `https://compute.leaflow.cloud/api/v1/peerings/${encodeURIComponent(String(peeringId))}/accept`;
2708
+ return `https://compute.leaflow.cloud/api/v1/peerings/${encodeURIComponent(String(peeringId))}:accept`;
2709
2709
  };
2710
2710
  /**
2711
2711
  * @summary Accept peering
@@ -2720,7 +2720,7 @@ export const acceptPeering = async (peeringId, options, fetchFn) => {
2720
2720
  return { data, status: res.status, headers: res.headers };
2721
2721
  };
2722
2722
  export const getRejectPeeringUrl = (peeringId) => {
2723
- return `https://compute.leaflow.cloud/api/v1/peerings/${encodeURIComponent(String(peeringId))}/reject`;
2723
+ return `https://compute.leaflow.cloud/api/v1/peerings/${encodeURIComponent(String(peeringId))}:reject`;
2724
2724
  };
2725
2725
  /**
2726
2726
  * @summary Reject peering
@@ -493,7 +493,7 @@ export const detachPolicy = async (policyId, options, fetchFn) => {
493
493
  return { data, status: res.status, headers: res.headers };
494
494
  };
495
495
  export const getTransferProjectOwnershipUrl = () => {
496
- return `https://iam.leaflow.cloud/api/v1/transfer-ownership`;
496
+ return `https://iam.leaflow.cloud/api/v1/project:transferOwnership`;
497
497
  };
498
498
  /**
499
499
  * The only way `OWNER` moves, and only the owner can initiate it.
@@ -172,7 +172,7 @@ export const listMembershipUpgradeOptions = async (membershipId, params, options
172
172
  return { data, status: res.status, headers: res.headers };
173
173
  };
174
174
  export const getUpgradeMembershipUrl = (membershipId) => {
175
- return `https://membership.leaflow.cloud/api/v1/memberships/${encodeURIComponent(String(membershipId))}/upgrade`;
175
+ return `https://membership.leaflow.cloud/api/v1/memberships/${encodeURIComponent(String(membershipId))}:upgrade`;
176
176
  };
177
177
  /**
178
178
  * Creates a Billing Checkout Session for the full-period price difference. The upgrade takes effect after payment, benefit issuance and delivery confirmation; renewal uses the target tier. Returns 409 MEMBERSHIP_NOT_ACTIVE or MEMBERSHIP_CHANGE_PENDING, or 422 MEMBERSHIP_UPGRADE_UNAVAILABLE. Returns 403 MEMBERSHIP_ACCOUNT_DELETING while the caller's account deletion is pending, or 403 MEMBERSHIP_ACCOUNT_UNUSABLE when the account is deleted, suspended or banned.
@@ -205,7 +205,7 @@ export const upgradeMembership = async (membershipId, membershipUpgrade, options
205
205
  return { data, status: res.status, headers: res.headers };
206
206
  };
207
207
  export const getScheduleMembershipDowngradeUrl = (membershipId) => {
208
- return `https://membership.leaflow.cloud/api/v1/memberships/${encodeURIComponent(String(membershipId))}/downgrade`;
208
+ return `https://membership.leaflow.cloud/api/v1/memberships/${encodeURIComponent(String(membershipId))}:scheduleDowngrade`;
209
209
  };
210
210
  /**
211
211
  * Schedules a lower tier for the next period. Current benefits remain valid. Returns 409 MEMBERSHIP_NOT_ACTIVE or MEMBERSHIP_CHANGE_PENDING, or 422 MEMBERSHIP_DOWNGRADE_INVALID. Returns 403 MEMBERSHIP_ACCOUNT_DELETING while the caller's account deletion is pending, or 403 MEMBERSHIP_ACCOUNT_UNUSABLE when the account is deleted, suspended or banned.
@@ -238,7 +238,7 @@ export const scheduleMembershipDowngrade = async (membershipId, membershipDowngr
238
238
  return { data, status: res.status, headers: res.headers };
239
239
  };
240
240
  export const getCancelMembershipDowngradeUrl = (membershipId) => {
241
- return `https://membership.leaflow.cloud/api/v1/memberships/${encodeURIComponent(String(membershipId))}/downgrade`;
241
+ return `https://membership.leaflow.cloud/api/v1/memberships/${encodeURIComponent(String(membershipId))}:cancelDowngrade`;
242
242
  };
243
243
  /**
244
244
  * Cancels the scheduled downgrade. Returns 409 MEMBERSHIP_CHANGE_PENDING if none is scheduled.
@@ -247,7 +247,7 @@ export const getCancelMembershipDowngradeUrl = (membershipId) => {
247
247
  export const cancelMembershipDowngrade = async (membershipId, options, fetchFn) => {
248
248
  const res = await (fetchFn ?? fetch)(getCancelMembershipDowngradeUrl(membershipId), {
249
249
  ...options,
250
- method: "DELETE",
250
+ method: "POST",
251
251
  });
252
252
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
253
253
  const data = body ? JSON.parse(body) : {};
@@ -39,7 +39,7 @@ export const getIncident = async (incidentId, options, fetchFn) => {
39
39
  return { data, status: res.status, headers: res.headers };
40
40
  };
41
41
  export const getAcknowledgeIncidentUrl = (incidentId) => {
42
- return `https://monitoring.leaflow.cloud/api/v1/incidents/${encodeURIComponent(String(incidentId))}/acknowledge`;
42
+ return `https://monitoring.leaflow.cloud/api/v1/incidents/${encodeURIComponent(String(incidentId))}:acknowledge`;
43
43
  };
44
44
  /**
45
45
  * The incident is also marked as acknowledged in the monitoring system, so that other channels can see it already has an owner.
@@ -107,7 +107,7 @@ export const assignIncident = async (incidentId, assignIncidentRequestBody, opti
107
107
  return { data, status: res.status, headers: res.headers };
108
108
  };
109
109
  export const getCloseIncidentUrl = (incidentId) => {
110
- return `https://monitoring.leaflow.cloud/api/v1/incidents/${encodeURIComponent(String(incidentId))}/close`;
110
+ return `https://monitoring.leaflow.cloud/api/v1/incidents/${encodeURIComponent(String(incidentId))}:close`;
111
111
  };
112
112
  /**
113
113
  * Closing records **that the handling process is finished on this platform**; it does not change the state of the incident itself. An incident that has not recovered may still be closed as an accepted risk, and remains unrecovered in the monitoring system.
@@ -205,7 +205,7 @@ export const setIncidentFollowing = async (incidentId, setFollowingRequestBody,
205
205
  return { data, status: res.status, headers: res.headers };
206
206
  };
207
207
  export const getReopenIncidentUrl = (incidentId) => {
208
- return `https://monitoring.leaflow.cloud/api/v1/incidents/${encodeURIComponent(String(incidentId))}/reopen`;
208
+ return `https://monitoring.leaflow.cloud/api/v1/incidents/${encodeURIComponent(String(incidentId))}:reopen`;
209
209
  };
210
210
  /**
211
211
  * @summary Reopen a closed incident
@@ -593,7 +593,7 @@ export const deleteServer = async (serverId, options, fetchFn) => {
593
593
  return { data, status: res.status, headers: res.headers };
594
594
  };
595
595
  export const getDisableServerMonitoringUrl = (serverId) => {
596
- return `https://monitoring.leaflow.cloud/api/v1/servers/${encodeURIComponent(String(serverId))}/disable`;
596
+ return `https://monitoring.leaflow.cloud/api/v1/servers/${encodeURIComponent(String(serverId))}:disable`;
597
597
  };
598
598
  /**
599
599
  * Reversible: the monitored host is retained, only collection stops, and history is unaffected. Enrolling again resumes collection. To remove the history as well, use DELETE.
@@ -1407,7 +1407,7 @@ export const getStatusPageMaintenance = async (maintenanceId, options, fetchFn)
1407
1407
  return { data, status: res.status, headers: res.headers };
1408
1408
  };
1409
1409
  export const getCancelStatusPageMaintenanceUrl = (maintenanceId) => {
1410
- return `https://monitoring.leaflow.cloud/api/v1/status-page/maintenances/${encodeURIComponent(String(maintenanceId))}/cancel`;
1410
+ return `https://monitoring.leaflow.cloud/api/v1/status-page/maintenances/${encodeURIComponent(String(maintenanceId))}:cancel`;
1411
1411
  };
1412
1412
  /**
1413
1413
  * Cancelled rather than deleted, so that readers who saw the announcement have an explanation. Maintenance that has already started cannot be cancelled; finish it early instead.
@@ -1423,7 +1423,7 @@ export const cancelStatusPageMaintenance = async (maintenanceId, options, fetchF
1423
1423
  return { data, status: res.status, headers: res.headers };
1424
1424
  };
1425
1425
  export const getCompleteStatusPageMaintenanceUrl = (maintenanceId) => {
1426
- return `https://monitoring.leaflow.cloud/api/v1/status-page/maintenances/${encodeURIComponent(String(maintenanceId))}/complete`;
1426
+ return `https://monitoring.leaflow.cloud/api/v1/status-page/maintenances/${encodeURIComponent(String(maintenanceId))}:complete`;
1427
1427
  };
1428
1428
  /**
1429
1429
  * Optional: maintenance finishes on its own at the scheduled end time. Use this endpoint when the work is done ahead of schedule; the affected components return to operational immediately.
@@ -29,7 +29,7 @@ export const listNotifications = async (params, options, fetchFn) => {
29
29
  return { data, status: res.status, headers: res.headers };
30
30
  };
31
31
  export const getMarkNotificationsReadUrl = () => {
32
- return `https://notification.leaflow.cloud/api/v1/notifications/read`;
32
+ return `https://notification.leaflow.cloud/api/v1/notifications:batchMarkRead`;
33
33
  };
34
34
  /**
35
35
  * Marks every listed notification as read. Notifications already read are left alone, and the
@@ -109,7 +109,7 @@ export const getNotification = async (notificationId, options, fetchFn) => {
109
109
  return { data, status: res.status, headers: res.headers };
110
110
  };
111
111
  export const getMarkNotificationReadUrl = (notificationId) => {
112
- return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}/read`;
112
+ return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}:markRead`;
113
113
  };
114
114
  /**
115
115
  * Marking a notification that is already read succeeds and changes nothing.
@@ -125,7 +125,7 @@ export const markNotificationRead = async (notificationId, options, fetchFn) =>
125
125
  return { data, status: res.status, headers: res.headers };
126
126
  };
127
127
  export const getMarkNotificationUnreadUrl = (notificationId) => {
128
- return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}/read`;
128
+ return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}:markUnread`;
129
129
  };
130
130
  /**
131
131
  * Puts it back in the unread count, which is what somebody wants after opening a thing by
@@ -137,14 +137,14 @@ export const getMarkNotificationUnreadUrl = (notificationId) => {
137
137
  export const markNotificationUnread = async (notificationId, options, fetchFn) => {
138
138
  const res = await (fetchFn ?? fetch)(getMarkNotificationUnreadUrl(notificationId), {
139
139
  ...options,
140
- method: "DELETE",
140
+ method: "POST",
141
141
  });
142
142
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
143
143
  const data = body ? JSON.parse(body) : {};
144
144
  return { data, status: res.status, headers: res.headers };
145
145
  };
146
146
  export const getArchiveNotificationUrl = (notificationId) => {
147
- return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}/archive`;
147
+ return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}:archive`;
148
148
  };
149
149
  /**
150
150
  * Archiving removes a notification from the default listing without deleting it; pass
@@ -161,7 +161,7 @@ export const archiveNotification = async (notificationId, options, fetchFn) => {
161
161
  return { data, status: res.status, headers: res.headers };
162
162
  };
163
163
  export const getUnarchiveNotificationUrl = (notificationId) => {
164
- return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}/archive`;
164
+ return `https://notification.leaflow.cloud/api/v1/notifications/${encodeURIComponent(String(notificationId))}:unarchive`;
165
165
  };
166
166
  /**
167
167
  * Returns it to the default listing. Archiving is one click away from anything in the list,
@@ -177,7 +177,7 @@ export const getUnarchiveNotificationUrl = (notificationId) => {
177
177
  export const unarchiveNotification = async (notificationId, options, fetchFn) => {
178
178
  const res = await (fetchFn ?? fetch)(getUnarchiveNotificationUrl(notificationId), {
179
179
  ...options,
180
- method: "DELETE",
180
+ method: "POST",
181
181
  });
182
182
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
183
183
  const data = body ? JSON.parse(body) : {};
@@ -213,7 +213,7 @@ export const listAnnouncements = async (options, fetchFn) => {
213
213
  return { data, status: res.status, headers: res.headers };
214
214
  };
215
215
  export const getReadAllAnnouncementsUrl = () => {
216
- return `https://notification.leaflow.cloud/api/v1/announcements/read`;
216
+ return `https://notification.leaflow.cloud/api/v1/announcements:markAllRead`;
217
217
  };
218
218
  /**
219
219
  * Idempotent. Announcements you had already read stay read, and the count only covers the ones this call changed.
@@ -229,7 +229,7 @@ export const readAllAnnouncements = async (options, fetchFn) => {
229
229
  return { data, status: res.status, headers: res.headers };
230
230
  };
231
231
  export const getReadAnnouncementUrl = (announcementId) => {
232
- return `https://notification.leaflow.cloud/api/v1/announcements/${encodeURIComponent(String(announcementId))}/read`;
232
+ return `https://notification.leaflow.cloud/api/v1/announcements/${encodeURIComponent(String(announcementId))}:markRead`;
233
233
  };
234
234
  /**
235
235
  * Idempotent: marking one twice is the same as marking it once. There is no way to mark it
@@ -376,7 +376,7 @@ export const cancelEmailOverride = async (options, fetchFn) => {
376
376
  return { data, status: res.status, headers: res.headers };
377
377
  };
378
378
  export const getConfirmEmailOverrideUrl = () => {
379
- return `https://notification.leaflow.cloud/api/v1/preferences/email-override/code/confirm`;
379
+ return `https://notification.leaflow.cloud/api/v1/preferences/email-override/code:confirm`;
380
380
  };
381
381
  /**
382
382
  * A correct code moves the pending address into use: email starts going there instead of the
@@ -651,7 +651,7 @@ export const deleteUserChannel = async (channelId, options, fetchFn) => {
651
651
  return { data, status: res.status, headers: res.headers };
652
652
  };
653
653
  export const getVerifyUserChannelUrl = (channelId) => {
654
- return `https://notification.leaflow.cloud/api/v1/channels/${encodeURIComponent(String(channelId))}/verify`;
654
+ return `https://notification.leaflow.cloud/api/v1/channels/${encodeURIComponent(String(channelId))}:verify`;
655
655
  };
656
656
  /**
657
657
  * Sends one message to the channel and marks it verified if the endpoint accepted it.
@@ -694,7 +694,7 @@ export const describeCredentialTicket = async (ticketId, options, fetchFn) => {
694
694
  return { data, status: res.status, headers: res.headers };
695
695
  };
696
696
  export const getRevealCredentialUrl = (ticketId) => {
697
- return `https://notification.leaflow.cloud/api/v1/credentials/${encodeURIComponent(String(ticketId))}/reveal`;
697
+ return `https://notification.leaflow.cloud/api/v1/credentials/${encodeURIComponent(String(ticketId))}:reveal`;
698
698
  };
699
699
  /**
700
700
  * Returns the credential and destroys it in the same step. **This is the only operation that