Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

wip

Kiran K1085153ea978
diff --git a/openapi.json b/openapi.json
new file mode 100644
index 0000000000..4fe25d16fe
--- /dev/null
+++ b/openapi.json
@@ -0,0 +1 @@
+{"openapi":"3.0.3","info":{"title":"Dub.co API","description":"Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.","version":"0.0.1","contact":{"name":"Dub.co Support","email":"[email protected]","url":"https://dub.co/api"},"license":{"name":"AGPL-3.0 license","url":"https://github.com/dubinc/dub/blob/main/LICENSE.md"}},"servers":[{"url":"https://api.dub.co","description":"Production API"}],"paths":{"/links":{"post":{"operationId":"createLink","summary":"Create a new link","description":"Create a new link for the authenticated workspace.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace to create the link for.","schema":{"type":"string","description":"The ID of the workspace to create the link for."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"prefix":{"type":"string","description":"The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."},"url":{"type":"string","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"The password required to access the destination URL of the short link."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."}},"required":["url"]}}}},"responses":{"200":{"description":"The created link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"get":{"operationId":"getLinks","summary":"Retrieve a list of links","description":"Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.","schema":{"type":"string","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned."}},{"in":"query","name":"tagId","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the links by.","schema":{"type":"string","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the links by.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to filter the links by.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to filter the links by."}},{"in":"query","name":"search","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url.","schema":{"type":"string","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url."}},{"in":"query","name":"userId","description":"The user ID to filter the links by.","schema":{"type":"string","description":"The user ID to filter the links by."}},{"in":"query","name":"showArchived","description":"Whether to include archived links in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include archived links in the response. Defaults to `false` if not provided."}},{"in":"query","name":"withTags","description":"Whether to include tags in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include tags in the response. Defaults to `false` if not provided."}},{"in":"query","name":"sort","description":"The field to sort the links by. The default is `createdAt`, and sort order is always descending.","schema":{"type":"string","enum":["createdAt","clicks","lastClicked"],"default":"createdAt","description":"The field to sort the links by. The default is `createdAt`, and sort order is always descending."}},{"in":"query","name":"page","description":"The page number for pagination (each page contains 100 links).","schema":{"type":"number","description":"The page number for pagination (each page contains 100 links)."}}],"responses":{"200":{"description":"A list of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/links/count":{"get":{"operationId":"getLinksCount","summary":"Retrieve the number of links","description":"Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.","schema":{"type":"string","description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned."}},{"in":"query","name":"tagId","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the links by.","schema":{"type":"string","description":"[DEPRECATED] (use tagIds instead): The tag ID to filter the links by.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to filter the links by.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to filter the links by."}},{"in":"query","name":"search","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url.","schema":{"type":"string","description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url."}},{"in":"query","name":"userId","description":"The user ID to filter the links by.","schema":{"type":"string","description":"The user ID to filter the links by."}},{"in":"query","name":"showArchived","description":"Whether to include archived links in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include archived links in the response. Defaults to `false` if not provided."}},{"in":"query","name":"withTags","description":"Whether to include tags in the response. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include tags in the response. Defaults to `false` if not provided."}},{"in":"query","name":"groupBy","description":"The field to group the links by.","schema":{"anyOf":[{"type":"string","enum":["domain"]},{"type":"string","enum":["tagId"]}],"description":"The field to group the links by."}}],"responses":{"200":{"description":"A list of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/links/info":{"get":{"operationId":"getLinkInfo","summary":"Retrieve a link","description":"Retrieve the info for a link from their domain and key.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`.","schema":{"type":"string","minLength":1,"description":"The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`."},"required":true},{"in":"query","name":"key","description":"The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`.","schema":{"type":"string","minLength":1,"description":"The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`."},"required":true}],"responses":{"200":{"description":"The retrieved link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/links/{linkId}":{"put":{"operationId":"editLink","summary":"Edit a link","description":"Edit a link for the authenticated workspace.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"path","name":"linkId","description":"The id of the link to edit. You can get this via the `getLinkInfo` endpoint.","schema":{"type":"string","description":"The id of the link to edit. You can get this via the `getLinkInfo` endpoint."},"required":true},{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"prefix":{"type":"string","description":"The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."},"url":{"type":"string","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"The password required to access the destination URL of the short link."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."}},"required":["url"]}}}},"responses":{"200":{"description":"The edited link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"delete":{"operationId":"deleteLink","summary":"Delete a link","description":"Delete a link for the authenticated workspace.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"path","name":"linkId","description":"The id of the link to delete. You can get this via the `getLinkInfo` endpoint.","schema":{"type":"string","description":"The id of the link to delete. You can get this via the `getLinkInfo` endpoint."},"required":true},{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true}],"responses":{"200":{"description":"The deleted link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/links/bulk":{"post":{"operationId":"bulkCreateLinks","summary":"Bulk create links","description":"Bulk create up to 100 links for the authenticated workspace.","tags":["Links"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace to create the link for.","schema":{"type":"string","description":"The ID of the workspace to create the link for."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"prefix":{"type":"string","description":"The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."},"url":{"type":"string","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"The password required to access the destination URL of the short link."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link.","deprecated":true},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The unique IDs of the tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."}},"required":["url"]}}}}},"responses":{"200":{"description":"The created links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/qr":{"get":{"operationId":"getQRCode","summary":"Retrieve a QR code","description":"Retrieve a QR code for a link.","tags":["QR Codes"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"url","description":"The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.","schema":{"type":"string","format":"uri","default":"https://dub.co","description":"The URL to generate a QR code for. Defaults to `https://dub.co` if not provided."}},{"in":"query","name":"size","description":"The size of the QR code in pixels. Defaults to `600` if not provided.","schema":{"type":"number","default":600,"description":"The size of the QR code in pixels. Defaults to `600` if not provided."}},{"in":"query","name":"level","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided.","schema":{"type":"string","enum":["L","M","Q","H"],"default":"L","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided."}},{"in":"query","name":"fgColor","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided.","schema":{"type":"string","default":"#000000","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided."}},{"in":"query","name":"bgColor","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided.","schema":{"type":"string","default":"#FFFFFF","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided."}},{"in":"query","name":"includeMargin","description":"Whether to include a margin around the QR code. Defaults to `false` if not provided.","schema":{"type":"boolean","default":"false","description":"Whether to include a margin around the QR code. Defaults to `false` if not provided."}}],"responses":{"200":{"description":"The QR code","content":{"image/png":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/clicks":{"get":{"operationId":"getClicksAnalytics","summary":"Retrieve clicks analytics","description":"Retrieve the number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The number of clicks","content":{"application/json":{"schema":{"type":"number","description":"The number of clicks"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/timeseries":{"get":{"operationId":"getTimeseriesAnalytics","summary":"Retrieve timeseries analytics","description":"Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The number of clicks over a period of time","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"The starting timestamp of the interval"},"clicks":{"type":"number","description":"The number of clicks in the interval"}},"required":["start","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/country":{"get":{"operationId":"getCountryAnalytics","summary":"Retrieve country analytics","description":"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top countries by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter country code: https://d.to/geo"},"clicks":{"type":"number","description":"The number of clicks from this country"}},"required":["country","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/city":{"get":{"operationId":"getCityAnalytics","summary":"Retrieve city analytics","description":"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top cities by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string","description":"The name of the city"},"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter country code of the city: https://d.to/geo"},"clicks":{"type":"number","description":"The number of clicks from this city"}},"required":["city","country","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/device":{"get":{"operationId":"getDeviceAnalytics","summary":"Retrieve device analytics","description":"Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top devices by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string","description":"The name of the device"},"clicks":{"type":"number","description":"The number of clicks from this device"}},"required":["device","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/browser":{"get":{"operationId":"getBrowserAnalytics","summary":"Retrieve browser analytics","description":"Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top browsers by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"browser":{"type":"string","description":"The name of the browser"},"clicks":{"type":"number","description":"The number of clicks from this browser"}},"required":["browser","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/os":{"get":{"operationId":"getOSAnalytics","summary":"Retrieve OS analytics","description":"Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top OS by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","description":"The name of the OS"},"clicks":{"type":"number","description":"The number of clicks from this OS"}},"required":["os","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/referer":{"get":{"operationId":"getRefererAnalytics","summary":"Retrieve referer analytics","description":"Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top referers by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"referer":{"type":"string","description":"The name of the referer. If unknown, this will be `(direct)`"},"clicks":{"type":"number","description":"The number of clicks from this referer"}},"required":["referer","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/top_links":{"get":{"operationId":"getTopLinks","summary":"Retrieve top links","description":"Retrieve the top links by number of clicks for a domain or the authenticated workspace.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top links by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"link":{"type":"string","description":"The unique ID of the short link"},"clicks":{"type":"number","description":"The number of clicks from this link"}},"required":["link","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/analytics/top_urls":{"get":{"operationId":"getTopURLs","summary":"Retrieve top URLs","description":"Retrieve the top URLs by number of clicks for a given short link.","tags":["Analytics"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace the link belongs to.","schema":{"type":"string","description":"The ID of the workspace the link belongs to."},"required":true},{"in":"query","name":"domain","description":"The domain of the short link.","schema":{"type":"string","description":"The domain of the short link."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for.","schema":{"type":"string","enum":["1h","24h","7d","30d","90d","all"],"description":"The interval to retrieve analytics for."}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for."}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for."}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for."}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for."}},{"in":"query","name":"referer","description":"The referer to retrieve analytics for.","schema":{"type":"string","description":"The referer to retrieve analytics for."}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"excludeRoot","description":"Whether to exclude the root link from the response.","schema":{"type":"boolean","description":"Whether to exclude the root link from the response."}},{"in":"query","name":"tagId","description":"The tag ID to retrieve analytics for.","schema":{"type":"string","description":"The tag ID to retrieve analytics for."}}],"responses":{"200":{"description":"The top URLs by number of clicks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The destination URL"},"clicks":{"type":"number","description":"The number of clicks from this URL"}},"required":["url","clicks"]}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/workspaces":{"get":{"operationId":"getWorkspaces","summary":"Retrieve a list of workspaces","description":"Retrieve a list of workspaces for the authenticated user.","tags":["Workspaces"],"security":[{"bearerToken":[]}],"responses":{"200":{"description":"A list of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"post":{"operationId":"createWorkspace","summary":"Create a workspace","description":"Create a new workspace for the authenticated user.","tags":["Workspaces"],"security":[{"bearerToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"slug":{"type":"string","minLength":3,"maxLength":48},"domain":{"type":"string"}},"required":["name","slug"]}}}},"responses":{"200":{"description":"The created workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/workspaces/{idOrSlug}":{"get":{"operationId":"getWorkspace","summary":"Retrieve a workspace","description":"Retrieve a workspace for the authenticated user.","tags":["Workspaces"],"security":[{"bearerToken":[]}],"parameters":[{"in":"path","name":"idOrSlug","description":"The ID or slug of the workspace.","schema":{"type":"string","description":"The ID or slug of the workspace."},"required":true}],"responses":{"200":{"description":"The retrieved workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/tags":{"post":{"operationId":"createTag","summary":"Create a new tag","description":"Create a new tag for the authenticated workspace.","tags":["Tags"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace to create the tag for.","schema":{"type":"string","description":"The ID of the workspace to create the tag for."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tag":{"type":"string","minLength":1,"description":"The name of the tag to create."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","pink","brown"],"description":"The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown."}},"required":["tag"]}}}},"responses":{"201":{"description":"The created tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagSchema"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}},"get":{"operationId":"getTags","summary":"Retrieve a list of tags","description":"Retrieve a list of tags for the authenticated workspace.","tags":["Tags"],"security":[{"bearerToken":[]}],"parameters":[{"in":"query","name":"workspaceId","description":"The ID of the workspace to retrieve the tags for.","schema":{"type":"string","description":"The ID of the workspace to retrieve the tags for."},"required":true}],"responses":{"200":{"description":"A list of tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagSchema"}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}},"components":{"securitySchemes":{"bearerToken":{"type":"http","description":"Default authentication mechanism","scheme":"bearer"}},"schemas":{"LinkSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the short link."},"domain":{"type":"string","description":"The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"archived":{"type":"boolean","default":false,"description":"Whether the short link is archived."},"expiresAt":{"type":"string","nullable":true,"description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future."},"password":{"type":"string","nullable":true,"description":"The password required to access the destination URL of the short link."},"proxy":{"type":"boolean","default":false,"description":"Whether the short link uses Custom Social Media Cards feature."},"title":{"type":"string","nullable":true,"description":"The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"description":{"type":"string","nullable":true,"description":"The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"image":{"type":"string","nullable":true,"description":"The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."},"rewrite":{"type":"boolean","default":false,"description":"Whether the short link uses link cloaking."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"geo":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"},"publicStats":{"type":"boolean","default":false,"description":"Whether the short link's stats are publicly accessible."},"tagId":{"type":"string","nullable":true,"description":"[DEPRECATED] (use `tags` instead): The unique ID of the tag assigned to the short link.","deprecated":true},"tags":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/TagSchema"},"description":"The tags assigned to the short link."},"comments":{"type":"string","nullable":true,"description":"The comments for the short link."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"qrCode":{"type":"string","format":"uri","description":"The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`)."},"utm_source":{"type":"string","nullable":true,"description":"The UTM source of the short link."},"utm_medium":{"type":"string","nullable":true,"description":"The UTM medium of the short link."},"utm_campaign":{"type":"string","nullable":true,"description":"The UTM campaign of the short link."},"utm_term":{"type":"string","nullable":true,"description":"The UTM term of the short link."},"utm_content":{"type":"string","nullable":true,"description":"The UTM content of the short link."},"userId":{"type":"string","description":"The user ID of the creator of the short link."},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"type":"number","default":0,"description":"The number of clicks on the short link."},"lastClicked":{"type":"string","nullable":true,"description":"The date and time when the short link was last clicked."},"createdAt":{"type":"string","description":"The date and time when the short link was created."},"updatedAt":{"type":"string","description":"The date and time when the short link was last updated."},"projectId":{"type":"string","description":"[DEPRECATED] (use workspaceId instead): The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","archived","expiresAt","password","proxy","title","description","image","rewrite","ios","android","geo","publicStats","tagId","tags","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","userId","workspaceId","clicks","lastClicked","createdAt","updatedAt","projectId"],"title":"Link"},"WorkspaceSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the workspace."},"name":{"type":"string","description":"The name of the workspace."},"slug":{"type":"string","description":"The slug of the workspace."},"logo":{"type":"string","nullable":true,"default":null,"description":"The logo of the workspace."},"usage":{"type":"number","description":"The usage of the workspace."},"usageLimit":{"type":"number","description":"The usage limit of the workspace."},"linksUsage":{"type":"number","description":"The links usage of the workspace."},"linksLimit":{"type":"number","description":"The links limit of the workspace."},"domainsLimit":{"type":"number","description":"The domains limit of the workspace."},"tagsLimit":{"type":"number","description":"The tags limit of the workspace."},"usersLimit":{"type":"number","description":"The users limit of the workspace."},"plan":{"type":"string","enum":["free","pro","business","business plus","business extra","business max","enterprise"],"description":"The plan of the workspace."},"stripeId":{"type":"string","nullable":true,"description":"The Stripe ID of the workspace."},"billingCycleStart":{"type":"number","description":"The date and time when the billing cycle starts for the workspace."},"createdAt":{"type":"string","description":"The date and time when the workspace was created."},"users":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"],"description":"The role of the authenticated user in the workspace."}},"required":["role"]},"description":"The role of the authenticated user in the workspace."},"domains":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The domain of the workspace."}},"required":["slug"]},"description":"The domains of the workspace."}},"required":["id","name","slug","logo","usage","usageLimit","linksUsage","linksLimit","domainsLimit","tagsLimit","usersLimit","plan","stripeId","billingCycleStart","createdAt","users","domains"],"title":"Workspace"},"TagSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the tag."},"name":{"type":"string","description":"The name of the tag."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","pink","brown"],"description":"The color of the tag."}},"required":["id","name","color"],"title":"Tag"}},"responses":{"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"A short code indicating the error code returned.","example":"bad_request"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#bad_request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"],"description":"A short code indicating the error code returned.","example":"unauthorized"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"A short code indicating the error code returned.","example":"forbidden"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"A short code indicating the error code returned.","example":"not_found"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#not_found"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"description":"A short code indicating the error code returned.","example":"conflict"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#conflict"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"This response is sent when the requested content has been permanently deleted from server, with no forwarding address.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invite_expired"],"description":"A short code indicating the error code returned.","example":"invite_expired"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#invite_expired"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"A short code indicating the error code returned.","example":"unprocessable_entity"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#unprocessable_entity"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"A short code indicating the error code returned.","example":"rate_limit_exceeded"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#rate_limit_exceeded"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"A short code indicating the error code returned.","example":"internal_server_error"},"message":{"type":"string","description":"A human readable explanation of what went wrong.","example":"The requested resource was not found."},"doc_url":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://dub.co/docs/api-reference/errors#internal_server_error"}},"required":["code","message"]}},"required":["error"]}}}}}}}
\ No newline at end of file
diff --git a/typescript/.eslintrc.js b/typescript/.eslintrc.js
new file mode 100644
index 0000000000..4d160bd212
--- /dev/null
+++ b/typescript/.eslintrc.js
@@ -0,0 +1,28 @@
+/* eslint-env node */
+module.exports = {
+ root: true,
+ extends: [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:import/recommended",
+ "plugin:import/typescript",
+ ],
+ parser: "@typescript-eslint/parser",
+ plugins: ["@typescript-eslint"],
+ settings: {
+ "import/resolver": {
+ typescript: true,
+ node: true,
+ },
+ },
+ rules: {
+ // Handled by typescript compiler
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/ban-types": "off",
+ "@typescript-eslint/no-namespace": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "import/no-named-as-default-member": "off",
+
+ "import/no-default-export": "error",
+ },
+};
diff --git a/typescript/.gitattributes b/typescript/.gitattributes
new file mode 100644
index 0000000000..113eead509
--- /dev/null
+++ b/typescript/.gitattributes
@@ -0,0 +1,2 @@
+# This allows generated code to be indexed correctly
+*.ts linguist-generated=false
\ No newline at end of file
diff --git a/typescript/.gitignore b/typescript/.gitignore
new file mode 100644
index 0000000000..cc2681a5ce
--- /dev/null
+++ b/typescript/.gitignore
@@ -0,0 +1,10 @@
+/models
+/models/errors
+/types
+/lib
+/sdk
+/hooks
+/index.*
+/cjs
+/node_modules
+/.tsbuildinfo
diff --git a/typescript/.npmignore b/typescript/.npmignore
new file mode 100644
index 0000000000..e8a556cd26
--- /dev/null
+++ b/typescript/.npmignore
@@ -0,0 +1,8 @@
+/*
+/docs/**/*.md
+!/**/*.ts
+!/**/*.js
+!/**/*.map
+
+/.eslintrc.js
+/cjs
diff --git a/typescript/.speakeasy/gen.lock b/typescript/.speakeasy/gen.lock
new file mode 100755
index 0000000000..5ef1447d79
--- /dev/null
+++ b/typescript/.speakeasy/gen.lock
@@ -0,0 +1,228 @@
+lockVersion: 2.0.0
+id: 76fda653-2b70-4c1a-a204-9a9aa2c1f7b1
+management:
+ docChecksum: 924b6b1a71693961acd167cba76e9639
+ docVersion: 0.0.1
+ speakeasyVersion: 1.228.1
+ generationVersion: 2.292.0
+ releaseVersion: 0.0.1
+ configChecksum: 311e495168ab88327327d83c51cd5f08
+features:
+ typescript:
+ acceptHeaders: 2.81.1
+ constsAndDefaults: 0.1.5
+ core: 3.7.0
+ deprecations: 2.81.1
+ flattening: 2.81.1
+ globalSecurity: 2.82.8
+ globalServerURLs: 2.82.4
+ responseFormat: 0.2.3
+ unions: 2.85.3
+generatedFiles:
+ - src/sdk/links.ts
+ - src/sdk/qrcodes.ts
+ - src/sdk/analytics.ts
+ - src/sdk/workspaces.ts
+ - src/sdk/tags.ts
+ - src/sdk/sdk.ts
+ - .eslintrc.js
+ - .npmignore
+ - RUNTIMES.md
+ - package.json
+ - src/index.ts
+ - src/lib/base64.ts
+ - src/lib/config.ts
+ - src/lib/encodings.ts
+ - src/lib/http.ts
+ - src/lib/retries.ts
+ - src/lib/schemas.ts
+ - src/lib/sdks.ts
+ - src/lib/security.ts
+ - src/lib/url.ts
+ - src/sdk/index.ts
+ - src/models/errors/sdkerror.ts
+ - src/models/errors/sdkvalidationerror.ts
+ - src/types/blobs.ts
+ - src/types/index.ts
+ - src/types/operations.ts
+ - src/types/rfcdate.ts
+ - tsconfig.json
+ - src/models/operations/getlinks.ts
+ - src/models/operations/createlink.ts
+ - src/models/operations/getlinkscount.ts
+ - src/models/operations/getlinkinfo.ts
+ - src/models/operations/editlink.ts
+ - src/models/operations/deletelink.ts
+ - src/models/operations/bulkcreatelinks.ts
+ - src/models/operations/getqrcode.ts
+ - src/models/operations/getclicksanalytics.ts
+ - src/models/operations/gettimeseriesanalytics.ts
+ - src/models/operations/getcountryanalytics.ts
+ - src/models/operations/getcityanalytics.ts
+ - src/models/operations/getdeviceanalytics.ts
+ - src/models/operations/getbrowseranalytics.ts
+ - src/models/operations/getosanalytics.ts
+ - src/models/operations/getrefereranalytics.ts
+ - src/models/operations/gettoplinks.ts
+ - src/models/operations/gettopurls.ts
+ - src/models/operations/getworkspaces.ts
+ - src/models/operations/createworkspace.ts
+ - src/models/operations/getworkspace.ts
+ - src/models/operations/gettags.ts
+ - src/models/operations/createtag.ts
+ - src/models/components/linkschema.ts
+ - src/models/components/tagschema.ts
+ - src/models/components/httpmetadata.ts
+ - src/models/components/workspaceschema.ts
+ - src/models/components/security.ts
+ - src/models/errors/fourhundred.ts
+ - src/models/errors/fourhundredandone.ts
+ - src/models/errors/fourhundredandthree.ts
+ - src/models/errors/fourhundredandfour.ts
+ - src/models/errors/fourhundredandnine.ts
+ - src/models/errors/fourhundredandten.ts
+ - src/models/errors/fourhundredandtwentytwo.ts
+ - src/models/errors/fourhundredandtwentynine.ts
+ - src/models/errors/fivehundred.ts
+ - src/models/errors/index.ts
+ - src/models/operations/index.ts
+ - src/models/components/index.ts
+ - docs/models/operations/queryparamtagids.md
+ - docs/models/operations/sort.md
+ - docs/models/operations/getlinksrequest.md
+ - docs/models/operations/getlinksresponse.md
+ - docs/models/operations/tagids.md
+ - docs/models/operations/createlinkrequestbody.md
+ - docs/models/operations/createlinkrequest.md
+ - docs/models/operations/createlinkresponse.md
+ - docs/models/operations/getlinkscountqueryparamtagids.md
+ - docs/models/operations/two.md
+ - docs/models/operations/one.md
+ - docs/models/operations/groupby.md
+ - docs/models/operations/getlinkscountrequest.md
+ - docs/models/operations/getlinkscountresponse.md
+ - docs/models/operations/getlinkinforequest.md
+ - docs/models/operations/getlinkinforesponse.md
+ - docs/models/operations/editlinktagids.md
+ - docs/models/operations/editlinkrequestbody.md
+ - docs/models/operations/editlinkrequest.md
+ - docs/models/operations/editlinkresponse.md
+ - docs/models/operations/deletelinkrequest.md
+ - docs/models/operations/deletelinkresponse.md
+ - docs/models/operations/bulkcreatelinkstagids.md
+ - docs/models/operations/requestbody.md
+ - docs/models/operations/bulkcreatelinksrequest.md
+ - docs/models/operations/bulkcreatelinksresponse.md
+ - docs/models/operations/level.md
+ - docs/models/operations/getqrcoderequest.md
+ - docs/models/operations/getqrcoderesponse.md
+ - docs/models/operations/interval.md
+ - docs/models/operations/country.md
+ - docs/models/operations/getclicksanalyticsrequest.md
+ - docs/models/operations/getclicksanalyticsresponse.md
+ - docs/models/operations/queryparaminterval.md
+ - docs/models/operations/queryparamcountry.md
+ - docs/models/operations/gettimeseriesanalyticsrequest.md
+ - docs/models/operations/responsebody.md
+ - docs/models/operations/gettimeseriesanalyticsresponse.md
+ - docs/models/operations/getcountryanalyticsqueryparaminterval.md
+ - docs/models/operations/getcountryanalyticsqueryparamcountry.md
+ - docs/models/operations/getcountryanalyticsrequest.md
+ - docs/models/operations/getcountryanalyticscountry.md
+ - docs/models/operations/getcountryanalyticsresponsebody.md
+ - docs/models/operations/getcountryanalyticsresponse.md
+ - docs/models/operations/getcityanalyticsqueryparaminterval.md
+ - docs/models/operations/getcityanalyticsqueryparamcountry.md
+ - docs/models/operations/getcityanalyticsrequest.md
+ - docs/models/operations/getcityanalyticscountry.md
+ - docs/models/operations/getcityanalyticsresponsebody.md
+ - docs/models/operations/getcityanalyticsresponse.md
+ - docs/models/operations/getdeviceanalyticsqueryparaminterval.md
+ - docs/models/operations/getdeviceanalyticsqueryparamcountry.md
+ - docs/models/operations/getdeviceanalyticsrequest.md
+ - docs/models/operations/getdeviceanalyticsresponsebody.md
+ - docs/models/operations/getdeviceanalyticsresponse.md
+ - docs/models/operations/getbrowseranalyticsqueryparaminterval.md
+ - docs/models/operations/getbrowseranalyticsqueryparamcountry.md
+ - docs/models/operations/getbrowseranalyticsrequest.md
+ - docs/models/operations/getbrowseranalyticsresponsebody.md
+ - docs/models/operations/getbrowseranalyticsresponse.md
+ - docs/models/operations/getosanalyticsqueryparaminterval.md
+ - docs/models/operations/getosanalyticsqueryparamcountry.md
+ - docs/models/operations/getosanalyticsrequest.md
+ - docs/models/operations/getosanalyticsresponsebody.md
+ - docs/models/operations/getosanalyticsresponse.md
+ - docs/models/operations/getrefereranalyticsqueryparaminterval.md
+ - docs/models/operations/getrefereranalyticsqueryparamcountry.md
+ - docs/models/operations/getrefereranalyticsrequest.md
+ - docs/models/operations/getrefereranalyticsresponsebody.md
+ - docs/models/operations/getrefereranalyticsresponse.md
+ - docs/models/operations/gettoplinksqueryparaminterval.md
+ - docs/models/operations/gettoplinksqueryparamcountry.md
+ - docs/models/operations/gettoplinksrequest.md
+ - docs/models/operations/gettoplinksresponsebody.md
+ - docs/models/operations/gettoplinksresponse.md
+ - docs/models/operations/gettopurlsqueryparaminterval.md
+ - docs/models/operations/gettopurlsqueryparamcountry.md
+ - docs/models/operations/gettopurlsrequest.md
+ - docs/models/operations/gettopurlsresponsebody.md
+ - docs/models/operations/gettopurlsresponse.md
+ - docs/models/operations/getworkspacesresponse.md
+ - docs/models/operations/createworkspacerequestbody.md
+ - docs/models/operations/createworkspaceresponse.md
+ - docs/models/operations/getworkspacerequest.md
+ - docs/models/operations/getworkspaceresponse.md
+ - docs/models/operations/gettagsrequest.md
+ - docs/models/operations/gettagsresponse.md
+ - docs/models/operations/color.md
+ - docs/models/operations/createtagrequestbody.md
+ - docs/models/operations/createtagrequest.md
+ - docs/models/operations/createtagresponse.md
+ - docs/models/components/linkschema.md
+ - docs/models/components/color.md
+ - docs/models/components/tagschema.md
+ - docs/models/components/httpmetadata.md
+ - docs/models/components/plan.md
+ - docs/models/components/role.md
+ - docs/models/components/users.md
+ - docs/models/components/domains.md
+ - docs/models/components/workspaceschema.md
+ - docs/models/components/security.md
+ - docs/models/errors/code.md
+ - docs/models/errors/errort.md
+ - docs/models/errors/fourhundred.md
+ - docs/models/errors/fourhundredandonecode.md
+ - docs/models/errors/fourhundredandoneerror.md
+ - docs/models/errors/fourhundredandone.md
+ - docs/models/errors/fourhundredandthreecode.md
+ - docs/models/errors/fourhundredandthreeerror.md
+ - docs/models/errors/fourhundredandthree.md
+ - docs/models/errors/fourhundredandfourcode.md
+ - docs/models/errors/fourhundredandfourerror.md
+ - docs/models/errors/fourhundredandfour.md
+ - docs/models/errors/fourhundredandninecode.md
+ - docs/models/errors/fourhundredandnineerror.md
+ - docs/models/errors/fourhundredandnine.md
+ - docs/models/errors/fourhundredandtencode.md
+ - docs/models/errors/fourhundredandtenerror.md
+ - docs/models/errors/fourhundredandten.md
+ - docs/models/errors/fourhundredandtwentytwocode.md
+ - docs/models/errors/fourhundredandtwentytwoerror.md
+ - docs/models/errors/fourhundredandtwentytwo.md
+ - docs/models/errors/fourhundredandtwentyninecode.md
+ - docs/models/errors/fourhundredandtwentynineerror.md
+ - docs/models/errors/fourhundredandtwentynine.md
+ - docs/models/errors/fivehundredcode.md
+ - docs/models/errors/fivehundrederror.md
+ - docs/models/errors/fivehundred.md
+ - docs/sdks/dub/README.md
+ - docs/sdks/links/README.md
+ - docs/sdks/qrcodes/README.md
+ - docs/sdks/analytics/README.md
+ - docs/sdks/workspaces/README.md
+ - docs/sdks/tags/README.md
+ - USAGE.md
+ - .gitattributes
+ - src/hooks/hooks.ts
+ - src/hooks/types.ts
+ - src/hooks/index.ts
diff --git a/typescript/.speakeasy/gen.yaml b/typescript/.speakeasy/gen.yaml
new file mode 100755
index 0000000000..0664c19ecd
--- /dev/null
+++ b/typescript/.speakeasy/gen.yaml
@@ -0,0 +1,36 @@
+configVersion: 2.0.0
+generation:
+ sdkClassName: dub
+ maintainOpenAPIOrder: true
+ usageSnippets:
+ optionalPropertyRendering: withExample
+ useClassNamesForArrayFields: true
+ fixes:
+ nameResolutionDec2023: true
+ parameterOrderingFeb2024: true
+ requestResponseComponentNamesFeb2024: true
+ auth:
+ oAuth2ClientCredentialsEnabled: false
+typescript:
+ version: 0.0.1
+ additionalDependencies:
+ dependencies: {}
+ devDependencies: {}
+ peerDependencies: {}
+ author: Speakeasy
+ clientServerStatusCodesAsErrors: true
+ flattenGlobalSecurity: true
+ imports:
+ option: openapi
+ paths:
+ callbacks: models/callbacks
+ errors: models/errors
+ operations: models/operations
+ shared: models/components
+ webhooks: models/webhooks
+ inputModelSuffix: input
+ maxMethodParams: 4
+ outputModelSuffix: output
+ packageName: dub-node
+ responseFormat: envelope-http
+ templateVersion: v2
diff --git a/typescript/.speakeasy/workflow.yaml b/typescript/.speakeasy/workflow.yaml
new file mode 100644
index 0000000000..7fa10a2447
--- /dev/null
+++ b/typescript/.speakeasy/workflow.yaml
@@ -0,0 +1,9 @@
+workflowVersion: 1.0.0
+sources:
+ my-first-source:
+ inputs:
+ - location: ../openapi.json
+targets:
+ my-first-target:
+ target: typescript
+ source: my-first-source
diff --git a/typescript/README.md b/typescript/README.md
new file mode 100644
index 0000000000..33da5a03df
--- /dev/null
+++ b/typescript/README.md
@@ -0,0 +1,365 @@
+# dub-node
+
+<div align="left">
+ <a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
+ <a href="https://opensource.org/licenses/MIT">
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
+ </a>
+</div>
+
+
+## 🏗 **Welcome to your new SDK!** 🏗
+
+It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
+- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
+- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
+- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/advanced-setup/publish-sdks)
+- [ ] ✨ When ready to productionize, delete this section from the README
+
+<!-- Start SDK Installation [installation] -->
+## SDK Installation
+
+### NPM
+
+```bash
+npm add <UNSET>
+```
+
+### Yarn
+
+```bash
+yarn add <UNSET>
+```
+<!-- End SDK Installation [installation] -->
+
+<!-- Start Requirements [requirements] -->
+## Requirements
+
+For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
+<!-- End Requirements [requirements] -->
+
+<!-- Start SDK Example Usage [usage] -->
+## SDK Example Usage
+
+### Example
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+
+ // Handle the result
+ console.log(result);
+}
+
+run();
+
+```
+<!-- End SDK Example Usage [usage] -->
+
+<!-- Start Available Resources and Operations [operations] -->
+## Available Resources and Operations
+
+### [links](docs/sdks/links/README.md)
+
+* [getLinks](docs/sdks/links/README.md#getlinks) - Retrieve a list of links
+* [createLink](docs/sdks/links/README.md#createlink) - Create a new link
+* [getLinksCount](docs/sdks/links/README.md#getlinkscount) - Retrieve the number of links
+* [getLinkInfo](docs/sdks/links/README.md#getlinkinfo) - Retrieve a link
+* [editLink](docs/sdks/links/README.md#editlink) - Edit a link
+* [deleteLink](docs/sdks/links/README.md#deletelink) - Delete a link
+* [bulkCreateLinks](docs/sdks/links/README.md#bulkcreatelinks) - Bulk create links
+
+### [qrCodes](docs/sdks/qrcodes/README.md)
+
+* [getQRCode](docs/sdks/qrcodes/README.md#getqrcode) - Retrieve a QR code
+
+### [analytics](docs/sdks/analytics/README.md)
+
+* [getClicksAnalytics](docs/sdks/analytics/README.md#getclicksanalytics) - Retrieve clicks analytics
+* [getTimeseriesAnalytics](docs/sdks/analytics/README.md#gettimeseriesanalytics) - Retrieve timeseries analytics
+* [getCountryAnalytics](docs/sdks/analytics/README.md#getcountryanalytics) - Retrieve country analytics
+* [getCityAnalytics](docs/sdks/analytics/README.md#getcityanalytics) - Retrieve city analytics
+* [getDeviceAnalytics](docs/sdks/analytics/README.md#getdeviceanalytics) - Retrieve device analytics
+* [getBrowserAnalytics](docs/sdks/analytics/README.md#getbrowseranalytics) - Retrieve browser analytics
+* [getOSAnalytics](docs/sdks/analytics/README.md#getosanalytics) - Retrieve OS analytics
+* [getRefererAnalytics](docs/sdks/analytics/README.md#getrefereranalytics) - Retrieve referer analytics
+* [getTopLinks](docs/sdks/analytics/README.md#gettoplinks) - Retrieve top links
+* [getTopURLs](docs/sdks/analytics/README.md#gettopurls) - Retrieve top URLs
+
+### [workspaces](docs/sdks/workspaces/README.md)
+
+* [getWorkspaces](docs/sdks/workspaces/README.md#getworkspaces) - Retrieve a list of workspaces
+* [createWorkspace](docs/sdks/workspaces/README.md#createworkspace) - Create a workspace
+* [getWorkspace](docs/sdks/workspaces/README.md#getworkspace) - Retrieve a workspace
+
+### [tags](docs/sdks/tags/README.md)
+
+* [getTags](docs/sdks/tags/README.md#gettags) - Retrieve a list of tags
+* [createTag](docs/sdks/tags/README.md#createtag) - Create a new tag
+<!-- End Available Resources and Operations [operations] -->
+
+<!-- Start Error Handling [errors] -->
+## Error Handling
+
+All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
+
+
+```typescript
+import { Dub } from "dub-node";
+import * as errors from "dub-node/models/errors";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ let result;
+ try {
+ result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+ } catch (err) {
+ switch (true) {
+ case err instanceof errors.SDKValidationError: {
+ // Validation errors can be pretty-printed
+ console.error(err.pretty());
+ // Raw value may also be inspected
+ console.error(err.rawValue);
+ return;
+ }
+ case err instanceof errors.FourHundred: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndOne: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndThree: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndFour: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndNine: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndTen: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndTwentyTwo: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FourHundredAndTwentyNine: {
+ console.error(err); // handle exception
+ return;
+ }
+ case err instanceof errors.FiveHundred: {
+ console.error(err); // handle exception
+ return;
+ }
+ default: {
+ throw err;
+ }
+ }
+ }
+
+ // Handle the result
+ console.log(result);
+}
+
+run();
+
+```
+<!-- End Error Handling [errors] -->
+
+<!-- Start Server Selection [server] -->
+## Server Selection
+
+### Select Server by Index
+
+You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
+
+| # | Server | Variables |
+| - | ------ | --------- |
+| 0 | `https://api.dub.co` | None |
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ serverIdx: 0,
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+
+ // Handle the result
+ console.log(result);
+}
+
+run();
+
+```
+
+
+### Override Server URL Per-Client
+
+The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ serverURL: "https://api.dub.co",
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+
+ // Handle the result
+ console.log(result);
+}
+
+run();
+
+```
+<!-- End Server Selection [server] -->
+
+<!-- Start Custom HTTP Client [http-client] -->
+## Custom HTTP Client
+
+The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
+[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
+client is a thin wrapper around `fetch` and provides the ability to attach hooks
+around the request lifecycle that can be used to modify the request or handle
+errors and response.
+
+The `HTTPClient` constructor takes an optional `fetcher` argument that can be
+used to integrate a third-party HTTP client or when writing tests to mock out
+the HTTP client and feed in fixtures.
+
+The following example shows how to use the `"beforeRequest"` hook to to add a
+custom header and a timeout to requests and how to use the `"requestError"` hook
+to log errors:
+
+```typescript
+import { Dub } from "dub-node";
+import { HTTPClient } from "dub-node/lib/http";
+
+const httpClient = new HTTPClient({
+ // fetcher takes a function that has the same signature as native `fetch`.
+ fetcher: (request) => {
+ return fetch(request);
+ }
+});
+
+httpClient.addHook("beforeRequest", (request) => {
+ const nextRequest = new Request(request, {
+ signal: request.signal || AbortSignal.timeout(5000);
+ });
+
+ nextRequest.headers.set("x-custom-header", "custom value");
+
+ return nextRequest;
+});
+
+httpClient.addHook("requestError", (error, request) => {
+ console.group("Request Error");
+ console.log("Reason:", `${error}`);
+ console.log("Endpoint:", `${request.method} ${request.url}`);
+ console.groupEnd();
+});
+
+const sdk = new Dub({ httpClient });
+```
+<!-- End Custom HTTP Client [http-client] -->
+
+<!-- Start Authentication [security] -->
+## Authentication
+
+### Per-Client Security Schemes
+
+This SDK supports the following security scheme globally:
+
+| Name | Type | Scheme |
+| ------------- | ------------- | ------------- |
+| `bearerToken` | http | HTTP Bearer |
+
+To authenticate with the API the `bearerToken` parameter must be set when initializing the SDK client instance. For example:
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+
+ // Handle the result
+ console.log(result);
+}
+
+run();
+
+```
+<!-- End Authentication [security] -->
+
+<!-- Placeholder for Future Speakeasy SDK Sections -->
+
+# Development
+
+## Maturity
+
+This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
+to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
+looking for the latest version.
+
+## Contributions
+
+While we value open-source contributions to this SDK, this library is generated programmatically.
+Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!
+
+### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
diff --git a/typescript/RUNTIMES.md b/typescript/RUNTIMES.md
new file mode 100644
index 0000000000..71fa3daef8
--- /dev/null
+++ b/typescript/RUNTIMES.md
@@ -0,0 +1,22 @@
+# Supported JavaScript runtimes
+
+This SDK is intended to be used in JavaScript runtimes that support the following features:
+
+* [Web Fetch API][web-fetch]
+* [Web Streams API](web-streams) and in particular `ReadableStream`
+* [Async iterables][async-iter] using `Symbol.asyncIterator`
+
+[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
+[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
+[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
+
+Runtime environments that are explicitly supported are:
+
+- Evergreen browsers which include: Chrome, Safari, Edge, Firefox
+- Node.js active and maintenance LTS releases
+ - Currently, this is v18 and v20
+- Bun v1 and above
+- Deno v1.39
+ - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
+
+[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
diff --git a/typescript/USAGE.md b/typescript/USAGE.md
new file mode 100644
index 0000000000..c2f28e66d3
--- /dev/null
+++ b/typescript/USAGE.md
@@ -0,0 +1,22 @@
+<!-- Start SDK Example Usage [usage] -->
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+
+ // Handle the result
+ console.log(result);
+}
+
+run();
+
+```
+<!-- End SDK Example Usage [usage] -->
\ No newline at end of file
diff --git a/typescript/docs/models/components/color.md b/typescript/docs/models/components/color.md
new file mode 100644
index 0000000000..daf69eb9fa
--- /dev/null
+++ b/typescript/docs/models/components/color.md
@@ -0,0 +1,16 @@
+# Color
+
+The color of the tag.
+
+
+## Values
+
+| Name | Value |
+| -------- | -------- |
+| `Red` | red |
+| `Yellow` | yellow |
+| `Green` | green |
+| `Blue` | blue |
+| `Purple` | purple |
+| `Pink` | pink |
+| `Brown` | brown |
\ No newline at end of file
diff --git a/typescript/docs/models/components/domains.md b/typescript/docs/models/components/domains.md
new file mode 100644
index 0000000000..86747c6cfd
--- /dev/null
+++ b/typescript/docs/models/components/domains.md
@@ -0,0 +1,8 @@
+# Domains
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
+| `slug` | *string* | :heavy_check_mark: | The domain of the workspace. |
\ No newline at end of file
diff --git a/typescript/docs/models/components/httpmetadata.md b/typescript/docs/models/components/httpmetadata.md
new file mode 100644
index 0000000000..8ce9328c4c
--- /dev/null
+++ b/typescript/docs/models/components/httpmetadata.md
@@ -0,0 +1,9 @@
+# HTTPMetadata
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
+| `response` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
+| `request` | *Request* | :heavy_check_mark: | Raw HTTP request; suitable for debugging |
\ No newline at end of file
diff --git a/typescript/docs/models/components/linkschema.md b/typescript/docs/models/components/linkschema.md
new file mode 100644
index 0000000000..66b95787ab
--- /dev/null
+++ b/typescript/docs/models/components/linkschema.md
@@ -0,0 +1,40 @@
+# LinkSchema
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. |
+| `domain` | *string* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). |
+| `key` | *string* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. |
+| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. |
+| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. |
+| `expiresAt` | *string* | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. Must be in the future. |
+| `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. |
+| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. |
+| `title` | *string* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `description` | *string* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `image` | *string* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. |
+| `ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. |
+| `android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. |
+| `geo` | Record<string, *string*> | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo |
+| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. |
+| ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[DEPRECATED] (use `tags` instead): The unique ID of the tag assigned to the short link. |
+| `tags` | [components.TagSchema](../../models/components/tagschema.md)[] | :heavy_check_mark: | The tags assigned to the short link. |
+| `comments` | *string* | :heavy_check_mark: | The comments for the short link. |
+| `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). |
+| `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). |
+| `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. |
+| `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. |
+| `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. |
+| `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. |
+| `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. |
+| `userId` | *string* | :heavy_check_mark: | The user ID of the creator of the short link. |
+| `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. |
+| `clicks` | *number* | :heavy_minus_sign: | The number of clicks on the short link. |
+| `lastClicked` | *string* | :heavy_check_mark: | The date and time when the short link was last clicked. |
+| `createdAt` | *string* | :heavy_check_mark: | The date and time when the short link was created. |
+| `updatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was last updated. |
+| ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[DEPRECATED] (use workspaceId instead): The project ID of the short link. |
\ No newline at end of file
diff --git a/typescript/docs/models/components/plan.md b/typescript/docs/models/components/plan.md
new file mode 100644
index 0000000000..4fa64b4981
--- /dev/null
+++ b/typescript/docs/models/components/plan.md
@@ -0,0 +1,16 @@
+# Plan
+
+The plan of the workspace.
+
+
+## Values
+
+| Name | Value |
+| --------------- | --------------- |
+| `Free` | free |
+| `Pro` | pro |
+| `Business` | business |
+| `BusinessPlus` | business plus |
+| `BusinessExtra` | business extra |
+| `BusinessMax` | business max |
+| `Enterprise` | enterprise |
\ No newline at end of file
diff --git a/typescript/docs/models/components/role.md b/typescript/docs/models/components/role.md
new file mode 100644
index 0000000000..b31a2d0fec
--- /dev/null
+++ b/typescript/docs/models/components/role.md
@@ -0,0 +1,11 @@
+# Role
+
+The role of the authenticated user in the workspace.
+
+
+## Values
+
+| Name | Value |
+| -------- | -------- |
+| `Owner` | owner |
+| `Member` | member |
\ No newline at end of file
diff --git a/typescript/docs/models/components/security.md b/typescript/docs/models/components/security.md
new file mode 100644
index 0000000000..e0cdb4c561
--- /dev/null
+++ b/typescript/docs/models/components/security.md
@@ -0,0 +1,8 @@
+# Security
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------ | ------------------ | ------------------ | ------------------ |
+| `bearerToken` | *string* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/components/tagschema.md b/typescript/docs/models/components/tagschema.md
new file mode 100644
index 0000000000..ecebdfb251
--- /dev/null
+++ b/typescript/docs/models/components/tagschema.md
@@ -0,0 +1,10 @@
+# TagSchema
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
+| `id` | *string* | :heavy_check_mark: | The unique ID of the tag. |
+| `name` | *string* | :heavy_check_mark: | The name of the tag. |
+| `color` | [components.Color](../../models/components/color.md) | :heavy_check_mark: | The color of the tag. |
\ No newline at end of file
diff --git a/typescript/docs/models/components/users.md b/typescript/docs/models/components/users.md
new file mode 100644
index 0000000000..785c101629
--- /dev/null
+++ b/typescript/docs/models/components/users.md
@@ -0,0 +1,8 @@
+# Users
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
+| `role` | [components.Role](../../models/components/role.md) | :heavy_check_mark: | The role of the authenticated user in the workspace. |
\ No newline at end of file
diff --git a/typescript/docs/models/components/workspaceschema.md b/typescript/docs/models/components/workspaceschema.md
new file mode 100644
index 0000000000..7924e622dc
--- /dev/null
+++ b/typescript/docs/models/components/workspaceschema.md
@@ -0,0 +1,24 @@
+# WorkspaceSchema
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `id` | *string* | :heavy_check_mark: | The unique ID of the workspace. |
+| `name` | *string* | :heavy_check_mark: | The name of the workspace. |
+| `slug` | *string* | :heavy_check_mark: | The slug of the workspace. |
+| `logo` | *string* | :heavy_minus_sign: | The logo of the workspace. |
+| `usage` | *number* | :heavy_check_mark: | The usage of the workspace. |
+| `usageLimit` | *number* | :heavy_check_mark: | The usage limit of the workspace. |
+| `linksUsage` | *number* | :heavy_check_mark: | The links usage of the workspace. |
+| `linksLimit` | *number* | :heavy_check_mark: | The links limit of the workspace. |
+| `domainsLimit` | *number* | :heavy_check_mark: | The domains limit of the workspace. |
+| `tagsLimit` | *number* | :heavy_check_mark: | The tags limit of the workspace. |
+| `usersLimit` | *number* | :heavy_check_mark: | The users limit of the workspace. |
+| `plan` | [components.Plan](../../models/components/plan.md) | :heavy_check_mark: | The plan of the workspace. |
+| `stripeId` | *string* | :heavy_check_mark: | The Stripe ID of the workspace. |
+| `billingCycleStart` | *number* | :heavy_check_mark: | The date and time when the billing cycle starts for the workspace. |
+| `createdAt` | *string* | :heavy_check_mark: | The date and time when the workspace was created. |
+| `users` | [components.Users](../../models/components/users.md)[] | :heavy_check_mark: | The role of the authenticated user in the workspace. |
+| `domains` | [components.Domains](../../models/components/domains.md)[] | :heavy_check_mark: | The domains of the workspace. |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/code.md b/typescript/docs/models/errors/code.md
new file mode 100644
index 0000000000..a9b8b0ebc6
--- /dev/null
+++ b/typescript/docs/models/errors/code.md
@@ -0,0 +1,10 @@
+# Code
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| ------------ | ------------ |
+| `BadRequest` | bad_request |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/errort.md b/typescript/docs/models/errors/errort.md
new file mode 100644
index 0000000000..b8b44f20ec
--- /dev/null
+++ b/typescript/docs/models/errors/errort.md
@@ -0,0 +1,10 @@
+# ErrorT
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
+| `code` | [errors.Code](../../models/errors/code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#bad_request |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fivehundred.md b/typescript/docs/models/errors/fivehundred.md
new file mode 100644
index 0000000000..24e716dee3
--- /dev/null
+++ b/typescript/docs/models/errors/fivehundred.md
@@ -0,0 +1,10 @@
+# FiveHundred
+
+The server has encountered a situation it does not know how to handle.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `error` | [errors.FiveHundredError](../../models/errors/fivehundrederror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fivehundredcode.md b/typescript/docs/models/errors/fivehundredcode.md
new file mode 100644
index 0000000000..321587f02c
--- /dev/null
+++ b/typescript/docs/models/errors/fivehundredcode.md
@@ -0,0 +1,10 @@
+# FiveHundredCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| --------------------- | --------------------- |
+| `InternalServerError` | internal_server_error |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fivehundrederror.md b/typescript/docs/models/errors/fivehundrederror.md
new file mode 100644
index 0000000000..f77df2af21
--- /dev/null
+++ b/typescript/docs/models/errors/fivehundrederror.md
@@ -0,0 +1,10 @@
+# FiveHundredError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
+| `code` | [errors.FiveHundredCode](../../models/errors/fivehundredcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal_server_error |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundred.md b/typescript/docs/models/errors/fourhundred.md
new file mode 100644
index 0000000000..a25cbd6278
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundred.md
@@ -0,0 +1,10 @@
+# FourHundred
+
+The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
+| `error` | [errors.ErrorT](../../models/errors/errort.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandfour.md b/typescript/docs/models/errors/fourhundredandfour.md
new file mode 100644
index 0000000000..db441e43de
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandfour.md
@@ -0,0 +1,10 @@
+# FourHundredAndFour
+
+The server cannot find the requested resource.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `error` | [errors.FourHundredAndFourError](../../models/errors/fourhundredandfourerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandfourcode.md b/typescript/docs/models/errors/fourhundredandfourcode.md
new file mode 100644
index 0000000000..d86ad50486
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandfourcode.md
@@ -0,0 +1,10 @@
+# FourHundredAndFourCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `NotFound` | not_found |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandfourerror.md b/typescript/docs/models/errors/fourhundredandfourerror.md
new file mode 100644
index 0000000000..2ccfc168e2
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandfourerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndFourError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `code` | [errors.FourHundredAndFourCode](../../models/errors/fourhundredandfourcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not_found |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandnine.md b/typescript/docs/models/errors/fourhundredandnine.md
new file mode 100644
index 0000000000..39b08b4fa6
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandnine.md
@@ -0,0 +1,10 @@
+# FourHundredAndNine
+
+This response is sent when a request conflicts with the current state of the server.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `error` | [errors.FourHundredAndNineError](../../models/errors/fourhundredandnineerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandninecode.md b/typescript/docs/models/errors/fourhundredandninecode.md
new file mode 100644
index 0000000000..d8f4e2d2d5
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandninecode.md
@@ -0,0 +1,10 @@
+# FourHundredAndNineCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `Conflict` | conflict |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandnineerror.md b/typescript/docs/models/errors/fourhundredandnineerror.md
new file mode 100644
index 0000000000..1cba2fe751
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandnineerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndNineError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `code` | [errors.FourHundredAndNineCode](../../models/errors/fourhundredandninecode.md) | :heavy_check_mark: | A short code indicating the error code returned. | conflict |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#conflict |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandone.md b/typescript/docs/models/errors/fourhundredandone.md
new file mode 100644
index 0000000000..a06255bd8a
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandone.md
@@ -0,0 +1,10 @@
+# FourHundredAndOne
+
+Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `error` | [errors.FourHundredAndOneError](../../models/errors/fourhundredandoneerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandonecode.md b/typescript/docs/models/errors/fourhundredandonecode.md
new file mode 100644
index 0000000000..7743c7d914
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandonecode.md
@@ -0,0 +1,10 @@
+# FourHundredAndOneCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| -------------- | -------------- |
+| `Unauthorized` | unauthorized |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandoneerror.md b/typescript/docs/models/errors/fourhundredandoneerror.md
new file mode 100644
index 0000000000..88f71ade7e
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandoneerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndOneError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| `code` | [errors.FourHundredAndOneCode](../../models/errors/fourhundredandonecode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unauthorized |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unauthorized |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandten.md b/typescript/docs/models/errors/fourhundredandten.md
new file mode 100644
index 0000000000..73e71c9f2e
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandten.md
@@ -0,0 +1,10 @@
+# FourHundredAndTen
+
+This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `error` | [errors.FourHundredAndTenError](../../models/errors/fourhundredandtenerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtencode.md b/typescript/docs/models/errors/fourhundredandtencode.md
new file mode 100644
index 0000000000..5f4f8f6c8c
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtencode.md
@@ -0,0 +1,10 @@
+# FourHundredAndTenCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| --------------- | --------------- |
+| `InviteExpired` | invite_expired |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtenerror.md b/typescript/docs/models/errors/fourhundredandtenerror.md
new file mode 100644
index 0000000000..7faced96e8
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtenerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndTenError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| `code` | [errors.FourHundredAndTenCode](../../models/errors/fourhundredandtencode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite_expired |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandthree.md b/typescript/docs/models/errors/fourhundredandthree.md
new file mode 100644
index 0000000000..2e52b1112c
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandthree.md
@@ -0,0 +1,10 @@
+# FourHundredAndThree
+
+The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `error` | [errors.FourHundredAndThreeError](../../models/errors/fourhundredandthreeerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandthreecode.md b/typescript/docs/models/errors/fourhundredandthreecode.md
new file mode 100644
index 0000000000..5aee4d291a
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandthreecode.md
@@ -0,0 +1,10 @@
+# FourHundredAndThreeCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| ----------- | ----------- |
+| `Forbidden` | forbidden |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandthreeerror.md b/typescript/docs/models/errors/fourhundredandthreeerror.md
new file mode 100644
index 0000000000..c57d4649da
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandthreeerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndThreeError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `code` | [errors.FourHundredAndThreeCode](../../models/errors/fourhundredandthreecode.md) | :heavy_check_mark: | A short code indicating the error code returned. | forbidden |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#forbidden |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtwentynine.md b/typescript/docs/models/errors/fourhundredandtwentynine.md
new file mode 100644
index 0000000000..0cb174d167
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtwentynine.md
@@ -0,0 +1,10 @@
+# FourHundredAndTwentyNine
+
+The user has sent too many requests in a given amount of time ("rate limiting")
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
+| `error` | [errors.FourHundredAndTwentyNineError](../../models/errors/fourhundredandtwentynineerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtwentyninecode.md b/typescript/docs/models/errors/fourhundredandtwentyninecode.md
new file mode 100644
index 0000000000..4d333c919a
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtwentyninecode.md
@@ -0,0 +1,10 @@
+# FourHundredAndTwentyNineCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| ------------------- | ------------------- |
+| `RateLimitExceeded` | rate_limit_exceeded |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtwentynineerror.md b/typescript/docs/models/errors/fourhundredandtwentynineerror.md
new file mode 100644
index 0000000000..b1159e7816
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtwentynineerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndTwentyNineError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `code` | [errors.FourHundredAndTwentyNineCode](../../models/errors/fourhundredandtwentyninecode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate_limit_exceeded |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtwentytwo.md b/typescript/docs/models/errors/fourhundredandtwentytwo.md
new file mode 100644
index 0000000000..d97c0e26a6
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtwentytwo.md
@@ -0,0 +1,10 @@
+# FourHundredAndTwentyTwo
+
+The request was well-formed but was unable to be followed due to semantic errors.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `error` | [errors.FourHundredAndTwentyTwoError](../../models/errors/fourhundredandtwentytwoerror.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtwentytwocode.md b/typescript/docs/models/errors/fourhundredandtwentytwocode.md
new file mode 100644
index 0000000000..c8498460e4
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtwentytwocode.md
@@ -0,0 +1,10 @@
+# FourHundredAndTwentyTwoCode
+
+A short code indicating the error code returned.
+
+
+## Values
+
+| Name | Value |
+| --------------------- | --------------------- |
+| `UnprocessableEntity` | unprocessable_entity |
\ No newline at end of file
diff --git a/typescript/docs/models/errors/fourhundredandtwentytwoerror.md b/typescript/docs/models/errors/fourhundredandtwentytwoerror.md
new file mode 100644
index 0000000000..7390f9bc12
--- /dev/null
+++ b/typescript/docs/models/errors/fourhundredandtwentytwoerror.md
@@ -0,0 +1,10 @@
+# FourHundredAndTwentyTwoError
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `code` | [errors.FourHundredAndTwentyTwoCode](../../models/errors/fourhundredandtwentytwocode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity |
+| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
+| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable_entity |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/bulkcreatelinksrequest.md b/typescript/docs/models/operations/bulkcreatelinksrequest.md
new file mode 100644
index 0000000000..9169fb57f5
--- /dev/null
+++ b/typescript/docs/models/operations/bulkcreatelinksrequest.md
@@ -0,0 +1,9 @@
+# BulkCreateLinksRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to create the link for. |
+| `requestBody` | [operations.RequestBody](../../models/operations/requestbody.md)[] | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/bulkcreatelinksresponse.md b/typescript/docs/models/operations/bulkcreatelinksresponse.md
new file mode 100644
index 0000000000..b02f734a42
--- /dev/null
+++ b/typescript/docs/models/operations/bulkcreatelinksresponse.md
@@ -0,0 +1,9 @@
+# BulkCreateLinksResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchemas` | [components.LinkSchema](../../models/components/linkschema.md)[] | :heavy_minus_sign: | The created links |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/bulkcreatelinkstagids.md b/typescript/docs/models/operations/bulkcreatelinkstagids.md
new file mode 100644
index 0000000000..4a272901cd
--- /dev/null
+++ b/typescript/docs/models/operations/bulkcreatelinkstagids.md
@@ -0,0 +1,4 @@
+# BulkCreateLinksTagIds
+
+The unique IDs of the tags assigned to the short link.
+
diff --git a/typescript/docs/models/operations/color.md b/typescript/docs/models/operations/color.md
new file mode 100644
index 0000000000..0e2f0fb1a7
--- /dev/null
+++ b/typescript/docs/models/operations/color.md
@@ -0,0 +1,16 @@
+# Color
+
+The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
+
+
+## Values
+
+| Name | Value |
+| -------- | -------- |
+| `Red` | red |
+| `Yellow` | yellow |
+| `Green` | green |
+| `Blue` | blue |
+| `Purple` | purple |
+| `Pink` | pink |
+| `Brown` | brown |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/country.md b/typescript/docs/models/operations/country.md
new file mode 100644
index 0000000000..e20d602939
--- /dev/null
+++ b/typescript/docs/models/operations/country.md
@@ -0,0 +1,259 @@
+# Country
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createlinkrequest.md b/typescript/docs/models/operations/createlinkrequest.md
new file mode 100644
index 0000000000..5bcfa414fd
--- /dev/null
+++ b/typescript/docs/models/operations/createlinkrequest.md
@@ -0,0 +1,9 @@
+# CreateLinkRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to create the link for. |
+| `requestBody` | [operations.CreateLinkRequestBody](../../models/operations/createlinkrequestbody.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createlinkrequestbody.md b/typescript/docs/models/operations/createlinkrequestbody.md
new file mode 100644
index 0000000000..acdd71ea11
--- /dev/null
+++ b/typescript/docs/models/operations/createlinkrequestbody.md
@@ -0,0 +1,26 @@
+# CreateLinkRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. |
+| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. |
+| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. |
+| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. |
+| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time when the short link will expire in ISO-8601 format. Must be in the future. |
+| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. |
+| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. |
+| `title` | *string* | :heavy_minus_sign: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `description` | *string* | :heavy_minus_sign: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `image` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. |
+| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. |
+| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. |
+| `geo` | Record<string, *string*> | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. |
+| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. |
+| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link. |
+| `tagIds` | *operations.TagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. |
+| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createlinkresponse.md b/typescript/docs/models/operations/createlinkresponse.md
new file mode 100644
index 0000000000..af82e44092
--- /dev/null
+++ b/typescript/docs/models/operations/createlinkresponse.md
@@ -0,0 +1,9 @@
+# CreateLinkResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchema` | [components.LinkSchema](../../models/components/linkschema.md) | :heavy_minus_sign: | The created link |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createtagrequest.md b/typescript/docs/models/operations/createtagrequest.md
new file mode 100644
index 0000000000..275c1edea0
--- /dev/null
+++ b/typescript/docs/models/operations/createtagrequest.md
@@ -0,0 +1,9 @@
+# CreateTagRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to create the tag for. |
+| `requestBody` | [operations.CreateTagRequestBody](../../models/operations/createtagrequestbody.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createtagrequestbody.md b/typescript/docs/models/operations/createtagrequestbody.md
new file mode 100644
index 0000000000..79581179ef
--- /dev/null
+++ b/typescript/docs/models/operations/createtagrequestbody.md
@@ -0,0 +1,9 @@
+# CreateTagRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
+| `tag` | *string* | :heavy_check_mark: | The name of the tag to create. |
+| `color` | [operations.Color](../../models/operations/color.md) | :heavy_minus_sign: | The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createtagresponse.md b/typescript/docs/models/operations/createtagresponse.md
new file mode 100644
index 0000000000..56d7bc71fc
--- /dev/null
+++ b/typescript/docs/models/operations/createtagresponse.md
@@ -0,0 +1,9 @@
+# CreateTagResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `tagSchema` | [components.TagSchema](../../models/components/tagschema.md) | :heavy_minus_sign: | The created tag |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createworkspacerequestbody.md b/typescript/docs/models/operations/createworkspacerequestbody.md
new file mode 100644
index 0000000000..e4d5651455
--- /dev/null
+++ b/typescript/docs/models/operations/createworkspacerequestbody.md
@@ -0,0 +1,10 @@
+# CreateWorkspaceRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------ | ------------------ | ------------------ | ------------------ |
+| `name` | *string* | :heavy_check_mark: | N/A |
+| `slug` | *string* | :heavy_check_mark: | N/A |
+| `domain` | *string* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/createworkspaceresponse.md b/typescript/docs/models/operations/createworkspaceresponse.md
new file mode 100644
index 0000000000..ec3dab535e
--- /dev/null
+++ b/typescript/docs/models/operations/createworkspaceresponse.md
@@ -0,0 +1,9 @@
+# CreateWorkspaceResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `workspaceSchema` | [components.WorkspaceSchema](../../models/components/workspaceschema.md) | :heavy_minus_sign: | The created workspace |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/deletelinkrequest.md b/typescript/docs/models/operations/deletelinkrequest.md
new file mode 100644
index 0000000000..bed54dd3d2
--- /dev/null
+++ b/typescript/docs/models/operations/deletelinkrequest.md
@@ -0,0 +1,9 @@
+# DeleteLinkRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/deletelinkresponse.md b/typescript/docs/models/operations/deletelinkresponse.md
new file mode 100644
index 0000000000..90382e5013
--- /dev/null
+++ b/typescript/docs/models/operations/deletelinkresponse.md
@@ -0,0 +1,9 @@
+# DeleteLinkResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchema` | [components.LinkSchema](../../models/components/linkschema.md) | :heavy_minus_sign: | The deleted link |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/editlinkrequest.md b/typescript/docs/models/operations/editlinkrequest.md
new file mode 100644
index 0000000000..308a97004c
--- /dev/null
+++ b/typescript/docs/models/operations/editlinkrequest.md
@@ -0,0 +1,10 @@
+# EditLinkRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/editlinkrequestbody.md b/typescript/docs/models/operations/editlinkrequestbody.md
new file mode 100644
index 0000000000..96528be391
--- /dev/null
+++ b/typescript/docs/models/operations/editlinkrequestbody.md
@@ -0,0 +1,26 @@
+# EditLinkRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. |
+| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. |
+| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. |
+| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. |
+| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time when the short link will expire in ISO-8601 format. Must be in the future. |
+| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. |
+| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. |
+| `title` | *string* | :heavy_minus_sign: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `description` | *string* | :heavy_minus_sign: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `image` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. |
+| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. |
+| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. |
+| `geo` | Record<string, *string*> | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. |
+| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. |
+| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link. |
+| `tagIds` | *operations.EditLinkTagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. |
+| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/editlinkresponse.md b/typescript/docs/models/operations/editlinkresponse.md
new file mode 100644
index 0000000000..36f2c8f735
--- /dev/null
+++ b/typescript/docs/models/operations/editlinkresponse.md
@@ -0,0 +1,9 @@
+# EditLinkResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchema` | [components.LinkSchema](../../models/components/linkschema.md) | :heavy_minus_sign: | The edited link |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/editlinktagids.md b/typescript/docs/models/operations/editlinktagids.md
new file mode 100644
index 0000000000..e7df80342e
--- /dev/null
+++ b/typescript/docs/models/operations/editlinktagids.md
@@ -0,0 +1,4 @@
+# EditLinkTagIds
+
+The unique IDs of the tags assigned to the short link.
+
diff --git a/typescript/docs/models/operations/getbrowseranalyticsqueryparamcountry.md b/typescript/docs/models/operations/getbrowseranalyticsqueryparamcountry.md
new file mode 100644
index 0000000000..38bafd6549
--- /dev/null
+++ b/typescript/docs/models/operations/getbrowseranalyticsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetBrowserAnalyticsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getbrowseranalyticsqueryparaminterval.md b/typescript/docs/models/operations/getbrowseranalyticsqueryparaminterval.md
new file mode 100644
index 0000000000..1fc1ba879e
--- /dev/null
+++ b/typescript/docs/models/operations/getbrowseranalyticsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetBrowserAnalyticsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getbrowseranalyticsrequest.md b/typescript/docs/models/operations/getbrowseranalyticsrequest.md
new file mode 100644
index 0000000000..62ce710e67
--- /dev/null
+++ b/typescript/docs/models/operations/getbrowseranalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetBrowserAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetBrowserAnalyticsQueryParamInterval](../../models/operations/getbrowseranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetBrowserAnalyticsQueryParamCountry](../../models/operations/getbrowseranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getbrowseranalyticsresponse.md b/typescript/docs/models/operations/getbrowseranalyticsresponse.md
new file mode 100644
index 0000000000..139b3dbaaa
--- /dev/null
+++ b/typescript/docs/models/operations/getbrowseranalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetBrowserAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetBrowserAnalyticsResponseBody](../../models/operations/getbrowseranalyticsresponsebody.md)[] | :heavy_minus_sign: | The top browsers by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getbrowseranalyticsresponsebody.md b/typescript/docs/models/operations/getbrowseranalyticsresponsebody.md
new file mode 100644
index 0000000000..10213f93d6
--- /dev/null
+++ b/typescript/docs/models/operations/getbrowseranalyticsresponsebody.md
@@ -0,0 +1,9 @@
+# GetBrowserAnalyticsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
+| `browser` | *string* | :heavy_check_mark: | The name of the browser |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this browser |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcityanalyticscountry.md b/typescript/docs/models/operations/getcityanalyticscountry.md
new file mode 100644
index 0000000000..484e915a2f
--- /dev/null
+++ b/typescript/docs/models/operations/getcityanalyticscountry.md
@@ -0,0 +1,259 @@
+# GetCityAnalyticsCountry
+
+The 2-letter country code of the city: https://d.to/geo
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcityanalyticsqueryparamcountry.md b/typescript/docs/models/operations/getcityanalyticsqueryparamcountry.md
new file mode 100644
index 0000000000..d72bcfb331
--- /dev/null
+++ b/typescript/docs/models/operations/getcityanalyticsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetCityAnalyticsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcityanalyticsqueryparaminterval.md b/typescript/docs/models/operations/getcityanalyticsqueryparaminterval.md
new file mode 100644
index 0000000000..b806498647
--- /dev/null
+++ b/typescript/docs/models/operations/getcityanalyticsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetCityAnalyticsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcityanalyticsrequest.md b/typescript/docs/models/operations/getcityanalyticsrequest.md
new file mode 100644
index 0000000000..ca987c666a
--- /dev/null
+++ b/typescript/docs/models/operations/getcityanalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetCityAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetCityAnalyticsQueryParamInterval](../../models/operations/getcityanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetCityAnalyticsQueryParamCountry](../../models/operations/getcityanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcityanalyticsresponse.md b/typescript/docs/models/operations/getcityanalyticsresponse.md
new file mode 100644
index 0000000000..beb371c339
--- /dev/null
+++ b/typescript/docs/models/operations/getcityanalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetCityAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetCityAnalyticsResponseBody](../../models/operations/getcityanalyticsresponsebody.md)[] | :heavy_minus_sign: | The top cities by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcityanalyticsresponsebody.md b/typescript/docs/models/operations/getcityanalyticsresponsebody.md
new file mode 100644
index 0000000000..c0ee1756b5
--- /dev/null
+++ b/typescript/docs/models/operations/getcityanalyticsresponsebody.md
@@ -0,0 +1,10 @@
+# GetCityAnalyticsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `city` | *string* | :heavy_check_mark: | The name of the city |
+| `country` | [operations.GetCityAnalyticsCountry](../../models/operations/getcityanalyticscountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this city |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getclicksanalyticsrequest.md b/typescript/docs/models/operations/getclicksanalyticsrequest.md
new file mode 100644
index 0000000000..d93e32ec97
--- /dev/null
+++ b/typescript/docs/models/operations/getclicksanalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetClicksAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.Country](../../models/operations/country.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getclicksanalyticsresponse.md b/typescript/docs/models/operations/getclicksanalyticsresponse.md
new file mode 100644
index 0000000000..dc4f6b41db
--- /dev/null
+++ b/typescript/docs/models/operations/getclicksanalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetClicksAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `number` | *number* | :heavy_minus_sign: | The number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcountryanalyticscountry.md b/typescript/docs/models/operations/getcountryanalyticscountry.md
new file mode 100644
index 0000000000..0c278a1640
--- /dev/null
+++ b/typescript/docs/models/operations/getcountryanalyticscountry.md
@@ -0,0 +1,259 @@
+# GetCountryAnalyticsCountry
+
+The 2-letter country code: https://d.to/geo
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcountryanalyticsqueryparamcountry.md b/typescript/docs/models/operations/getcountryanalyticsqueryparamcountry.md
new file mode 100644
index 0000000000..ff86dca1a6
--- /dev/null
+++ b/typescript/docs/models/operations/getcountryanalyticsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetCountryAnalyticsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcountryanalyticsqueryparaminterval.md b/typescript/docs/models/operations/getcountryanalyticsqueryparaminterval.md
new file mode 100644
index 0000000000..7a4a717ea4
--- /dev/null
+++ b/typescript/docs/models/operations/getcountryanalyticsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetCountryAnalyticsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcountryanalyticsrequest.md b/typescript/docs/models/operations/getcountryanalyticsrequest.md
new file mode 100644
index 0000000000..fe6c4c9a1f
--- /dev/null
+++ b/typescript/docs/models/operations/getcountryanalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetCountryAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetCountryAnalyticsQueryParamInterval](../../models/operations/getcountryanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetCountryAnalyticsQueryParamCountry](../../models/operations/getcountryanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcountryanalyticsresponse.md b/typescript/docs/models/operations/getcountryanalyticsresponse.md
new file mode 100644
index 0000000000..dfd2a982ec
--- /dev/null
+++ b/typescript/docs/models/operations/getcountryanalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetCountryAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetCountryAnalyticsResponseBody](../../models/operations/getcountryanalyticsresponsebody.md)[] | :heavy_minus_sign: | The top countries by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getcountryanalyticsresponsebody.md b/typescript/docs/models/operations/getcountryanalyticsresponsebody.md
new file mode 100644
index 0000000000..701ad7608a
--- /dev/null
+++ b/typescript/docs/models/operations/getcountryanalyticsresponsebody.md
@@ -0,0 +1,9 @@
+# GetCountryAnalyticsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
+| `country` | [operations.GetCountryAnalyticsCountry](../../models/operations/getcountryanalyticscountry.md) | :heavy_check_mark: | The 2-letter country code: https://d.to/geo |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this country |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getdeviceanalyticsqueryparamcountry.md b/typescript/docs/models/operations/getdeviceanalyticsqueryparamcountry.md
new file mode 100644
index 0000000000..b38191d132
--- /dev/null
+++ b/typescript/docs/models/operations/getdeviceanalyticsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetDeviceAnalyticsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getdeviceanalyticsqueryparaminterval.md b/typescript/docs/models/operations/getdeviceanalyticsqueryparaminterval.md
new file mode 100644
index 0000000000..79b56f3255
--- /dev/null
+++ b/typescript/docs/models/operations/getdeviceanalyticsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetDeviceAnalyticsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getdeviceanalyticsrequest.md b/typescript/docs/models/operations/getdeviceanalyticsrequest.md
new file mode 100644
index 0000000000..e5410b55eb
--- /dev/null
+++ b/typescript/docs/models/operations/getdeviceanalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetDeviceAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetDeviceAnalyticsQueryParamInterval](../../models/operations/getdeviceanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetDeviceAnalyticsQueryParamCountry](../../models/operations/getdeviceanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getdeviceanalyticsresponse.md b/typescript/docs/models/operations/getdeviceanalyticsresponse.md
new file mode 100644
index 0000000000..3847a8fd92
--- /dev/null
+++ b/typescript/docs/models/operations/getdeviceanalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetDeviceAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetDeviceAnalyticsResponseBody](../../models/operations/getdeviceanalyticsresponsebody.md)[] | :heavy_minus_sign: | The top devices by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getdeviceanalyticsresponsebody.md b/typescript/docs/models/operations/getdeviceanalyticsresponsebody.md
new file mode 100644
index 0000000000..8ef1843829
--- /dev/null
+++ b/typescript/docs/models/operations/getdeviceanalyticsresponsebody.md
@@ -0,0 +1,9 @@
+# GetDeviceAnalyticsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
+| `device` | *string* | :heavy_check_mark: | The name of the device |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this device |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getlinkinforequest.md b/typescript/docs/models/operations/getlinkinforequest.md
new file mode 100644
index 0000000000..7f0cbb2326
--- /dev/null
+++ b/typescript/docs/models/operations/getlinkinforequest.md
@@ -0,0 +1,10 @@
+# GetLinkInfoRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_check_mark: | The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`. |
+| `key` | *string* | :heavy_check_mark: | The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getlinkinforesponse.md b/typescript/docs/models/operations/getlinkinforesponse.md
new file mode 100644
index 0000000000..57b4667002
--- /dev/null
+++ b/typescript/docs/models/operations/getlinkinforesponse.md
@@ -0,0 +1,9 @@
+# GetLinkInfoResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchema` | [components.LinkSchema](../../models/components/linkschema.md) | :heavy_minus_sign: | The retrieved link |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getlinkscountqueryparamtagids.md b/typescript/docs/models/operations/getlinkscountqueryparamtagids.md
new file mode 100644
index 0000000000..7e702083ae
--- /dev/null
+++ b/typescript/docs/models/operations/getlinkscountqueryparamtagids.md
@@ -0,0 +1,4 @@
+# GetLinksCountQueryParamTagIds
+
+The tag IDs to filter the links by.
+
diff --git a/typescript/docs/models/operations/getlinkscountrequest.md b/typescript/docs/models/operations/getlinkscountrequest.md
new file mode 100644
index 0000000000..19490abcc4
--- /dev/null
+++ b/typescript/docs/models/operations/getlinkscountrequest.md
@@ -0,0 +1,16 @@
+# GetLinksCountRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. |
+| `tagId` | *string* | :heavy_minus_sign: | [DEPRECATED] (use tagIds instead): The tag ID to filter the links by. |
+| `tagIds` | *operations.GetLinksCountQueryParamTagIds* | :heavy_minus_sign: | The tag IDs to filter the links by. |
+| `search` | *string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. |
+| `userId` | *string* | :heavy_minus_sign: | The user ID to filter the links by. |
+| `showArchived` | *boolean* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. |
+| `withTags` | *boolean* | :heavy_minus_sign: | Whether to include tags in the response. Defaults to `false` if not provided. |
+| `groupBy` | *operations.GroupBy* | :heavy_minus_sign: | The field to group the links by. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getlinkscountresponse.md b/typescript/docs/models/operations/getlinkscountresponse.md
new file mode 100644
index 0000000000..ae4d541073
--- /dev/null
+++ b/typescript/docs/models/operations/getlinkscountresponse.md
@@ -0,0 +1,9 @@
+# GetLinksCountResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchemas` | [components.LinkSchema](../../models/components/linkschema.md)[] | :heavy_minus_sign: | A list of links |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getlinksrequest.md b/typescript/docs/models/operations/getlinksrequest.md
new file mode 100644
index 0000000000..7d00453753
--- /dev/null
+++ b/typescript/docs/models/operations/getlinksrequest.md
@@ -0,0 +1,17 @@
+# GetLinksRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. |
+| `tagId` | *string* | :heavy_minus_sign: | [DEPRECATED] (use tagIds instead): The tag ID to filter the links by. |
+| `tagIds` | *operations.QueryParamTagIds* | :heavy_minus_sign: | The tag IDs to filter the links by. |
+| `search` | *string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. |
+| `userId` | *string* | :heavy_minus_sign: | The user ID to filter the links by. |
+| `showArchived` | *boolean* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. |
+| `withTags` | *boolean* | :heavy_minus_sign: | Whether to include tags in the response. Defaults to `false` if not provided. |
+| `sort` | [operations.Sort](../../models/operations/sort.md) | :heavy_minus_sign: | The field to sort the links by. The default is `createdAt`, and sort order is always descending. |
+| `page` | *number* | :heavy_minus_sign: | The page number for pagination (each page contains 100 links). |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getlinksresponse.md b/typescript/docs/models/operations/getlinksresponse.md
new file mode 100644
index 0000000000..4978b435b5
--- /dev/null
+++ b/typescript/docs/models/operations/getlinksresponse.md
@@ -0,0 +1,9 @@
+# GetLinksResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `linkSchemas` | [components.LinkSchema](../../models/components/linkschema.md)[] | :heavy_minus_sign: | A list of links |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getosanalyticsqueryparamcountry.md b/typescript/docs/models/operations/getosanalyticsqueryparamcountry.md
new file mode 100644
index 0000000000..7d2376ffe3
--- /dev/null
+++ b/typescript/docs/models/operations/getosanalyticsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetOSAnalyticsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getosanalyticsqueryparaminterval.md b/typescript/docs/models/operations/getosanalyticsqueryparaminterval.md
new file mode 100644
index 0000000000..1bb5bdae52
--- /dev/null
+++ b/typescript/docs/models/operations/getosanalyticsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetOSAnalyticsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getosanalyticsrequest.md b/typescript/docs/models/operations/getosanalyticsrequest.md
new file mode 100644
index 0000000000..d3fc25ccc0
--- /dev/null
+++ b/typescript/docs/models/operations/getosanalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetOSAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetOSAnalyticsQueryParamInterval](../../models/operations/getosanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetOSAnalyticsQueryParamCountry](../../models/operations/getosanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getosanalyticsresponse.md b/typescript/docs/models/operations/getosanalyticsresponse.md
new file mode 100644
index 0000000000..e5b84349c8
--- /dev/null
+++ b/typescript/docs/models/operations/getosanalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetOSAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetOSAnalyticsResponseBody](../../models/operations/getosanalyticsresponsebody.md)[] | :heavy_minus_sign: | The top OS by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getosanalyticsresponsebody.md b/typescript/docs/models/operations/getosanalyticsresponsebody.md
new file mode 100644
index 0000000000..e3f8071ad2
--- /dev/null
+++ b/typescript/docs/models/operations/getosanalyticsresponsebody.md
@@ -0,0 +1,9 @@
+# GetOSAnalyticsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
+| `os` | *string* | :heavy_check_mark: | The name of the OS |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this OS |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getqrcoderequest.md b/typescript/docs/models/operations/getqrcoderequest.md
new file mode 100644
index 0000000000..30c3ee3392
--- /dev/null
+++ b/typescript/docs/models/operations/getqrcoderequest.md
@@ -0,0 +1,13 @@
+# GetQRCodeRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
+| `url` | *string* | :heavy_minus_sign: | The URL to generate a QR code for. Defaults to `https://dub.co` if not provided. |
+| `size` | *number* | :heavy_minus_sign: | The size of the QR code in pixels. Defaults to `600` if not provided. |
+| `level` | [operations.Level](../../models/operations/level.md) | :heavy_minus_sign: | The level of error correction to use for the QR code. Defaults to `L` if not provided. |
+| `fgColor` | *string* | :heavy_minus_sign: | The foreground color of the QR code in hex format. Defaults to `#000000` if not provided. |
+| `bgColor` | *string* | :heavy_minus_sign: | The background color of the QR code in hex format. Defaults to `#ffffff` if not provided. |
+| `includeMargin` | *boolean* | :heavy_minus_sign: | Whether to include a margin around the QR code. Defaults to `false` if not provided. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getqrcoderesponse.md b/typescript/docs/models/operations/getqrcoderesponse.md
new file mode 100644
index 0000000000..9b744d813f
--- /dev/null
+++ b/typescript/docs/models/operations/getqrcoderesponse.md
@@ -0,0 +1,9 @@
+# GetQRCodeResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `res` | *string* | :heavy_minus_sign: | The QR code |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getrefereranalyticsqueryparamcountry.md b/typescript/docs/models/operations/getrefereranalyticsqueryparamcountry.md
new file mode 100644
index 0000000000..8f2581265d
--- /dev/null
+++ b/typescript/docs/models/operations/getrefereranalyticsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetRefererAnalyticsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getrefereranalyticsqueryparaminterval.md b/typescript/docs/models/operations/getrefereranalyticsqueryparaminterval.md
new file mode 100644
index 0000000000..6fbafd19b4
--- /dev/null
+++ b/typescript/docs/models/operations/getrefereranalyticsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetRefererAnalyticsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getrefereranalyticsrequest.md b/typescript/docs/models/operations/getrefereranalyticsrequest.md
new file mode 100644
index 0000000000..d32b8b0447
--- /dev/null
+++ b/typescript/docs/models/operations/getrefereranalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetRefererAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetRefererAnalyticsQueryParamInterval](../../models/operations/getrefereranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetRefererAnalyticsQueryParamCountry](../../models/operations/getrefereranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getrefereranalyticsresponse.md b/typescript/docs/models/operations/getrefereranalyticsresponse.md
new file mode 100644
index 0000000000..07ecd29255
--- /dev/null
+++ b/typescript/docs/models/operations/getrefereranalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetRefererAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetRefererAnalyticsResponseBody](../../models/operations/getrefereranalyticsresponsebody.md)[] | :heavy_minus_sign: | The top referers by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getrefereranalyticsresponsebody.md b/typescript/docs/models/operations/getrefereranalyticsresponsebody.md
new file mode 100644
index 0000000000..181738fada
--- /dev/null
+++ b/typescript/docs/models/operations/getrefereranalyticsresponsebody.md
@@ -0,0 +1,9 @@
+# GetRefererAnalyticsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
+| `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this referer |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettagsrequest.md b/typescript/docs/models/operations/gettagsrequest.md
new file mode 100644
index 0000000000..733b5ff17c
--- /dev/null
+++ b/typescript/docs/models/operations/gettagsrequest.md
@@ -0,0 +1,8 @@
+# GetTagsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to retrieve the tags for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettagsresponse.md b/typescript/docs/models/operations/gettagsresponse.md
new file mode 100644
index 0000000000..04ac7a034d
--- /dev/null
+++ b/typescript/docs/models/operations/gettagsresponse.md
@@ -0,0 +1,9 @@
+# GetTagsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `tagSchemas` | [components.TagSchema](../../models/components/tagschema.md)[] | :heavy_minus_sign: | A list of tags |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettimeseriesanalyticsrequest.md b/typescript/docs/models/operations/gettimeseriesanalyticsrequest.md
new file mode 100644
index 0000000000..4f1d75069c
--- /dev/null
+++ b/typescript/docs/models/operations/gettimeseriesanalyticsrequest.md
@@ -0,0 +1,20 @@
+# GetTimeseriesAnalyticsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.QueryParamCountry](../../models/operations/queryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettimeseriesanalyticsresponse.md b/typescript/docs/models/operations/gettimeseriesanalyticsresponse.md
new file mode 100644
index 0000000000..4ba85c26b3
--- /dev/null
+++ b/typescript/docs/models/operations/gettimeseriesanalyticsresponse.md
@@ -0,0 +1,9 @@
+# GetTimeseriesAnalyticsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.ResponseBody](../../models/operations/responsebody.md)[] | :heavy_minus_sign: | The number of clicks over a period of time |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettoplinksqueryparamcountry.md b/typescript/docs/models/operations/gettoplinksqueryparamcountry.md
new file mode 100644
index 0000000000..3ef47a872d
--- /dev/null
+++ b/typescript/docs/models/operations/gettoplinksqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetTopLinksQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettoplinksqueryparaminterval.md b/typescript/docs/models/operations/gettoplinksqueryparaminterval.md
new file mode 100644
index 0000000000..4a16001616
--- /dev/null
+++ b/typescript/docs/models/operations/gettoplinksqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetTopLinksQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettoplinksrequest.md b/typescript/docs/models/operations/gettoplinksrequest.md
new file mode 100644
index 0000000000..b6827914c7
--- /dev/null
+++ b/typescript/docs/models/operations/gettoplinksrequest.md
@@ -0,0 +1,20 @@
+# GetTopLinksRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetTopLinksQueryParamInterval](../../models/operations/gettoplinksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetTopLinksQueryParamCountry](../../models/operations/gettoplinksqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettoplinksresponse.md b/typescript/docs/models/operations/gettoplinksresponse.md
new file mode 100644
index 0000000000..c2c454f025
--- /dev/null
+++ b/typescript/docs/models/operations/gettoplinksresponse.md
@@ -0,0 +1,9 @@
+# GetTopLinksResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetTopLinksResponseBody](../../models/operations/gettoplinksresponsebody.md)[] | :heavy_minus_sign: | The top links by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettoplinksresponsebody.md b/typescript/docs/models/operations/gettoplinksresponsebody.md
new file mode 100644
index 0000000000..0896894b18
--- /dev/null
+++ b/typescript/docs/models/operations/gettoplinksresponsebody.md
@@ -0,0 +1,9 @@
+# GetTopLinksResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
+| `link` | *string* | :heavy_check_mark: | The unique ID of the short link |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this link |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettopurlsqueryparamcountry.md b/typescript/docs/models/operations/gettopurlsqueryparamcountry.md
new file mode 100644
index 0000000000..7beebe7c39
--- /dev/null
+++ b/typescript/docs/models/operations/gettopurlsqueryparamcountry.md
@@ -0,0 +1,259 @@
+# GetTopURLsQueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettopurlsqueryparaminterval.md b/typescript/docs/models/operations/gettopurlsqueryparaminterval.md
new file mode 100644
index 0000000000..ce6c83f550
--- /dev/null
+++ b/typescript/docs/models/operations/gettopurlsqueryparaminterval.md
@@ -0,0 +1,15 @@
+# GetTopURLsQueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettopurlsrequest.md b/typescript/docs/models/operations/gettopurlsrequest.md
new file mode 100644
index 0000000000..873141b146
--- /dev/null
+++ b/typescript/docs/models/operations/gettopurlsrequest.md
@@ -0,0 +1,20 @@
+# GetTopURLsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. |
+| `interval` | [operations.GetTopURLsQueryParamInterval](../../models/operations/gettopurlsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
+| `country` | [operations.GetTopURLsQueryParamCountry](../../models/operations/gettopurlsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
+| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
+| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |
+| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. |
+| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. |
+| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. |
+| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. |
+| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. |
+| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettopurlsresponse.md b/typescript/docs/models/operations/gettopurlsresponse.md
new file mode 100644
index 0000000000..eeccacd301
--- /dev/null
+++ b/typescript/docs/models/operations/gettopurlsresponse.md
@@ -0,0 +1,9 @@
+# GetTopURLsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `responseBodies` | [operations.GetTopURLsResponseBody](../../models/operations/gettopurlsresponsebody.md)[] | :heavy_minus_sign: | The top URLs by number of clicks |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/gettopurlsresponsebody.md b/typescript/docs/models/operations/gettopurlsresponsebody.md
new file mode 100644
index 0000000000..ee01b3d812
--- /dev/null
+++ b/typescript/docs/models/operations/gettopurlsresponsebody.md
@@ -0,0 +1,9 @@
+# GetTopURLsResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| `url` | *string* | :heavy_check_mark: | The destination URL |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this URL |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getworkspacerequest.md b/typescript/docs/models/operations/getworkspacerequest.md
new file mode 100644
index 0000000000..b28840c569
--- /dev/null
+++ b/typescript/docs/models/operations/getworkspacerequest.md
@@ -0,0 +1,8 @@
+# GetWorkspaceRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
+| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getworkspaceresponse.md b/typescript/docs/models/operations/getworkspaceresponse.md
new file mode 100644
index 0000000000..8d838871e3
--- /dev/null
+++ b/typescript/docs/models/operations/getworkspaceresponse.md
@@ -0,0 +1,9 @@
+# GetWorkspaceResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `workspaceSchema` | [components.WorkspaceSchema](../../models/components/workspaceschema.md) | :heavy_minus_sign: | The retrieved workspace |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/getworkspacesresponse.md b/typescript/docs/models/operations/getworkspacesresponse.md
new file mode 100644
index 0000000000..323fc5b222
--- /dev/null
+++ b/typescript/docs/models/operations/getworkspacesresponse.md
@@ -0,0 +1,9 @@
+# GetWorkspacesResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
+| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `workspaceSchemas` | [components.WorkspaceSchema](../../models/components/workspaceschema.md)[] | :heavy_minus_sign: | A list of workspaces |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/groupby.md b/typescript/docs/models/operations/groupby.md
new file mode 100644
index 0000000000..57f29de882
--- /dev/null
+++ b/typescript/docs/models/operations/groupby.md
@@ -0,0 +1,4 @@
+# GroupBy
+
+The field to group the links by.
+
diff --git a/typescript/docs/models/operations/interval.md b/typescript/docs/models/operations/interval.md
new file mode 100644
index 0000000000..efa8f7c60a
--- /dev/null
+++ b/typescript/docs/models/operations/interval.md
@@ -0,0 +1,15 @@
+# Interval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/level.md b/typescript/docs/models/operations/level.md
new file mode 100644
index 0000000000..ff37c9ae61
--- /dev/null
+++ b/typescript/docs/models/operations/level.md
@@ -0,0 +1,13 @@
+# Level
+
+The level of error correction to use for the QR code. Defaults to `L` if not provided.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `L` | L |
+| `M` | M |
+| `Q` | Q |
+| `H` | H |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/one.md b/typescript/docs/models/operations/one.md
new file mode 100644
index 0000000000..187e6eb406
--- /dev/null
+++ b/typescript/docs/models/operations/one.md
@@ -0,0 +1,8 @@
+# One
+
+
+## Values
+
+| Name | Value |
+| -------- | -------- |
+| `Domain` | domain |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/queryparamcountry.md b/typescript/docs/models/operations/queryparamcountry.md
new file mode 100644
index 0000000000..e55054c541
--- /dev/null
+++ b/typescript/docs/models/operations/queryparamcountry.md
@@ -0,0 +1,259 @@
+# QueryParamCountry
+
+The country to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ----- | ----- |
+| `Af` | AF |
+| `Al` | AL |
+| `Dz` | DZ |
+| `As` | AS |
+| `Ad` | AD |
+| `Ao` | AO |
+| `Ai` | AI |
+| `Aq` | AQ |
+| `Ag` | AG |
+| `Ar` | AR |
+| `Am` | AM |
+| `Aw` | AW |
+| `Au` | AU |
+| `At` | AT |
+| `Az` | AZ |
+| `Bs` | BS |
+| `Bh` | BH |
+| `Bd` | BD |
+| `Bb` | BB |
+| `By` | BY |
+| `Be` | BE |
+| `Bz` | BZ |
+| `Bj` | BJ |
+| `Bm` | BM |
+| `Bt` | BT |
+| `Bo` | BO |
+| `Ba` | BA |
+| `Bw` | BW |
+| `Bv` | BV |
+| `Br` | BR |
+| `Io` | IO |
+| `Bn` | BN |
+| `Bg` | BG |
+| `Bf` | BF |
+| `Bi` | BI |
+| `Kh` | KH |
+| `Cm` | CM |
+| `Ca` | CA |
+| `Cv` | CV |
+| `Ky` | KY |
+| `Cf` | CF |
+| `Td` | TD |
+| `Cl` | CL |
+| `Cn` | CN |
+| `Cx` | CX |
+| `Cc` | CC |
+| `Co` | CO |
+| `Km` | KM |
+| `Cg` | CG |
+| `Cd` | CD |
+| `Ck` | CK |
+| `Cr` | CR |
+| `Ci` | CI |
+| `Hr` | HR |
+| `Cu` | CU |
+| `Cy` | CY |
+| `Cz` | CZ |
+| `Dk` | DK |
+| `Dj` | DJ |
+| `Dm` | DM |
+| `Do` | DO |
+| `Ec` | EC |
+| `Eg` | EG |
+| `Sv` | SV |
+| `Gq` | GQ |
+| `Er` | ER |
+| `Ee` | EE |
+| `Et` | ET |
+| `Fk` | FK |
+| `Fo` | FO |
+| `Fj` | FJ |
+| `Fi` | FI |
+| `Fr` | FR |
+| `Gf` | GF |
+| `Pf` | PF |
+| `Tf` | TF |
+| `Ga` | GA |
+| `Gm` | GM |
+| `Ge` | GE |
+| `De` | DE |
+| `Gh` | GH |
+| `Gi` | GI |
+| `Gr` | GR |
+| `Gl` | GL |
+| `Gd` | GD |
+| `Gp` | GP |
+| `Gu` | GU |
+| `Gt` | GT |
+| `Gn` | GN |
+| `Gw` | GW |
+| `Gy` | GY |
+| `Ht` | HT |
+| `Hm` | HM |
+| `Va` | VA |
+| `Hn` | HN |
+| `Hk` | HK |
+| `Hu` | HU |
+| `Is` | IS |
+| `In` | IN |
+| `Id` | ID |
+| `Ir` | IR |
+| `Iq` | IQ |
+| `Ie` | IE |
+| `Il` | IL |
+| `It` | IT |
+| `Jm` | JM |
+| `Jp` | JP |
+| `Jo` | JO |
+| `Kz` | KZ |
+| `Ke` | KE |
+| `Ki` | KI |
+| `Kp` | KP |
+| `Kr` | KR |
+| `Kw` | KW |
+| `Kg` | KG |
+| `La` | LA |
+| `Lv` | LV |
+| `Lb` | LB |
+| `Ls` | LS |
+| `Lr` | LR |
+| `Ly` | LY |
+| `Li` | LI |
+| `Lt` | LT |
+| `Lu` | LU |
+| `Mo` | MO |
+| `Mg` | MG |
+| `Mw` | MW |
+| `My` | MY |
+| `Mv` | MV |
+| `Ml` | ML |
+| `Mt` | MT |
+| `Mh` | MH |
+| `Mq` | MQ |
+| `Mr` | MR |
+| `Mu` | MU |
+| `Yt` | YT |
+| `Mx` | MX |
+| `Fm` | FM |
+| `Md` | MD |
+| `Mc` | MC |
+| `Mn` | MN |
+| `Ms` | MS |
+| `Ma` | MA |
+| `Mz` | MZ |
+| `Mm` | MM |
+| `Na` | NA |
+| `Nr` | NR |
+| `Np` | NP |
+| `Nl` | NL |
+| `Nc` | NC |
+| `Nz` | NZ |
+| `Ni` | NI |
+| `Ne` | NE |
+| `Ng` | NG |
+| `Nu` | NU |
+| `Nf` | NF |
+| `Mk` | MK |
+| `Mp` | MP |
+| `No` | NO |
+| `Om` | OM |
+| `Pk` | PK |
+| `Pw` | PW |
+| `Ps` | PS |
+| `Pa` | PA |
+| `Pg` | PG |
+| `Py` | PY |
+| `Pe` | PE |
+| `Ph` | PH |
+| `Pn` | PN |
+| `Pl` | PL |
+| `Pt` | PT |
+| `Pr` | PR |
+| `Qa` | QA |
+| `Re` | RE |
+| `Ro` | RO |
+| `Ru` | RU |
+| `Rw` | RW |
+| `Sh` | SH |
+| `Kn` | KN |
+| `Lc` | LC |
+| `Pm` | PM |
+| `Vc` | VC |
+| `Ws` | WS |
+| `Sm` | SM |
+| `St` | ST |
+| `Sa` | SA |
+| `Sn` | SN |
+| `Sc` | SC |
+| `Sl` | SL |
+| `Sg` | SG |
+| `Sk` | SK |
+| `Si` | SI |
+| `Sb` | SB |
+| `So` | SO |
+| `Za` | ZA |
+| `Gs` | GS |
+| `Es` | ES |
+| `Lk` | LK |
+| `Sd` | SD |
+| `Sr` | SR |
+| `Sj` | SJ |
+| `Sz` | SZ |
+| `Se` | SE |
+| `Ch` | CH |
+| `Sy` | SY |
+| `Tw` | TW |
+| `Tj` | TJ |
+| `Tz` | TZ |
+| `Th` | TH |
+| `Tl` | TL |
+| `Tg` | TG |
+| `Tk` | TK |
+| `To` | TO |
+| `Tt` | TT |
+| `Tn` | TN |
+| `Tr` | TR |
+| `Tm` | TM |
+| `Tc` | TC |
+| `Tv` | TV |
+| `Ug` | UG |
+| `Ua` | UA |
+| `Ae` | AE |
+| `Gb` | GB |
+| `Us` | US |
+| `Um` | UM |
+| `Uy` | UY |
+| `Uz` | UZ |
+| `Vu` | VU |
+| `Ve` | VE |
+| `Vn` | VN |
+| `Vg` | VG |
+| `Vi` | VI |
+| `Wf` | WF |
+| `Eh` | EH |
+| `Ye` | YE |
+| `Zm` | ZM |
+| `Zw` | ZW |
+| `Ax` | AX |
+| `Bq` | BQ |
+| `Cw` | CW |
+| `Gg` | GG |
+| `Im` | IM |
+| `Je` | JE |
+| `Me` | ME |
+| `Bl` | BL |
+| `Mf` | MF |
+| `Rs` | RS |
+| `Sx` | SX |
+| `Ss` | SS |
+| `Xk` | XK |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/queryparaminterval.md b/typescript/docs/models/operations/queryparaminterval.md
new file mode 100644
index 0000000000..0a9b632de5
--- /dev/null
+++ b/typescript/docs/models/operations/queryparaminterval.md
@@ -0,0 +1,15 @@
+# QueryParamInterval
+
+The interval to retrieve analytics for.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `Oneh` | 1h |
+| `TwentyFourh` | 24h |
+| `Sevend` | 7d |
+| `Thirtyd` | 30d |
+| `Ninetyd` | 90d |
+| `All` | all |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/queryparamtagids.md b/typescript/docs/models/operations/queryparamtagids.md
new file mode 100644
index 0000000000..dcb80e17b7
--- /dev/null
+++ b/typescript/docs/models/operations/queryparamtagids.md
@@ -0,0 +1,4 @@
+# QueryParamTagIds
+
+The tag IDs to filter the links by.
+
diff --git a/typescript/docs/models/operations/requestbody.md b/typescript/docs/models/operations/requestbody.md
new file mode 100644
index 0000000000..ba104dc068
--- /dev/null
+++ b/typescript/docs/models/operations/requestbody.md
@@ -0,0 +1,26 @@
+# RequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). |
+| `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. |
+| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. |
+| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. |
+| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. |
+| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time when the short link will expire in ISO-8601 format. Must be in the future. |
+| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. |
+| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. |
+| `title` | *string* | :heavy_minus_sign: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `description` | *string* | :heavy_minus_sign: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `image` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. |
+| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. |
+| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. |
+| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. |
+| `geo` | Record<string, *string*> | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. |
+| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. |
+| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link. |
+| `tagIds` | *operations.BulkCreateLinksTagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. |
+| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/responsebody.md b/typescript/docs/models/operations/responsebody.md
new file mode 100644
index 0000000000..af29a48a3f
--- /dev/null
+++ b/typescript/docs/models/operations/responsebody.md
@@ -0,0 +1,9 @@
+# ResponseBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
+| `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval |
+| `clicks` | *number* | :heavy_check_mark: | The number of clicks in the interval |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/sort.md b/typescript/docs/models/operations/sort.md
new file mode 100644
index 0000000000..4e57289a78
--- /dev/null
+++ b/typescript/docs/models/operations/sort.md
@@ -0,0 +1,12 @@
+# Sort
+
+The field to sort the links by. The default is `createdAt`, and sort order is always descending.
+
+
+## Values
+
+| Name | Value |
+| ------------- | ------------- |
+| `CreatedAt` | createdAt |
+| `Clicks` | clicks |
+| `LastClicked` | lastClicked |
\ No newline at end of file
diff --git a/typescript/docs/models/operations/tagids.md b/typescript/docs/models/operations/tagids.md
new file mode 100644
index 0000000000..8dca755b01
--- /dev/null
+++ b/typescript/docs/models/operations/tagids.md
@@ -0,0 +1,4 @@
+# TagIds
+
+The unique IDs of the tags assigned to the short link.
+
diff --git a/typescript/docs/models/operations/two.md b/typescript/docs/models/operations/two.md
new file mode 100644
index 0000000000..46cb4a60c3
--- /dev/null
+++ b/typescript/docs/models/operations/two.md
@@ -0,0 +1,8 @@
+# Two
+
+
+## Values
+
+| Name | Value |
+| ------- | ------- |
+| `TagId` | tagId |
\ No newline at end of file
diff --git a/typescript/docs/sdks/analytics/README.md b/typescript/docs/sdks/analytics/README.md
new file mode 100644
index 0000000000..c585876fc8
--- /dev/null
+++ b/typescript/docs/sdks/analytics/README.md
@@ -0,0 +1,535 @@
+# Analytics
+(*analytics*)
+
+### Available Operations
+
+* [getClicksAnalytics](#getclicksanalytics) - Retrieve clicks analytics
+* [getTimeseriesAnalytics](#gettimeseriesanalytics) - Retrieve timeseries analytics
+* [getCountryAnalytics](#getcountryanalytics) - Retrieve country analytics
+* [getCityAnalytics](#getcityanalytics) - Retrieve city analytics
+* [getDeviceAnalytics](#getdeviceanalytics) - Retrieve device analytics
+* [getBrowserAnalytics](#getbrowseranalytics) - Retrieve browser analytics
+* [getOSAnalytics](#getosanalytics) - Retrieve OS analytics
+* [getRefererAnalytics](#getrefereranalytics) - Retrieve referer analytics
+* [getTopLinks](#gettoplinks) - Retrieve top links
+* [getTopURLs](#gettopurls) - Retrieve top URLs
+
+## getClicksAnalytics
+
+Retrieve the number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getClicksAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetClicksAnalyticsRequest](../../models/operations/getclicksanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetClicksAnalyticsResponse](../../models/operations/getclicksanalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getTimeseriesAnalytics
+
+Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getTimeseriesAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetTimeseriesAnalyticsRequest](../../models/operations/gettimeseriesanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetTimeseriesAnalyticsResponse](../../models/operations/gettimeseriesanalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getCountryAnalytics
+
+Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getCountryAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetCountryAnalyticsRequest](../../models/operations/getcountryanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetCountryAnalyticsResponse](../../models/operations/getcountryanalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getCityAnalytics
+
+Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getCityAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetCityAnalyticsRequest](../../models/operations/getcityanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetCityAnalyticsResponse](../../models/operations/getcityanalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getDeviceAnalytics
+
+Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getDeviceAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetDeviceAnalyticsRequest](../../models/operations/getdeviceanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetDeviceAnalyticsResponse](../../models/operations/getdeviceanalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getBrowserAnalytics
+
+Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getBrowserAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetBrowserAnalyticsRequest](../../models/operations/getbrowseranalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetBrowserAnalyticsResponse](../../models/operations/getbrowseranalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getOSAnalytics
+
+Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getOSAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetOSAnalyticsRequest](../../models/operations/getosanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetOSAnalyticsResponse](../../models/operations/getosanalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getRefererAnalytics
+
+Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getRefererAnalytics({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetRefererAnalyticsRequest](../../models/operations/getrefereranalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetRefererAnalyticsResponse](../../models/operations/getrefereranalyticsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getTopLinks
+
+Retrieve the top links by number of clicks for a domain or the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getTopLinks({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetTopLinksRequest](../../models/operations/gettoplinksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetTopLinksResponse](../../models/operations/gettoplinksresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getTopURLs
+
+Retrieve the top URLs by number of clicks for a given short link.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.analytics.getTopURLs({
+ workspaceId: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetTopURLsRequest](../../models/operations/gettopurlsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetTopURLsResponse](../../models/operations/gettopurlsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/typescript/docs/sdks/dub/README.md b/typescript/docs/sdks/dub/README.md
new file mode 100644
index 0000000000..15c31150e4
--- /dev/null
+++ b/typescript/docs/sdks/dub/README.md
@@ -0,0 +1,9 @@
+# Dub SDK
+
+
+## Overview
+
+Dub.co API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.
+
+### Available Operations
+
diff --git a/typescript/docs/sdks/links/README.md b/typescript/docs/sdks/links/README.md
new file mode 100644
index 0000000000..2485c1aab7
--- /dev/null
+++ b/typescript/docs/sdks/links/README.md
@@ -0,0 +1,416 @@
+# Links
+(*links*)
+
+### Available Operations
+
+* [getLinks](#getlinks) - Retrieve a list of links
+* [createLink](#createlink) - Create a new link
+* [getLinksCount](#getlinkscount) - Retrieve the number of links
+* [getLinkInfo](#getlinkinfo) - Retrieve a link
+* [editLink](#editlink) - Edit a link
+* [deleteLink](#deletelink) - Delete a link
+* [bulkCreateLinks](#bulkcreatelinks) - Bulk create links
+
+## getLinks
+
+Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinks({
+ workspaceId: "<value>",
+ tagIds: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetLinksRequest](../../models/operations/getlinksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetLinksResponse](../../models/operations/getlinksresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## createLink
+
+Create a new link for the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const workspaceId = "<value>";
+ const requestBody = {
+ url: "https://first-marxism.net",
+ geo: {
+ "key": "<value>",
+ },
+ tagIds: "<value>",
+ };
+
+ const result = await sdk.links.createLink(workspaceId, requestBody);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to create the link for. |
+| `requestBody` | [operations.CreateLinkRequestBody](../../models/operations/createlinkrequestbody.md) | :heavy_minus_sign: | N/A |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.CreateLinkResponse](../../models/operations/createlinkresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getLinksCount
+
+Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+import { Two } from "dub-node/models/operations";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.links.getLinksCount({
+ workspaceId: "<value>",
+ tagIds: [
+ "<value>",
+ ],
+ groupBy: Two.TagId,
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetLinksCountRequest](../../models/operations/getlinkscountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetLinksCountResponse](../../models/operations/getlinkscountresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getLinkInfo
+
+Retrieve the info for a link from their domain and key.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const workspaceId = "<value>";
+ const domain = "<value>";
+ const key = "<value>";
+
+ const result = await sdk.links.getLinkInfo(workspaceId, domain, key);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `domain` | *string* | :heavy_check_mark: | The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`. |
+| `key` | *string* | :heavy_check_mark: | The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetLinkInfoResponse](../../models/operations/getlinkinforesponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## editLink
+
+Edit a link for the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const linkId = "<value>";
+ const workspaceId = "<value>";
+ const requestBody = {
+ url: "https://fruitful-strategy.com",
+ geo: {
+ "key": "<value>",
+ },
+ tagIds: "<value>",
+ };
+
+ const result = await sdk.links.editLink(linkId, workspaceId, requestBody);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.EditLinkResponse](../../models/operations/editlinkresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## deleteLink
+
+Delete a link for the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const linkId = "<value>";
+ const workspaceId = "<value>";
+
+ const result = await sdk.links.deleteLink(linkId, workspaceId);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace the link belongs to. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.DeleteLinkResponse](../../models/operations/deletelinkresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## bulkCreateLinks
+
+Bulk create up to 100 links for the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const workspaceId = "<value>";
+ const requestBody = [
+ {
+ url: "https://impish-brow.info",
+ geo: {
+ "key": "<value>",
+ },
+ tagIds: "<value>",
+ },
+ ];
+
+ const result = await sdk.links.bulkCreateLinks(workspaceId, requestBody);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to create the link for. |
+| `requestBody` | [operations.RequestBody](../../models/operations/requestbody.md)[] | :heavy_minus_sign: | N/A |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.BulkCreateLinksResponse](../../models/operations/bulkcreatelinksresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/typescript/docs/sdks/qrcodes/README.md b/typescript/docs/sdks/qrcodes/README.md
new file mode 100644
index 0000000000..64742c5bb3
--- /dev/null
+++ b/typescript/docs/sdks/qrcodes/README.md
@@ -0,0 +1,56 @@
+# QRCodes
+(*qrCodes*)
+
+### Available Operations
+
+* [getQRCode](#getqrcode) - Retrieve a QR code
+
+## getQRCode
+
+Retrieve a QR code for a link.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.qrCodes.getQRCode({});
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetQRCodeRequest](../../models/operations/getqrcoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetQRCodeResponse](../../models/operations/getqrcoderesponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/typescript/docs/sdks/tags/README.md b/typescript/docs/sdks/tags/README.md
new file mode 100644
index 0000000000..4cde81e8c3
--- /dev/null
+++ b/typescript/docs/sdks/tags/README.md
@@ -0,0 +1,115 @@
+# Tags
+(*tags*)
+
+### Available Operations
+
+* [getTags](#gettags) - Retrieve a list of tags
+* [createTag](#createtag) - Create a new tag
+
+## getTags
+
+Retrieve a list of tags for the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const workspaceId = "<value>";
+
+ const result = await sdk.tags.getTags(workspaceId);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to retrieve the tags for. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetTagsResponse](../../models/operations/gettagsresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## createTag
+
+Create a new tag for the authenticated workspace.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const workspaceId = "<value>";
+ const requestBody = {
+ tag: "<value>",
+ };
+
+ const result = await sdk.tags.createTag(workspaceId, requestBody);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `workspaceId` | *string* | :heavy_check_mark: | The ID of the workspace to create the tag for. |
+| `requestBody` | [operations.CreateTagRequestBody](../../models/operations/createtagrequestbody.md) | :heavy_minus_sign: | N/A |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.CreateTagResponse](../../models/operations/createtagresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/typescript/docs/sdks/workspaces/README.md b/typescript/docs/sdks/workspaces/README.md
new file mode 100644
index 0000000000..1a4812461d
--- /dev/null
+++ b/typescript/docs/sdks/workspaces/README.md
@@ -0,0 +1,162 @@
+# Workspaces
+(*workspaces*)
+
+### Available Operations
+
+* [getWorkspaces](#getworkspaces) - Retrieve a list of workspaces
+* [createWorkspace](#createworkspace) - Create a workspace
+* [getWorkspace](#getworkspace) - Retrieve a workspace
+
+## getWorkspaces
+
+Retrieve a list of workspaces for the authenticated user.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.workspaces.getWorkspaces();
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetWorkspacesResponse](../../models/operations/getworkspacesresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## createWorkspace
+
+Create a new workspace for the authenticated user.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const result = await sdk.workspaces.createWorkspace({
+ name: "<value>",
+ slug: "<value>",
+ });
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.CreateWorkspaceRequestBody](../../models/operations/createworkspacerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.CreateWorkspaceResponse](../../models/operations/createworkspaceresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
+
+## getWorkspace
+
+Retrieve a workspace for the authenticated user.
+
+### Example Usage
+
+```typescript
+import { Dub } from "dub-node";
+
+async function run() {
+ const sdk = new Dub({
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
+ });
+
+ const idOrSlug = "<value>";
+
+ const result = await sdk.workspaces.getWorkspace(idOrSlug);
+
+ // Handle the result
+ console.log(result)
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+
+
+### Response
+
+**Promise<[operations.GetWorkspaceResponse](../../models/operations/getworkspaceresponse.md)>**
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.FourHundred | 400 | application/json |
+| errors.FourHundredAndOne | 401 | application/json |
+| errors.FourHundredAndThree | 403 | application/json |
+| errors.FourHundredAndFour | 404 | application/json |
+| errors.FourHundredAndNine | 409 | application/json |
+| errors.FourHundredAndTen | 410 | application/json |
+| errors.FourHundredAndTwentyTwo | 422 | application/json |
+| errors.FourHundredAndTwentyNine | 429 | application/json |
+| errors.FiveHundred | 500 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/typescript/package-lock.json b/typescript/package-lock.json
new file mode 100644
index 0000000000..f481378131
--- /dev/null
+++ b/typescript/package-lock.json
@@ -0,0 +1,3109 @@
+{
+ "name": "dub-node",
+ "version": "0.0.1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "dub-node",
+ "version": "0.0.1",
+ "devDependencies": {
+ "@types/jsonpath": "^0.2.4",
+ "@typescript-eslint/eslint-plugin": "^6.13.2",
+ "@typescript-eslint/parser": "^6.13.2",
+ "eslint": "^8.55.0",
+ "eslint-import-resolver-typescript": "^3.6.1",
+ "eslint-plugin-import": "^2.29.0",
+ "typescript": "^5.3.3",
+ "zod": "^3.22.4"
+ },
+ "peerDependencies": {
+ "zod": ">= 3"
+ }
+ },
+ "node_modules/@aashutoshrathi/word-wrap": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
+ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "dev": true,
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
+ "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
+ "dev": true,
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
+ "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+ "dev": true,
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^9.6.0",
+ "globals": "^13.19.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "8.57.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
+ "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array": {
+ "version": "0.11.14",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
+ "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
+ "dev": true,
+ "dependencies": {
+ "@humanwhocodes/object-schema": "^2.0.2",
+ "debug": "^4.3.1",
+ "minimatch": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=10.10.0"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/object-schema": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
+ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
+ "dev": true
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true
+ },
+ "node_modules/@types/json5": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
+ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
+ "dev": true
+ },
+ "node_modules/@types/jsonpath": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.4.tgz",
+ "integrity": "sha512-K3hxB8Blw0qgW6ExKgMbXQv2UPZBoE2GqLpVY+yr7nMD2Pq86lsuIzyAaiQ7eMqFL5B6di6pxSkogLJEyEHoGA==",
+ "dev": true
+ },
+ "node_modules/@types/semver": {
+ "version": "7.5.8",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
+ "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
+ "dev": true
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz",
+ "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.5.1",
+ "@typescript-eslint/scope-manager": "6.21.0",
+ "@typescript-eslint/type-utils": "6.21.0",
+ "@typescript-eslint/utils": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0",
+ "debug": "^4.3.4",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.4",
+ "natural-compare": "^1.4.0",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
+ "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "6.21.0",
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/typescript-estree": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
+ "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz",
+ "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/typescript-estree": "6.21.0",
+ "@typescript-eslint/utils": "6.21.0",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
+ "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
+ "dev": true,
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
+ "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "minimatch": "9.0.3",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz",
+ "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@types/json-schema": "^7.0.12",
+ "@types/semver": "^7.5.0",
+ "@typescript-eslint/scope-manager": "6.21.0",
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/typescript-estree": "6.21.0",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
+ "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.21.0",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "dev": true
+ },
+ "node_modules/acorn": {
+ "version": "8.11.3",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
+ "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
+ "node_modules/array-buffer-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz",
+ "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "is-array-buffer": "^3.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array-includes": {
+ "version": "3.1.8",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz",
+ "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "is-string": "^1.0.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/array.prototype.findlastindex": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
+ "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flat": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz",
+ "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flatmap": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz",
+ "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/arraybuffer.prototype.slice": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz",
+ "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==",
+ "dev": true,
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.22.3",
+ "es-errors": "^1.2.1",
+ "get-intrinsic": "^1.2.3",
+ "is-array-buffer": "^3.0.4",
+ "is-shared-array-buffer": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
+ "dev": true,
+ "dependencies": {
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
+ "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
+ "dev": true,
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "set-function-length": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/data-view-buffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz",
+ "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz",
+ "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-offset": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz",
+ "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
+ "dev": true,
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "dev": true,
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/enhanced-resolve": {
+ "version": "5.16.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
+ "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/es-abstract": {
+ "version": "1.23.3",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz",
+ "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==",
+ "dev": true,
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "arraybuffer.prototype.slice": "^1.0.3",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
+ "data-view-buffer": "^1.0.1",
+ "data-view-byte-length": "^1.0.1",
+ "data-view-byte-offset": "^1.0.0",
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-set-tostringtag": "^2.0.3",
+ "es-to-primitive": "^1.2.1",
+ "function.prototype.name": "^1.1.6",
+ "get-intrinsic": "^1.2.4",
+ "get-symbol-description": "^1.0.2",
+ "globalthis": "^1.0.3",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.0.3",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.2",
+ "internal-slot": "^1.0.7",
+ "is-array-buffer": "^3.0.4",
+ "is-callable": "^1.2.7",
+ "is-data-view": "^1.0.1",
+ "is-negative-zero": "^2.0.3",
+ "is-regex": "^1.1.4",
+ "is-shared-array-buffer": "^1.0.3",
+ "is-string": "^1.0.7",
+ "is-typed-array": "^1.1.13",
+ "is-weakref": "^1.0.2",
+ "object-inspect": "^1.13.1",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.5",
+ "regexp.prototype.flags": "^1.5.2",
+ "safe-array-concat": "^1.1.2",
+ "safe-regex-test": "^1.0.3",
+ "string.prototype.trim": "^1.2.9",
+ "string.prototype.trimend": "^1.0.8",
+ "string.prototype.trimstart": "^1.0.8",
+ "typed-array-buffer": "^1.0.2",
+ "typed-array-byte-length": "^1.0.1",
+ "typed-array-byte-offset": "^1.0.2",
+ "typed-array-length": "^1.0.6",
+ "unbox-primitive": "^1.0.2",
+ "which-typed-array": "^1.1.15"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
+ "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
+ "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz",
+ "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.4",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-shim-unscopables": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",
+ "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==",
+ "dev": true,
+ "dependencies": {
+ "hasown": "^2.0.0"
+ }
+ },
+ "node_modules/es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "dev": true,
+ "dependencies": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "8.57.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
+ "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.6.1",
+ "@eslint/eslintrc": "^2.1.4",
+ "@eslint/js": "8.57.0",
+ "@humanwhocodes/config-array": "^0.11.14",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@nodelib/fs.walk": "^1.2.8",
+ "@ungap/structured-clone": "^1.2.0",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
+ "debug": "^4.3.2",
+ "doctrine": "^3.0.0",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^7.2.2",
+ "eslint-visitor-keys": "^3.4.3",
+ "espree": "^9.6.1",
+ "esquery": "^1.4.2",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "globals": "^13.19.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "is-path-inside": "^3.0.3",
+ "js-yaml": "^4.1.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3",
+ "strip-ansi": "^6.0.1",
+ "text-table": "^0.2.0"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-import-resolver-node": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
+ "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^3.2.7",
+ "is-core-module": "^2.13.0",
+ "resolve": "^1.22.4"
+ }
+ },
+ "node_modules/eslint-import-resolver-node/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-import-resolver-typescript": {
+ "version": "3.6.1",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz",
+ "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.3.4",
+ "enhanced-resolve": "^5.12.0",
+ "eslint-module-utils": "^2.7.4",
+ "fast-glob": "^3.3.1",
+ "get-tsconfig": "^4.5.0",
+ "is-core-module": "^2.11.0",
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts"
+ },
+ "peerDependencies": {
+ "eslint": "*",
+ "eslint-plugin-import": "*"
+ }
+ },
+ "node_modules/eslint-module-utils": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz",
+ "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^3.2.7"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-module-utils/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-import": {
+ "version": "2.29.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
+ "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
+ "dev": true,
+ "dependencies": {
+ "array-includes": "^3.1.7",
+ "array.prototype.findlastindex": "^1.2.3",
+ "array.prototype.flat": "^1.3.2",
+ "array.prototype.flatmap": "^1.3.2",
+ "debug": "^3.2.7",
+ "doctrine": "^2.1.0",
+ "eslint-import-resolver-node": "^0.3.9",
+ "eslint-module-utils": "^2.8.0",
+ "hasown": "^2.0.0",
+ "is-core-module": "^2.13.1",
+ "is-glob": "^4.0.3",
+ "minimatch": "^3.1.2",
+ "object.fromentries": "^2.0.7",
+ "object.groupby": "^1.0.1",
+ "object.values": "^1.1.7",
+ "semver": "^6.3.1",
+ "tsconfig-paths": "^3.15.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+ "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "dev": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/espree": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
+ "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.9.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
+ "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true
+ },
+ "node_modules/fastq": {
+ "version": "1.17.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
+ "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
+ "dev": true,
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+ "dev": true,
+ "dependencies": {
+ "flat-cache": "^3.0.4"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
+ "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
+ "dev": true,
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.3",
+ "rimraf": "^3.0.2"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
+ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
+ "dev": true
+ },
+ "node_modules/for-each": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
+ "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
+ "dev": true,
+ "dependencies": {
+ "is-callable": "^1.1.3"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/function.prototype.name": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz",
+ "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "functions-have-names": "^1.2.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/functions-have-names": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
+ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
+ "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-symbol-description": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz",
+ "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz",
+ "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==",
+ "dev": true,
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/glob/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/globals": {
+ "version": "13.24.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
+ "dev": true,
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
+ "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+ "dev": true,
+ "dependencies": {
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/globby": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
+ "dev": true,
+ "dependencies": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.2.9",
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.1.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "node_modules/graphemer": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
+ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
+ "dev": true
+ },
+ "node_modules/has-bigints": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
+ "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "dev": true,
+ "dependencies": {
+ "es-define-property": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
+ "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "dev": true,
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
+ "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/internal-slot": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz",
+ "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "hasown": "^2.0.0",
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/is-array-buffer": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",
+ "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bigint": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+ "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+ "dev": true,
+ "dependencies": {
+ "has-bigints": "^1.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-boolean-object": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+ "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-callable": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
+ "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "dev": true,
+ "dependencies": {
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-data-view": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz",
+ "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==",
+ "dev": true,
+ "dependencies": {
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-date-object": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+ "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+ "dev": true,
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-negative-zero": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
+ "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-number-object": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
+ "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
+ "dev": true,
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-path-inside": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-regex": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+ "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-shared-array-buffer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-string": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+ "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+ "dev": true,
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-symbol": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+ "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+ "dev": true,
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-typed-array": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz",
+ "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==",
+ "dev": true,
+ "dependencies": {
+ "which-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakref": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
+ "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true
+ },
+ "node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.assign": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",
+ "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "has-symbols": "^1.0.3",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.fromentries": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
+ "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.groupby": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
+ "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.values": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz",
+ "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
+ "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+ "dev": true,
+ "dependencies": {
+ "@aashutoshrathi/word-wrap": "^1.2.3",
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/possible-typed-array-names": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
+ "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/regexp.prototype.flags": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz",
+ "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "define-properties": "^1.2.1",
+ "es-errors": "^1.3.0",
+ "set-function-name": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.8",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
+ "dev": true,
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/safe-array-concat": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
+ "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "get-intrinsic": "^1.2.4",
+ "has-symbols": "^1.0.3",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safe-regex-test": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz",
+ "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-regex": "^1.1.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
+ "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/set-function-length": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "dev": true,
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/set-function-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
+ "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
+ "dev": true,
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "functions-have-names": "^1.2.3",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4",
+ "object-inspect": "^1.13.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string.prototype.trim": {
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
+ "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.0",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimend": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz",
+ "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimstart": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
+ "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tapable": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
+ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
+ "dev": true
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
+ "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.2.0"
+ }
+ },
+ "node_modules/tsconfig-paths": {
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json5": "^0.0.29",
+ "json5": "^1.0.2",
+ "minimist": "^1.2.6",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz",
+ "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/typed-array-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz",
+ "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-byte-offset": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz",
+ "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==",
+ "dev": true,
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-length": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz",
+ "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13",
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.4.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz",
+ "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/unbox-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
+ "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-bigints": "^1.0.2",
+ "has-symbols": "^1.0.3",
+ "which-boxed-primitive": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "dev": true,
+ "dependencies": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-typed-array": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz",
+ "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==",
+ "dev": true,
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.22.4",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",
+ "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/typescript/package.json b/typescript/package.json
new file mode 100644
index 0000000000..41d4c166c6
--- /dev/null
+++ b/typescript/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "dub-node",
+ "version": "0.0.1",
+ "author": "Speakeasy",
+ "main": "./index.js",
+ "sideEffects": false,
+ "scripts": {
+ "lint": "eslint --max-warnings=0 src",
+ "build": "tsc",
+ "prepare": "npm run build"
+ },
+ "keywords": [],
+ "peerDependencies": {
+ "zod": ">= 3"
+ },
+ "devDependencies": {
+ "@types/jsonpath": "^0.2.4",
+ "@typescript-eslint/eslint-plugin": "^6.13.2",
+ "@typescript-eslint/parser": "^6.13.2",
+ "eslint": "^8.55.0",
+ "eslint-import-resolver-typescript": "^3.6.1",
+ "eslint-plugin-import": "^2.29.0",
+ "typescript": "^5.3.3",
+ "zod": "^3.22.4"
+ },
+ "dependencies": {
+
+ }
+}
diff --git a/typescript/src/hooks/hooks.ts b/typescript/src/hooks/hooks.ts
new file mode 100644
index 0000000000..74a677aaab
--- /dev/null
+++ b/typescript/src/hooks/hooks.ts
@@ -0,0 +1,81 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import {
+ AfterErrorContext,
+ AfterErrorHook,
+ AfterSuccessContext,
+ AfterSuccessHook,
+ BeforeRequestContext,
+ BeforeRequestHook,
+ Hooks,
+ SDKInitHook,
+ SDKInitOptions,
+} from "./types";
+
+export class SDKHooks implements Hooks {
+ sdkInitHooks: SDKInitHook[] = [];
+ beforeRequestHooks: BeforeRequestHook[] = [];
+ afterSuccessHooks: AfterSuccessHook[] = [];
+ afterErrorHooks: AfterErrorHook[] = [];
+
+ constructor() {}
+
+ registerSDKInitHook(hook: SDKInitHook) {
+ this.sdkInitHooks.push(hook);
+ }
+
+ registerBeforeRequestHook(hook: BeforeRequestHook) {
+ this.beforeRequestHooks.push(hook);
+ }
+
+ registerAfterSuccessHook(hook: AfterSuccessHook) {
+ this.afterSuccessHooks.push(hook);
+ }
+
+ registerAfterErrorHook(hook: AfterErrorHook) {
+ this.afterErrorHooks.push(hook);
+ }
+
+ sdkInit(opts: SDKInitOptions): SDKInitOptions {
+ return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts);
+ }
+
+ async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise<Request> {
+ let req = request;
+
+ for (const hook of this.beforeRequestHooks) {
+ req = await hook.beforeRequest(hookCtx, req);
+ }
+
+ return req;
+ }
+
+ async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise<Response> {
+ let res = response;
+
+ for (const hook of this.afterSuccessHooks) {
+ res = await hook.afterSuccess(hookCtx, res);
+ }
+
+ return res;
+ }
+
+ async afterError(
+ hookCtx: AfterErrorContext,
+ response: Response | null,
+ error: unknown
+ ): Promise<{ response: Response | null; error: unknown }> {
+ let res = response;
+ let err = error;
+
+ for (const hook of this.afterErrorHooks) {
+ const result = await hook.afterError(hookCtx, res, err);
+ res = result.response;
+ err = result.error;
+ }
+
+ return { response: res, error: err };
+ }
+}
diff --git a/typescript/src/hooks/index.ts b/typescript/src/hooks/index.ts
new file mode 100644
index 0000000000..3df03930d2
--- /dev/null
+++ b/typescript/src/hooks/index.ts
@@ -0,0 +1,6 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export * from "./types";
+export * from "./hooks";
diff --git a/typescript/src/hooks/types.ts b/typescript/src/hooks/types.ts
new file mode 100644
index 0000000000..62f8e14292
--- /dev/null
+++ b/typescript/src/hooks/types.ts
@@ -0,0 +1,74 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { HTTPClient } from "../lib/http";
+
+export type HookContext = {
+ operationID: string;
+ oAuth2Scopes?: string[];
+ securitySource?: any | (() => Promise<any>);
+};
+
+export type Awaitable<T> = T | Promise<T>;
+
+export type SDKInitOptions = {
+ baseURL: URL | null;
+ client: HTTPClient;
+};
+export type BeforeRequestContext = HookContext & {};
+export type AfterSuccessContext = HookContext & {};
+export type AfterErrorContext = HookContext & {};
+
+/**
+ * SDKInitHook is called when the SDK is initializing. The
+ * hook can return a new baseURL and HTTP client to be used by the SDK.
+ */
+export interface SDKInitHook {
+ sdkInit: (opts: SDKInitOptions) => SDKInitOptions;
+}
+
+/**
+ * BeforeRequestHook is called before the SDK sends a request. The hook can
+ * modify the request before it is sent or throw an error to stop the request
+ * from being sent.
+ */
+export interface BeforeRequestHook {
+ beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable<Request>;
+}
+
+/**
+ * AfterSuccessHook is called after the SDK receives a response. The hook can
+ * modify the response before it is handled or throw an error to stop the
+ * response from being handled.
+ */
+export interface AfterSuccessHook {
+ afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable<Response>;
+}
+
+/**
+ * AfterErrorHook is called after the SDK encounters an error, or a
+ * non-successful response. The hook can modify the response if available
+ * otherwise modify the error.
+ */
+export interface AfterErrorHook {
+ afterError: (
+ hookCtx: AfterErrorContext,
+ response: Response | null,
+ error: unknown
+ ) => Awaitable<{
+ response: Response | null;
+ error: unknown;
+ }>;
+}
+
+export interface Hooks {
+ /** Registers a hook to be used by the SDK for initialization event. */
+ registerSDKInitHook(hook: SDKInitHook): void;
+ /** Registers a hook to be used by the SDK for the before request event. */
+ registerBeforeRequestHook(hook: BeforeRequestHook): void;
+ /** Registers a hook to be used by the SDK for the after success event. */
+ registerAfterSuccessHook(hook: AfterSuccessHook): void;
+ /** Registers a hook to be used by the SDK for the after error event. */
+ registerAfterErrorHook(hook: AfterErrorHook): void;
+}
diff --git a/typescript/src/index.ts b/typescript/src/index.ts
new file mode 100644
index 0000000000..32044ebab0
--- /dev/null
+++ b/typescript/src/index.ts
@@ -0,0 +1,6 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export * from "./sdk";
+export * from "./lib/config";
diff --git a/typescript/src/lib/base64.ts b/typescript/src/lib/base64.ts
new file mode 100644
index 0000000000..cda0764118
--- /dev/null
+++ b/typescript/src/lib/base64.ts
@@ -0,0 +1,37 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+export function bytesToBase64(u8arr: Uint8Array): string {
+ return btoa(String.fromCodePoint(...u8arr));
+}
+
+export function bytesFromBase64(encoded: string): Uint8Array {
+ return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0));
+}
+
+export function stringToBytes(str: string): Uint8Array {
+ return new TextEncoder().encode(str);
+}
+
+export function stringFromBytes(u8arr: Uint8Array): string {
+ return new TextDecoder().decode(u8arr);
+}
+
+export function stringToBase64(str: string): string {
+ return bytesToBase64(stringToBytes(str));
+}
+
+export function stringFromBase64(b64str: string): string {
+ return stringFromBytes(bytesFromBase64(b64str));
+}
+
+export const zodOutbound = z
+ .instanceof(Uint8Array)
+ .or(z.string().transform(stringToBytes));
+
+export const zodInbound = z
+ .instanceof(Uint8Array)
+ .or(z.string().transform(bytesFromBase64));
diff --git a/typescript/src/lib/config.ts b/typescript/src/lib/config.ts
new file mode 100644
index 0000000000..801d217f7c
--- /dev/null
+++ b/typescript/src/lib/config.ts
@@ -0,0 +1,60 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { HTTPClient } from "./http";
+import { RetryConfig } from "./retries";
+import { pathToFunc } from "./url";
+
+/**
+ * Contains the list of servers available to the SDK
+ */
+export const ServerList = [
+ /**
+ * Production API
+ */
+ "https://api.dub.co",
+] as const;
+
+export type SDKOptions = {
+ bearerToken?: string | (() => Promise<string>);
+
+ httpClient?: HTTPClient;
+ /**
+ * Allows overriding the default server used by the SDK
+ */
+ serverIdx?: number;
+ /**
+ * Allows overriding the default server URL used by the SDK
+ */
+ serverURL?: string;
+ /**
+ * Allows overriding the default retry config used by the SDK
+ */
+ retryConfig?: RetryConfig;
+};
+
+export function serverURLFromOptions(options: SDKOptions): URL | null {
+ let serverURL = options.serverURL;
+
+ const params: Record<string, string> = {};
+
+ if (!serverURL) {
+ const serverIdx = options.serverIdx ?? 0;
+ if (serverIdx < 0 || serverIdx >= ServerList.length) {
+ throw new Error(`Invalid server index ${serverIdx}`);
+ }
+ serverURL = ServerList[serverIdx] || "";
+ }
+
+ const u = pathToFunc(serverURL)(params);
+ return new URL(u);
+}
+
+export const SDK_METADATA = Object.freeze({
+ language: "typescript",
+ openapiDocVersion: "0.0.1",
+ sdkVersion: "0.0.1",
+ genVersion: "2.292.0",
+ userAgent: "speakeasy-sdk/typescript 0.0.1 2.292.0 0.0.1 dub-node",
+});
diff --git a/typescript/src/lib/encodings.ts b/typescript/src/lib/encodings.ts
new file mode 100644
index 0000000000..71ce003ffe
--- /dev/null
+++ b/typescript/src/lib/encodings.ts
@@ -0,0 +1,384 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { bytesToBase64 } from "./base64";
+
+export class EncodingError extends Error {
+ constructor(message: string) {
+ super(message);
+ this.name = "EncodingError";
+ }
+}
+
+export function encodeMatrix(
+ key: string,
+ value: unknown,
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
+) {
+ let out = "";
+ const pairs: [string, unknown][] = options?.explode
+ ? explode(key, value)
+ : [[key, value]];
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+ const encodeValue = (v: unknown) => encodeString(serializeValue(v));
+
+ pairs.forEach(([pk, pv]) => {
+ let tmp = "";
+ let encValue = "";
+
+ if (pv === undefined) {
+ return;
+ } else if (Array.isArray(pv)) {
+ encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(",");
+ } else if (isPlainObject(pv)) {
+ encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => {
+ return `,${encodeString(k)},${encodeValue(v)}`;
+ }).join("");
+ encValue = encValue.slice(1);
+ } else {
+ encValue = `${encodeValue(pv)}`;
+ }
+
+ const keyPrefix = encodeString(pk);
+ tmp = `${keyPrefix}=${encValue}`;
+ // trim trailing '=' if value was empty
+ if (tmp === `${keyPrefix}=`) {
+ tmp = tmp.slice(0, -1);
+ }
+
+ // If we end up with the nothing then skip forward
+ if (!tmp) {
+ return;
+ }
+
+ out += `;${tmp}`;
+ });
+
+ return out;
+}
+
+export function encodeLabel(
+ key: string,
+ value: unknown,
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
+) {
+ let out = "";
+ const pairs: [string, unknown][] = options?.explode
+ ? explode(key, value)
+ : [[key, value]];
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+ const encodeValue = (v: unknown) => encodeString(serializeValue(v));
+
+ pairs.forEach(([pk, pv]) => {
+ let encValue = "";
+
+ if (pv === undefined) {
+ return;
+ } else if (Array.isArray(pv)) {
+ encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(".");
+ } else if (isPlainObject(pv)) {
+ encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => {
+ return `.${encodeString(k)}.${encodeValue(v)}`;
+ }).join("");
+ encValue = encValue.slice(1);
+ } else {
+ const k =
+ options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : "";
+ encValue = `${k}${encodeValue(pv)}`;
+ }
+
+ out += `.${encValue}`;
+ });
+
+ return out;
+}
+
+function formEncoder(sep: string) {
+ return (
+ key: string,
+ value: unknown,
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
+ ) => {
+ let out = "";
+ const pairs: [string, unknown][] = options?.explode
+ ? explode(key, value)
+ : [[key, value]];
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+
+ const encodeValue = (v: unknown) => encodeString(serializeValue(v));
+
+ const encodedSep = encodeString(sep);
+
+ pairs.forEach(([pk, pv]) => {
+ let tmp = "";
+ let encValue = "";
+
+ if (pv === undefined) {
+ return;
+ } else if (Array.isArray(pv)) {
+ encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep);
+ } else if (isPlainObject(pv)) {
+ encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => {
+ return `${encodeString(k)}${encodedSep}${encodeValue(v)}`;
+ }).join(encodedSep);
+ } else {
+ encValue = `${encodeValue(pv)}`;
+ }
+
+ tmp = `${encodeString(pk)}=${encValue}`;
+
+ // If we end up with the nothing then skip forward
+ if (!tmp || tmp === "=") {
+ return;
+ }
+
+ out += `&${tmp}`;
+ });
+
+ return out.slice(1);
+ };
+}
+
+export const encodeForm = formEncoder(",");
+export const encodeSpaceDelimited = formEncoder(" ");
+export const encodePipeDelimited = formEncoder("|");
+
+export function encodeBodyForm(
+ key: string,
+ value: unknown,
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
+) {
+ let out = "";
+ const pairs: [string, unknown][] = options?.explode
+ ? explode(key, value)
+ : [[key, value]];
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+
+ const encodeValue = (v: unknown) => encodeString(serializeValue(v));
+
+ pairs.forEach(([pk, pv]) => {
+ let tmp = "";
+ let encValue = "";
+
+ if (pv === undefined) {
+ return;
+ } else if (Array.isArray(pv)) {
+ encValue = JSON.stringify(pv, jsonReplacer);
+ } else if (isPlainObject(pv)) {
+ encValue = JSON.stringify(pv, jsonReplacer);
+ } else {
+ encValue = `${encodeValue(pv)}`;
+ }
+
+ tmp = `${encodeString(pk)}=${encValue}`;
+
+ // If we end up with the nothing then skip forward
+ if (!tmp || tmp === "=") {
+ return;
+ }
+
+ out += `&${tmp}`;
+ });
+
+ return out.slice(1);
+}
+
+export function encodeDeepObject(
+ key: string,
+ value: unknown,
+ options?: { charEncoding?: "percent" | "none" },
+) {
+ if (value == null) {
+ return "";
+ }
+
+ let out = "";
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+
+ if (!isPlainObject(value)) {
+ throw new EncodingError(
+ `Value of parameter '${key}' which uses deepObject encoding must be an object`,
+ );
+ }
+
+ Object.entries(value).forEach(([ck, cv]) => {
+ if (cv === undefined) {
+ return;
+ }
+
+ const pk = `${key}[${ck}]`;
+
+ if (isPlainObject(cv)) {
+ throw new EncodingError(
+ `Value of parameter field '${pk}' cannot be an array or object.`,
+ );
+ }
+
+ const pairs: unknown[] = Array.isArray(cv) ? cv : [cv];
+ let encoded = "";
+
+ encoded = mapDefined(pairs, (v) => {
+ return `${encodeString(pk)}=${encodeString(serializeValue(v))}`;
+ }).join("&");
+
+ out += `&${encoded}`;
+ });
+
+ return out.slice(1);
+}
+
+export function encodeJSON(
+ key: string,
+ value: unknown,
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
+) {
+ if (typeof value === "undefined") {
+ return "";
+ }
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+
+ const encVal = encodeString(JSON.stringify(value, jsonReplacer));
+
+ return options?.explode ? encVal : `${encodeString(key)}=${encVal}`;
+}
+
+export const encodeSimple = (
+ key: string,
+ value: unknown,
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
+) => {
+ let out = "";
+ const pairs: [string, unknown][] = options?.explode
+ ? explode(key, value)
+ : [[key, value]];
+
+ const encodeString = (v: string) => {
+ return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
+ };
+ const encodeValue = (v: unknown) => encodeString(serializeValue(v));
+
+ pairs.forEach(([pk, pv]) => {
+ let tmp = "";
+
+ if (pv === undefined) {
+ return;
+ } else if (Array.isArray(pv)) {
+ tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(",");
+ } else if (isPlainObject(pv)) {
+ tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => {
+ return `,${encodeString(k)},${encodeValue(v)}`;
+ }).join("");
+ tmp = tmp.slice(1);
+ } else {
+ const k = options?.explode && isPlainObject(value) ? `${pk}=` : "";
+ tmp = `${k}${encodeValue(pv)}`;
+ }
+
+ // If we end up with the nothing then skip forward
+ if (!tmp) {
+ return;
+ }
+
+ out += `,${tmp}`;
+ });
+
+ return out.slice(1);
+};
+
+function explode(key: string, value: unknown): [string, unknown][] {
+ if (Array.isArray(value)) {
+ return value.map((v) => [key, v]);
+ } else if (isPlainObject(value)) {
+ const o = value ?? {};
+ return Object.entries(o).map(([k, v]) => [k, v]);
+ } else {
+ return [[key, value]];
+ }
+}
+
+function isPlainObject(value: unknown): value is object {
+ if (typeof value !== "object" || value == null) return false;
+ const proto = Object.getPrototypeOf(value);
+ return proto === null || proto === Object.prototype;
+}
+
+function serializeValue(value: unknown): string {
+ if (value === null) {
+ return "null";
+ } else if (typeof value === "undefined") {
+ return "";
+ } else if (value instanceof Date) {
+ return value.toISOString();
+ } else if (value instanceof Uint8Array) {
+ return bytesToBase64(value);
+ } else if (typeof value === "object") {
+ return JSON.stringify(value, jsonReplacer);
+ }
+
+ return `${value}`;
+}
+
+function jsonReplacer(_: string, value: unknown) {
+ if (value instanceof Uint8Array) {
+ return bytesToBase64(value);
+ } else {
+ return value;
+ }
+}
+
+function mapDefined<T, R>(inp: T[], mapper: (v: T) => R): R[] {
+ return inp.reduce<R[]>((acc, v) => {
+ if (v === undefined) {
+ return acc;
+ }
+
+ const m = mapper(v);
+ if (m === undefined) {
+ return acc;
+ }
+
+ acc.push(m);
+
+ return acc;
+ }, []);
+}
+
+function mapDefinedEntries<K, V, R>(
+ inp: Iterable<[K, V]>,
+ mapper: (v: [K, V]) => R,
+): R[] {
+ const acc: R[] = [];
+ for (const [k, v] of inp) {
+ if (v === undefined) {
+ continue;
+ }
+
+ const m = mapper([k, v]);
+ if (m === undefined) {
+ continue;
+ }
+
+ acc.push(m);
+ }
+
+ return acc;
+}
diff --git a/typescript/src/lib/http.ts b/typescript/src/lib/http.ts
new file mode 100644
index 0000000000..45ef1344fa
--- /dev/null
+++ b/typescript/src/lib/http.ts
@@ -0,0 +1,215 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export type Fetcher = (
+ input: RequestInfo | URL,
+ init?: RequestInit,
+) => Promise<Response>;
+
+type Awaitable<T> = T | Promise<T>;
+
+const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init);
+
+export interface HTTPClientOptions {
+ fetcher?: Fetcher;
+}
+
+type BeforeRequestHook = (req: Request) => Awaitable<Request | void>;
+type RequestErrorHook = (err: unknown, req: Request) => Awaitable<void>;
+type ResponseHook = (res: Response, req: Request) => Awaitable<void>;
+
+export class HTTPClient {
+ private fetcher: Fetcher;
+ private requestHooks: BeforeRequestHook[] = [];
+ private requestErrorHooks: RequestErrorHook[] = [];
+ private responseHooks: ResponseHook[] = [];
+
+ constructor(private options: HTTPClientOptions = {}) {
+ this.fetcher = options.fetcher || DEFAULT_FETCHER;
+ }
+
+ async request(request: Request): Promise<Response> {
+ let req = request;
+ for (const hook of this.requestHooks) {
+ const nextRequest = await hook(req);
+ if (nextRequest) {
+ req = nextRequest;
+ }
+ }
+
+ try {
+ const res = await this.fetcher(req);
+
+ for (const hook of this.responseHooks) {
+ await hook(res, req);
+ }
+
+ return res;
+ } catch (err) {
+ for (const hook of this.requestErrorHooks) {
+ await hook(err, req);
+ }
+
+ throw err;
+ }
+ }
+
+ /**
+ * Registers a hook that is called before a request is made. The hook function
+ * can mutate the request or return a new request. This may be useful to add
+ * additional information to request such as request IDs and tracing headers.
+ */
+ addHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
+ /**
+ * Registers a hook that is called when a request cannot be made due to a
+ * network error.
+ */
+ addHook(hook: "requestError", fn: RequestErrorHook): this;
+ /**
+ * Registers a hook that is called when a response has been received from the
+ * server.
+ */
+ addHook(hook: "response", fn: ResponseHook): this;
+ addHook(
+ ...args:
+ | [hook: "beforeRequest", fn: BeforeRequestHook]
+ | [hook: "requestError", fn: RequestErrorHook]
+ | [hook: "response", fn: ResponseHook]
+ ) {
+ if (args[0] === "beforeRequest") {
+ this.requestHooks.push(args[1]);
+ } else if (args[0] === "requestError") {
+ this.requestErrorHooks.push(args[1]);
+ } else if (args[0] === "response") {
+ this.responseHooks.push(args[1]);
+ } else {
+ throw new Error(`Invalid hook type: ${args[0]}`);
+ }
+ return this;
+ }
+
+ /** Removes a hook that was previously registered with `addHook`. */
+ removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
+ /** Removes a hook that was previously registered with `addHook`. */
+ removeHook(hook: "requestError", fn: RequestErrorHook): this;
+ /** Removes a hook that was previously registered with `addHook`. */
+ removeHook(hook: "response", fn: ResponseHook): this;
+ removeHook(
+ ...args:
+ | [hook: "beforeRequest", fn: BeforeRequestHook]
+ | [hook: "requestError", fn: RequestErrorHook]
+ | [hook: "response", fn: ResponseHook]
+ ) {
+ let target: unknown[];
+ if (args[0] === "beforeRequest") {
+ target = this.requestHooks;
+ } else if (args[0] === "requestError") {
+ target = this.requestErrorHooks;
+ } else if (args[0] === "response") {
+ target = this.responseHooks;
+ } else {
+ throw new Error(`Invalid hook type: ${args[0]}`);
+ }
+
+ const index = target.findIndex((v) => v === args[1]);
+ if (index >= 0) {
+ target.splice(index, 1);
+ }
+
+ return this;
+ }
+
+ clone() {
+ const child = new HTTPClient(this.options);
+ child.requestHooks = this.requestHooks.slice();
+ child.requestErrorHooks = this.requestErrorHooks.slice();
+ child.responseHooks = this.responseHooks.slice();
+
+ return child;
+ }
+}
+
+export function matchContentType(response: Response, pattern: string): boolean {
+ if (pattern === "*" || pattern === "*/*") {
+ return true;
+ }
+
+ const contentType =
+ response.headers.get("content-type") ?? "application/octet-stream";
+
+ const idx = contentType.split(";").findIndex((raw) => {
+ const ctype = raw.trim();
+ if (ctype === pattern) {
+ return true;
+ }
+
+ const parts = ctype.split("/");
+ if (parts.length !== 2) {
+ return false;
+ }
+
+ return `${parts[0]}/*` === pattern || `*/${parts[1]}` === pattern;
+ });
+
+ return idx >= 0;
+}
+
+const codeRangeRE = new RegExp("^[0-9]xx$", "i");
+
+export function matchStatusCode(
+ response: Response,
+ codes: number | string | (number | string)[],
+) {
+ const actual = `${response.status}`;
+ const expectedCodes = Array.isArray(codes) ? codes : [codes];
+ if (!expectedCodes.length) {
+ return false;
+ }
+
+ return expectedCodes.some((ec) => {
+ const code = `${ec}`;
+
+ if (code === "default") {
+ return true;
+ }
+
+ if (!codeRangeRE.test(`${code}`)) {
+ return code === actual;
+ }
+
+ const expectFamily = code.charAt(0);
+ if (!expectFamily) {
+ throw new Error("Invalid status code range");
+ }
+
+ const actualFamily = actual.charAt(0);
+ if (!actualFamily) {
+ throw new Error(`Invalid response status code: ${actual}`);
+ }
+
+ return actualFamily === expectFamily;
+ });
+}
+
+export function matchResponse(
+ response: Response,
+ code: number | string | (number | string)[],
+ contentTypePattern: string,
+): boolean {
+ return (
+ matchStatusCode(response, code) &&
+ matchContentType(response, contentTypePattern)
+ );
+}
+
+const headerValRE = /, */;
+export function unpackHeaders(headers: Headers): Record<string, string[]> {
+ const out: Record<string, string[]> = {};
+
+ for (const [k, v] of headers.entries()) {
+ out[k] = v.split(headerValRE);
+ }
+
+ return out;
+}
diff --git a/typescript/src/lib/retries.ts b/typescript/src/lib/retries.ts
new file mode 100644
index 0000000000..ed9b495952
--- /dev/null
+++ b/typescript/src/lib/retries.ts
@@ -0,0 +1,226 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export type BackoffStrategy = {
+ initialInterval: number;
+ maxInterval: number;
+ exponent: number;
+ maxElapsedTime: number;
+};
+
+const defaultBackoff: BackoffStrategy = {
+ initialInterval: 500,
+ maxInterval: 60000,
+ exponent: 1.5,
+ maxElapsedTime: 3600000,
+};
+
+export type RetryConfig =
+ | { strategy: "none" }
+ | {
+ strategy: "backoff";
+ backoff?: BackoffStrategy;
+ retryConnectionErrors?: boolean;
+ };
+
+class PermanentError extends Error {
+ inner: unknown;
+
+ constructor(inner: unknown) {
+ super("Permanent error");
+ this.inner = inner;
+
+ Object.setPrototypeOf(this, PermanentError.prototype);
+ }
+}
+
+class TemporaryError extends Error {
+ res: Response;
+
+ constructor(res: Response) {
+ super("Temporary error");
+ this.res = res;
+
+ Object.setPrototypeOf(this, TemporaryError.prototype);
+ }
+}
+
+export async function retry(
+ fetchFn: () => Promise<Response>,
+ options: {
+ config: RetryConfig;
+ statusCodes: string[];
+ },
+): Promise<Response> {
+ switch (options.config.strategy) {
+ case "backoff":
+ return retryBackoff(
+ wrapFetcher(fetchFn, {
+ statusCodes: options.statusCodes,
+ retryConnectionErrors: !!options.config.retryConnectionErrors,
+ }),
+ options.config.backoff ?? defaultBackoff,
+ );
+ default:
+ return await fetchFn();
+ }
+}
+
+function wrapFetcher(
+ fn: () => Promise<Response>,
+ options: {
+ statusCodes: string[];
+ retryConnectionErrors: boolean;
+ },
+): () => Promise<Response> {
+ return async () => {
+ try {
+ const res = await fn();
+ if (isRetryableResponse(res, options.statusCodes)) {
+ throw new TemporaryError(res);
+ }
+
+ return res;
+ } catch (err) {
+ if (err instanceof TemporaryError) {
+ throw err;
+ }
+
+ if (
+ options.retryConnectionErrors &&
+ (isTimeoutError(err) || isConnectionError(err))
+ ) {
+ throw err;
+ }
+
+ throw new PermanentError(err);
+ }
+ };
+}
+
+function isConnectionError(err: unknown) {
+ if (typeof err !== "object" || err == null) {
+ return false;
+ }
+
+ // Covers fetch in Deno as well
+ const isBrowserErr =
+ err instanceof TypeError &&
+ err.message.toLowerCase().startsWith("failed to fetch");
+
+ const isNodeErr =
+ err instanceof TypeError &&
+ err.message.toLowerCase().startsWith("fetch failed");
+
+ const isBunErr = "name" in err && err.name === "ConnectionError";
+
+ const isGenericErr =
+ "code" in err &&
+ typeof err.code === "string" &&
+ err.code.toLowerCase() === "econnreset";
+
+ return isBrowserErr || isNodeErr || isGenericErr || isBunErr;
+}
+
+function isTimeoutError(err: unknown) {
+ if (typeof err !== "object" || err == null) {
+ return false;
+ }
+
+ // Fetch in browser, Node.js, Bun, Deno
+ const isNative = "name" in err && err.name === "TimeoutError";
+
+ // Node.js HTTP client and Axios
+ const isGenericErr =
+ "code" in err &&
+ typeof err.code === "string" &&
+ err.code.toLowerCase() === "econnaborted";
+
+ return isNative || isGenericErr;
+}
+
+const codeRangeRE = new RegExp("^[0-9]xx$", "i");
+
+function isRetryableResponse(res: Response, statusCodes: string[]): boolean {
+ const actual = `${res.status}`;
+
+ return statusCodes.some((code) => {
+ if (!codeRangeRE.test(code)) {
+ return code === actual;
+ }
+
+ const expectFamily = code.charAt(0);
+ if (!expectFamily) {
+ throw new Error("Invalid status code range");
+ }
+
+ const actualFamily = actual.charAt(0);
+ if (!actualFamily) {
+ throw new Error(`Invalid response status code: ${actual}`);
+ }
+
+ return actualFamily === expectFamily;
+ });
+}
+
+async function retryBackoff(
+ fn: () => Promise<Response>,
+ strategy: BackoffStrategy,
+): Promise<Response> {
+ const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy;
+
+ const start = Date.now();
+ let x = 0;
+
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ try {
+ const res = await fn();
+ return res;
+ } catch (err) {
+ if (err instanceof PermanentError) {
+ throw err.inner;
+ }
+ const elapsed = Date.now() - start;
+ if (elapsed > maxElapsedTime) {
+ if (err instanceof TemporaryError) {
+ return err.res;
+ }
+
+ throw err;
+ }
+
+ let retryInterval = 0;
+ if (err instanceof TemporaryError && err.res && err.res.headers) {
+ const retryVal = err.res.headers.get("retry-after") || "";
+ if (retryVal != "") {
+ const parsedNumber = Number(retryVal);
+ if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) {
+ retryInterval = parsedNumber * 1000;
+ } else {
+ const parsedDate = Date.parse(retryVal);
+ if (!isNaN(parsedDate)) {
+ const deltaMS = parsedDate - Date.now();
+ retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0;
+ }
+ }
+ }
+ }
+
+ if (retryInterval == 0) {
+ retryInterval =
+ initialInterval * Math.pow(x, exponent) + Math.random() * 1000;
+ }
+
+ const d = Math.min(retryInterval, maxInterval);
+
+ await delay(d);
+ x++;
+ }
+ }
+}
+
+async function delay(delay: number): Promise<void> {
+ return new Promise((resolve) => setTimeout(resolve, delay));
+}
diff --git a/typescript/src/lib/schemas.ts b/typescript/src/lib/schemas.ts
new file mode 100644
index 0000000000..63ad0ae96a
--- /dev/null
+++ b/typescript/src/lib/schemas.ts
@@ -0,0 +1,22 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { ZodError } from "zod";
+import * as errors from "../models/errors";
+
+/**
+ * Utility function that executes some code which may throw a ZodError. It
+ * intercepts this error and converts it to an SDKValidationError so as to not
+ * leak Zod implementation details to user code.
+ */
+export function parse<Inp, Out>(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out {
+ try {
+ return fn(rawValue);
+ } catch (err) {
+ if (err instanceof ZodError) {
+ throw new errors.SDKValidationError(errorMessage, err, rawValue);
+ }
+ throw err;
+ }
+}
diff --git a/typescript/src/lib/sdks.ts b/typescript/src/lib/sdks.ts
new file mode 100644
index 0000000000..e432c07d28
--- /dev/null
+++ b/typescript/src/lib/sdks.ts
@@ -0,0 +1,139 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { HTTPClient, matchResponse, matchStatusCode, unpackHeaders } from "./http";
+import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security";
+import { pathToFunc } from "./url";
+import { encodeForm } from "./encodings";
+import { stringToBase64 } from "./base64";
+import { SDKHooks, HookContext } from "../hooks";
+
+export type RequestOptions = {
+ fetchOptions?: Omit<RequestInit, "method" | "body">;
+};
+
+type RequestConfig = {
+ method: string;
+ path: string;
+ baseURL?: string | URL;
+ query?: string;
+ body?: RequestInit["body"];
+ headers?: HeadersInit;
+ security?: SecurityState | null;
+};
+
+export class ClientSDK {
+ private readonly client: HTTPClient;
+ protected readonly baseURL: URL | null;
+ protected readonly hooks$: SDKHooks;
+
+ constructor(init: { client: HTTPClient; baseURL: URL | null; hooks: SDKHooks }) {
+ const url = init.baseURL;
+ if (url) {
+ url.pathname = url.pathname.replace(/\/+$/, "") + "/";
+ }
+
+ this.hooks$ = init.hooks;
+ const { baseURL, client } = this.hooks$.sdkInit({ baseURL: url, client: init.client });
+ this.baseURL = baseURL;
+ this.client = client;
+ }
+
+ protected createRequest$(conf: RequestConfig, options?: RequestOptions) {
+ const { method, path, query, headers: opHeaders, security } = conf;
+
+ const base = conf.baseURL ?? this.baseURL;
+ if (!base) {
+ throw new TypeError("No base URL provided for operation");
+ }
+ const reqURL = new URL(base);
+ const inputURL = new URL(path, reqURL);
+
+ if (path) {
+ reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
+ }
+
+ let finalQuery = query || "";
+
+ const secQuery: string[] = [];
+ for (const [k, v] of Object.entries(security?.queryParams || {})) {
+ secQuery.push(encodeForm(k, v, { charEncoding: "percent" }));
+ }
+ if (secQuery.length) {
+ finalQuery += `&${secQuery.join("&")}`;
+ }
+
+ if (finalQuery) {
+ const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery;
+ reqURL.search = `?${q}`;
+ }
+
+ const headers = new Headers(opHeaders);
+
+ const username = security?.basic.username;
+ const password = security?.basic.password;
+ if (username != null || password != null) {
+ const encoded = stringToBase64([username || "", password || ""].join(":"));
+ headers.set("Authorization", `Basic ${encoded}`);
+ }
+
+ const securityHeaders = new Headers(security?.headers || {});
+ for (const [k, v] of securityHeaders) {
+ headers.set(k, v);
+ }
+
+ let cookie = headers.get("cookie") || "";
+ for (const [k, v] of Object.entries(security?.cookies || {})) {
+ cookie += `; ${k}=${v}`;
+ }
+ cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
+ headers.set("cookie", cookie);
+
+ const userHeaders = new Headers(options?.fetchOptions?.headers);
+ for (const [k, v] of userHeaders) {
+ headers.set(k, v);
+ }
+
+ return new Request(reqURL, {
+ ...options?.fetchOptions,
+ body: conf.body ?? null,
+ headers,
+ method,
+ });
+ }
+
+ protected async do$(
+ req: Request,
+ options: {
+ context: HookContext;
+ errorCodes: number | string | (number | string)[];
+ }
+ ) {
+ const { context, errorCodes } = options;
+
+ let response = await this.client.request(await this.hooks$.beforeRequest(context, req));
+
+ if (this.matchStatusCode(response, errorCodes)) {
+ const result = await this.hooks$.afterError(context, response, null);
+ if (result.error) {
+ throw result.error;
+ }
+ response = result.response || response;
+ } else {
+ response = await this.hooks$.afterSuccess(context, response);
+ }
+
+ return response;
+ }
+
+ protected unpackHeaders = unpackHeaders;
+
+ protected matchStatusCode = matchStatusCode;
+ protected matchResponse = matchResponse;
+
+ protected templateURLComponent = pathToFunc;
+
+ protected resolveSecurity = resolveSecurity;
+ protected resolveGlobalSecurity = resolveGlobalSecurity;
+}
diff --git a/typescript/src/lib/security.ts b/typescript/src/lib/security.ts
new file mode 100644
index 0000000000..8d9c44b8d7
--- /dev/null
+++ b/typescript/src/lib/security.ts
@@ -0,0 +1,181 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../models/components";
+
+export enum SecurityErrorCode {
+ Incomplete = "incomplete",
+ UnrecognisedSecurityType = "unrecognized_security_type",
+}
+
+export class SecurityError extends Error {
+ constructor(public code: SecurityErrorCode, message: string) {
+ super(message);
+ this.name = "SecurityError";
+ }
+
+ static incomplete(): SecurityError {
+ return new SecurityError(
+ SecurityErrorCode.Incomplete,
+ "Security requirements not met in order to perform the operation"
+ );
+ }
+ static unrecognizedType(type: string): SecurityError {
+ return new SecurityError(
+ SecurityErrorCode.UnrecognisedSecurityType,
+ `Unrecognised security type: ${type}`
+ );
+ }
+}
+
+export type SecurityState = {
+ basic: { username?: string | undefined; password?: string | undefined };
+ headers: Record<string, string>;
+ queryParams: Record<string, string>;
+ cookies: Record<string, string>;
+};
+
+type SecurityInputBasic = {
+ type: "http:basic";
+ value: { username?: string | undefined; password?: string | undefined } | null | undefined;
+};
+
+type SecurityInputBearer = {
+ type: "http:bearer";
+ value: string | null | undefined;
+ fieldName: string;
+};
+
+type SecurityInputAPIKey = {
+ type: "apiKey:header" | "apiKey:query" | "apiKey:cookie";
+ value: string | null | undefined;
+ fieldName: string;
+};
+
+type SecurityInputOIDC = {
+ type: "openIdConnect";
+ value: string | null | undefined;
+ fieldName: string;
+};
+
+type SecurityInputOAuth2 = {
+ type: "oauth2";
+ value: string | null | undefined;
+ fieldName: string;
+};
+
+type SecurityInputOAuth2ClientCredentials = {
+ type: "oauth2:client_credentials";
+ value: string | null | undefined;
+ fieldName: "clientID" | "clientSecret";
+};
+
+export type SecurityInput =
+ | SecurityInputBasic
+ | SecurityInputBearer
+ | SecurityInputAPIKey
+ | SecurityInputOAuth2
+ | SecurityInputOAuth2ClientCredentials
+ | SecurityInputOIDC;
+
+export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null {
+ const state: SecurityState = {
+ basic: { username: "", password: "" },
+ headers: {},
+ queryParams: {},
+ cookies: {},
+ };
+
+ const option = options.find((opts) => {
+ return opts.every((o) => {
+ switch (true) {
+ case o.value == null:
+ return false;
+ case o.type === "http:basic":
+ return o.value.username != null || o.value.password != null;
+ case typeof o.value === "string":
+ return !!o.value;
+ default:
+ throw new Error(
+ `Unrecognized security type: ${o.type} (value type: ${typeof o.value})`
+ );
+ }
+ });
+ });
+ if (option == null) {
+ return null;
+ }
+
+ option.forEach((spec) => {
+ if (spec.value == null) {
+ return;
+ }
+
+ const { type } = spec;
+
+ switch (type) {
+ case "apiKey:header":
+ state.headers[spec.fieldName] = spec.value;
+ break;
+ case "apiKey:query":
+ state.queryParams[spec.fieldName] = spec.value;
+ break;
+ case "apiKey:cookie":
+ state.cookies[spec.fieldName] = spec.value;
+ break;
+ case "http:basic":
+ applyBasic(state, spec);
+ break;
+ case "http:bearer":
+ applyBearer(state, spec);
+ break;
+ case "oauth2":
+ applyBearer(state, spec);
+ break;
+ case "oauth2:client_credentials":
+ break;
+ case "openIdConnect":
+ applyBearer(state, spec);
+ break;
+ default:
+ spec satisfies never;
+ throw SecurityError.unrecognizedType(type);
+ }
+ });
+
+ return state;
+}
+
+function applyBasic(state: SecurityState, spec: SecurityInputBasic) {
+ if (spec.value == null) {
+ return;
+ }
+
+ state.basic = spec.value;
+}
+
+function applyBearer(
+ state: SecurityState,
+ spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC
+) {
+ if (spec.value == null) {
+ return;
+ }
+
+ let value = spec.value;
+ if (value.slice(0, 7).toLowerCase() !== "bearer ") {
+ value = `Bearer ${value}`;
+ }
+
+ state.headers[spec.fieldName] = value;
+}
+export function resolveGlobalSecurity(security: Partial<components.Security> | null | undefined) {
+ return resolveSecurity([
+ {
+ fieldName: "Authorization",
+ type: "http:bearer",
+ value: security?.bearerToken,
+ },
+ ]);
+}
diff --git a/typescript/src/lib/url.ts b/typescript/src/lib/url.ts
new file mode 100644
index 0000000000..3fc4eccf8a
--- /dev/null
+++ b/typescript/src/lib/url.ts
@@ -0,0 +1,31 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+const hasOwn = Object.prototype.hasOwnProperty;
+
+export function pathToFunc(
+ pathPattern: string,
+ options?: { charEncoding?: "percent" | "none" },
+): (params?: Record<string, string | number>) => string {
+ const paramRE = /\{([a-zA-Z0-9_]+?)\}/g;
+
+ return function buildURLPath(params: Record<string, unknown> = {}): string {
+ return pathPattern.replace(paramRE, function (_, placeholder) {
+ if (!hasOwn.call(params, placeholder)) {
+ throw new Error(`Parameter '${placeholder}' is required`);
+ }
+
+ const value = params[placeholder];
+ if (typeof value !== "string" && typeof value !== "number") {
+ throw new Error(
+ `Parameter '${placeholder}' must be a string or number`,
+ );
+ }
+
+ return options?.charEncoding === "percent"
+ ? encodeURIComponent(`${value}`)
+ : `${value}`;
+ });
+ };
+}
diff --git a/typescript/src/models/components/httpmetadata.ts b/typescript/src/models/components/httpmetadata.ts
new file mode 100644
index 0000000000..59a9fd64d8
--- /dev/null
+++ b/typescript/src/models/components/httpmetadata.ts
@@ -0,0 +1,57 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+export type HTTPMetadata = {
+ /**
+ * Raw HTTP response; suitable for custom response parsing
+ */
+ response: Response;
+ /**
+ * Raw HTTP request; suitable for debugging
+ */
+ request: Request;
+};
+
+/** @internal */
+export namespace HTTPMetadata$ {
+ export type Inbound = {
+ Response: Response;
+ Request: Request;
+ };
+
+ export const inboundSchema: z.ZodType<HTTPMetadata, z.ZodTypeDef, Inbound> = z
+ .object({
+ Response: z.instanceof(Response),
+ Request: z.instanceof(Request),
+ })
+ .transform((v) => {
+ return {
+ response: v.Response,
+ request: v.Request,
+ };
+ });
+
+ export type Outbound = {
+ Response: never;
+ Request: never;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, HTTPMetadata> = z
+ .object({
+ response: z.instanceof(Response).transform(() => {
+ throw new Error("Response cannot be serialized");
+ }),
+ request: z.instanceof(Request).transform(() => {
+ throw new Error("Response cannot be serialized");
+ }),
+ })
+ .transform((v) => {
+ return {
+ Response: v.response,
+ Request: v.request,
+ };
+ });
+}
diff --git a/typescript/src/models/components/index.ts b/typescript/src/models/components/index.ts
new file mode 100644
index 0000000000..7856c7d251
--- /dev/null
+++ b/typescript/src/models/components/index.ts
@@ -0,0 +1,9 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export * from "./httpmetadata";
+export * from "./linkschema";
+export * from "./security";
+export * from "./tagschema";
+export * from "./workspaceschema";
diff --git a/typescript/src/models/components/linkschema.ts b/typescript/src/models/components/linkschema.ts
new file mode 100644
index 0000000000..1c1169cb26
--- /dev/null
+++ b/typescript/src/models/components/linkschema.ts
@@ -0,0 +1,368 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { TagSchema, TagSchema$ } from "./tagschema";
+import * as z from "zod";
+
+export type LinkSchema = {
+ /**
+ * The unique ID of the short link.
+ */
+ id: string;
+ /**
+ * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
+ */
+ domain: string;
+ /**
+ * The short link slug. If not provided, a random 7-character slug will be generated.
+ */
+ key: string;
+ /**
+ * The destination URL of the short link.
+ */
+ url: string;
+ /**
+ * Whether the short link is archived.
+ */
+ archived?: boolean | undefined;
+ /**
+ * The date and time when the short link will expire in ISO-8601 format. Must be in the future.
+ */
+ expiresAt: string | null;
+ /**
+ * The password required to access the destination URL of the short link.
+ */
+ password: string | null;
+ /**
+ * Whether the short link uses Custom Social Media Cards feature.
+ */
+ proxy?: boolean | undefined;
+ /**
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ title: string | null;
+ /**
+ * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ description: string | null;
+ /**
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ image: string | null;
+ /**
+ * Whether the short link uses link cloaking.
+ */
+ rewrite?: boolean | undefined;
+ /**
+ * The iOS destination URL for the short link for iOS device targeting.
+ */
+ ios: string | null;
+ /**
+ * The Android destination URL for the short link for Android device targeting.
+ */
+ android: string | null;
+ /**
+ * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
+ */
+ geo: Record<string, string> | null;
+ /**
+ * Whether the short link's stats are publicly accessible.
+ */
+ publicStats?: boolean | undefined;
+ /**
+ * [DEPRECATED] (use `tags` instead): The unique ID of the tag assigned to the short link.
+ *
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ */
+ tagId: string | null;
+ /**
+ * The tags assigned to the short link.
+ */
+ tags: Array<TagSchema> | null;
+ /**
+ * The comments for the short link.
+ */
+ comments: string | null;
+ /**
+ * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
+ */
+ shortLink: string;
+ /**
+ * The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).
+ */
+ qrCode: string;
+ /**
+ * The UTM source of the short link.
+ */
+ utmSource: string | null;
+ /**
+ * The UTM medium of the short link.
+ */
+ utmMedium: string | null;
+ /**
+ * The UTM campaign of the short link.
+ */
+ utmCampaign: string | null;
+ /**
+ * The UTM term of the short link.
+ */
+ utmTerm: string | null;
+ /**
+ * The UTM content of the short link.
+ */
+ utmContent: string | null;
+ /**
+ * The user ID of the creator of the short link.
+ */
+ userId: string;
+ /**
+ * The workspace ID of the short link.
+ */
+ workspaceId: string;
+ /**
+ * The number of clicks on the short link.
+ */
+ clicks?: number | undefined;
+ /**
+ * The date and time when the short link was last clicked.
+ */
+ lastClicked: string | null;
+ /**
+ * The date and time when the short link was created.
+ */
+ createdAt: string;
+ /**
+ * The date and time when the short link was last updated.
+ */
+ updatedAt: string;
+ /**
+ * [DEPRECATED] (use workspaceId instead): The project ID of the short link.
+ *
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ */
+ projectId: string;
+};
+
+/** @internal */
+export namespace LinkSchema$ {
+ export type Inbound = {
+ id: string;
+ domain: string;
+ key: string;
+ url: string;
+ archived?: boolean | undefined;
+ expiresAt: string | null;
+ password: string | null;
+ proxy?: boolean | undefined;
+ title: string | null;
+ description: string | null;
+ image: string | null;
+ rewrite?: boolean | undefined;
+ ios: string | null;
+ android: string | null;
+ geo: Record<string, string> | null;
+ publicStats?: boolean | undefined;
+ tagId: string | null;
+ tags: Array<TagSchema$.Inbound> | null;
+ comments: string | null;
+ shortLink: string;
+ qrCode: string;
+ utm_source: string | null;
+ utm_medium: string | null;
+ utm_campaign: string | null;
+ utm_term: string | null;
+ utm_content: string | null;
+ userId: string;
+ workspaceId: string;
+ clicks?: number | undefined;
+ lastClicked: string | null;
+ createdAt: string;
+ updatedAt: string;
+ projectId: string;
+ };
+
+ export const inboundSchema: z.ZodType<LinkSchema, z.ZodTypeDef, Inbound> = z
+ .object({
+ id: z.string(),
+ domain: z.string(),
+ key: z.string(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z.nullable(z.string()),
+ password: z.nullable(z.string()),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()),
+ description: z.nullable(z.string()),
+ image: z.nullable(z.string()),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()),
+ android: z.nullable(z.string()),
+ geo: z.nullable(z.record(z.string())),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()),
+ tags: z.nullable(z.array(TagSchema$.inboundSchema)),
+ comments: z.nullable(z.string()),
+ shortLink: z.string(),
+ qrCode: z.string(),
+ utm_source: z.nullable(z.string()),
+ utm_medium: z.nullable(z.string()),
+ utm_campaign: z.nullable(z.string()),
+ utm_term: z.nullable(z.string()),
+ utm_content: z.nullable(z.string()),
+ userId: z.string(),
+ workspaceId: z.string(),
+ clicks: z.number().default(0),
+ lastClicked: z.nullable(z.string()),
+ createdAt: z.string(),
+ updatedAt: z.string(),
+ projectId: z.string(),
+ })
+ .transform((v) => {
+ return {
+ id: v.id,
+ domain: v.domain,
+ key: v.key,
+ url: v.url,
+ archived: v.archived,
+ expiresAt: v.expiresAt,
+ password: v.password,
+ proxy: v.proxy,
+ title: v.title,
+ description: v.description,
+ image: v.image,
+ rewrite: v.rewrite,
+ ios: v.ios,
+ android: v.android,
+ geo: v.geo,
+ publicStats: v.publicStats,
+ tagId: v.tagId,
+ tags: v.tags,
+ comments: v.comments,
+ shortLink: v.shortLink,
+ qrCode: v.qrCode,
+ utmSource: v.utm_source,
+ utmMedium: v.utm_medium,
+ utmCampaign: v.utm_campaign,
+ utmTerm: v.utm_term,
+ utmContent: v.utm_content,
+ userId: v.userId,
+ workspaceId: v.workspaceId,
+ clicks: v.clicks,
+ lastClicked: v.lastClicked,
+ createdAt: v.createdAt,
+ updatedAt: v.updatedAt,
+ projectId: v.projectId,
+ };
+ });
+
+ export type Outbound = {
+ id: string;
+ domain: string;
+ key: string;
+ url: string;
+ archived: boolean;
+ expiresAt: string | null;
+ password: string | null;
+ proxy: boolean;
+ title: string | null;
+ description: string | null;
+ image: string | null;
+ rewrite: boolean;
+ ios: string | null;
+ android: string | null;
+ geo: Record<string, string> | null;
+ publicStats: boolean;
+ tagId: string | null;
+ tags: Array<TagSchema$.Outbound> | null;
+ comments: string | null;
+ shortLink: string;
+ qrCode: string;
+ utm_source: string | null;
+ utm_medium: string | null;
+ utm_campaign: string | null;
+ utm_term: string | null;
+ utm_content: string | null;
+ userId: string;
+ workspaceId: string;
+ clicks: number;
+ lastClicked: string | null;
+ createdAt: string;
+ updatedAt: string;
+ projectId: string;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LinkSchema> = z
+ .object({
+ id: z.string(),
+ domain: z.string(),
+ key: z.string(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z.nullable(z.string()),
+ password: z.nullable(z.string()),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()),
+ description: z.nullable(z.string()),
+ image: z.nullable(z.string()),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()),
+ android: z.nullable(z.string()),
+ geo: z.nullable(z.record(z.string())),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()),
+ tags: z.nullable(z.array(TagSchema$.outboundSchema)),
+ comments: z.nullable(z.string()),
+ shortLink: z.string(),
+ qrCode: z.string(),
+ utmSource: z.nullable(z.string()),
+ utmMedium: z.nullable(z.string()),
+ utmCampaign: z.nullable(z.string()),
+ utmTerm: z.nullable(z.string()),
+ utmContent: z.nullable(z.string()),
+ userId: z.string(),
+ workspaceId: z.string(),
+ clicks: z.number().default(0),
+ lastClicked: z.nullable(z.string()),
+ createdAt: z.string(),
+ updatedAt: z.string(),
+ projectId: z.string(),
+ })
+ .transform((v) => {
+ return {
+ id: v.id,
+ domain: v.domain,
+ key: v.key,
+ url: v.url,
+ archived: v.archived,
+ expiresAt: v.expiresAt,
+ password: v.password,
+ proxy: v.proxy,
+ title: v.title,
+ description: v.description,
+ image: v.image,
+ rewrite: v.rewrite,
+ ios: v.ios,
+ android: v.android,
+ geo: v.geo,
+ publicStats: v.publicStats,
+ tagId: v.tagId,
+ tags: v.tags,
+ comments: v.comments,
+ shortLink: v.shortLink,
+ qrCode: v.qrCode,
+ utm_source: v.utmSource,
+ utm_medium: v.utmMedium,
+ utm_campaign: v.utmCampaign,
+ utm_term: v.utmTerm,
+ utm_content: v.utmContent,
+ userId: v.userId,
+ workspaceId: v.workspaceId,
+ clicks: v.clicks,
+ lastClicked: v.lastClicked,
+ createdAt: v.createdAt,
+ updatedAt: v.updatedAt,
+ projectId: v.projectId,
+ };
+ });
+}
diff --git a/typescript/src/models/components/security.ts b/typescript/src/models/components/security.ts
new file mode 100644
index 0000000000..3410f89656
--- /dev/null
+++ b/typescript/src/models/components/security.ts
@@ -0,0 +1,40 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+export type Security = {
+ bearerToken?: string | undefined;
+};
+
+/** @internal */
+export namespace Security$ {
+ export type Inbound = {
+ bearerToken?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<Security, z.ZodTypeDef, Inbound> = z
+ .object({
+ bearerToken: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.bearerToken === undefined ? null : { bearerToken: v.bearerToken }),
+ };
+ });
+
+ export type Outbound = {
+ bearerToken?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Security> = z
+ .object({
+ bearerToken: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.bearerToken === undefined ? null : { bearerToken: v.bearerToken }),
+ };
+ });
+}
diff --git a/typescript/src/models/components/tagschema.ts b/typescript/src/models/components/tagschema.ts
new file mode 100644
index 0000000000..9b01a24548
--- /dev/null
+++ b/typescript/src/models/components/tagschema.ts
@@ -0,0 +1,79 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * The color of the tag.
+ */
+export enum Color {
+ Red = "red",
+ Yellow = "yellow",
+ Green = "green",
+ Blue = "blue",
+ Purple = "purple",
+ Pink = "pink",
+ Brown = "brown",
+}
+
+export type TagSchema = {
+ /**
+ * The unique ID of the tag.
+ */
+ id: string;
+ /**
+ * The name of the tag.
+ */
+ name: string;
+ /**
+ * The color of the tag.
+ */
+ color: Color;
+};
+
+/** @internal */
+export const Color$ = z.nativeEnum(Color);
+
+/** @internal */
+export namespace TagSchema$ {
+ export type Inbound = {
+ id: string;
+ name: string;
+ color: Color;
+ };
+
+ export const inboundSchema: z.ZodType<TagSchema, z.ZodTypeDef, Inbound> = z
+ .object({
+ id: z.string(),
+ name: z.string(),
+ color: Color$,
+ })
+ .transform((v) => {
+ return {
+ id: v.id,
+ name: v.name,
+ color: v.color,
+ };
+ });
+
+ export type Outbound = {
+ id: string;
+ name: string;
+ color: Color;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TagSchema> = z
+ .object({
+ id: z.string(),
+ name: z.string(),
+ color: Color$,
+ })
+ .transform((v) => {
+ return {
+ id: v.id,
+ name: v.name,
+ color: v.color,
+ };
+ });
+}
diff --git a/typescript/src/models/components/workspaceschema.ts b/typescript/src/models/components/workspaceschema.ts
new file mode 100644
index 0000000000..08052f3f09
--- /dev/null
+++ b/typescript/src/models/components/workspaceschema.ts
@@ -0,0 +1,306 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * The plan of the workspace.
+ */
+export enum Plan {
+ Free = "free",
+ Pro = "pro",
+ Business = "business",
+ BusinessPlus = "business plus",
+ BusinessExtra = "business extra",
+ BusinessMax = "business max",
+ Enterprise = "enterprise",
+}
+
+/**
+ * The role of the authenticated user in the workspace.
+ */
+export enum Role {
+ Owner = "owner",
+ Member = "member",
+}
+
+export type Users = {
+ /**
+ * The role of the authenticated user in the workspace.
+ */
+ role: Role;
+};
+
+export type Domains = {
+ /**
+ * The domain of the workspace.
+ */
+ slug: string;
+};
+
+export type WorkspaceSchema = {
+ /**
+ * The unique ID of the workspace.
+ */
+ id: string;
+ /**
+ * The name of the workspace.
+ */
+ name: string;
+ /**
+ * The slug of the workspace.
+ */
+ slug: string;
+ /**
+ * The logo of the workspace.
+ */
+ logo?: string | null | undefined;
+ /**
+ * The usage of the workspace.
+ */
+ usage: number;
+ /**
+ * The usage limit of the workspace.
+ */
+ usageLimit: number;
+ /**
+ * The links usage of the workspace.
+ */
+ linksUsage: number;
+ /**
+ * The links limit of the workspace.
+ */
+ linksLimit: number;
+ /**
+ * The domains limit of the workspace.
+ */
+ domainsLimit: number;
+ /**
+ * The tags limit of the workspace.
+ */
+ tagsLimit: number;
+ /**
+ * The users limit of the workspace.
+ */
+ usersLimit: number;
+ /**
+ * The plan of the workspace.
+ */
+ plan: Plan;
+ /**
+ * The Stripe ID of the workspace.
+ */
+ stripeId: string | null;
+ /**
+ * The date and time when the billing cycle starts for the workspace.
+ */
+ billingCycleStart: number;
+ /**
+ * The date and time when the workspace was created.
+ */
+ createdAt: string;
+ /**
+ * The role of the authenticated user in the workspace.
+ */
+ users: Array<Users>;
+ /**
+ * The domains of the workspace.
+ */
+ domains: Array<Domains>;
+};
+
+/** @internal */
+export const Plan$ = z.nativeEnum(Plan);
+
+/** @internal */
+export const Role$ = z.nativeEnum(Role);
+
+/** @internal */
+export namespace Users$ {
+ export type Inbound = {
+ role: Role;
+ };
+
+ export const inboundSchema: z.ZodType<Users, z.ZodTypeDef, Inbound> = z
+ .object({
+ role: Role$,
+ })
+ .transform((v) => {
+ return {
+ role: v.role,
+ };
+ });
+
+ export type Outbound = {
+ role: Role;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Users> = z
+ .object({
+ role: Role$,
+ })
+ .transform((v) => {
+ return {
+ role: v.role,
+ };
+ });
+}
+
+/** @internal */
+export namespace Domains$ {
+ export type Inbound = {
+ slug: string;
+ };
+
+ export const inboundSchema: z.ZodType<Domains, z.ZodTypeDef, Inbound> = z
+ .object({
+ slug: z.string(),
+ })
+ .transform((v) => {
+ return {
+ slug: v.slug,
+ };
+ });
+
+ export type Outbound = {
+ slug: string;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Domains> = z
+ .object({
+ slug: z.string(),
+ })
+ .transform((v) => {
+ return {
+ slug: v.slug,
+ };
+ });
+}
+
+/** @internal */
+export namespace WorkspaceSchema$ {
+ export type Inbound = {
+ id: string;
+ name: string;
+ slug: string;
+ logo?: string | null | undefined;
+ usage: number;
+ usageLimit: number;
+ linksUsage: number;
+ linksLimit: number;
+ domainsLimit: number;
+ tagsLimit: number;
+ usersLimit: number;
+ plan: Plan;
+ stripeId: string | null;
+ billingCycleStart: number;
+ createdAt: string;
+ users: Array<Users$.Inbound>;
+ domains: Array<Domains$.Inbound>;
+ };
+
+ export const inboundSchema: z.ZodType<WorkspaceSchema, z.ZodTypeDef, Inbound> = z
+ .object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ logo: z.nullable(z.string()).default(null),
+ usage: z.number(),
+ usageLimit: z.number(),
+ linksUsage: z.number(),
+ linksLimit: z.number(),
+ domainsLimit: z.number(),
+ tagsLimit: z.number(),
+ usersLimit: z.number(),
+ plan: Plan$,
+ stripeId: z.nullable(z.string()),
+ billingCycleStart: z.number(),
+ createdAt: z.string(),
+ users: z.array(z.lazy(() => Users$.inboundSchema)),
+ domains: z.array(z.lazy(() => Domains$.inboundSchema)),
+ })
+ .transform((v) => {
+ return {
+ id: v.id,
+ name: v.name,
+ slug: v.slug,
+ logo: v.logo,
+ usage: v.usage,
+ usageLimit: v.usageLimit,
+ linksUsage: v.linksUsage,
+ linksLimit: v.linksLimit,
+ domainsLimit: v.domainsLimit,
+ tagsLimit: v.tagsLimit,
+ usersLimit: v.usersLimit,
+ plan: v.plan,
+ stripeId: v.stripeId,
+ billingCycleStart: v.billingCycleStart,
+ createdAt: v.createdAt,
+ users: v.users,
+ domains: v.domains,
+ };
+ });
+
+ export type Outbound = {
+ id: string;
+ name: string;
+ slug: string;
+ logo: string | null;
+ usage: number;
+ usageLimit: number;
+ linksUsage: number;
+ linksLimit: number;
+ domainsLimit: number;
+ tagsLimit: number;
+ usersLimit: number;
+ plan: Plan;
+ stripeId: string | null;
+ billingCycleStart: number;
+ createdAt: string;
+ users: Array<Users$.Outbound>;
+ domains: Array<Domains$.Outbound>;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, WorkspaceSchema> = z
+ .object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ logo: z.nullable(z.string()).default(null),
+ usage: z.number(),
+ usageLimit: z.number(),
+ linksUsage: z.number(),
+ linksLimit: z.number(),
+ domainsLimit: z.number(),
+ tagsLimit: z.number(),
+ usersLimit: z.number(),
+ plan: Plan$,
+ stripeId: z.nullable(z.string()),
+ billingCycleStart: z.number(),
+ createdAt: z.string(),
+ users: z.array(z.lazy(() => Users$.outboundSchema)),
+ domains: z.array(z.lazy(() => Domains$.outboundSchema)),
+ })
+ .transform((v) => {
+ return {
+ id: v.id,
+ name: v.name,
+ slug: v.slug,
+ logo: v.logo,
+ usage: v.usage,
+ usageLimit: v.usageLimit,
+ linksUsage: v.linksUsage,
+ linksLimit: v.linksLimit,
+ domainsLimit: v.domainsLimit,
+ tagsLimit: v.tagsLimit,
+ usersLimit: v.usersLimit,
+ plan: v.plan,
+ stripeId: v.stripeId,
+ billingCycleStart: v.billingCycleStart,
+ createdAt: v.createdAt,
+ users: v.users,
+ domains: v.domains,
+ };
+ });
+}
diff --git a/typescript/src/models/errors/fivehundred.ts b/typescript/src/models/errors/fivehundred.ts
new file mode 100644
index 0000000000..3310428de4
--- /dev/null
+++ b/typescript/src/models/errors/fivehundred.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FiveHundredCode {
+ InternalServerError = "internal_server_error",
+}
+
+export type FiveHundredError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FiveHundredCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * The server has encountered a situation it does not know how to handle.
+ */
+export type FiveHundredData = {
+ error: FiveHundredError;
+};
+
+/**
+ * The server has encountered a situation it does not know how to handle.
+ */
+export class FiveHundred extends Error {
+ error: FiveHundredError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FiveHundredData;
+
+ constructor(err: FiveHundredData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FiveHundred";
+ }
+}
+
+/** @internal */
+export const FiveHundredCode$ = z.nativeEnum(FiveHundredCode);
+
+/** @internal */
+export namespace FiveHundredError$ {
+ export type Inbound = {
+ code: FiveHundredCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FiveHundredError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FiveHundredCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FiveHundredCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FiveHundredError> = z
+ .object({
+ code: FiveHundredCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FiveHundred$ {
+ export type Inbound = {
+ error: FiveHundredError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FiveHundred, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FiveHundredError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FiveHundred({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FiveHundredError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FiveHundred> = z
+ .instanceof(FiveHundred)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FiveHundredError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundred.ts b/typescript/src/models/errors/fourhundred.ts
new file mode 100644
index 0000000000..7794225efa
--- /dev/null
+++ b/typescript/src/models/errors/fourhundred.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum Code {
+ BadRequest = "bad_request",
+}
+
+export type ErrorT = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: Code;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
+ */
+export type FourHundredData = {
+ error: ErrorT;
+};
+
+/**
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
+ */
+export class FourHundred extends Error {
+ error: ErrorT;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredData;
+
+ constructor(err: FourHundredData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundred";
+ }
+}
+
+/** @internal */
+export const Code$ = z.nativeEnum(Code);
+
+/** @internal */
+export namespace ErrorT$ {
+ export type Inbound = {
+ code: Code;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: Code$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: Code;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ErrorT> = z
+ .object({
+ code: Code$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundred$ {
+ export type Inbound = {
+ error: ErrorT$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundred, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => ErrorT$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundred({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: ErrorT$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundred> = z
+ .instanceof(FourHundred)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => ErrorT$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandfour.ts b/typescript/src/models/errors/fourhundredandfour.ts
new file mode 100644
index 0000000000..bf636dfffc
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandfour.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndFourCode {
+ NotFound = "not_found",
+}
+
+export type FourHundredAndFourError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndFourCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * The server cannot find the requested resource.
+ */
+export type FourHundredAndFourData = {
+ error: FourHundredAndFourError;
+};
+
+/**
+ * The server cannot find the requested resource.
+ */
+export class FourHundredAndFour extends Error {
+ error: FourHundredAndFourError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndFourData;
+
+ constructor(err: FourHundredAndFourData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndFour";
+ }
+}
+
+/** @internal */
+export const FourHundredAndFourCode$ = z.nativeEnum(FourHundredAndFourCode);
+
+/** @internal */
+export namespace FourHundredAndFourError$ {
+ export type Inbound = {
+ code: FourHundredAndFourCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndFourError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndFourCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndFourCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndFourError> = z
+ .object({
+ code: FourHundredAndFourCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndFour$ {
+ export type Inbound = {
+ error: FourHundredAndFourError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndFour, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndFourError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndFour({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndFourError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndFour> = z
+ .instanceof(FourHundredAndFour)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndFourError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandnine.ts b/typescript/src/models/errors/fourhundredandnine.ts
new file mode 100644
index 0000000000..5be2f7dab0
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandnine.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndNineCode {
+ Conflict = "conflict",
+}
+
+export type FourHundredAndNineError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndNineCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * This response is sent when a request conflicts with the current state of the server.
+ */
+export type FourHundredAndNineData = {
+ error: FourHundredAndNineError;
+};
+
+/**
+ * This response is sent when a request conflicts with the current state of the server.
+ */
+export class FourHundredAndNine extends Error {
+ error: FourHundredAndNineError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndNineData;
+
+ constructor(err: FourHundredAndNineData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndNine";
+ }
+}
+
+/** @internal */
+export const FourHundredAndNineCode$ = z.nativeEnum(FourHundredAndNineCode);
+
+/** @internal */
+export namespace FourHundredAndNineError$ {
+ export type Inbound = {
+ code: FourHundredAndNineCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndNineError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndNineCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndNineCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndNineError> = z
+ .object({
+ code: FourHundredAndNineCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndNine$ {
+ export type Inbound = {
+ error: FourHundredAndNineError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndNine, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndNineError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndNine({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndNineError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndNine> = z
+ .instanceof(FourHundredAndNine)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndNineError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandone.ts b/typescript/src/models/errors/fourhundredandone.ts
new file mode 100644
index 0000000000..277f5eee75
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandone.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndOneCode {
+ Unauthorized = "unauthorized",
+}
+
+export type FourHundredAndOneError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndOneCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
+ */
+export type FourHundredAndOneData = {
+ error: FourHundredAndOneError;
+};
+
+/**
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
+ */
+export class FourHundredAndOne extends Error {
+ error: FourHundredAndOneError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndOneData;
+
+ constructor(err: FourHundredAndOneData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndOne";
+ }
+}
+
+/** @internal */
+export const FourHundredAndOneCode$ = z.nativeEnum(FourHundredAndOneCode);
+
+/** @internal */
+export namespace FourHundredAndOneError$ {
+ export type Inbound = {
+ code: FourHundredAndOneCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndOneError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndOneCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndOneCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndOneError> = z
+ .object({
+ code: FourHundredAndOneCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndOne$ {
+ export type Inbound = {
+ error: FourHundredAndOneError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndOne, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndOneError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndOne({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndOneError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndOne> = z
+ .instanceof(FourHundredAndOne)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndOneError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandten.ts b/typescript/src/models/errors/fourhundredandten.ts
new file mode 100644
index 0000000000..c3a8a66d31
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandten.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndTenCode {
+ InviteExpired = "invite_expired",
+}
+
+export type FourHundredAndTenError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndTenCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
+ */
+export type FourHundredAndTenData = {
+ error: FourHundredAndTenError;
+};
+
+/**
+ * This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
+ */
+export class FourHundredAndTen extends Error {
+ error: FourHundredAndTenError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndTenData;
+
+ constructor(err: FourHundredAndTenData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndTen";
+ }
+}
+
+/** @internal */
+export const FourHundredAndTenCode$ = z.nativeEnum(FourHundredAndTenCode);
+
+/** @internal */
+export namespace FourHundredAndTenError$ {
+ export type Inbound = {
+ code: FourHundredAndTenCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndTenError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndTenCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndTenCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndTenError> = z
+ .object({
+ code: FourHundredAndTenCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndTen$ {
+ export type Inbound = {
+ error: FourHundredAndTenError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndTen, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndTenError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndTen({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndTenError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndTen> = z
+ .instanceof(FourHundredAndTen)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndTenError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandthree.ts b/typescript/src/models/errors/fourhundredandthree.ts
new file mode 100644
index 0000000000..8f719040ee
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandthree.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndThreeCode {
+ Forbidden = "forbidden",
+}
+
+export type FourHundredAndThreeError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndThreeCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
+ */
+export type FourHundredAndThreeData = {
+ error: FourHundredAndThreeError;
+};
+
+/**
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
+ */
+export class FourHundredAndThree extends Error {
+ error: FourHundredAndThreeError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndThreeData;
+
+ constructor(err: FourHundredAndThreeData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndThree";
+ }
+}
+
+/** @internal */
+export const FourHundredAndThreeCode$ = z.nativeEnum(FourHundredAndThreeCode);
+
+/** @internal */
+export namespace FourHundredAndThreeError$ {
+ export type Inbound = {
+ code: FourHundredAndThreeCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndThreeError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndThreeCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndThreeCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndThreeError> = z
+ .object({
+ code: FourHundredAndThreeCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndThree$ {
+ export type Inbound = {
+ error: FourHundredAndThreeError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndThree, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndThreeError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndThree({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndThreeError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndThree> = z
+ .instanceof(FourHundredAndThree)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndThreeError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandtwentynine.ts b/typescript/src/models/errors/fourhundredandtwentynine.ts
new file mode 100644
index 0000000000..09a72883ca
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandtwentynine.ts
@@ -0,0 +1,141 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndTwentyNineCode {
+ RateLimitExceeded = "rate_limit_exceeded",
+}
+
+export type FourHundredAndTwentyNineError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndTwentyNineCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * The user has sent too many requests in a given amount of time ("rate limiting")
+ */
+export type FourHundredAndTwentyNineData = {
+ error: FourHundredAndTwentyNineError;
+};
+
+/**
+ * The user has sent too many requests in a given amount of time ("rate limiting")
+ */
+export class FourHundredAndTwentyNine extends Error {
+ error: FourHundredAndTwentyNineError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndTwentyNineData;
+
+ constructor(err: FourHundredAndTwentyNineData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndTwentyNine";
+ }
+}
+
+/** @internal */
+export const FourHundredAndTwentyNineCode$ = z.nativeEnum(FourHundredAndTwentyNineCode);
+
+/** @internal */
+export namespace FourHundredAndTwentyNineError$ {
+ export type Inbound = {
+ code: FourHundredAndTwentyNineCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndTwentyNineError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndTwentyNineCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndTwentyNineCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndTwentyNineError> =
+ z
+ .object({
+ code: FourHundredAndTwentyNineCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndTwentyNine$ {
+ export type Inbound = {
+ error: FourHundredAndTwentyNineError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndTwentyNine, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndTwentyNineError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndTwentyNine({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndTwentyNineError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndTwentyNine> = z
+ .instanceof(FourHundredAndTwentyNine)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndTwentyNineError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/fourhundredandtwentytwo.ts b/typescript/src/models/errors/fourhundredandtwentytwo.ts
new file mode 100644
index 0000000000..0c7d9ba00b
--- /dev/null
+++ b/typescript/src/models/errors/fourhundredandtwentytwo.ts
@@ -0,0 +1,140 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+/**
+ * A short code indicating the error code returned.
+ */
+export enum FourHundredAndTwentyTwoCode {
+ UnprocessableEntity = "unprocessable_entity",
+}
+
+export type FourHundredAndTwentyTwoError = {
+ /**
+ * A short code indicating the error code returned.
+ */
+ code: FourHundredAndTwentyTwoCode;
+ /**
+ * A human readable explanation of what went wrong.
+ */
+ message: string;
+ /**
+ * A link to our documentation with more details about this error code
+ */
+ docUrl?: string | undefined;
+};
+
+/**
+ * The request was well-formed but was unable to be followed due to semantic errors.
+ */
+export type FourHundredAndTwentyTwoData = {
+ error: FourHundredAndTwentyTwoError;
+};
+
+/**
+ * The request was well-formed but was unable to be followed due to semantic errors.
+ */
+export class FourHundredAndTwentyTwo extends Error {
+ error: FourHundredAndTwentyTwoError;
+
+ /** The original data that was passed to this error instance. */
+ data$: FourHundredAndTwentyTwoData;
+
+ constructor(err: FourHundredAndTwentyTwoData) {
+ super("");
+ this.data$ = err;
+
+ this.error = err.error;
+
+ this.message =
+ "message" in err && typeof err.message === "string"
+ ? err.message
+ : "API error occurred";
+
+ this.name = "FourHundredAndTwentyTwo";
+ }
+}
+
+/** @internal */
+export const FourHundredAndTwentyTwoCode$ = z.nativeEnum(FourHundredAndTwentyTwoCode);
+
+/** @internal */
+export namespace FourHundredAndTwentyTwoError$ {
+ export type Inbound = {
+ code: FourHundredAndTwentyTwoCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndTwentyTwoError, z.ZodTypeDef, Inbound> = z
+ .object({
+ code: FourHundredAndTwentyTwoCode$,
+ message: z.string(),
+ doc_url: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
+ };
+ });
+
+ export type Outbound = {
+ code: FourHundredAndTwentyTwoCode;
+ message: string;
+ doc_url?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndTwentyTwoError> = z
+ .object({
+ code: FourHundredAndTwentyTwoCode$,
+ message: z.string(),
+ docUrl: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ code: v.code,
+ message: v.message,
+ ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
+ };
+ });
+}
+
+/** @internal */
+export namespace FourHundredAndTwentyTwo$ {
+ export type Inbound = {
+ error: FourHundredAndTwentyTwoError$.Inbound;
+ };
+
+ export const inboundSchema: z.ZodType<FourHundredAndTwentyTwo, z.ZodTypeDef, Inbound> = z
+ .object({
+ error: z.lazy(() => FourHundredAndTwentyTwoError$.inboundSchema),
+ })
+ .transform((v) => {
+ return new FourHundredAndTwentyTwo({
+ error: v.error,
+ });
+ });
+
+ export type Outbound = {
+ error: FourHundredAndTwentyTwoError$.Outbound;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, FourHundredAndTwentyTwo> = z
+ .instanceof(FourHundredAndTwentyTwo)
+ .transform((v) => v.data$)
+ .pipe(
+ z
+ .object({
+ error: z.lazy(() => FourHundredAndTwentyTwoError$.outboundSchema),
+ })
+ .transform((v) => {
+ return {
+ error: v.error,
+ };
+ })
+ );
+}
diff --git a/typescript/src/models/errors/index.ts b/typescript/src/models/errors/index.ts
new file mode 100644
index 0000000000..e7ef329867
--- /dev/null
+++ b/typescript/src/models/errors/index.ts
@@ -0,0 +1,15 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export * from "./fivehundred";
+export * from "./fourhundred";
+export * from "./fourhundredandfour";
+export * from "./fourhundredandnine";
+export * from "./fourhundredandone";
+export * from "./fourhundredandten";
+export * from "./fourhundredandthree";
+export * from "./fourhundredandtwentynine";
+export * from "./fourhundredandtwentytwo";
+export * from "./sdkerror";
+export * from "./sdkvalidationerror";
diff --git a/typescript/src/models/errors/sdkerror.ts b/typescript/src/models/errors/sdkerror.ts
new file mode 100644
index 0000000000..730b89b1ab
--- /dev/null
+++ b/typescript/src/models/errors/sdkerror.ts
@@ -0,0 +1,17 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export class SDKError extends Error {
+ constructor(
+ message: string,
+ public readonly httpMeta: {
+ response: Response;
+ request: Request;
+ }
+ ) {
+ super(`${message}: Status ${httpMeta.response.status}`);
+
+ this.name = "SDKError";
+ }
+}
diff --git a/typescript/src/models/errors/sdkvalidationerror.ts b/typescript/src/models/errors/sdkvalidationerror.ts
new file mode 100644
index 0000000000..fe38e77254
--- /dev/null
+++ b/typescript/src/models/errors/sdkvalidationerror.ts
@@ -0,0 +1,95 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+export class SDKValidationError extends Error {
+ /**
+ * The raw value that failed validation.
+ */
+ public readonly rawValue: unknown;
+
+ constructor(message: string, cause: unknown, rawValue: unknown) {
+ super(message);
+ this.name = "SDKValidationError";
+ this.cause = cause;
+ this.rawValue = rawValue;
+ }
+
+ public override toString() {
+ return `${this.message}: ${this.cause}`;
+ }
+
+ /**
+ * Return a pretty-formatted error message if the underlying validation error
+ * is a ZodError or some other recognized error type, otherwise return the
+ * default error message.
+ */
+ public pretty() {
+ if (this.cause instanceof z.ZodError) {
+ return `${this.message}\n${formatZodError(this.cause)}`;
+ } else {
+ return this.toString();
+ }
+ }
+}
+
+export function formatZodError(err: z.ZodError, level = 0): string {
+ let pre = " ".repeat(level);
+ pre = level > 0 ? `│${pre}` : pre;
+ pre += " ".repeat(level);
+
+ let message = "";
+ const append = (str: string) => (message += `\n${pre}${str}`);
+
+ const len = err.issues.length;
+ const headline = len === 1 ? `${len} issue found` : `${len} issues found`;
+
+ if (len) {
+ append(`┌ ${headline}:`);
+ }
+
+ for (const issue of err.issues) {
+ let path = issue.path.join(".");
+ path = path ? `<root>.${path}` : "<root>";
+ append(`│ • [${path}]: ${issue.message} (${issue.code})`);
+ switch (issue.code) {
+ case "invalid_literal":
+ case "invalid_type": {
+ append(`│ Want: ${issue.expected}`);
+ append(`│ Got: ${issue.received}`);
+ break;
+ }
+ case "unrecognized_keys": {
+ append(`│ Keys: ${issue.keys.join(", ")}`);
+ break;
+ }
+ case "invalid_enum_value": {
+ append(`│ Allowed: ${issue.options.join(", ")}`);
+ append(`│ Got: ${issue.received}`);
+ break;
+ }
+ case "invalid_union_discriminator": {
+ append(`│ Allowed: ${issue.options.join(", ")}`);
+ break;
+ }
+ case "invalid_union": {
+ const len = issue.unionErrors.length;
+ append(
+ `│ ✖︎ Attemped to deserialize into one of ${len} union members:`,
+ );
+ issue.unionErrors.forEach((err, i) => {
+ append(`│ ✖︎ Member ${i + 1} of ${len}`);
+ append(`${formatZodError(err, level + 1)}`);
+ });
+ }
+ }
+ }
+
+ if (err.issues.length) {
+ append(`└─*`);
+ }
+
+ return message.slice(1);
+}
diff --git a/typescript/src/models/operations/bulkcreatelinks.ts b/typescript/src/models/operations/bulkcreatelinks.ts
new file mode 100644
index 0000000000..abc8400db5
--- /dev/null
+++ b/typescript/src/models/operations/bulkcreatelinks.ts
@@ -0,0 +1,342 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The unique IDs of the tags assigned to the short link.
+ */
+export type BulkCreateLinksTagIds = string | Array<string>;
+
+export type RequestBody = {
+ /**
+ * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug. If not provided, a random 7-character slug will be generated.
+ */
+ key?: string | undefined;
+ /**
+ * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.
+ */
+ prefix?: string | undefined;
+ /**
+ * The destination URL of the short link.
+ */
+ url: string;
+ /**
+ * Whether the short link is archived.
+ */
+ archived?: boolean | undefined;
+ /**
+ * The date and time when the short link will expire in ISO-8601 format. Must be in the future.
+ */
+ expiresAt?: Date | null | undefined;
+ /**
+ * The password required to access the destination URL of the short link.
+ */
+ password?: string | null | undefined;
+ /**
+ * Whether the short link uses Custom Social Media Cards feature.
+ */
+ proxy?: boolean | undefined;
+ /**
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ title?: string | null | undefined;
+ /**
+ * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ description?: string | null | undefined;
+ /**
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ image?: string | null | undefined;
+ /**
+ * Whether the short link uses link cloaking.
+ */
+ rewrite?: boolean | undefined;
+ /**
+ * The iOS destination URL for the short link for iOS device targeting.
+ */
+ ios?: string | null | undefined;
+ /**
+ * The Android destination URL for the short link for Android device targeting.
+ */
+ android?: string | null | undefined;
+ /**
+ * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
+ */
+ geo?: Record<string, string> | null | undefined;
+ /**
+ * Whether the short link's stats are publicly accessible.
+ */
+ publicStats?: boolean | undefined;
+ /**
+ * [DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link.
+ *
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ */
+ tagId?: string | null | undefined;
+ /**
+ * The unique IDs of the tags assigned to the short link.
+ */
+ tagIds?: string | Array<string> | undefined;
+ /**
+ * The comments for the short link.
+ */
+ comments?: string | null | undefined;
+};
+
+export type BulkCreateLinksRequest = {
+ /**
+ * The ID of the workspace to create the link for.
+ */
+ workspaceId: string;
+ requestBody?: Array<RequestBody> | undefined;
+};
+
+export type BulkCreateLinksResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The created links
+ */
+ linkSchemas?: Array<components.LinkSchema> | undefined;
+};
+
+/** @internal */
+export namespace BulkCreateLinksTagIds$ {
+ export type Inbound = string | Array<string>;
+
+ export type Outbound = string | Array<string>;
+ export const inboundSchema: z.ZodType<BulkCreateLinksTagIds, z.ZodTypeDef, Inbound> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksTagIds> = z.union(
+ [z.string(), z.array(z.string())]
+ );
+}
+
+/** @internal */
+export namespace RequestBody$ {
+ export type Inbound = {
+ domain?: string | undefined;
+ key?: string | undefined;
+ prefix?: string | undefined;
+ url: string;
+ archived?: boolean | undefined;
+ expiresAt?: string | null | undefined;
+ password?: string | null | undefined;
+ proxy?: boolean | undefined;
+ title?: string | null | undefined;
+ description?: string | null | undefined;
+ image?: string | null | undefined;
+ rewrite?: boolean | undefined;
+ ios?: string | null | undefined;
+ android?: string | null | undefined;
+ geo?: Record<string, string> | null | undefined;
+ publicStats?: boolean | undefined;
+ tagId?: string | null | undefined;
+ tagIds?: string | Array<string> | undefined;
+ comments?: string | null | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<RequestBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ prefix: z.string().optional(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z
+ .nullable(
+ z
+ .string()
+ .datetime({ offset: true })
+ .transform((v) => new Date(v))
+ )
+ .optional(),
+ password: z.nullable(z.string()).optional(),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()).optional(),
+ description: z.nullable(z.string()).optional(),
+ image: z.nullable(z.string()).optional(),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()).optional(),
+ android: z.nullable(z.string()).optional(),
+ geo: z.nullable(z.record(z.string())).optional(),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()).optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ comments: z.nullable(z.string()).optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.prefix === undefined ? null : { prefix: v.prefix }),
+ url: v.url,
+ archived: v.archived,
+ ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
+ ...(v.password === undefined ? null : { password: v.password }),
+ proxy: v.proxy,
+ ...(v.title === undefined ? null : { title: v.title }),
+ ...(v.description === undefined ? null : { description: v.description }),
+ ...(v.image === undefined ? null : { image: v.image }),
+ rewrite: v.rewrite,
+ ...(v.ios === undefined ? null : { ios: v.ios }),
+ ...(v.android === undefined ? null : { android: v.android }),
+ ...(v.geo === undefined ? null : { geo: v.geo }),
+ publicStats: v.publicStats,
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.comments === undefined ? null : { comments: v.comments }),
+ };
+ });
+
+ export type Outbound = {
+ domain?: string | undefined;
+ key?: string | undefined;
+ prefix?: string | undefined;
+ url: string;
+ archived: boolean;
+ expiresAt?: string | null | undefined;
+ password?: string | null | undefined;
+ proxy: boolean;
+ title?: string | null | undefined;
+ description?: string | null | undefined;
+ image?: string | null | undefined;
+ rewrite: boolean;
+ ios?: string | null | undefined;
+ android?: string | null | undefined;
+ geo?: Record<string, string> | null | undefined;
+ publicStats: boolean;
+ tagId?: string | null | undefined;
+ tagIds?: string | Array<string> | undefined;
+ comments?: string | null | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RequestBody> = z
+ .object({
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ prefix: z.string().optional(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z.nullable(z.date().transform((v) => v.toISOString())).optional(),
+ password: z.nullable(z.string()).optional(),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()).optional(),
+ description: z.nullable(z.string()).optional(),
+ image: z.nullable(z.string()).optional(),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()).optional(),
+ android: z.nullable(z.string()).optional(),
+ geo: z.nullable(z.record(z.string())).optional(),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()).optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ comments: z.nullable(z.string()).optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.prefix === undefined ? null : { prefix: v.prefix }),
+ url: v.url,
+ archived: v.archived,
+ ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
+ ...(v.password === undefined ? null : { password: v.password }),
+ proxy: v.proxy,
+ ...(v.title === undefined ? null : { title: v.title }),
+ ...(v.description === undefined ? null : { description: v.description }),
+ ...(v.image === undefined ? null : { image: v.image }),
+ rewrite: v.rewrite,
+ ...(v.ios === undefined ? null : { ios: v.ios }),
+ ...(v.android === undefined ? null : { android: v.android }),
+ ...(v.geo === undefined ? null : { geo: v.geo }),
+ publicStats: v.publicStats,
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.comments === undefined ? null : { comments: v.comments }),
+ };
+ });
+}
+
+/** @internal */
+export namespace BulkCreateLinksRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ RequestBody?: Array<RequestBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<BulkCreateLinksRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ RequestBody: z.array(z.lazy(() => RequestBody$.inboundSchema)).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ RequestBody?: Array<RequestBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksRequest> = z
+ .object({
+ workspaceId: z.string(),
+ requestBody: z.array(z.lazy(() => RequestBody$.outboundSchema)).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
+ };
+ });
+}
+
+/** @internal */
+export namespace BulkCreateLinksResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchemas?: Array<components.LinkSchema$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<BulkCreateLinksResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchemas: z.array(components.LinkSchema$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchemas === undefined ? null : { linkSchemas: v.LinkSchemas }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchemas?: Array<components.LinkSchema$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchemas: z.array(components.LinkSchema$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchemas === undefined ? null : { LinkSchemas: v.linkSchemas }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/createlink.ts b/typescript/src/models/operations/createlink.ts
new file mode 100644
index 0000000000..7a30405c6f
--- /dev/null
+++ b/typescript/src/models/operations/createlink.ts
@@ -0,0 +1,343 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The unique IDs of the tags assigned to the short link.
+ */
+export type TagIds = string | Array<string>;
+
+export type CreateLinkRequestBody = {
+ /**
+ * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug. If not provided, a random 7-character slug will be generated.
+ */
+ key?: string | undefined;
+ /**
+ * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.
+ */
+ prefix?: string | undefined;
+ /**
+ * The destination URL of the short link.
+ */
+ url: string;
+ /**
+ * Whether the short link is archived.
+ */
+ archived?: boolean | undefined;
+ /**
+ * The date and time when the short link will expire in ISO-8601 format. Must be in the future.
+ */
+ expiresAt?: Date | null | undefined;
+ /**
+ * The password required to access the destination URL of the short link.
+ */
+ password?: string | null | undefined;
+ /**
+ * Whether the short link uses Custom Social Media Cards feature.
+ */
+ proxy?: boolean | undefined;
+ /**
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ title?: string | null | undefined;
+ /**
+ * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ description?: string | null | undefined;
+ /**
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ image?: string | null | undefined;
+ /**
+ * Whether the short link uses link cloaking.
+ */
+ rewrite?: boolean | undefined;
+ /**
+ * The iOS destination URL for the short link for iOS device targeting.
+ */
+ ios?: string | null | undefined;
+ /**
+ * The Android destination URL for the short link for Android device targeting.
+ */
+ android?: string | null | undefined;
+ /**
+ * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
+ */
+ geo?: Record<string, string> | null | undefined;
+ /**
+ * Whether the short link's stats are publicly accessible.
+ */
+ publicStats?: boolean | undefined;
+ /**
+ * [DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link.
+ *
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ */
+ tagId?: string | null | undefined;
+ /**
+ * The unique IDs of the tags assigned to the short link.
+ */
+ tagIds?: string | Array<string> | undefined;
+ /**
+ * The comments for the short link.
+ */
+ comments?: string | null | undefined;
+};
+
+export type CreateLinkRequest = {
+ /**
+ * The ID of the workspace to create the link for.
+ */
+ workspaceId: string;
+ requestBody?: CreateLinkRequestBody | undefined;
+};
+
+export type CreateLinkResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The created link
+ */
+ linkSchema?: components.LinkSchema | undefined;
+};
+
+/** @internal */
+export namespace TagIds$ {
+ export type Inbound = string | Array<string>;
+
+ export type Outbound = string | Array<string>;
+ export const inboundSchema: z.ZodType<TagIds, z.ZodTypeDef, Inbound> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TagIds> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+}
+
+/** @internal */
+export namespace CreateLinkRequestBody$ {
+ export type Inbound = {
+ domain?: string | undefined;
+ key?: string | undefined;
+ prefix?: string | undefined;
+ url: string;
+ archived?: boolean | undefined;
+ expiresAt?: string | null | undefined;
+ password?: string | null | undefined;
+ proxy?: boolean | undefined;
+ title?: string | null | undefined;
+ description?: string | null | undefined;
+ image?: string | null | undefined;
+ rewrite?: boolean | undefined;
+ ios?: string | null | undefined;
+ android?: string | null | undefined;
+ geo?: Record<string, string> | null | undefined;
+ publicStats?: boolean | undefined;
+ tagId?: string | null | undefined;
+ tagIds?: string | Array<string> | undefined;
+ comments?: string | null | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateLinkRequestBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ prefix: z.string().optional(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z
+ .nullable(
+ z
+ .string()
+ .datetime({ offset: true })
+ .transform((v) => new Date(v))
+ )
+ .optional(),
+ password: z.nullable(z.string()).optional(),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()).optional(),
+ description: z.nullable(z.string()).optional(),
+ image: z.nullable(z.string()).optional(),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()).optional(),
+ android: z.nullable(z.string()).optional(),
+ geo: z.nullable(z.record(z.string())).optional(),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()).optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ comments: z.nullable(z.string()).optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.prefix === undefined ? null : { prefix: v.prefix }),
+ url: v.url,
+ archived: v.archived,
+ ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
+ ...(v.password === undefined ? null : { password: v.password }),
+ proxy: v.proxy,
+ ...(v.title === undefined ? null : { title: v.title }),
+ ...(v.description === undefined ? null : { description: v.description }),
+ ...(v.image === undefined ? null : { image: v.image }),
+ rewrite: v.rewrite,
+ ...(v.ios === undefined ? null : { ios: v.ios }),
+ ...(v.android === undefined ? null : { android: v.android }),
+ ...(v.geo === undefined ? null : { geo: v.geo }),
+ publicStats: v.publicStats,
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.comments === undefined ? null : { comments: v.comments }),
+ };
+ });
+
+ export type Outbound = {
+ domain?: string | undefined;
+ key?: string | undefined;
+ prefix?: string | undefined;
+ url: string;
+ archived: boolean;
+ expiresAt?: string | null | undefined;
+ password?: string | null | undefined;
+ proxy: boolean;
+ title?: string | null | undefined;
+ description?: string | null | undefined;
+ image?: string | null | undefined;
+ rewrite: boolean;
+ ios?: string | null | undefined;
+ android?: string | null | undefined;
+ geo?: Record<string, string> | null | undefined;
+ publicStats: boolean;
+ tagId?: string | null | undefined;
+ tagIds?: string | Array<string> | undefined;
+ comments?: string | null | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequestBody> = z
+ .object({
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ prefix: z.string().optional(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z.nullable(z.date().transform((v) => v.toISOString())).optional(),
+ password: z.nullable(z.string()).optional(),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()).optional(),
+ description: z.nullable(z.string()).optional(),
+ image: z.nullable(z.string()).optional(),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()).optional(),
+ android: z.nullable(z.string()).optional(),
+ geo: z.nullable(z.record(z.string())).optional(),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()).optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ comments: z.nullable(z.string()).optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.prefix === undefined ? null : { prefix: v.prefix }),
+ url: v.url,
+ archived: v.archived,
+ ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
+ ...(v.password === undefined ? null : { password: v.password }),
+ proxy: v.proxy,
+ ...(v.title === undefined ? null : { title: v.title }),
+ ...(v.description === undefined ? null : { description: v.description }),
+ ...(v.image === undefined ? null : { image: v.image }),
+ rewrite: v.rewrite,
+ ...(v.ios === undefined ? null : { ios: v.ios }),
+ ...(v.android === undefined ? null : { android: v.android }),
+ ...(v.geo === undefined ? null : { geo: v.geo }),
+ publicStats: v.publicStats,
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.comments === undefined ? null : { comments: v.comments }),
+ };
+ });
+}
+
+/** @internal */
+export namespace CreateLinkRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ RequestBody?: CreateLinkRequestBody$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateLinkRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ RequestBody: z.lazy(() => CreateLinkRequestBody$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ RequestBody?: CreateLinkRequestBody$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequest> = z
+ .object({
+ workspaceId: z.string(),
+ requestBody: z.lazy(() => CreateLinkRequestBody$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
+ };
+ });
+}
+
+/** @internal */
+export namespace CreateLinkResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchema?: components.LinkSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateLinkResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchema: components.LinkSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchema === undefined ? null : { linkSchema: v.LinkSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchema?: components.LinkSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchema: components.LinkSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchema === undefined ? null : { LinkSchema: v.linkSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/createtag.ts b/typescript/src/models/operations/createtag.ts
new file mode 100644
index 0000000000..3c9267b508
--- /dev/null
+++ b/typescript/src/models/operations/createtag.ts
@@ -0,0 +1,160 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
+ */
+export enum Color {
+ Red = "red",
+ Yellow = "yellow",
+ Green = "green",
+ Blue = "blue",
+ Purple = "purple",
+ Pink = "pink",
+ Brown = "brown",
+}
+
+export type CreateTagRequestBody = {
+ /**
+ * The name of the tag to create.
+ */
+ tag: string;
+ /**
+ * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
+ */
+ color?: Color | undefined;
+};
+
+export type CreateTagRequest = {
+ /**
+ * The ID of the workspace to create the tag for.
+ */
+ workspaceId: string;
+ requestBody?: CreateTagRequestBody | undefined;
+};
+
+export type CreateTagResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The created tag
+ */
+ tagSchema?: components.TagSchema | undefined;
+};
+
+/** @internal */
+export const Color$ = z.nativeEnum(Color);
+
+/** @internal */
+export namespace CreateTagRequestBody$ {
+ export type Inbound = {
+ tag: string;
+ color?: Color | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateTagRequestBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ tag: z.string(),
+ color: Color$.optional(),
+ })
+ .transform((v) => {
+ return {
+ tag: v.tag,
+ ...(v.color === undefined ? null : { color: v.color }),
+ };
+ });
+
+ export type Outbound = {
+ tag: string;
+ color?: Color | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagRequestBody> = z
+ .object({
+ tag: z.string(),
+ color: Color$.optional(),
+ })
+ .transform((v) => {
+ return {
+ tag: v.tag,
+ ...(v.color === undefined ? null : { color: v.color }),
+ };
+ });
+}
+
+/** @internal */
+export namespace CreateTagRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ RequestBody?: CreateTagRequestBody$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateTagRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ RequestBody: z.lazy(() => CreateTagRequestBody$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ RequestBody?: CreateTagRequestBody$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagRequest> = z
+ .object({
+ workspaceId: z.string(),
+ requestBody: z.lazy(() => CreateTagRequestBody$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
+ };
+ });
+}
+
+/** @internal */
+export namespace CreateTagResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ TagSchema?: components.TagSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateTagResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ TagSchema: components.TagSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.TagSchema === undefined ? null : { tagSchema: v.TagSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ TagSchema?: components.TagSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ tagSchema: components.TagSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.tagSchema === undefined ? null : { TagSchema: v.tagSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/createworkspace.ts b/typescript/src/models/operations/createworkspace.ts
new file mode 100644
index 0000000000..578acbc077
--- /dev/null
+++ b/typescript/src/models/operations/createworkspace.ts
@@ -0,0 +1,104 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+export type CreateWorkspaceRequestBody = {
+ name: string;
+ slug: string;
+ domain?: string | undefined;
+};
+
+export type CreateWorkspaceResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The created workspace
+ */
+ workspaceSchema?: components.WorkspaceSchema | undefined;
+};
+
+/** @internal */
+export namespace CreateWorkspaceRequestBody$ {
+ export type Inbound = {
+ name: string;
+ slug: string;
+ domain?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateWorkspaceRequestBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ name: z.string(),
+ slug: z.string(),
+ domain: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ name: v.name,
+ slug: v.slug,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ };
+ });
+
+ export type Outbound = {
+ name: string;
+ slug: string;
+ domain?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateWorkspaceRequestBody> = z
+ .object({
+ name: z.string(),
+ slug: z.string(),
+ domain: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ name: v.name,
+ slug: v.slug,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ };
+ });
+}
+
+/** @internal */
+export namespace CreateWorkspaceResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ WorkspaceSchema?: components.WorkspaceSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<CreateWorkspaceResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ WorkspaceSchema: components.WorkspaceSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.WorkspaceSchema === undefined
+ ? null
+ : { workspaceSchema: v.WorkspaceSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ WorkspaceSchema?: components.WorkspaceSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateWorkspaceResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ workspaceSchema: components.WorkspaceSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.workspaceSchema === undefined
+ ? null
+ : { WorkspaceSchema: v.workspaceSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/deletelink.ts b/typescript/src/models/operations/deletelink.ts
new file mode 100644
index 0000000000..012ac2cc70
--- /dev/null
+++ b/typescript/src/models/operations/deletelink.ts
@@ -0,0 +1,99 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+export type DeleteLinkRequest = {
+ /**
+ * The id of the link to delete. You can get this via the `getLinkInfo` endpoint.
+ */
+ linkId: string;
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+};
+
+export type DeleteLinkResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The deleted link
+ */
+ linkSchema?: components.LinkSchema | undefined;
+};
+
+/** @internal */
+export namespace DeleteLinkRequest$ {
+ export type Inbound = {
+ linkId: string;
+ workspaceId: string;
+ };
+
+ export const inboundSchema: z.ZodType<DeleteLinkRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ linkId: z.string(),
+ workspaceId: z.string(),
+ })
+ .transform((v) => {
+ return {
+ linkId: v.linkId,
+ workspaceId: v.workspaceId,
+ };
+ });
+
+ export type Outbound = {
+ linkId: string;
+ workspaceId: string;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkRequest> = z
+ .object({
+ linkId: z.string(),
+ workspaceId: z.string(),
+ })
+ .transform((v) => {
+ return {
+ linkId: v.linkId,
+ workspaceId: v.workspaceId,
+ };
+ });
+}
+
+/** @internal */
+export namespace DeleteLinkResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchema?: components.LinkSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<DeleteLinkResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchema: components.LinkSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchema === undefined ? null : { linkSchema: v.LinkSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchema?: components.LinkSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchema: components.LinkSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchema === undefined ? null : { LinkSchema: v.linkSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/editlink.ts b/typescript/src/models/operations/editlink.ts
new file mode 100644
index 0000000000..4a3c329c71
--- /dev/null
+++ b/typescript/src/models/operations/editlink.ts
@@ -0,0 +1,353 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The unique IDs of the tags assigned to the short link.
+ */
+export type EditLinkTagIds = string | Array<string>;
+
+export type EditLinkRequestBody = {
+ /**
+ * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug. If not provided, a random 7-character slug will be generated.
+ */
+ key?: string | undefined;
+ /**
+ * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.
+ */
+ prefix?: string | undefined;
+ /**
+ * The destination URL of the short link.
+ */
+ url: string;
+ /**
+ * Whether the short link is archived.
+ */
+ archived?: boolean | undefined;
+ /**
+ * The date and time when the short link will expire in ISO-8601 format. Must be in the future.
+ */
+ expiresAt?: Date | null | undefined;
+ /**
+ * The password required to access the destination URL of the short link.
+ */
+ password?: string | null | undefined;
+ /**
+ * Whether the short link uses Custom Social Media Cards feature.
+ */
+ proxy?: boolean | undefined;
+ /**
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ title?: string | null | undefined;
+ /**
+ * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ description?: string | null | undefined;
+ /**
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
+ */
+ image?: string | null | undefined;
+ /**
+ * Whether the short link uses link cloaking.
+ */
+ rewrite?: boolean | undefined;
+ /**
+ * The iOS destination URL for the short link for iOS device targeting.
+ */
+ ios?: string | null | undefined;
+ /**
+ * The Android destination URL for the short link for Android device targeting.
+ */
+ android?: string | null | undefined;
+ /**
+ * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
+ */
+ geo?: Record<string, string> | null | undefined;
+ /**
+ * Whether the short link's stats are publicly accessible.
+ */
+ publicStats?: boolean | undefined;
+ /**
+ * [DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short link.
+ *
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ */
+ tagId?: string | null | undefined;
+ /**
+ * The unique IDs of the tags assigned to the short link.
+ */
+ tagIds?: string | Array<string> | undefined;
+ /**
+ * The comments for the short link.
+ */
+ comments?: string | null | undefined;
+};
+
+export type EditLinkRequest = {
+ /**
+ * The id of the link to edit. You can get this via the `getLinkInfo` endpoint.
+ */
+ linkId: string;
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ requestBody?: EditLinkRequestBody | undefined;
+};
+
+export type EditLinkResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The edited link
+ */
+ linkSchema?: components.LinkSchema | undefined;
+};
+
+/** @internal */
+export namespace EditLinkTagIds$ {
+ export type Inbound = string | Array<string>;
+
+ export type Outbound = string | Array<string>;
+ export const inboundSchema: z.ZodType<EditLinkTagIds, z.ZodTypeDef, Inbound> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkTagIds> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+}
+
+/** @internal */
+export namespace EditLinkRequestBody$ {
+ export type Inbound = {
+ domain?: string | undefined;
+ key?: string | undefined;
+ prefix?: string | undefined;
+ url: string;
+ archived?: boolean | undefined;
+ expiresAt?: string | null | undefined;
+ password?: string | null | undefined;
+ proxy?: boolean | undefined;
+ title?: string | null | undefined;
+ description?: string | null | undefined;
+ image?: string | null | undefined;
+ rewrite?: boolean | undefined;
+ ios?: string | null | undefined;
+ android?: string | null | undefined;
+ geo?: Record<string, string> | null | undefined;
+ publicStats?: boolean | undefined;
+ tagId?: string | null | undefined;
+ tagIds?: string | Array<string> | undefined;
+ comments?: string | null | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<EditLinkRequestBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ prefix: z.string().optional(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z
+ .nullable(
+ z
+ .string()
+ .datetime({ offset: true })
+ .transform((v) => new Date(v))
+ )
+ .optional(),
+ password: z.nullable(z.string()).optional(),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()).optional(),
+ description: z.nullable(z.string()).optional(),
+ image: z.nullable(z.string()).optional(),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()).optional(),
+ android: z.nullable(z.string()).optional(),
+ geo: z.nullable(z.record(z.string())).optional(),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()).optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ comments: z.nullable(z.string()).optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.prefix === undefined ? null : { prefix: v.prefix }),
+ url: v.url,
+ archived: v.archived,
+ ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
+ ...(v.password === undefined ? null : { password: v.password }),
+ proxy: v.proxy,
+ ...(v.title === undefined ? null : { title: v.title }),
+ ...(v.description === undefined ? null : { description: v.description }),
+ ...(v.image === undefined ? null : { image: v.image }),
+ rewrite: v.rewrite,
+ ...(v.ios === undefined ? null : { ios: v.ios }),
+ ...(v.android === undefined ? null : { android: v.android }),
+ ...(v.geo === undefined ? null : { geo: v.geo }),
+ publicStats: v.publicStats,
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.comments === undefined ? null : { comments: v.comments }),
+ };
+ });
+
+ export type Outbound = {
+ domain?: string | undefined;
+ key?: string | undefined;
+ prefix?: string | undefined;
+ url: string;
+ archived: boolean;
+ expiresAt?: string | null | undefined;
+ password?: string | null | undefined;
+ proxy: boolean;
+ title?: string | null | undefined;
+ description?: string | null | undefined;
+ image?: string | null | undefined;
+ rewrite: boolean;
+ ios?: string | null | undefined;
+ android?: string | null | undefined;
+ geo?: Record<string, string> | null | undefined;
+ publicStats: boolean;
+ tagId?: string | null | undefined;
+ tagIds?: string | Array<string> | undefined;
+ comments?: string | null | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkRequestBody> = z
+ .object({
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ prefix: z.string().optional(),
+ url: z.string(),
+ archived: z.boolean().default(false),
+ expiresAt: z.nullable(z.date().transform((v) => v.toISOString())).optional(),
+ password: z.nullable(z.string()).optional(),
+ proxy: z.boolean().default(false),
+ title: z.nullable(z.string()).optional(),
+ description: z.nullable(z.string()).optional(),
+ image: z.nullable(z.string()).optional(),
+ rewrite: z.boolean().default(false),
+ ios: z.nullable(z.string()).optional(),
+ android: z.nullable(z.string()).optional(),
+ geo: z.nullable(z.record(z.string())).optional(),
+ publicStats: z.boolean().default(false),
+ tagId: z.nullable(z.string()).optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ comments: z.nullable(z.string()).optional(),
+ })
+ .transform((v) => {
+ return {
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.prefix === undefined ? null : { prefix: v.prefix }),
+ url: v.url,
+ archived: v.archived,
+ ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
+ ...(v.password === undefined ? null : { password: v.password }),
+ proxy: v.proxy,
+ ...(v.title === undefined ? null : { title: v.title }),
+ ...(v.description === undefined ? null : { description: v.description }),
+ ...(v.image === undefined ? null : { image: v.image }),
+ rewrite: v.rewrite,
+ ...(v.ios === undefined ? null : { ios: v.ios }),
+ ...(v.android === undefined ? null : { android: v.android }),
+ ...(v.geo === undefined ? null : { geo: v.geo }),
+ publicStats: v.publicStats,
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.comments === undefined ? null : { comments: v.comments }),
+ };
+ });
+}
+
+/** @internal */
+export namespace EditLinkRequest$ {
+ export type Inbound = {
+ linkId: string;
+ workspaceId: string;
+ RequestBody?: EditLinkRequestBody$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<EditLinkRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ linkId: z.string(),
+ workspaceId: z.string(),
+ RequestBody: z.lazy(() => EditLinkRequestBody$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ linkId: v.linkId,
+ workspaceId: v.workspaceId,
+ ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
+ };
+ });
+
+ export type Outbound = {
+ linkId: string;
+ workspaceId: string;
+ RequestBody?: EditLinkRequestBody$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkRequest> = z
+ .object({
+ linkId: z.string(),
+ workspaceId: z.string(),
+ requestBody: z.lazy(() => EditLinkRequestBody$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ linkId: v.linkId,
+ workspaceId: v.workspaceId,
+ ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
+ };
+ });
+}
+
+/** @internal */
+export namespace EditLinkResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchema?: components.LinkSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<EditLinkResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchema: components.LinkSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchema === undefined ? null : { linkSchema: v.LinkSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchema?: components.LinkSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchema: components.LinkSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchema === undefined ? null : { LinkSchema: v.linkSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getbrowseranalytics.ts b/typescript/src/models/operations/getbrowseranalytics.ts
new file mode 100644
index 0000000000..2237018fee
--- /dev/null
+++ b/typescript/src/models/operations/getbrowseranalytics.ts
@@ -0,0 +1,544 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetBrowserAnalyticsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetBrowserAnalyticsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetBrowserAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetBrowserAnalyticsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetBrowserAnalyticsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetBrowserAnalyticsResponseBody = {
+ /**
+ * The name of the browser
+ */
+ browser: string;
+ /**
+ * The number of clicks from this browser
+ */
+ clicks: number;
+};
+
+export type GetBrowserAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top browsers by number of clicks
+ */
+ responseBodies?: Array<GetBrowserAnalyticsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetBrowserAnalyticsQueryParamInterval$ = z.nativeEnum(
+ GetBrowserAnalyticsQueryParamInterval
+);
+
+/** @internal */
+export const GetBrowserAnalyticsQueryParamCountry$ = z.nativeEnum(
+ GetBrowserAnalyticsQueryParamCountry
+);
+
+/** @internal */
+export namespace GetBrowserAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetBrowserAnalyticsQueryParamInterval | undefined;
+ country?: GetBrowserAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetBrowserAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetBrowserAnalyticsQueryParamInterval$.optional(),
+ country: GetBrowserAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetBrowserAnalyticsQueryParamInterval | undefined;
+ country?: GetBrowserAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBrowserAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetBrowserAnalyticsQueryParamInterval$.optional(),
+ country: GetBrowserAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetBrowserAnalyticsResponseBody$ {
+ export type Inbound = {
+ browser: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetBrowserAnalyticsResponseBody, z.ZodTypeDef, Inbound> =
+ z
+ .object({
+ browser: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ browser: v.browser,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ browser: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<
+ Outbound,
+ z.ZodTypeDef,
+ GetBrowserAnalyticsResponseBody
+ > = z
+ .object({
+ browser: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ browser: v.browser,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetBrowserAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetBrowserAnalyticsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetBrowserAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetBrowserAnalyticsResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetBrowserAnalyticsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBrowserAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetBrowserAnalyticsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getcityanalytics.ts b/typescript/src/models/operations/getcityanalytics.ts
new file mode 100644
index 0000000000..abe171d321
--- /dev/null
+++ b/typescript/src/models/operations/getcityanalytics.ts
@@ -0,0 +1,804 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetCityAnalyticsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetCityAnalyticsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetCityAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetCityAnalyticsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetCityAnalyticsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+/**
+ * The 2-letter country code of the city: https://d.to/geo
+ */
+export enum GetCityAnalyticsCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetCityAnalyticsResponseBody = {
+ /**
+ * The name of the city
+ */
+ city: string;
+ /**
+ * The 2-letter country code of the city: https://d.to/geo
+ */
+ country: GetCityAnalyticsCountry;
+ /**
+ * The number of clicks from this city
+ */
+ clicks: number;
+};
+
+export type GetCityAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top cities by number of clicks
+ */
+ responseBodies?: Array<GetCityAnalyticsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetCityAnalyticsQueryParamInterval$ = z.nativeEnum(GetCityAnalyticsQueryParamInterval);
+
+/** @internal */
+export const GetCityAnalyticsQueryParamCountry$ = z.nativeEnum(GetCityAnalyticsQueryParamCountry);
+
+/** @internal */
+export namespace GetCityAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetCityAnalyticsQueryParamInterval | undefined;
+ country?: GetCityAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetCityAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetCityAnalyticsQueryParamInterval$.optional(),
+ country: GetCityAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetCityAnalyticsQueryParamInterval | undefined;
+ country?: GetCityAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCityAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetCityAnalyticsQueryParamInterval$.optional(),
+ country: GetCityAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export const GetCityAnalyticsCountry$ = z.nativeEnum(GetCityAnalyticsCountry);
+
+/** @internal */
+export namespace GetCityAnalyticsResponseBody$ {
+ export type Inbound = {
+ city: string;
+ country: GetCityAnalyticsCountry;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetCityAnalyticsResponseBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ city: z.string(),
+ country: GetCityAnalyticsCountry$,
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ city: v.city,
+ country: v.country,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ city: string;
+ country: GetCityAnalyticsCountry;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCityAnalyticsResponseBody> = z
+ .object({
+ city: z.string(),
+ country: GetCityAnalyticsCountry$,
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ city: v.city,
+ country: v.country,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetCityAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetCityAnalyticsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetCityAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetCityAnalyticsResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetCityAnalyticsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCityAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetCityAnalyticsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getclicksanalytics.ts b/typescript/src/models/operations/getclicksanalytics.ts
new file mode 100644
index 0000000000..e4cda0faae
--- /dev/null
+++ b/typescript/src/models/operations/getclicksanalytics.ts
@@ -0,0 +1,483 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum Interval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum Country {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetClicksAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: Interval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: Country | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetClicksAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The number of clicks
+ */
+ number?: number | undefined;
+};
+
+/** @internal */
+export const Interval$ = z.nativeEnum(Interval);
+
+/** @internal */
+export const Country$ = z.nativeEnum(Country);
+
+/** @internal */
+export namespace GetClicksAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: Interval | undefined;
+ country?: Country | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetClicksAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: Interval$.optional(),
+ country: Country$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: Interval | undefined;
+ country?: Country | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetClicksAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: Interval$.optional(),
+ country: Country$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetClicksAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ number?: number | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetClicksAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ number: z.number().optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.number === undefined ? null : { number: v.number }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ number?: number | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetClicksAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ number: z.number().optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.number === undefined ? null : { number: v.number }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getcountryanalytics.ts b/typescript/src/models/operations/getcountryanalytics.ts
new file mode 100644
index 0000000000..50b7865ce9
--- /dev/null
+++ b/typescript/src/models/operations/getcountryanalytics.ts
@@ -0,0 +1,803 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetCountryAnalyticsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetCountryAnalyticsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetCountryAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetCountryAnalyticsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetCountryAnalyticsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+/**
+ * The 2-letter country code: https://d.to/geo
+ */
+export enum GetCountryAnalyticsCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetCountryAnalyticsResponseBody = {
+ /**
+ * The 2-letter country code: https://d.to/geo
+ */
+ country: GetCountryAnalyticsCountry;
+ /**
+ * The number of clicks from this country
+ */
+ clicks: number;
+};
+
+export type GetCountryAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top countries by number of clicks
+ */
+ responseBodies?: Array<GetCountryAnalyticsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetCountryAnalyticsQueryParamInterval$ = z.nativeEnum(
+ GetCountryAnalyticsQueryParamInterval
+);
+
+/** @internal */
+export const GetCountryAnalyticsQueryParamCountry$ = z.nativeEnum(
+ GetCountryAnalyticsQueryParamCountry
+);
+
+/** @internal */
+export namespace GetCountryAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetCountryAnalyticsQueryParamInterval | undefined;
+ country?: GetCountryAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetCountryAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetCountryAnalyticsQueryParamInterval$.optional(),
+ country: GetCountryAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetCountryAnalyticsQueryParamInterval | undefined;
+ country?: GetCountryAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCountryAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetCountryAnalyticsQueryParamInterval$.optional(),
+ country: GetCountryAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export const GetCountryAnalyticsCountry$ = z.nativeEnum(GetCountryAnalyticsCountry);
+
+/** @internal */
+export namespace GetCountryAnalyticsResponseBody$ {
+ export type Inbound = {
+ country: GetCountryAnalyticsCountry;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetCountryAnalyticsResponseBody, z.ZodTypeDef, Inbound> =
+ z
+ .object({
+ country: GetCountryAnalyticsCountry$,
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ country: v.country,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ country: GetCountryAnalyticsCountry;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<
+ Outbound,
+ z.ZodTypeDef,
+ GetCountryAnalyticsResponseBody
+ > = z
+ .object({
+ country: GetCountryAnalyticsCountry$,
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ country: v.country,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetCountryAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetCountryAnalyticsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetCountryAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetCountryAnalyticsResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetCountryAnalyticsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCountryAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetCountryAnalyticsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getdeviceanalytics.ts b/typescript/src/models/operations/getdeviceanalytics.ts
new file mode 100644
index 0000000000..a6caf7fe2c
--- /dev/null
+++ b/typescript/src/models/operations/getdeviceanalytics.ts
@@ -0,0 +1,540 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetDeviceAnalyticsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetDeviceAnalyticsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetDeviceAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetDeviceAnalyticsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetDeviceAnalyticsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetDeviceAnalyticsResponseBody = {
+ /**
+ * The name of the device
+ */
+ device: string;
+ /**
+ * The number of clicks from this device
+ */
+ clicks: number;
+};
+
+export type GetDeviceAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top devices by number of clicks
+ */
+ responseBodies?: Array<GetDeviceAnalyticsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetDeviceAnalyticsQueryParamInterval$ = z.nativeEnum(
+ GetDeviceAnalyticsQueryParamInterval
+);
+
+/** @internal */
+export const GetDeviceAnalyticsQueryParamCountry$ = z.nativeEnum(
+ GetDeviceAnalyticsQueryParamCountry
+);
+
+/** @internal */
+export namespace GetDeviceAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetDeviceAnalyticsQueryParamInterval | undefined;
+ country?: GetDeviceAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetDeviceAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetDeviceAnalyticsQueryParamInterval$.optional(),
+ country: GetDeviceAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetDeviceAnalyticsQueryParamInterval | undefined;
+ country?: GetDeviceAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDeviceAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetDeviceAnalyticsQueryParamInterval$.optional(),
+ country: GetDeviceAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetDeviceAnalyticsResponseBody$ {
+ export type Inbound = {
+ device: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetDeviceAnalyticsResponseBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ device: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ device: v.device,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ device: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDeviceAnalyticsResponseBody> =
+ z
+ .object({
+ device: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ device: v.device,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetDeviceAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetDeviceAnalyticsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetDeviceAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetDeviceAnalyticsResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetDeviceAnalyticsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDeviceAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetDeviceAnalyticsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getlinkinfo.ts b/typescript/src/models/operations/getlinkinfo.ts
new file mode 100644
index 0000000000..d7d52e8f40
--- /dev/null
+++ b/typescript/src/models/operations/getlinkinfo.ts
@@ -0,0 +1,109 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+export type GetLinkInfoRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`.
+ */
+ domain: string;
+ /**
+ * The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`.
+ */
+ key: string;
+};
+
+export type GetLinkInfoResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The retrieved link
+ */
+ linkSchema?: components.LinkSchema | undefined;
+};
+
+/** @internal */
+export namespace GetLinkInfoRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain: string;
+ key: string;
+ };
+
+ export const inboundSchema: z.ZodType<GetLinkInfoRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string(),
+ key: z.string(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ domain: v.domain,
+ key: v.key,
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain: string;
+ key: string;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string(),
+ key: z.string(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ domain: v.domain,
+ key: v.key,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetLinkInfoResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchema?: components.LinkSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetLinkInfoResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchema: components.LinkSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchema === undefined ? null : { linkSchema: v.LinkSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchema?: components.LinkSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchema: components.LinkSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchema === undefined ? null : { LinkSchema: v.linkSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getlinks.ts b/typescript/src/models/operations/getlinks.ts
new file mode 100644
index 0000000000..3014afe11f
--- /dev/null
+++ b/typescript/src/models/operations/getlinks.ts
@@ -0,0 +1,211 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The tag IDs to filter the links by.
+ */
+export type QueryParamTagIds = string | Array<string>;
+
+/**
+ * The field to sort the links by. The default is `createdAt`, and sort order is always descending.
+ */
+export enum Sort {
+ CreatedAt = "createdAt",
+ Clicks = "clicks",
+ LastClicked = "lastClicked",
+}
+
+export type GetLinksRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.
+ */
+ domain?: string | undefined;
+ /**
+ * [DEPRECATED] (use tagIds instead): The tag ID to filter the links by.
+ */
+ tagId?: string | undefined;
+ /**
+ * The tag IDs to filter the links by.
+ */
+ tagIds?: string | Array<string> | undefined;
+ /**
+ * The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
+ */
+ search?: string | undefined;
+ /**
+ * The user ID to filter the links by.
+ */
+ userId?: string | undefined;
+ /**
+ * Whether to include archived links in the response. Defaults to `false` if not provided.
+ */
+ showArchived?: boolean | undefined;
+ /**
+ * Whether to include tags in the response. Defaults to `false` if not provided.
+ */
+ withTags?: boolean | undefined;
+ /**
+ * The field to sort the links by. The default is `createdAt`, and sort order is always descending.
+ */
+ sort?: Sort | undefined;
+ /**
+ * The page number for pagination (each page contains 100 links).
+ */
+ page?: number | undefined;
+};
+
+export type GetLinksResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * A list of links
+ */
+ linkSchemas?: Array<components.LinkSchema> | undefined;
+};
+
+/** @internal */
+export namespace QueryParamTagIds$ {
+ export type Inbound = string | Array<string>;
+
+ export type Outbound = string | Array<string>;
+ export const inboundSchema: z.ZodType<QueryParamTagIds, z.ZodTypeDef, Inbound> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, QueryParamTagIds> = z.union([
+ z.string(),
+ z.array(z.string()),
+ ]);
+}
+
+/** @internal */
+export const Sort$ = z.nativeEnum(Sort);
+
+/** @internal */
+export namespace GetLinksRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ tagId?: string | undefined;
+ tagIds?: string | Array<string> | undefined;
+ search?: string | undefined;
+ userId?: string | undefined;
+ showArchived?: boolean | undefined;
+ withTags?: boolean | undefined;
+ sort?: Sort | undefined;
+ page?: number | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetLinksRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ tagId: z.string().optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ search: z.string().optional(),
+ userId: z.string().optional(),
+ showArchived: z.boolean().default(false),
+ withTags: z.boolean().default(false),
+ sort: Sort$.default(Sort.CreatedAt),
+ page: z.number().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.search === undefined ? null : { search: v.search }),
+ ...(v.userId === undefined ? null : { userId: v.userId }),
+ showArchived: v.showArchived,
+ withTags: v.withTags,
+ sort: v.sort,
+ ...(v.page === undefined ? null : { page: v.page }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ tagId?: string | undefined;
+ tagIds?: string | Array<string> | undefined;
+ search?: string | undefined;
+ userId?: string | undefined;
+ showArchived: boolean;
+ withTags: boolean;
+ sort: Sort;
+ page?: number | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ tagId: z.string().optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ search: z.string().optional(),
+ userId: z.string().optional(),
+ showArchived: z.boolean().default(false),
+ withTags: z.boolean().default(false),
+ sort: Sort$.default(Sort.CreatedAt),
+ page: z.number().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.search === undefined ? null : { search: v.search }),
+ ...(v.userId === undefined ? null : { userId: v.userId }),
+ showArchived: v.showArchived,
+ withTags: v.withTags,
+ sort: v.sort,
+ ...(v.page === undefined ? null : { page: v.page }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetLinksResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchemas?: Array<components.LinkSchema$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetLinksResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchemas: z.array(components.LinkSchema$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchemas === undefined ? null : { linkSchemas: v.LinkSchemas }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchemas?: Array<components.LinkSchema$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchemas: z.array(components.LinkSchema$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchemas === undefined ? null : { LinkSchemas: v.linkSchemas }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getlinkscount.ts b/typescript/src/models/operations/getlinkscount.ts
new file mode 100644
index 0000000000..723b4254e7
--- /dev/null
+++ b/typescript/src/models/operations/getlinkscount.ts
@@ -0,0 +1,213 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The tag IDs to filter the links by.
+ */
+export type GetLinksCountQueryParamTagIds = string | Array<string>;
+
+export enum Two {
+ TagId = "tagId",
+}
+
+export enum One {
+ Domain = "domain",
+}
+
+/**
+ * The field to group the links by.
+ */
+export type GroupBy = One | Two;
+
+export type GetLinksCountRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.
+ */
+ domain?: string | undefined;
+ /**
+ * [DEPRECATED] (use tagIds instead): The tag ID to filter the links by.
+ */
+ tagId?: string | undefined;
+ /**
+ * The tag IDs to filter the links by.
+ */
+ tagIds?: string | Array<string> | undefined;
+ /**
+ * The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
+ */
+ search?: string | undefined;
+ /**
+ * The user ID to filter the links by.
+ */
+ userId?: string | undefined;
+ /**
+ * Whether to include archived links in the response. Defaults to `false` if not provided.
+ */
+ showArchived?: boolean | undefined;
+ /**
+ * Whether to include tags in the response. Defaults to `false` if not provided.
+ */
+ withTags?: boolean | undefined;
+ /**
+ * The field to group the links by.
+ */
+ groupBy?: One | Two | undefined;
+};
+
+export type GetLinksCountResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * A list of links
+ */
+ linkSchemas?: Array<components.LinkSchema> | undefined;
+};
+
+/** @internal */
+export namespace GetLinksCountQueryParamTagIds$ {
+ export type Inbound = string | Array<string>;
+
+ export type Outbound = string | Array<string>;
+ export const inboundSchema: z.ZodType<GetLinksCountQueryParamTagIds, z.ZodTypeDef, Inbound> =
+ z.union([z.string(), z.array(z.string())]);
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountQueryParamTagIds> =
+ z.union([z.string(), z.array(z.string())]);
+}
+
+/** @internal */
+export const Two$ = z.nativeEnum(Two);
+
+/** @internal */
+export const One$ = z.nativeEnum(One);
+
+/** @internal */
+export namespace GroupBy$ {
+ export type Inbound = One | Two;
+
+ export type Outbound = One | Two;
+ export const inboundSchema: z.ZodType<GroupBy, z.ZodTypeDef, Inbound> = z.union([One$, Two$]);
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GroupBy> = z.union([One$, Two$]);
+}
+
+/** @internal */
+export namespace GetLinksCountRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ tagId?: string | undefined;
+ tagIds?: string | Array<string> | undefined;
+ search?: string | undefined;
+ userId?: string | undefined;
+ showArchived?: boolean | undefined;
+ withTags?: boolean | undefined;
+ groupBy?: One | Two | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetLinksCountRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ tagId: z.string().optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ search: z.string().optional(),
+ userId: z.string().optional(),
+ showArchived: z.boolean().default(false),
+ withTags: z.boolean().default(false),
+ groupBy: z.union([One$, Two$]).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.search === undefined ? null : { search: v.search }),
+ ...(v.userId === undefined ? null : { userId: v.userId }),
+ showArchived: v.showArchived,
+ withTags: v.withTags,
+ ...(v.groupBy === undefined ? null : { groupBy: v.groupBy }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ tagId?: string | undefined;
+ tagIds?: string | Array<string> | undefined;
+ search?: string | undefined;
+ userId?: string | undefined;
+ showArchived: boolean;
+ withTags: boolean;
+ groupBy?: One | Two | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ tagId: z.string().optional(),
+ tagIds: z.union([z.string(), z.array(z.string())]).optional(),
+ search: z.string().optional(),
+ userId: z.string().optional(),
+ showArchived: z.boolean().default(false),
+ withTags: z.boolean().default(false),
+ groupBy: z.union([One$, Two$]).optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
+ ...(v.search === undefined ? null : { search: v.search }),
+ ...(v.userId === undefined ? null : { userId: v.userId }),
+ showArchived: v.showArchived,
+ withTags: v.withTags,
+ ...(v.groupBy === undefined ? null : { groupBy: v.groupBy }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetLinksCountResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ LinkSchemas?: Array<components.LinkSchema$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetLinksCountResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ LinkSchemas: z.array(components.LinkSchema$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.LinkSchemas === undefined ? null : { linkSchemas: v.LinkSchemas }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ LinkSchemas?: Array<components.LinkSchema$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ linkSchemas: z.array(components.LinkSchema$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.linkSchemas === undefined ? null : { LinkSchemas: v.linkSchemas }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getosanalytics.ts b/typescript/src/models/operations/getosanalytics.ts
new file mode 100644
index 0000000000..6b7ed15411
--- /dev/null
+++ b/typescript/src/models/operations/getosanalytics.ts
@@ -0,0 +1,535 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetOSAnalyticsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetOSAnalyticsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetOSAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetOSAnalyticsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetOSAnalyticsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetOSAnalyticsResponseBody = {
+ /**
+ * The name of the OS
+ */
+ os: string;
+ /**
+ * The number of clicks from this OS
+ */
+ clicks: number;
+};
+
+export type GetOSAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top OS by number of clicks
+ */
+ responseBodies?: Array<GetOSAnalyticsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetOSAnalyticsQueryParamInterval$ = z.nativeEnum(GetOSAnalyticsQueryParamInterval);
+
+/** @internal */
+export const GetOSAnalyticsQueryParamCountry$ = z.nativeEnum(GetOSAnalyticsQueryParamCountry);
+
+/** @internal */
+export namespace GetOSAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetOSAnalyticsQueryParamInterval | undefined;
+ country?: GetOSAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetOSAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetOSAnalyticsQueryParamInterval$.optional(),
+ country: GetOSAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetOSAnalyticsQueryParamInterval | undefined;
+ country?: GetOSAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOSAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetOSAnalyticsQueryParamInterval$.optional(),
+ country: GetOSAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetOSAnalyticsResponseBody$ {
+ export type Inbound = {
+ os: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetOSAnalyticsResponseBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ os: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ os: v.os,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ os: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOSAnalyticsResponseBody> = z
+ .object({
+ os: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ os: v.os,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetOSAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetOSAnalyticsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetOSAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetOSAnalyticsResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetOSAnalyticsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOSAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetOSAnalyticsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getqrcode.ts b/typescript/src/models/operations/getqrcode.ts
new file mode 100644
index 0000000000..ba0d08b6e5
--- /dev/null
+++ b/typescript/src/models/operations/getqrcode.ts
@@ -0,0 +1,152 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The level of error correction to use for the QR code. Defaults to `L` if not provided.
+ */
+export enum Level {
+ L = "L",
+ M = "M",
+ Q = "Q",
+ H = "H",
+}
+
+export type GetQRCodeRequest = {
+ /**
+ * The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.
+ */
+ url?: string | undefined;
+ /**
+ * The size of the QR code in pixels. Defaults to `600` if not provided.
+ */
+ size?: number | undefined;
+ /**
+ * The level of error correction to use for the QR code. Defaults to `L` if not provided.
+ */
+ level?: Level | undefined;
+ /**
+ * The foreground color of the QR code in hex format. Defaults to `#000000` if not provided.
+ */
+ fgColor?: string | undefined;
+ /**
+ * The background color of the QR code in hex format. Defaults to `#ffffff` if not provided.
+ */
+ bgColor?: string | undefined;
+ /**
+ * Whether to include a margin around the QR code. Defaults to `false` if not provided.
+ */
+ includeMargin?: boolean | undefined;
+};
+
+export type GetQRCodeResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The QR code
+ */
+ res?: string | undefined;
+};
+
+/** @internal */
+export const Level$ = z.nativeEnum(Level);
+
+/** @internal */
+export namespace GetQRCodeRequest$ {
+ export type Inbound = {
+ url?: string | undefined;
+ size?: number | undefined;
+ level?: Level | undefined;
+ fgColor?: string | undefined;
+ bgColor?: string | undefined;
+ includeMargin?: boolean | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetQRCodeRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ url: z.string().default("https://dub.co"),
+ size: z.number().default(600),
+ level: Level$.default(Level.L),
+ fgColor: z.string().default("#000000"),
+ bgColor: z.string().default("#FFFFFF"),
+ includeMargin: z.boolean().default(false),
+ })
+ .transform((v) => {
+ return {
+ url: v.url,
+ size: v.size,
+ level: v.level,
+ fgColor: v.fgColor,
+ bgColor: v.bgColor,
+ includeMargin: v.includeMargin,
+ };
+ });
+
+ export type Outbound = {
+ url: string;
+ size: number;
+ level: Level;
+ fgColor: string;
+ bgColor: string;
+ includeMargin: boolean;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetQRCodeRequest> = z
+ .object({
+ url: z.string().default("https://dub.co"),
+ size: z.number().default(600),
+ level: Level$.default(Level.L),
+ fgColor: z.string().default("#000000"),
+ bgColor: z.string().default("#FFFFFF"),
+ includeMargin: z.boolean().default(false),
+ })
+ .transform((v) => {
+ return {
+ url: v.url,
+ size: v.size,
+ level: v.level,
+ fgColor: v.fgColor,
+ bgColor: v.bgColor,
+ includeMargin: v.includeMargin,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetQRCodeResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ res?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetQRCodeResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ res: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.res === undefined ? null : { res: v.res }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ res?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetQRCodeResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ res: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.res === undefined ? null : { res: v.res }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getrefereranalytics.ts b/typescript/src/models/operations/getrefereranalytics.ts
new file mode 100644
index 0000000000..7a1ff2f961
--- /dev/null
+++ b/typescript/src/models/operations/getrefereranalytics.ts
@@ -0,0 +1,544 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetRefererAnalyticsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetRefererAnalyticsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetRefererAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetRefererAnalyticsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetRefererAnalyticsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetRefererAnalyticsResponseBody = {
+ /**
+ * The name of the referer. If unknown, this will be `(direct)`
+ */
+ referer: string;
+ /**
+ * The number of clicks from this referer
+ */
+ clicks: number;
+};
+
+export type GetRefererAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top referers by number of clicks
+ */
+ responseBodies?: Array<GetRefererAnalyticsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetRefererAnalyticsQueryParamInterval$ = z.nativeEnum(
+ GetRefererAnalyticsQueryParamInterval
+);
+
+/** @internal */
+export const GetRefererAnalyticsQueryParamCountry$ = z.nativeEnum(
+ GetRefererAnalyticsQueryParamCountry
+);
+
+/** @internal */
+export namespace GetRefererAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetRefererAnalyticsQueryParamInterval | undefined;
+ country?: GetRefererAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetRefererAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetRefererAnalyticsQueryParamInterval$.optional(),
+ country: GetRefererAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetRefererAnalyticsQueryParamInterval | undefined;
+ country?: GetRefererAnalyticsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetRefererAnalyticsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetRefererAnalyticsQueryParamInterval$.optional(),
+ country: GetRefererAnalyticsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetRefererAnalyticsResponseBody$ {
+ export type Inbound = {
+ referer: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetRefererAnalyticsResponseBody, z.ZodTypeDef, Inbound> =
+ z
+ .object({
+ referer: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ referer: v.referer,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ referer: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<
+ Outbound,
+ z.ZodTypeDef,
+ GetRefererAnalyticsResponseBody
+ > = z
+ .object({
+ referer: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ referer: v.referer,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetRefererAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetRefererAnalyticsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetRefererAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetRefererAnalyticsResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetRefererAnalyticsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetRefererAnalyticsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetRefererAnalyticsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/gettags.ts b/typescript/src/models/operations/gettags.ts
new file mode 100644
index 0000000000..c0ee19dd72
--- /dev/null
+++ b/typescript/src/models/operations/gettags.ts
@@ -0,0 +1,89 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+export type GetTagsRequest = {
+ /**
+ * The ID of the workspace to retrieve the tags for.
+ */
+ workspaceId: string;
+};
+
+export type GetTagsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * A list of tags
+ */
+ tagSchemas?: Array<components.TagSchema> | undefined;
+};
+
+/** @internal */
+export namespace GetTagsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ };
+
+ export const inboundSchema: z.ZodType<GetTagsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTagsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetTagsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ TagSchemas?: Array<components.TagSchema$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTagsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ TagSchemas: z.array(components.TagSchema$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.TagSchemas === undefined ? null : { tagSchemas: v.TagSchemas }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ TagSchemas?: Array<components.TagSchema$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTagsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ tagSchemas: z.array(components.TagSchema$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.tagSchemas === undefined ? null : { TagSchemas: v.tagSchemas }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/gettimeseriesanalytics.ts b/typescript/src/models/operations/gettimeseriesanalytics.ts
new file mode 100644
index 0000000000..3c3b640bef
--- /dev/null
+++ b/typescript/src/models/operations/gettimeseriesanalytics.ts
@@ -0,0 +1,535 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum QueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum QueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetTimeseriesAnalyticsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: QueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: QueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type ResponseBody = {
+ /**
+ * The starting timestamp of the interval
+ */
+ start: string;
+ /**
+ * The number of clicks in the interval
+ */
+ clicks: number;
+};
+
+export type GetTimeseriesAnalyticsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The number of clicks over a period of time
+ */
+ responseBodies?: Array<ResponseBody> | undefined;
+};
+
+/** @internal */
+export const QueryParamInterval$ = z.nativeEnum(QueryParamInterval);
+
+/** @internal */
+export const QueryParamCountry$ = z.nativeEnum(QueryParamCountry);
+
+/** @internal */
+export namespace GetTimeseriesAnalyticsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: QueryParamInterval | undefined;
+ country?: QueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTimeseriesAnalyticsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: QueryParamInterval$.optional(),
+ country: QueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: QueryParamInterval | undefined;
+ country?: QueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTimeseriesAnalyticsRequest> =
+ z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: QueryParamInterval$.optional(),
+ country: QueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace ResponseBody$ {
+ export type Inbound = {
+ start: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<ResponseBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ start: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ start: v.start,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ start: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ResponseBody> = z
+ .object({
+ start: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ start: v.start,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetTimeseriesAnalyticsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<ResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTimeseriesAnalyticsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z.array(z.lazy(() => ResponseBody$.inboundSchema)).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<ResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTimeseriesAnalyticsResponse> =
+ z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z.array(z.lazy(() => ResponseBody$.outboundSchema)).optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined
+ ? null
+ : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/gettoplinks.ts b/typescript/src/models/operations/gettoplinks.ts
new file mode 100644
index 0000000000..b422cbba6b
--- /dev/null
+++ b/typescript/src/models/operations/gettoplinks.ts
@@ -0,0 +1,535 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetTopLinksQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetTopLinksQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetTopLinksRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetTopLinksQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetTopLinksQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetTopLinksResponseBody = {
+ /**
+ * The unique ID of the short link
+ */
+ link: string;
+ /**
+ * The number of clicks from this link
+ */
+ clicks: number;
+};
+
+export type GetTopLinksResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top links by number of clicks
+ */
+ responseBodies?: Array<GetTopLinksResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetTopLinksQueryParamInterval$ = z.nativeEnum(GetTopLinksQueryParamInterval);
+
+/** @internal */
+export const GetTopLinksQueryParamCountry$ = z.nativeEnum(GetTopLinksQueryParamCountry);
+
+/** @internal */
+export namespace GetTopLinksRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetTopLinksQueryParamInterval | undefined;
+ country?: GetTopLinksQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTopLinksRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetTopLinksQueryParamInterval$.optional(),
+ country: GetTopLinksQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetTopLinksQueryParamInterval | undefined;
+ country?: GetTopLinksQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopLinksRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetTopLinksQueryParamInterval$.optional(),
+ country: GetTopLinksQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetTopLinksResponseBody$ {
+ export type Inbound = {
+ link: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetTopLinksResponseBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ link: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ link: v.link,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ link: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopLinksResponseBody> = z
+ .object({
+ link: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ link: v.link,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetTopLinksResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetTopLinksResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTopLinksResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetTopLinksResponseBody$.inboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetTopLinksResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopLinksResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetTopLinksResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/gettopurls.ts b/typescript/src/models/operations/gettopurls.ts
new file mode 100644
index 0000000000..56726c7aed
--- /dev/null
+++ b/typescript/src/models/operations/gettopurls.ts
@@ -0,0 +1,533 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+/**
+ * The interval to retrieve analytics for.
+ */
+export enum GetTopURLsQueryParamInterval {
+ Oneh = "1h",
+ TwentyFourh = "24h",
+ Sevend = "7d",
+ Thirtyd = "30d",
+ Ninetyd = "90d",
+ All = "all",
+}
+
+/**
+ * The country to retrieve analytics for.
+ */
+export enum GetTopURLsQueryParamCountry {
+ Af = "AF",
+ Al = "AL",
+ Dz = "DZ",
+ As = "AS",
+ Ad = "AD",
+ Ao = "AO",
+ Ai = "AI",
+ Aq = "AQ",
+ Ag = "AG",
+ Ar = "AR",
+ Am = "AM",
+ Aw = "AW",
+ Au = "AU",
+ At = "AT",
+ Az = "AZ",
+ Bs = "BS",
+ Bh = "BH",
+ Bd = "BD",
+ Bb = "BB",
+ By = "BY",
+ Be = "BE",
+ Bz = "BZ",
+ Bj = "BJ",
+ Bm = "BM",
+ Bt = "BT",
+ Bo = "BO",
+ Ba = "BA",
+ Bw = "BW",
+ Bv = "BV",
+ Br = "BR",
+ Io = "IO",
+ Bn = "BN",
+ Bg = "BG",
+ Bf = "BF",
+ Bi = "BI",
+ Kh = "KH",
+ Cm = "CM",
+ Ca = "CA",
+ Cv = "CV",
+ Ky = "KY",
+ Cf = "CF",
+ Td = "TD",
+ Cl = "CL",
+ Cn = "CN",
+ Cx = "CX",
+ Cc = "CC",
+ Co = "CO",
+ Km = "KM",
+ Cg = "CG",
+ Cd = "CD",
+ Ck = "CK",
+ Cr = "CR",
+ Ci = "CI",
+ Hr = "HR",
+ Cu = "CU",
+ Cy = "CY",
+ Cz = "CZ",
+ Dk = "DK",
+ Dj = "DJ",
+ Dm = "DM",
+ Do = "DO",
+ Ec = "EC",
+ Eg = "EG",
+ Sv = "SV",
+ Gq = "GQ",
+ Er = "ER",
+ Ee = "EE",
+ Et = "ET",
+ Fk = "FK",
+ Fo = "FO",
+ Fj = "FJ",
+ Fi = "FI",
+ Fr = "FR",
+ Gf = "GF",
+ Pf = "PF",
+ Tf = "TF",
+ Ga = "GA",
+ Gm = "GM",
+ Ge = "GE",
+ De = "DE",
+ Gh = "GH",
+ Gi = "GI",
+ Gr = "GR",
+ Gl = "GL",
+ Gd = "GD",
+ Gp = "GP",
+ Gu = "GU",
+ Gt = "GT",
+ Gn = "GN",
+ Gw = "GW",
+ Gy = "GY",
+ Ht = "HT",
+ Hm = "HM",
+ Va = "VA",
+ Hn = "HN",
+ Hk = "HK",
+ Hu = "HU",
+ Is = "IS",
+ In = "IN",
+ Id = "ID",
+ Ir = "IR",
+ Iq = "IQ",
+ Ie = "IE",
+ Il = "IL",
+ It = "IT",
+ Jm = "JM",
+ Jp = "JP",
+ Jo = "JO",
+ Kz = "KZ",
+ Ke = "KE",
+ Ki = "KI",
+ Kp = "KP",
+ Kr = "KR",
+ Kw = "KW",
+ Kg = "KG",
+ La = "LA",
+ Lv = "LV",
+ Lb = "LB",
+ Ls = "LS",
+ Lr = "LR",
+ Ly = "LY",
+ Li = "LI",
+ Lt = "LT",
+ Lu = "LU",
+ Mo = "MO",
+ Mg = "MG",
+ Mw = "MW",
+ My = "MY",
+ Mv = "MV",
+ Ml = "ML",
+ Mt = "MT",
+ Mh = "MH",
+ Mq = "MQ",
+ Mr = "MR",
+ Mu = "MU",
+ Yt = "YT",
+ Mx = "MX",
+ Fm = "FM",
+ Md = "MD",
+ Mc = "MC",
+ Mn = "MN",
+ Ms = "MS",
+ Ma = "MA",
+ Mz = "MZ",
+ Mm = "MM",
+ Na = "NA",
+ Nr = "NR",
+ Np = "NP",
+ Nl = "NL",
+ Nc = "NC",
+ Nz = "NZ",
+ Ni = "NI",
+ Ne = "NE",
+ Ng = "NG",
+ Nu = "NU",
+ Nf = "NF",
+ Mk = "MK",
+ Mp = "MP",
+ No = "NO",
+ Om = "OM",
+ Pk = "PK",
+ Pw = "PW",
+ Ps = "PS",
+ Pa = "PA",
+ Pg = "PG",
+ Py = "PY",
+ Pe = "PE",
+ Ph = "PH",
+ Pn = "PN",
+ Pl = "PL",
+ Pt = "PT",
+ Pr = "PR",
+ Qa = "QA",
+ Re = "RE",
+ Ro = "RO",
+ Ru = "RU",
+ Rw = "RW",
+ Sh = "SH",
+ Kn = "KN",
+ Lc = "LC",
+ Pm = "PM",
+ Vc = "VC",
+ Ws = "WS",
+ Sm = "SM",
+ St = "ST",
+ Sa = "SA",
+ Sn = "SN",
+ Sc = "SC",
+ Sl = "SL",
+ Sg = "SG",
+ Sk = "SK",
+ Si = "SI",
+ Sb = "SB",
+ So = "SO",
+ Za = "ZA",
+ Gs = "GS",
+ Es = "ES",
+ Lk = "LK",
+ Sd = "SD",
+ Sr = "SR",
+ Sj = "SJ",
+ Sz = "SZ",
+ Se = "SE",
+ Ch = "CH",
+ Sy = "SY",
+ Tw = "TW",
+ Tj = "TJ",
+ Tz = "TZ",
+ Th = "TH",
+ Tl = "TL",
+ Tg = "TG",
+ Tk = "TK",
+ To = "TO",
+ Tt = "TT",
+ Tn = "TN",
+ Tr = "TR",
+ Tm = "TM",
+ Tc = "TC",
+ Tv = "TV",
+ Ug = "UG",
+ Ua = "UA",
+ Ae = "AE",
+ Gb = "GB",
+ Us = "US",
+ Um = "UM",
+ Uy = "UY",
+ Uz = "UZ",
+ Vu = "VU",
+ Ve = "VE",
+ Vn = "VN",
+ Vg = "VG",
+ Vi = "VI",
+ Wf = "WF",
+ Eh = "EH",
+ Ye = "YE",
+ Zm = "ZM",
+ Zw = "ZW",
+ Ax = "AX",
+ Bq = "BQ",
+ Cw = "CW",
+ Gg = "GG",
+ Im = "IM",
+ Je = "JE",
+ Me = "ME",
+ Bl = "BL",
+ Mf = "MF",
+ Rs = "RS",
+ Sx = "SX",
+ Ss = "SS",
+ Xk = "XK",
+}
+
+export type GetTopURLsRequest = {
+ /**
+ * The ID of the workspace the link belongs to.
+ */
+ workspaceId: string;
+ /**
+ * The domain of the short link.
+ */
+ domain?: string | undefined;
+ /**
+ * The short link slug.
+ */
+ key?: string | undefined;
+ /**
+ * The interval to retrieve analytics for.
+ */
+ interval?: GetTopURLsQueryParamInterval | undefined;
+ /**
+ * The country to retrieve analytics for.
+ */
+ country?: GetTopURLsQueryParamCountry | undefined;
+ /**
+ * The city to retrieve analytics for.
+ */
+ city?: string | undefined;
+ /**
+ * The device to retrieve analytics for.
+ */
+ device?: string | undefined;
+ /**
+ * The browser to retrieve analytics for.
+ */
+ browser?: string | undefined;
+ /**
+ * The OS to retrieve analytics for.
+ */
+ os?: string | undefined;
+ /**
+ * The referer to retrieve analytics for.
+ */
+ referer?: string | undefined;
+ /**
+ * The URL to retrieve analytics for.
+ */
+ url?: string | undefined;
+ /**
+ * Whether to exclude the root link from the response.
+ */
+ excludeRoot?: boolean | undefined;
+ /**
+ * The tag ID to retrieve analytics for.
+ */
+ tagId?: string | undefined;
+};
+
+export type GetTopURLsResponseBody = {
+ /**
+ * The destination URL
+ */
+ url: string;
+ /**
+ * The number of clicks from this URL
+ */
+ clicks: number;
+};
+
+export type GetTopURLsResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The top URLs by number of clicks
+ */
+ responseBodies?: Array<GetTopURLsResponseBody> | undefined;
+};
+
+/** @internal */
+export const GetTopURLsQueryParamInterval$ = z.nativeEnum(GetTopURLsQueryParamInterval);
+
+/** @internal */
+export const GetTopURLsQueryParamCountry$ = z.nativeEnum(GetTopURLsQueryParamCountry);
+
+/** @internal */
+export namespace GetTopURLsRequest$ {
+ export type Inbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetTopURLsQueryParamInterval | undefined;
+ country?: GetTopURLsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTopURLsRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetTopURLsQueryParamInterval$.optional(),
+ country: GetTopURLsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+
+ export type Outbound = {
+ workspaceId: string;
+ domain?: string | undefined;
+ key?: string | undefined;
+ interval?: GetTopURLsQueryParamInterval | undefined;
+ country?: GetTopURLsQueryParamCountry | undefined;
+ city?: string | undefined;
+ device?: string | undefined;
+ browser?: string | undefined;
+ os?: string | undefined;
+ referer?: string | undefined;
+ url?: string | undefined;
+ excludeRoot?: boolean | undefined;
+ tagId?: string | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopURLsRequest> = z
+ .object({
+ workspaceId: z.string(),
+ domain: z.string().optional(),
+ key: z.string().optional(),
+ interval: GetTopURLsQueryParamInterval$.optional(),
+ country: GetTopURLsQueryParamCountry$.optional(),
+ city: z.string().optional(),
+ device: z.string().optional(),
+ browser: z.string().optional(),
+ os: z.string().optional(),
+ referer: z.string().optional(),
+ url: z.string().optional(),
+ excludeRoot: z.boolean().optional(),
+ tagId: z.string().optional(),
+ })
+ .transform((v) => {
+ return {
+ workspaceId: v.workspaceId,
+ ...(v.domain === undefined ? null : { domain: v.domain }),
+ ...(v.key === undefined ? null : { key: v.key }),
+ ...(v.interval === undefined ? null : { interval: v.interval }),
+ ...(v.country === undefined ? null : { country: v.country }),
+ ...(v.city === undefined ? null : { city: v.city }),
+ ...(v.device === undefined ? null : { device: v.device }),
+ ...(v.browser === undefined ? null : { browser: v.browser }),
+ ...(v.os === undefined ? null : { os: v.os }),
+ ...(v.referer === undefined ? null : { referer: v.referer }),
+ ...(v.url === undefined ? null : { url: v.url }),
+ ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }),
+ ...(v.tagId === undefined ? null : { tagId: v.tagId }),
+ };
+ });
+}
+
+/** @internal */
+export namespace GetTopURLsResponseBody$ {
+ export type Inbound = {
+ url: string;
+ clicks: number;
+ };
+
+ export const inboundSchema: z.ZodType<GetTopURLsResponseBody, z.ZodTypeDef, Inbound> = z
+ .object({
+ url: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ url: v.url,
+ clicks: v.clicks,
+ };
+ });
+
+ export type Outbound = {
+ url: string;
+ clicks: number;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopURLsResponseBody> = z
+ .object({
+ url: z.string(),
+ clicks: z.number(),
+ })
+ .transform((v) => {
+ return {
+ url: v.url,
+ clicks: v.clicks,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetTopURLsResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ responseBodies?: Array<GetTopURLsResponseBody$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetTopURLsResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ responseBodies: z.array(z.lazy(() => GetTopURLsResponseBody$.inboundSchema)).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ responseBodies?: Array<GetTopURLsResponseBody$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopURLsResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ responseBodies: z
+ .array(z.lazy(() => GetTopURLsResponseBody$.outboundSchema))
+ .optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getworkspace.ts b/typescript/src/models/operations/getworkspace.ts
new file mode 100644
index 0000000000..8c6aa2c1e8
--- /dev/null
+++ b/typescript/src/models/operations/getworkspace.ts
@@ -0,0 +1,93 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+export type GetWorkspaceRequest = {
+ /**
+ * The ID or slug of the workspace.
+ */
+ idOrSlug: string;
+};
+
+export type GetWorkspaceResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * The retrieved workspace
+ */
+ workspaceSchema?: components.WorkspaceSchema | undefined;
+};
+
+/** @internal */
+export namespace GetWorkspaceRequest$ {
+ export type Inbound = {
+ idOrSlug: string;
+ };
+
+ export const inboundSchema: z.ZodType<GetWorkspaceRequest, z.ZodTypeDef, Inbound> = z
+ .object({
+ idOrSlug: z.string(),
+ })
+ .transform((v) => {
+ return {
+ idOrSlug: v.idOrSlug,
+ };
+ });
+
+ export type Outbound = {
+ idOrSlug: string;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetWorkspaceRequest> = z
+ .object({
+ idOrSlug: z.string(),
+ })
+ .transform((v) => {
+ return {
+ idOrSlug: v.idOrSlug,
+ };
+ });
+}
+
+/** @internal */
+export namespace GetWorkspaceResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ WorkspaceSchema?: components.WorkspaceSchema$.Inbound | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetWorkspaceResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ WorkspaceSchema: components.WorkspaceSchema$.inboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.WorkspaceSchema === undefined
+ ? null
+ : { workspaceSchema: v.WorkspaceSchema }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ WorkspaceSchema?: components.WorkspaceSchema$.Outbound | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetWorkspaceResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ workspaceSchema: components.WorkspaceSchema$.outboundSchema.optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.workspaceSchema === undefined
+ ? null
+ : { WorkspaceSchema: v.workspaceSchema }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/getworkspaces.ts b/typescript/src/models/operations/getworkspaces.ts
new file mode 100644
index 0000000000..beb4c8f066
--- /dev/null
+++ b/typescript/src/models/operations/getworkspaces.ts
@@ -0,0 +1,55 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as components from "../components";
+import * as z from "zod";
+
+export type GetWorkspacesResponse = {
+ httpMeta: components.HTTPMetadata;
+ /**
+ * A list of workspaces
+ */
+ workspaceSchemas?: Array<components.WorkspaceSchema> | undefined;
+};
+
+/** @internal */
+export namespace GetWorkspacesResponse$ {
+ export type Inbound = {
+ HttpMeta: components.HTTPMetadata$.Inbound;
+ WorkspaceSchemas?: Array<components.WorkspaceSchema$.Inbound> | undefined;
+ };
+
+ export const inboundSchema: z.ZodType<GetWorkspacesResponse, z.ZodTypeDef, Inbound> = z
+ .object({
+ HttpMeta: components.HTTPMetadata$.inboundSchema,
+ WorkspaceSchemas: z.array(components.WorkspaceSchema$.inboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ httpMeta: v.HttpMeta,
+ ...(v.WorkspaceSchemas === undefined
+ ? null
+ : { workspaceSchemas: v.WorkspaceSchemas }),
+ };
+ });
+
+ export type Outbound = {
+ HttpMeta: components.HTTPMetadata$.Outbound;
+ WorkspaceSchemas?: Array<components.WorkspaceSchema$.Outbound> | undefined;
+ };
+
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetWorkspacesResponse> = z
+ .object({
+ httpMeta: components.HTTPMetadata$.outboundSchema,
+ workspaceSchemas: z.array(components.WorkspaceSchema$.outboundSchema).optional(),
+ })
+ .transform((v) => {
+ return {
+ HttpMeta: v.httpMeta,
+ ...(v.workspaceSchemas === undefined
+ ? null
+ : { WorkspaceSchemas: v.workspaceSchemas }),
+ };
+ });
+}
diff --git a/typescript/src/models/operations/index.ts b/typescript/src/models/operations/index.ts
new file mode 100644
index 0000000000..214d53f23a
--- /dev/null
+++ b/typescript/src/models/operations/index.ts
@@ -0,0 +1,27 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export * from "./bulkcreatelinks";
+export * from "./createlink";
+export * from "./createtag";
+export * from "./createworkspace";
+export * from "./deletelink";
+export * from "./editlink";
+export * from "./getbrowseranalytics";
+export * from "./getcityanalytics";
+export * from "./getclicksanalytics";
+export * from "./getcountryanalytics";
+export * from "./getdeviceanalytics";
+export * from "./getlinkinfo";
+export * from "./getlinks";
+export * from "./getlinkscount";
+export * from "./getosanalytics";
+export * from "./getqrcode";
+export * from "./getrefereranalytics";
+export * from "./gettags";
+export * from "./gettimeseriesanalytics";
+export * from "./gettoplinks";
+export * from "./gettopurls";
+export * from "./getworkspace";
+export * from "./getworkspaces";
diff --git a/typescript/src/sdk/analytics.ts b/typescript/src/sdk/analytics.ts
new file mode 100644
index 0000000000..bb5de4ec65
--- /dev/null
+++ b/typescript/src/sdk/analytics.ts
@@ -0,0 +1,2500 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { SDKHooks } from "../hooks";
+import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
+import * as enc$ from "../lib/encodings";
+import { HTTPClient } from "../lib/http";
+import * as schemas$ from "../lib/schemas";
+import { ClientSDK, RequestOptions } from "../lib/sdks";
+import * as errors from "../models/errors";
+import * as operations from "../models/operations";
+
+export class Analytics extends ClientSDK {
+ private readonly options$: SDKOptions & { hooks?: SDKHooks };
+
+ constructor(options: SDKOptions = {}) {
+ const opt = options as unknown;
+ let hooks: SDKHooks;
+ if (
+ typeof opt === "object" &&
+ opt != null &&
+ "hooks" in opt &&
+ opt.hooks instanceof SDKHooks
+ ) {
+ hooks = opt.hooks;
+ } else {
+ hooks = new SDKHooks();
+ }
+
+ super({
+ client: options.httpClient || new HTTPClient(),
+ baseURL: serverURLFromOptions(options),
+ hooks,
+ });
+
+ this.options$ = { ...options, hooks };
+ void this.options$;
+ }
+
+ /**
+ * Retrieve clicks analytics
+ *
+ * @remarks
+ * Retrieve the number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getClicksAnalytics(
+ input: operations.GetClicksAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetClicksAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetClicksAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/clicks")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getClicksAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetClicksAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ number: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve timeseries analytics
+ *
+ * @remarks
+ * Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.
+ */
+ async getTimeseriesAnalytics(
+ input: operations.GetTimeseriesAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetTimeseriesAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetTimeseriesAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/timeseries")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getTimeseriesAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve country analytics
+ *
+ * @remarks
+ * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getCountryAnalytics(
+ input: operations.GetCountryAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetCountryAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetCountryAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/country")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getCountryAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetCountryAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve city analytics
+ *
+ * @remarks
+ * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getCityAnalytics(
+ input: operations.GetCityAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetCityAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetCityAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/city")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getCityAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetCityAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve device analytics
+ *
+ * @remarks
+ * Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getDeviceAnalytics(
+ input: operations.GetDeviceAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetDeviceAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetDeviceAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/device")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getDeviceAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve browser analytics
+ *
+ * @remarks
+ * Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getBrowserAnalytics(
+ input: operations.GetBrowserAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetBrowserAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetBrowserAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/browser")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getBrowserAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve OS analytics
+ *
+ * @remarks
+ * Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getOSAnalytics(
+ input: operations.GetOSAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetOSAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetOSAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/os")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getOSAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetOSAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve referer analytics
+ *
+ * @remarks
+ * Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.
+ */
+ async getRefererAnalytics(
+ input: operations.GetRefererAnalyticsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetRefererAnalyticsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetRefererAnalyticsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/referer")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getRefererAnalytics",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetRefererAnalyticsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve top links
+ *
+ * @remarks
+ * Retrieve the top links by number of clicks for a domain or the authenticated workspace.
+ */
+ async getTopLinks(
+ input: operations.GetTopLinksRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetTopLinksResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetTopLinksRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/top_links")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getTopLinks",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetTopLinksResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve top URLs
+ *
+ * @remarks
+ * Retrieve the top URLs by number of clicks for a given short link.
+ */
+ async getTopURLs(
+ input: operations.GetTopURLsRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetTopURLsResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetTopURLsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/analytics/top_urls")();
+
+ const query$ = [
+ enc$.encodeForm("browser", payload$.browser, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("country", payload$.country, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("excludeRoot", payload$.excludeRoot, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("interval", payload$.interval, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("referer", payload$.referer, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getTopURLs",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetTopURLsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ responseBodies: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+}
diff --git a/typescript/src/sdk/index.ts b/typescript/src/sdk/index.ts
new file mode 100644
index 0000000000..313031483f
--- /dev/null
+++ b/typescript/src/sdk/index.ts
@@ -0,0 +1,5 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export * from "./sdk";
diff --git a/typescript/src/sdk/links.ts b/typescript/src/sdk/links.ts
new file mode 100644
index 0000000000..279a2f3347
--- /dev/null
+++ b/typescript/src/sdk/links.ts
@@ -0,0 +1,1651 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { SDKHooks } from "../hooks";
+import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
+import * as enc$ from "../lib/encodings";
+import { HTTPClient } from "../lib/http";
+import * as schemas$ from "../lib/schemas";
+import { ClientSDK, RequestOptions } from "../lib/sdks";
+import * as errors from "../models/errors";
+import * as operations from "../models/operations";
+
+export class Links extends ClientSDK {
+ private readonly options$: SDKOptions & { hooks?: SDKHooks };
+
+ constructor(options: SDKOptions = {}) {
+ const opt = options as unknown;
+ let hooks: SDKHooks;
+ if (
+ typeof opt === "object" &&
+ opt != null &&
+ "hooks" in opt &&
+ opt.hooks instanceof SDKHooks
+ ) {
+ hooks = opt.hooks;
+ } else {
+ hooks = new SDKHooks();
+ }
+
+ super({
+ client: options.httpClient || new HTTPClient(),
+ baseURL: serverURLFromOptions(options),
+ hooks,
+ });
+
+ this.options$ = { ...options, hooks };
+ void this.options$;
+ }
+
+ /**
+ * Retrieve a list of links
+ *
+ * @remarks
+ * Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links.
+ */
+ async getLinks(
+ input: operations.GetLinksRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetLinksResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetLinksRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/links")();
+
+ const query$ = [
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("page", payload$.page, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("showArchived", payload$.showArchived, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("sort", payload$.sort, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("withTags", payload$.withTags, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getLinks",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetLinksResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchemas: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Create a new link
+ *
+ * @remarks
+ * Create a new link for the authenticated workspace.
+ */
+ async createLink(
+ workspaceId: string,
+ requestBody?: operations.CreateLinkRequestBody | undefined,
+ options?: RequestOptions
+ ): Promise<operations.CreateLinkResponse> {
+ const input$: operations.CreateLinkRequest = {
+ workspaceId: workspaceId,
+ requestBody: requestBody,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Content-Type", "application/json");
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.CreateLinkRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
+
+ const path$ = this.templateURLComponent("/links")();
+
+ const query$ = [
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "createLink",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "POST",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.CreateLinkResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve the number of links
+ *
+ * @remarks
+ * Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links.
+ */
+ async getLinksCount(
+ input: operations.GetLinksCountRequest,
+ options?: RequestOptions
+ ): Promise<operations.GetLinksCountResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetLinksCountRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/links/count")();
+
+ const query$ = [
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("groupBy", payload$.groupBy, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("showArchived", payload$.showArchived, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("withTags", payload$.withTags, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getLinksCount",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetLinksCountResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchemas: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve a link
+ *
+ * @remarks
+ * Retrieve the info for a link from their domain and key.
+ */
+ async getLinkInfo(
+ workspaceId: string,
+ domain: string,
+ key: string,
+ options?: RequestOptions
+ ): Promise<operations.GetLinkInfoResponse> {
+ const input$: operations.GetLinkInfoRequest = {
+ workspaceId: workspaceId,
+ domain: domain,
+ key: key,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.GetLinkInfoRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/links/info")();
+
+ const query$ = [
+ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getLinkInfo",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetLinkInfoResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Edit a link
+ *
+ * @remarks
+ * Edit a link for the authenticated workspace.
+ */
+ async editLink(
+ linkId: string,
+ workspaceId: string,
+ requestBody?: operations.EditLinkRequestBody | undefined,
+ options?: RequestOptions
+ ): Promise<operations.EditLinkResponse> {
+ const input$: operations.EditLinkRequest = {
+ linkId: linkId,
+ workspaceId: workspaceId,
+ requestBody: requestBody,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Content-Type", "application/json");
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.EditLinkRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
+
+ const pathParams$ = {
+ linkId: enc$.encodeSimple("linkId", payload$.linkId, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$);
+
+ const query$ = [
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "editLink",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "PUT",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.EditLinkResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Delete a link
+ *
+ * @remarks
+ * Delete a link for the authenticated workspace.
+ */
+ async deleteLink(
+ linkId: string,
+ workspaceId: string,
+ options?: RequestOptions
+ ): Promise<operations.DeleteLinkResponse> {
+ const input$: operations.DeleteLinkRequest = {
+ linkId: linkId,
+ workspaceId: workspaceId,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.DeleteLinkRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const pathParams$ = {
+ linkId: enc$.encodeSimple("linkId", payload$.linkId, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$);
+
+ const query$ = [
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "deleteLink",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "DELETE",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.DeleteLinkResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Bulk create links
+ *
+ * @remarks
+ * Bulk create up to 100 links for the authenticated workspace.
+ */
+ async bulkCreateLinks(
+ workspaceId: string,
+ requestBody?: Array<operations.RequestBody> | undefined,
+ options?: RequestOptions
+ ): Promise<operations.BulkCreateLinksResponse> {
+ const input$: operations.BulkCreateLinksRequest = {
+ workspaceId: workspaceId,
+ requestBody: requestBody,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Content-Type", "application/json");
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.BulkCreateLinksRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
+
+ const path$ = this.templateURLComponent("/links/bulk")();
+
+ const query$ = [
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "bulkCreateLinks",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "POST",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.BulkCreateLinksResponse$.inboundSchema.parse({
+ ...responseFields$,
+ LinkSchemas: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+}
diff --git a/typescript/src/sdk/qrcodes.ts b/typescript/src/sdk/qrcodes.ts
new file mode 100644
index 0000000000..a58725173f
--- /dev/null
+++ b/typescript/src/sdk/qrcodes.ts
@@ -0,0 +1,277 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { SDKHooks } from "../hooks";
+import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
+import * as enc$ from "../lib/encodings";
+import { HTTPClient } from "../lib/http";
+import * as schemas$ from "../lib/schemas";
+import { ClientSDK, RequestOptions } from "../lib/sdks";
+import * as errors from "../models/errors";
+import * as operations from "../models/operations";
+
+export enum GetQRCodeAcceptEnum {
+ applicationJson = "application/json",
+ imagePng = "image/png",
+}
+
+export class QRCodes extends ClientSDK {
+ private readonly options$: SDKOptions & { hooks?: SDKHooks };
+
+ constructor(options: SDKOptions = {}) {
+ const opt = options as unknown;
+ let hooks: SDKHooks;
+ if (
+ typeof opt === "object" &&
+ opt != null &&
+ "hooks" in opt &&
+ opt.hooks instanceof SDKHooks
+ ) {
+ hooks = opt.hooks;
+ } else {
+ hooks = new SDKHooks();
+ }
+
+ super({
+ client: options.httpClient || new HTTPClient(),
+ baseURL: serverURLFromOptions(options),
+ hooks,
+ });
+
+ this.options$ = { ...options, hooks };
+ void this.options$;
+ }
+
+ /**
+ * Retrieve a QR code
+ *
+ * @remarks
+ * Retrieve a QR code for a link.
+ */
+ async getQRCode(
+ input: operations.GetQRCodeRequest,
+ options?: RequestOptions & { acceptHeaderOverride?: GetQRCodeAcceptEnum }
+ ): Promise<operations.GetQRCodeResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+
+ const accept = options?.acceptHeaderOverride || "application/json;q=1, image/png;q=0";
+ headers$.set("Accept", accept);
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) => operations.GetQRCodeRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/qr")();
+
+ const query$ = [
+ enc$.encodeForm("bgColor", payload$.bgColor, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("fgColor", payload$.fgColor, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("includeMargin", payload$.includeMargin, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ enc$.encodeForm("level", payload$.level, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("size", payload$.size, { explode: true, charEncoding: "percent" }),
+ enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getQRCode",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "image/png")) {
+ const responseBody = await response.text();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetQRCodeResponse$.inboundSchema.parse({
+ ...responseFields$,
+ res: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+}
diff --git a/typescript/src/sdk/sdk.ts b/typescript/src/sdk/sdk.ts
new file mode 100644
index 0000000000..091c1abe29
--- /dev/null
+++ b/typescript/src/sdk/sdk.ts
@@ -0,0 +1,66 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { SDKHooks } from "../hooks";
+import { SDKOptions, serverURLFromOptions } from "../lib/config";
+import { HTTPClient } from "../lib/http";
+import { ClientSDK } from "../lib/sdks";
+import { Analytics } from "./analytics";
+import { Links } from "./links";
+import { QRCodes } from "./qrcodes";
+import { Tags } from "./tags";
+import { Workspaces } from "./workspaces";
+
+export class Dub extends ClientSDK {
+ private readonly options$: SDKOptions & { hooks?: SDKHooks };
+
+ constructor(options: SDKOptions = {}) {
+ const opt = options as unknown;
+ let hooks: SDKHooks;
+ if (
+ typeof opt === "object" &&
+ opt != null &&
+ "hooks" in opt &&
+ opt.hooks instanceof SDKHooks
+ ) {
+ hooks = opt.hooks;
+ } else {
+ hooks = new SDKHooks();
+ }
+
+ super({
+ client: options.httpClient || new HTTPClient(),
+ baseURL: serverURLFromOptions(options),
+ hooks,
+ });
+
+ this.options$ = { ...options, hooks };
+ void this.options$;
+ }
+
+ private _links?: Links;
+ get links() {
+ return (this._links ??= new Links(this.options$));
+ }
+
+ private _qrCodes?: QRCodes;
+ get qrCodes() {
+ return (this._qrCodes ??= new QRCodes(this.options$));
+ }
+
+ private _analytics?: Analytics;
+ get analytics() {
+ return (this._analytics ??= new Analytics(this.options$));
+ }
+
+ private _workspaces?: Workspaces;
+ get workspaces() {
+ return (this._workspaces ??= new Workspaces(this.options$));
+ }
+
+ private _tags?: Tags;
+ get tags() {
+ return (this._tags ??= new Tags(this.options$));
+ }
+}
diff --git a/typescript/src/sdk/tags.ts b/typescript/src/sdk/tags.ts
new file mode 100644
index 0000000000..e3ed7b5f23
--- /dev/null
+++ b/typescript/src/sdk/tags.ts
@@ -0,0 +1,487 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { SDKHooks } from "../hooks";
+import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
+import * as enc$ from "../lib/encodings";
+import { HTTPClient } from "../lib/http";
+import * as schemas$ from "../lib/schemas";
+import { ClientSDK, RequestOptions } from "../lib/sdks";
+import * as errors from "../models/errors";
+import * as operations from "../models/operations";
+
+export class Tags extends ClientSDK {
+ private readonly options$: SDKOptions & { hooks?: SDKHooks };
+
+ constructor(options: SDKOptions = {}) {
+ const opt = options as unknown;
+ let hooks: SDKHooks;
+ if (
+ typeof opt === "object" &&
+ opt != null &&
+ "hooks" in opt &&
+ opt.hooks instanceof SDKHooks
+ ) {
+ hooks = opt.hooks;
+ } else {
+ hooks = new SDKHooks();
+ }
+
+ super({
+ client: options.httpClient || new HTTPClient(),
+ baseURL: serverURLFromOptions(options),
+ hooks,
+ });
+
+ this.options$ = { ...options, hooks };
+ void this.options$;
+ }
+
+ /**
+ * Retrieve a list of tags
+ *
+ * @remarks
+ * Retrieve a list of tags for the authenticated workspace.
+ */
+ async getTags(
+ workspaceId: string,
+ options?: RequestOptions
+ ): Promise<operations.GetTagsResponse> {
+ const input$: operations.GetTagsRequest = {
+ workspaceId: workspaceId,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.GetTagsRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const path$ = this.templateURLComponent("/tags")();
+
+ const query$ = [
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getTags",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetTagsResponse$.inboundSchema.parse({
+ ...responseFields$,
+ TagSchemas: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Create a new tag
+ *
+ * @remarks
+ * Create a new tag for the authenticated workspace.
+ */
+ async createTag(
+ workspaceId: string,
+ requestBody?: operations.CreateTagRequestBody | undefined,
+ options?: RequestOptions
+ ): Promise<operations.CreateTagResponse> {
+ const input$: operations.CreateTagRequest = {
+ workspaceId: workspaceId,
+ requestBody: requestBody,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Content-Type", "application/json");
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.CreateTagRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
+
+ const path$ = this.templateURLComponent("/tags")();
+
+ const query$ = [
+ enc$.encodeForm("workspaceId", payload$.workspaceId, {
+ explode: true,
+ charEncoding: "percent",
+ }),
+ ]
+ .filter(Boolean)
+ .join("&");
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "createTag",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "POST",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 201, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.CreateTagResponse$.inboundSchema.parse({
+ ...responseFields$,
+ TagSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+}
diff --git a/typescript/src/sdk/workspaces.ts b/typescript/src/sdk/workspaces.ts
new file mode 100644
index 0000000000..744442b270
--- /dev/null
+++ b/typescript/src/sdk/workspaces.ts
@@ -0,0 +1,677 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import { SDKHooks } from "../hooks";
+import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
+import * as enc$ from "../lib/encodings";
+import { HTTPClient } from "../lib/http";
+import * as schemas$ from "../lib/schemas";
+import { ClientSDK, RequestOptions } from "../lib/sdks";
+import * as errors from "../models/errors";
+import * as operations from "../models/operations";
+
+export class Workspaces extends ClientSDK {
+ private readonly options$: SDKOptions & { hooks?: SDKHooks };
+
+ constructor(options: SDKOptions = {}) {
+ const opt = options as unknown;
+ let hooks: SDKHooks;
+ if (
+ typeof opt === "object" &&
+ opt != null &&
+ "hooks" in opt &&
+ opt.hooks instanceof SDKHooks
+ ) {
+ hooks = opt.hooks;
+ } else {
+ hooks = new SDKHooks();
+ }
+
+ super({
+ client: options.httpClient || new HTTPClient(),
+ baseURL: serverURLFromOptions(options),
+ hooks,
+ });
+
+ this.options$ = { ...options, hooks };
+ void this.options$;
+ }
+
+ /**
+ * Retrieve a list of workspaces
+ *
+ * @remarks
+ * Retrieve a list of workspaces for the authenticated user.
+ */
+ async getWorkspaces(options?: RequestOptions): Promise<operations.GetWorkspacesResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const path$ = this.templateURLComponent("/workspaces")();
+
+ const query$ = "";
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getWorkspaces",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetWorkspacesResponse$.inboundSchema.parse({
+ ...responseFields$,
+ WorkspaceSchemas: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Create a workspace
+ *
+ * @remarks
+ * Create a new workspace for the authenticated user.
+ */
+ async createWorkspace(
+ input: operations.CreateWorkspaceRequestBody | undefined,
+ options?: RequestOptions
+ ): Promise<operations.CreateWorkspaceResponse> {
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Content-Type", "application/json");
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input,
+ (value$) =>
+ operations.CreateWorkspaceRequestBody$.outboundSchema.optional().parse(value$),
+ "Input validation failed"
+ );
+ const body$ =
+ payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
+
+ const path$ = this.templateURLComponent("/workspaces")();
+
+ const query$ = "";
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "createWorkspace",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "POST",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.CreateWorkspaceResponse$.inboundSchema.parse({
+ ...responseFields$,
+ WorkspaceSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+
+ /**
+ * Retrieve a workspace
+ *
+ * @remarks
+ * Retrieve a workspace for the authenticated user.
+ */
+ async getWorkspace(
+ idOrSlug: string,
+ options?: RequestOptions
+ ): Promise<operations.GetWorkspaceResponse> {
+ const input$: operations.GetWorkspaceRequest = {
+ idOrSlug: idOrSlug,
+ };
+ const headers$ = new Headers();
+ headers$.set("user-agent", SDK_METADATA.userAgent);
+ headers$.set("Accept", "application/json");
+
+ const payload$ = schemas$.parse(
+ input$,
+ (value$) => operations.GetWorkspaceRequest$.outboundSchema.parse(value$),
+ "Input validation failed"
+ );
+ const body$ = null;
+
+ const pathParams$ = {
+ idOrSlug: enc$.encodeSimple("idOrSlug", payload$.idOrSlug, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path$ = this.templateURLComponent("/workspaces/{idOrSlug}")(pathParams$);
+
+ const query$ = "";
+
+ let security$;
+ if (typeof this.options$.bearerToken === "function") {
+ security$ = { bearerToken: await this.options$.bearerToken() };
+ } else if (this.options$.bearerToken) {
+ security$ = { bearerToken: this.options$.bearerToken };
+ } else {
+ security$ = {};
+ }
+ const context = {
+ operationID: "getWorkspace",
+ oAuth2Scopes: [],
+ securitySource: this.options$.bearerToken,
+ };
+ const securitySettings$ = this.resolveGlobalSecurity(security$);
+
+ const doOptions = {
+ context,
+ errorCodes: [
+ "400",
+ "401",
+ "403",
+ "404",
+ "409",
+ "410",
+ "422",
+ "429",
+ "4XX",
+ "500",
+ "5XX",
+ ],
+ };
+ const request = this.createRequest$(
+ {
+ security: securitySettings$,
+ method: "GET",
+ path: path$,
+ headers: headers$,
+ query: query$,
+ body: body$,
+ },
+ options
+ );
+
+ const response = await this.do$(request, doOptions);
+
+ const responseFields$ = {
+ HttpMeta: {
+ Response: response,
+ Request: request,
+ },
+ };
+
+ if (this.matchResponse(response, 200, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return operations.GetWorkspaceResponse$.inboundSchema.parse({
+ ...responseFields$,
+ WorkspaceSchema: val$,
+ });
+ },
+ "Response validation failed"
+ );
+ return result;
+ } else if (this.matchResponse(response, 400, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 401, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndOne$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 403, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndThree$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 404, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndFour$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 409, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 410, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTen$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 422, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyTwo$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 429, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FourHundredAndTwentyNine$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else if (this.matchResponse(response, 500, "application/json")) {
+ const responseBody = await response.json();
+ const result = schemas$.parse(
+ responseBody,
+ (val$) => {
+ return errors.FiveHundred$.inboundSchema.parse({
+ ...responseFields$,
+ ...val$,
+ });
+ },
+ "Response validation failed"
+ );
+ throw result;
+ } else {
+ throw new errors.SDKError("Unexpected API response", { response, request });
+ }
+ }
+}
diff --git a/typescript/src/types/blobs.ts b/typescript/src/types/blobs.ts
new file mode 100644
index 0000000000..2c21e4100e
--- /dev/null
+++ b/typescript/src/types/blobs.ts
@@ -0,0 +1,30 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+
+export const blobLikeSchema = z.custom<Blob>(isBlobLike, {
+ message: "expected a Blob, File or Blob-like object",
+ fatal: true,
+});
+
+export function isBlobLike(val: unknown): val is Blob {
+ if (val instanceof Blob) {
+ return true;
+ }
+
+ if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
+ return false;
+ }
+
+ const name = val[Symbol.toStringTag];
+ if (typeof name !== "string") {
+ return false;
+ }
+ if (name !== "Blob" && name !== "File") {
+ return false;
+ }
+
+ return "stream" in val && typeof val.stream === "function";
+}
diff --git a/typescript/src/types/index.ts b/typescript/src/types/index.ts
new file mode 100644
index 0000000000..3937ae70cb
--- /dev/null
+++ b/typescript/src/types/index.ts
@@ -0,0 +1,8 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export { RFCDate } from "./rfcdate";
+export { blobLikeSchema, isBlobLike } from "./blobs";
+export type { Paginator, PageIterator } from "./operations";
+export { createPageIterator } from "./operations";
diff --git a/typescript/src/types/operations.ts b/typescript/src/types/operations.ts
new file mode 100644
index 0000000000..8e38c2fcba
--- /dev/null
+++ b/typescript/src/types/operations.ts
@@ -0,0 +1,25 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+export type Paginator<Result> = () => Promise<PageIterator<Result>> | null;
+
+export type PageIterator<Result> = Result & {
+ next: Paginator<Result>;
+ [Symbol.asyncIterator]: () => AsyncIterableIterator<Result>;
+};
+
+export function createPageIterator<Result>(
+ page: Result & { next: Paginator<Result> },
+) {
+ return {
+ [Symbol.asyncIterator]: async function* paginator() {
+ yield page;
+
+ let p: typeof page | null = page;
+ for (p = await p.next(); p != null; p = await p.next()) {
+ yield p;
+ }
+ },
+ };
+}
diff --git a/typescript/src/types/rfcdate.ts b/typescript/src/types/rfcdate.ts
new file mode 100644
index 0000000000..c37d292b71
--- /dev/null
+++ b/typescript/src/types/rfcdate.ts
@@ -0,0 +1,54 @@
+/*
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+ */
+
+const dateRE = /^\d{4}-\d{2}-\d{2}$/;
+
+export class RFCDate {
+ private serialized: string;
+
+ /**
+ * Creates a new RFCDate instance using today's date.
+ */
+ static today() {
+ return new RFCDate(new Date());
+ }
+
+ /**
+ * Creates a new RFCDate instance using the provided input.
+ * If a string is used then in must be in the format YYYY-MM-DD.
+ *
+ * @param date A Date object or a date string in YYYY-MM-DD format
+ * @example
+ * new RFCDate("2022-01-01")
+ * @example
+ * new RFCDate(new Date())
+ */
+ constructor(date: Date | string) {
+ if (typeof date === "string" && !dateRE.test(date)) {
+ throw new RangeError(
+ "RFCDate: date strings must be in the format YYYY-MM-DD: " + date,
+ );
+ }
+
+ const value = new Date(date);
+ if (isNaN(+value)) {
+ throw new RangeError("RFCDate: invalid date provided: " + date);
+ }
+
+ this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length);
+ if (!dateRE.test(this.serialized)) {
+ throw new TypeError(
+ `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`,
+ );
+ }
+ }
+
+ toJSON(): string {
+ return this.toString();
+ }
+
+ toString(): string {
+ return this.serialized;
+ }
+}
diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json
new file mode 100644
index 0000000000..7a86d2d982
--- /dev/null
+++ b/typescript/tsconfig.json
@@ -0,0 +1,40 @@
+{
+ "compilerOptions": {
+ "incremental": true,
+ "tsBuildInfoFile": ".tsbuildinfo",
+ "target": "ES2018",
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+
+ "module": "Node16",
+ "moduleResolution": "Node16",
+
+ "allowJs": true,
+
+ "declaration": true,
+ "declarationMap": true,
+ "sourceMap": true,
+ "outDir": ".",
+
+
+ // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json
+ "strict": true,
+ "allowUnusedLabels": false,
+ "allowUnreachableCode": false,
+ "exactOptionalPropertyTypes": true,
+ "useUnknownInCatchVariables": true,
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitOverride": true,
+ "noImplicitReturns": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "noUncheckedIndexedAccess": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "isolatedModules": true,
+ "checkJs": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "include": ["src"],
+ "exclude": ["node_modules"]
+}