@gpt-core/admin 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -84,10 +84,46 @@ type WebhookConfig = {
84
84
  * An attributes object for a webhook_config
85
85
  */
86
86
  attributes?: {
87
+ /**
88
+ * Field included by default.
89
+ */
90
+ application_id: string;
91
+ /**
92
+ * Field included by default.
93
+ */
94
+ enabled?: boolean | null | unknown;
95
+ /**
96
+ * Field included by default.
97
+ */
98
+ events?: Array<string> | null | unknown;
99
+ /**
100
+ * Field included by default.
101
+ */
102
+ inserted_at: unknown;
103
+ /**
104
+ * Field included by default.
105
+ */
106
+ name: string;
107
+ /**
108
+ * HMAC secret for webhook signature verification. Field included by default.
109
+ */
110
+ secret?: string | null | unknown;
111
+ /**
112
+ * Field included by default.
113
+ */
114
+ tenant_id?: string | null | unknown;
87
115
  /**
88
116
  * ISV filter: specific tenant UUIDs to receive events from (null = all). Field included by default.
89
117
  */
90
118
  tenant_ids?: Array<string> | null | unknown;
119
+ /**
120
+ * Field included by default.
121
+ */
122
+ updated_at: unknown;
123
+ /**
124
+ * Field included by default.
125
+ */
126
+ url: string;
91
127
  /**
92
128
  * Tenant filter: specific workspace UUIDs to receive events from (null = all). Field included by default.
93
129
  */
@@ -98,7 +134,30 @@ type WebhookConfig = {
98
134
  * A relationships object for a webhook_config
99
135
  */
100
136
  relationships?: {
101
- [key: string]: never;
137
+ application?: {
138
+ /**
139
+ * An identifier for application
140
+ */
141
+ data?: {
142
+ id: string;
143
+ meta?: {
144
+ [key: string]: unknown;
145
+ };
146
+ type: string;
147
+ } | null;
148
+ };
149
+ tenant?: {
150
+ /**
151
+ * An identifier for tenant
152
+ */
153
+ data?: {
154
+ id: string;
155
+ meta?: {
156
+ [key: string]: unknown;
157
+ };
158
+ type: string;
159
+ } | null;
160
+ };
102
161
  };
103
162
  type: string;
104
163
  };
@@ -422,7 +481,12 @@ type Ledger = {
422
481
  * An attributes object for a ledger
423
482
  */
424
483
  attributes?: {
425
- [key: string]: never;
484
+ /**
485
+ * Optional metadata including api_key_id for tracking source. Field included by default.
486
+ */
487
+ metadata?: {
488
+ [key: string]: unknown;
489
+ } | null | unknown;
426
490
  };
427
491
  id: string;
428
492
  /**
@@ -864,6 +928,14 @@ type ApiKey = {
864
928
  * The raw API key token. Only returned once upon creation or rotation.
865
929
  */
866
930
  generated_api_key?: string | null | unknown;
931
+ /**
932
+ * Field included by default.
933
+ */
934
+ key_type: "user" | "application" | "system" | "server";
935
+ /**
936
+ * Field included by default.
937
+ */
938
+ last_used_at?: unknown;
867
939
  /**
868
940
  * Field included by default.
869
941
  */
@@ -872,6 +944,14 @@ type ApiKey = {
872
944
  * Field included by default.
873
945
  */
874
946
  prefix: string;
947
+ /**
948
+ * Rate limit period in seconds. Field included by default.
949
+ */
950
+ rate_limit_period_seconds: number;
951
+ /**
952
+ * Maximum requests allowed per period. Field included by default.
953
+ */
954
+ rate_limit_requests: number;
875
955
  /**
876
956
  * Field included by default.
877
957
  */
@@ -884,6 +964,14 @@ type ApiKey = {
884
964
  * Field included by default.
885
965
  */
886
966
  tenant_id?: string | null | unknown;
967
+ /**
968
+ * Field included by default.
969
+ */
970
+ total_credits_used: number;
971
+ /**
972
+ * Field included by default.
973
+ */
974
+ total_requests: number;
887
975
  /**
888
976
  * Field included by default.
889
977
  */
@@ -1786,14 +1874,76 @@ type WebhookDelivery = {
1786
1874
  * An attributes object for a webhook_delivery
1787
1875
  */
1788
1876
  attributes?: {
1789
- [key: string]: never;
1877
+ /**
1878
+ * Field included by default.
1879
+ */
1880
+ attempt_count?: number | null | unknown;
1881
+ /**
1882
+ * Field included by default.
1883
+ */
1884
+ event_type?: string | null | unknown;
1885
+ /**
1886
+ * Field included by default.
1887
+ */
1888
+ inserted_at: unknown;
1889
+ /**
1890
+ * Field included by default.
1891
+ */
1892
+ next_retry_at?: unknown;
1893
+ /**
1894
+ * Field included by default.
1895
+ */
1896
+ payload: {
1897
+ [key: string]: unknown;
1898
+ };
1899
+ /**
1900
+ * Field included by default.
1901
+ */
1902
+ request_headers?: {
1903
+ [key: string]: unknown;
1904
+ } | null | unknown;
1905
+ /**
1906
+ * Field included by default.
1907
+ */
1908
+ response_body?: string | null | unknown;
1909
+ /**
1910
+ * Field included by default.
1911
+ */
1912
+ response_status?: number | null | unknown;
1913
+ /**
1914
+ * Field included by default.
1915
+ */
1916
+ status?: "pending" | "success" | "failed" | "retrying" | unknown;
1917
+ /**
1918
+ * Field included by default.
1919
+ */
1920
+ updated_at: unknown;
1921
+ /**
1922
+ * Field included by default.
1923
+ */
1924
+ url: string;
1925
+ /**
1926
+ * Field included by default.
1927
+ */
1928
+ webhook_config_id: string;
1790
1929
  };
1791
1930
  id: string;
1792
1931
  /**
1793
1932
  * A relationships object for a webhook_delivery
1794
1933
  */
1795
1934
  relationships?: {
1796
- [key: string]: never;
1935
+ webhook_config?: {
1936
+ /**
1937
+ * An identifier for webhook_config
1938
+ */
1939
+ data?: {
1940
+ id: string;
1941
+ meta?: {
1942
+ [key: string]: unknown;
1943
+ };
1944
+ type: string;
1945
+ } | null;
1946
+ };
1797
1947
  };
1798
1948
  type: string;
1799
1949
  };
@@ -5410,10 +5560,13 @@ type PostAdminWebhookConfigsData = {
5410
5560
  body: {
5411
5561
  data: {
5412
5562
  attributes?: {
5413
- application_id: string;
5563
+ application_id?: string | unknown;
5414
5564
  enabled?: boolean | unknown;
5415
5565
  events?: Array<string> | unknown;
5416
5566
  name: string;
5567
+ /**
5568
+ * HMAC secret for webhook signature verification
5569
+ */
5417
5570
  secret?: string | unknown;
5418
5571
  tenant_id?: string | unknown;
5419
5572
  /**
@@ -6479,6 +6632,9 @@ type PatchAdminWebhookConfigsByIdData = {
6479
6632
  enabled?: boolean | unknown;
6480
6633
  events?: Array<string> | unknown;
6481
6634
  name?: string | unknown;
6635
+ /**
6636
+ * HMAC secret for webhook signature verification
6637
+ */
6482
6638
  secret?: string | unknown;
6483
6639
  /**
6484
6640
  * ISV filter: specific tenant UUIDs to receive events from (null = all)
@@ -17161,16 +17317,24 @@ type PostAdminApiKeysData = {
17161
17317
  /**
17162
17318
  * Request body for the /api_keys operation on api_key resource
17163
17319
  */
17164
- body: {
17320
+ body?: {
17165
17321
  data: {
17166
17322
  attributes?: {
17167
17323
  application_id?: string | unknown;
17168
17324
  expires_at?: unknown;
17325
+ key_type?: "user" | "application" | "system" | "server" | unknown;
17169
17326
  name?: string | unknown;
17327
+ /**
17328
+ * Rate limit period in seconds
17329
+ */
17330
+ rate_limit_period_seconds?: number | unknown;
17331
+ /**
17332
+ * Maximum requests allowed per period
17333
+ */
17334
+ rate_limit_requests?: number | unknown;
17170
17335
  scopes?: Array<string> | unknown;
17171
17336
  tenant_id?: string | unknown;
17172
17337
  token?: string | unknown;
17173
- type: "user" | "application" | "system" | "server";
17174
17338
  user_id?: string | unknown;
17175
17339
  workspace_id?: string | unknown;
17176
17340
  };
@@ -19586,6 +19750,15 @@ type PatchAdminApiKeysByIdData = {
19586
19750
  data: {
19587
19751
  attributes?: {
19588
19752
  name?: string | unknown;
19753
+ /**
19754
+ * Rate limit period in seconds
19755
+ */
19756
+ rate_limit_period_seconds?: number | unknown;
19757
+ /**
19758
+ * Maximum requests allowed per period
19759
+ */
19760
+ rate_limit_requests?: number | unknown;
19761
+ scopes?: Array<string> | unknown;
19589
19762
  };
19590
19763
  id: string;
19591
19764
  relationships?: {
package/dist/index.d.ts CHANGED
@@ -84,10 +84,46 @@ type WebhookConfig = {
84
84
  * An attributes object for a webhook_config
85
85
  */
86
86
  attributes?: {
87
+ /**
88
+ * Field included by default.
89
+ */
90
+ application_id: string;
91
+ /**
92
+ * Field included by default.
93
+ */
94
+ enabled?: boolean | null | unknown;
95
+ /**
96
+ * Field included by default.
97
+ */
98
+ events?: Array<string> | null | unknown;
99
+ /**
100
+ * Field included by default.
101
+ */
102
+ inserted_at: unknown;
103
+ /**
104
+ * Field included by default.
105
+ */
106
+ name: string;
107
+ /**
108
+ * HMAC secret for webhook signature verification. Field included by default.
109
+ */
110
+ secret?: string | null | unknown;
111
+ /**
112
+ * Field included by default.
113
+ */
114
+ tenant_id?: string | null | unknown;
87
115
  /**
88
116
  * ISV filter: specific tenant UUIDs to receive events from (null = all). Field included by default.
89
117
  */
90
118
  tenant_ids?: Array<string> | null | unknown;
119
+ /**
120
+ * Field included by default.
121
+ */
122
+ updated_at: unknown;
123
+ /**
124
+ * Field included by default.
125
+ */
126
+ url: string;
91
127
  /**
92
128
  * Tenant filter: specific workspace UUIDs to receive events from (null = all). Field included by default.
93
129
  */
@@ -98,7 +134,30 @@ type WebhookConfig = {
98
134
  * A relationships object for a webhook_config
99
135
  */
100
136
  relationships?: {
101
- [key: string]: never;
137
+ application?: {
138
+ /**
139
+ * An identifier for application
140
+ */
141
+ data?: {
142
+ id: string;
143
+ meta?: {
144
+ [key: string]: unknown;
145
+ };
146
+ type: string;
147
+ } | null;
148
+ };
149
+ tenant?: {
150
+ /**
151
+ * An identifier for tenant
152
+ */
153
+ data?: {
154
+ id: string;
155
+ meta?: {
156
+ [key: string]: unknown;
157
+ };
158
+ type: string;
159
+ } | null;
160
+ };
102
161
  };
103
162
  type: string;
104
163
  };
@@ -422,7 +481,12 @@ type Ledger = {
422
481
  * An attributes object for a ledger
423
482
  */
424
483
  attributes?: {
425
- [key: string]: never;
484
+ /**
485
+ * Optional metadata including api_key_id for tracking source. Field included by default.
486
+ */
487
+ metadata?: {
488
+ [key: string]: unknown;
489
+ } | null | unknown;
426
490
  };
427
491
  id: string;
428
492
  /**
@@ -864,6 +928,14 @@ type ApiKey = {
864
928
  * The raw API key token. Only returned once upon creation or rotation.
865
929
  */
866
930
  generated_api_key?: string | null | unknown;
931
+ /**
932
+ * Field included by default.
933
+ */
934
+ key_type: "user" | "application" | "system" | "server";
935
+ /**
936
+ * Field included by default.
937
+ */
938
+ last_used_at?: unknown;
867
939
  /**
868
940
  * Field included by default.
869
941
  */
@@ -872,6 +944,14 @@ type ApiKey = {
872
944
  * Field included by default.
873
945
  */
874
946
  prefix: string;
947
+ /**
948
+ * Rate limit period in seconds. Field included by default.
949
+ */
950
+ rate_limit_period_seconds: number;
951
+ /**
952
+ * Maximum requests allowed per period. Field included by default.
953
+ */
954
+ rate_limit_requests: number;
875
955
  /**
876
956
  * Field included by default.
877
957
  */
@@ -884,6 +964,14 @@ type ApiKey = {
884
964
  * Field included by default.
885
965
  */
886
966
  tenant_id?: string | null | unknown;
967
+ /**
968
+ * Field included by default.
969
+ */
970
+ total_credits_used: number;
971
+ /**
972
+ * Field included by default.
973
+ */
974
+ total_requests: number;
887
975
  /**
888
976
  * Field included by default.
889
977
  */
@@ -1786,14 +1874,76 @@ type WebhookDelivery = {
1786
1874
  * An attributes object for a webhook_delivery
1787
1875
  */
1788
1876
  attributes?: {
1789
- [key: string]: never;
1877
+ /**
1878
+ * Field included by default.
1879
+ */
1880
+ attempt_count?: number | null | unknown;
1881
+ /**
1882
+ * Field included by default.
1883
+ */
1884
+ event_type?: string | null | unknown;
1885
+ /**
1886
+ * Field included by default.
1887
+ */
1888
+ inserted_at: unknown;
1889
+ /**
1890
+ * Field included by default.
1891
+ */
1892
+ next_retry_at?: unknown;
1893
+ /**
1894
+ * Field included by default.
1895
+ */
1896
+ payload: {
1897
+ [key: string]: unknown;
1898
+ };
1899
+ /**
1900
+ * Field included by default.
1901
+ */
1902
+ request_headers?: {
1903
+ [key: string]: unknown;
1904
+ } | null | unknown;
1905
+ /**
1906
+ * Field included by default.
1907
+ */
1908
+ response_body?: string | null | unknown;
1909
+ /**
1910
+ * Field included by default.
1911
+ */
1912
+ response_status?: number | null | unknown;
1913
+ /**
1914
+ * Field included by default.
1915
+ */
1916
+ status?: "pending" | "success" | "failed" | "retrying" | unknown;
1917
+ /**
1918
+ * Field included by default.
1919
+ */
1920
+ updated_at: unknown;
1921
+ /**
1922
+ * Field included by default.
1923
+ */
1924
+ url: string;
1925
+ /**
1926
+ * Field included by default.
1927
+ */
1928
+ webhook_config_id: string;
1790
1929
  };
1791
1930
  id: string;
1792
1931
  /**
1793
1932
  * A relationships object for a webhook_delivery
1794
1933
  */
1795
1934
  relationships?: {
1796
- [key: string]: never;
1935
+ webhook_config?: {
1936
+ /**
1937
+ * An identifier for webhook_config
1938
+ */
1939
+ data?: {
1940
+ id: string;
1941
+ meta?: {
1942
+ [key: string]: unknown;
1943
+ };
1944
+ type: string;
1945
+ } | null;
1946
+ };
1797
1947
  };
1798
1948
  type: string;
1799
1949
  };
@@ -5410,10 +5560,13 @@ type PostAdminWebhookConfigsData = {
5410
5560
  body: {
5411
5561
  data: {
5412
5562
  attributes?: {
5413
- application_id: string;
5563
+ application_id?: string | unknown;
5414
5564
  enabled?: boolean | unknown;
5415
5565
  events?: Array<string> | unknown;
5416
5566
  name: string;
5567
+ /**
5568
+ * HMAC secret for webhook signature verification
5569
+ */
5417
5570
  secret?: string | unknown;
5418
5571
  tenant_id?: string | unknown;
5419
5572
  /**
@@ -6479,6 +6632,9 @@ type PatchAdminWebhookConfigsByIdData = {
6479
6632
  enabled?: boolean | unknown;
6480
6633
  events?: Array<string> | unknown;
6481
6634
  name?: string | unknown;
6635
+ /**
6636
+ * HMAC secret for webhook signature verification
6637
+ */
6482
6638
  secret?: string | unknown;
6483
6639
  /**
6484
6640
  * ISV filter: specific tenant UUIDs to receive events from (null = all)
@@ -17161,16 +17317,24 @@ type PostAdminApiKeysData = {
17161
17317
  /**
17162
17318
  * Request body for the /api_keys operation on api_key resource
17163
17319
  */
17164
- body: {
17320
+ body?: {
17165
17321
  data: {
17166
17322
  attributes?: {
17167
17323
  application_id?: string | unknown;
17168
17324
  expires_at?: unknown;
17325
+ key_type?: "user" | "application" | "system" | "server" | unknown;
17169
17326
  name?: string | unknown;
17327
+ /**
17328
+ * Rate limit period in seconds
17329
+ */
17330
+ rate_limit_period_seconds?: number | unknown;
17331
+ /**
17332
+ * Maximum requests allowed per period
17333
+ */
17334
+ rate_limit_requests?: number | unknown;
17170
17335
  scopes?: Array<string> | unknown;
17171
17336
  tenant_id?: string | unknown;
17172
17337
  token?: string | unknown;
17173
- type: "user" | "application" | "system" | "server";
17174
17338
  user_id?: string | unknown;
17175
17339
  workspace_id?: string | unknown;
17176
17340
  };
@@ -19586,6 +19750,15 @@ type PatchAdminApiKeysByIdData = {
19586
19750
  data: {
19587
19751
  attributes?: {
19588
19752
  name?: string | unknown;
19753
+ /**
19754
+ * Rate limit period in seconds
19755
+ */
19756
+ rate_limit_period_seconds?: number | unknown;
19757
+ /**
19758
+ * Maximum requests allowed per period
19759
+ */
19760
+ rate_limit_requests?: number | unknown;
19761
+ scopes?: Array<string> | unknown;
19589
19762
  };
19590
19763
  id: string;
19591
19764
  relationships?: {
package/dist/index.js CHANGED
@@ -54,15 +54,6 @@ var jsonBodySerializer = {
54
54
  )
55
55
  };
56
56
 
57
- // src/_internal/core/params.gen.ts
58
- var extraPrefixesMap = {
59
- $body_: "body",
60
- $headers_: "headers",
61
- $path_: "path",
62
- $query_: "query"
63
- };
64
- var extraPrefixes = Object.entries(extraPrefixesMap);
65
-
66
57
  // src/_internal/core/serverSentEvents.gen.ts
67
58
  var createSseClient = ({
68
59
  onRequest,
package/dist/index.mjs CHANGED
@@ -6,15 +6,6 @@ var jsonBodySerializer = {
6
6
  )
7
7
  };
8
8
 
9
- // src/_internal/core/params.gen.ts
10
- var extraPrefixesMap = {
11
- $body_: "body",
12
- $headers_: "headers",
13
- $path_: "path",
14
- $query_: "query"
15
- };
16
- var extraPrefixes = Object.entries(extraPrefixesMap);
17
-
18
9
  // src/_internal/core/serverSentEvents.gen.ts
19
10
  var createSseClient = ({
20
11
  onRequest,
package/package.json CHANGED
@@ -1,17 +1,26 @@
1
1
  {
2
2
  "name": "@gpt-core/admin",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "TypeScript SDK for GPT Core Admin API - Platform administration and ISV management",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
10
+ "import": {
11
+ "types": "./dist/index.d.mts",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
13
18
  }
14
19
  },
20
+ "sideEffects": false,
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
15
24
  "files": [
16
25
  "dist"
17
26
  ],
@@ -33,6 +42,14 @@
33
42
  "publishConfig": {
34
43
  "access": "public"
35
44
  },
45
+ "scripts": {
46
+ "generate": "openapi-ts",
47
+ "build": "tsup src/index.ts --format cjs,esm --dts",
48
+ "test": "vitest run",
49
+ "test:watch": "vitest",
50
+ "test:ui": "vitest --ui",
51
+ "test:coverage": "vitest run --coverage"
52
+ },
36
53
  "dependencies": {
37
54
  "zod": "^3.25.76"
38
55
  },
@@ -44,13 +61,5 @@
44
61
  "tsup": "^8.5.1",
45
62
  "typescript": "^5.9.3",
46
63
  "vitest": "^4.0.15"
47
- },
48
- "scripts": {
49
- "generate": "openapi-ts",
50
- "build": "tsup src/index.ts --format cjs,esm --dts",
51
- "test": "vitest run",
52
- "test:watch": "vitest",
53
- "test:ui": "vitest --ui",
54
- "test:coverage": "vitest run --coverage"
55
64
  }
56
- }
65
+ }