Skip to content

Commit 9bae13c

Browse files
authored
Merge pull request #4 from ZoriHQ/release-please--branches--main--changes--next--components--zorihq
release: 0.2.0
2 parents efe1fb9 + 187a21a commit 9bae13c

17 files changed

Lines changed: 479 additions & 9 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0"
2+
".": "0.2.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 11
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zorihq%2Fzoriapi-249410b3771531f6a7aafc993a05557bf687c22eb450dd78ed1f1e198125f54a.yml
3-
openapi_spec_hash: 088319baeccc7d94e45650c94e230b58
4-
config_hash: 0ab6bd874b54c7da314b8709aefb4daa
1+
configured_endpoints: 15
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zorihq%2Fzoriapi-90e3d6d432b90ee0c1c586fe2821c14f0168c931f47055917c54751894b89f40.yml
3+
openapi_spec_hash: 9c4e1b5c3ae8433e24e833ea23683288
4+
config_hash: 85e426cfce3cef8d8dae314167edbc9b

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.2.0 (2025-10-19)
4+
5+
Full Changelog: [v0.1.0...v0.2.0](https://github.com/ZoriHQ/typescript-api-sdk/compare/v0.1.0...v0.2.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([175a417](https://github.com/ZoriHQ/typescript-api-sdk/commit/175a41746a5a0f6d2bbc5b131fb87c6e150ea8e0))
10+
11+
12+
### Chores
13+
14+
* **internal:** use npm pack for build uploads ([78f373a](https://github.com/ZoriHQ/typescript-api-sdk/commit/78f373a8e9d8193148c52c1d45a88f752478509a))
15+
316
## 0.1.0 (2025-10-05)
417

518
Full Changelog: [v0.0.3...v0.1.0](https://github.com/ZoriHQ/typescript-api-sdk/compare/v0.0.3...v0.1.0)

api.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# V1
22

3+
## Analytics
4+
5+
Types:
6+
7+
- <code><a href="./src/resources/v1/analytics/analytics.ts">CountryDataPoint</a></code>
8+
- <code><a href="./src/resources/v1/analytics/analytics.ts">OriginDataPoint</a></code>
9+
- <code><a href="./src/resources/v1/analytics/analytics.ts">RecentEvent</a></code>
10+
- <code><a href="./src/resources/v1/analytics/analytics.ts">RecentEventsResponse</a></code>
11+
- <code><a href="./src/resources/v1/analytics/analytics.ts">VisitorDataPoint</a></code>
12+
- <code><a href="./src/resources/v1/analytics/analytics.ts">VisitorsByCountryResponse</a></code>
13+
- <code><a href="./src/resources/v1/analytics/analytics.ts">VisitorsByDeviceResponse</a></code>
14+
- <code><a href="./src/resources/v1/analytics/analytics.ts">VisitorsByOriginResponse</a></code>
15+
16+
### Visitors
17+
18+
Methods:
19+
20+
- <code title="get /api/v1/analytics/visitors/country">client.v1.analytics.visitors.<a href="./src/resources/v1/analytics/visitors.ts">byCountry</a>({ ...params }) -> VisitorsByCountryResponse</code>
21+
- <code title="get /api/v1/analytics/visitors/device">client.v1.analytics.visitors.<a href="./src/resources/v1/analytics/visitors.ts">byDevice</a>({ ...params }) -> VisitorsByDeviceResponse</code>
22+
- <code title="get /api/v1/analytics/visitors/origin">client.v1.analytics.visitors.<a href="./src/resources/v1/analytics/visitors.ts">byOrigin</a>({ ...params }) -> VisitorsByOriginResponse</code>
23+
24+
### Events
25+
26+
Methods:
27+
28+
- <code title="get /api/v1/analytics/events/recent">client.v1.analytics.events.<a href="./src/resources/v1/analytics/events.ts">recent</a>({ ...params }) -> RecentEventsResponse</code>
29+
330
## Projects
431

532
Types:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zorihq",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "The official TypeScript library for the Zoriapi API",
55
"author": "Zoriapi <support@zorihq.com>",
66
"types": "dist/index.d.ts",

scripts/utils/upload-artifact.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ if [[ "$SIGNED_URL" == "null" ]]; then
1212
exit 1
1313
fi
1414

15-
UPLOAD_RESPONSE=$(tar "${BASE_PATH:+-C$BASE_PATH}" -cz "${ARTIFACT_PATH:-dist}" | curl -v -X PUT \
15+
TARBALL=$(cd dist && npm pack --silent)
16+
17+
UPLOAD_RESPONSE=$(curl -v -X PUT \
1618
-H "Content-Type: application/gzip" \
17-
--data-binary @- "$SIGNED_URL" 2>&1)
19+
--data-binary "@dist/$TARBALL" "$SIGNED_URL" 2>&1)
1820

1921
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
2022
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"

src/resources/v1/analytics.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export * from './analytics/index';
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import { APIResource } from '../../../core/resource';
4+
import * as EventsAPI from './events';
5+
import { EventRecentParams, Events } from './events';
6+
import * as VisitorsAPI from './visitors';
7+
import { VisitorByCountryParams, VisitorByDeviceParams, VisitorByOriginParams, Visitors } from './visitors';
8+
9+
export class Analytics extends APIResource {
10+
visitors: VisitorsAPI.Visitors = new VisitorsAPI.Visitors(this._client);
11+
events: EventsAPI.Events = new EventsAPI.Events(this._client);
12+
}
13+
14+
export interface CountryDataPoint {
15+
country_code?: string;
16+
17+
unique_visitors?: number;
18+
}
19+
20+
export interface OriginDataPoint {
21+
origin?: string;
22+
23+
unique_visitors?: number;
24+
}
25+
26+
export interface RecentEvent {
27+
browser_name?: string;
28+
29+
client_timestamp_utc?: string;
30+
31+
device_type?: string;
32+
33+
event_name?: string;
34+
35+
location_city?: string;
36+
37+
location_country_iso?: string;
38+
39+
page_path?: string;
40+
41+
page_url?: string;
42+
43+
referrer_url?: string;
44+
45+
visitor_id?: string;
46+
}
47+
48+
export interface RecentEventsResponse {
49+
events?: Array<RecentEvent>;
50+
51+
total?: number;
52+
}
53+
54+
export interface VisitorDataPoint {
55+
desktop?: number;
56+
57+
mobile?: number;
58+
59+
tablet?: number;
60+
61+
timestamp?: string;
62+
63+
unknown?: number;
64+
}
65+
66+
export interface VisitorsByCountryResponse {
67+
data?: Array<CountryDataPoint>;
68+
}
69+
70+
export interface VisitorsByDeviceResponse {
71+
data?: Array<VisitorDataPoint>;
72+
}
73+
74+
export interface VisitorsByOriginResponse {
75+
data?: Array<OriginDataPoint>;
76+
}
77+
78+
Analytics.Visitors = Visitors;
79+
Analytics.Events = Events;
80+
81+
export declare namespace Analytics {
82+
export {
83+
type CountryDataPoint as CountryDataPoint,
84+
type OriginDataPoint as OriginDataPoint,
85+
type RecentEvent as RecentEvent,
86+
type RecentEventsResponse as RecentEventsResponse,
87+
type VisitorDataPoint as VisitorDataPoint,
88+
type VisitorsByCountryResponse as VisitorsByCountryResponse,
89+
type VisitorsByDeviceResponse as VisitorsByDeviceResponse,
90+
type VisitorsByOriginResponse as VisitorsByOriginResponse,
91+
};
92+
93+
export {
94+
Visitors as Visitors,
95+
type VisitorByCountryParams as VisitorByCountryParams,
96+
type VisitorByDeviceParams as VisitorByDeviceParams,
97+
type VisitorByOriginParams as VisitorByOriginParams,
98+
};
99+
100+
export { Events as Events, type EventRecentParams as EventRecentParams };
101+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import { APIResource } from '../../../core/resource';
4+
import * as AnalyticsAPI from './analytics';
5+
import { APIPromise } from '../../../core/api-promise';
6+
import { RequestOptions } from '../../../internal/request-options';
7+
8+
export class Events extends APIResource {
9+
/**
10+
* Get a list of the most recent events (default: 15 events)
11+
*
12+
* @example
13+
* ```ts
14+
* const recentEventsResponse =
15+
* await client.v1.analytics.events.recent({
16+
* project_id: 'project_id',
17+
* });
18+
* ```
19+
*/
20+
recent(query: EventRecentParams, options?: RequestOptions): APIPromise<AnalyticsAPI.RecentEventsResponse> {
21+
return this._client.get('/api/v1/analytics/events/recent', { query, ...options });
22+
}
23+
}
24+
25+
export interface EventRecentParams {
26+
/**
27+
* Project ID
28+
*/
29+
project_id: string;
30+
31+
/**
32+
* Maximum number of events to return (default: 15)
33+
*/
34+
limit?: number;
35+
}
36+
37+
export declare namespace Events {
38+
export { type EventRecentParams as EventRecentParams };
39+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
export {
4+
Analytics,
5+
type CountryDataPoint,
6+
type OriginDataPoint,
7+
type RecentEvent,
8+
type RecentEventsResponse,
9+
type VisitorDataPoint,
10+
type VisitorsByCountryResponse,
11+
type VisitorsByDeviceResponse,
12+
type VisitorsByOriginResponse,
13+
} from './analytics';
14+
export { Events, type EventRecentParams } from './events';
15+
export {
16+
Visitors,
17+
type VisitorByCountryParams,
18+
type VisitorByDeviceParams,
19+
type VisitorByOriginParams,
20+
} from './visitors';

0 commit comments

Comments
 (0)