@nosana/api 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/client/index.d.ts +2 -2
  2. package/dist/client/index.js +4 -2
  3. package/dist/client/index.js.map +1 -1
  4. package/dist/client/schema.d.ts +150 -141
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.js +5 -5
  7. package/dist/index.js.map +1 -1
  8. package/dist/routes/deployments/deployment/actions/deploymentGetEvents.d.ts +3 -5
  9. package/dist/routes/deployments/deployment/actions/deploymentGetEvents.js +22 -4
  10. package/dist/routes/deployments/deployment/actions/deploymentGetEvents.js.map +1 -1
  11. package/dist/routes/deployments/deployment/actions/deploymentGetJobs.d.ts +3 -5
  12. package/dist/routes/deployments/deployment/actions/deploymentGetJobs.js +22 -4
  13. package/dist/routes/deployments/deployment/actions/deploymentGetJobs.js.map +1 -1
  14. package/dist/routes/deployments/deployment/actions/deploymentGetRevisions.d.ts +3 -5
  15. package/dist/routes/deployments/deployment/actions/deploymentGetRevisions.js +22 -4
  16. package/dist/routes/deployments/deployment/actions/deploymentGetRevisions.js.map +1 -1
  17. package/dist/routes/deployments/deployment/actions/deploymentGetTasks.d.ts +3 -4
  18. package/dist/routes/deployments/deployment/actions/deploymentGetTasks.js +22 -4
  19. package/dist/routes/deployments/deployment/actions/deploymentGetTasks.js.map +1 -1
  20. package/dist/routes/deployments/deployment/createDeployment.js +16 -12
  21. package/dist/routes/deployments/deployment/createDeployment.js.map +1 -1
  22. package/dist/routes/deployments/index.js +22 -3
  23. package/dist/routes/deployments/index.js.map +1 -1
  24. package/dist/routes/deployments/types.d.ts +35 -8
  25. package/dist/types.d.ts +1 -0
  26. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
1
  import type { paths } from './schema.js';
2
2
  import type { AuthenticatedClient } from './type.utils.js';
3
- import type { NosanaNetwork, ApiKeyAuth, SignerAuth, CreateNosanaApiOptions } from '../types.js';
3
+ import type { NosanaNetwork, ApiKeyAuth, SignerAuth, CreateNosanaApiOptions, IncludeCookiesAuth } from '../types.js';
4
4
  export type * from './schema.js';
5
5
  export type QueryClient = AuthenticatedClient<paths>;
6
6
  export interface ApiConfig {
7
7
  backend_url?: string;
8
8
  }
9
- export declare function createNosanaClient(environment: NosanaNetwork, authParams: ApiKeyAuth | SignerAuth | undefined, options: CreateNosanaApiOptions | undefined): QueryClient;
9
+ export declare function createNosanaClient(environment: NosanaNetwork, authParams: ApiKeyAuth | SignerAuth | IncludeCookiesAuth | undefined, options: CreateNosanaApiOptions | undefined): QueryClient;
@@ -18,9 +18,11 @@ export function createNosanaClient(environment, authParams, options) {
18
18
  };
19
19
  const client = createClient({
20
20
  baseUrl: backend_url,
21
- credentials: 'include',
21
+ ...(authParams === 'include' ? { credentials: 'include' } : {}),
22
22
  });
23
- client.use(authMiddleware);
23
+ if (authParams !== 'include') {
24
+ client.use(authMiddleware);
25
+ }
24
26
  return client;
25
27
  }
26
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAiC,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAcrD,MAAM,UAAU,kBAAkB,CAChC,WAA0B,EAC1B,UAA+C,EAC/C,OAA2C;IAE3C,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC;IAEnF,MAAM,cAAc,GAAe;QACjC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE;YACzB,IAAI,UAAU,EAAE,CAAC;gBACjB,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;oBACnC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,UAAU,EAAE,CAAC,CAAC;gBAC/D,CAAC;qBAAM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CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;gBACnD,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,YAAY,CAA4B;QACrD,OAAO,EAAE,WAAW;QACpB,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAC,CAAC;IAEH,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -127,26 +127,6 @@ export interface paths {
127
127
  patch?: never;
128
128
  trace?: never;
129
129
  };
130
- "/api/auth/sign-message/external": {
131
- parameters: {
132
- query?: never;
133
- header?: never;
134
- path?: never;
135
- cookie?: never;
136
- };
137
- get?: never;
138
- put?: never;
139
- /**
140
- * Get the signed message for external service authentication
141
- * @description Authentication required via Authorization header. Supports either JWT (Bearer <jwt>) or API key (Bearer <key>).
142
- */
143
- post: operations["postApiAuthSign-messageExternal"];
144
- delete?: never;
145
- options?: never;
146
- head?: never;
147
- patch?: never;
148
- trace?: never;
149
- };
150
130
  "/api/credits/balance": {
151
131
  parameters: {
152
132
  query?: never;
@@ -177,7 +157,26 @@ export interface paths {
177
157
  /** @description List all user deployments. */
178
158
  get: {
179
159
  parameters: {
180
- query?: never;
160
+ query?: {
161
+ /** @description Base64-encoded cursor for keyset pagination */
162
+ cursor?: string;
163
+ /** @description Number of items per page (10, 20, 50, or 100) */
164
+ limit?: 10 | 20 | 50 | 100 | "10" | "20" | "50" | "100";
165
+ /** @description Sort order: 'asc' (oldest first) or 'desc' (newest first) */
166
+ sort_order?: "asc" | "desc";
167
+ /** @description Filter by deployment status. Can be single value or comma-separated list */
168
+ status?: ("DRAFT" | "ERROR" | "STARTING" | "RUNNING" | "STOPPING" | "STOPPED" | "INSUFFICIENT_FUNDS" | "ARCHIVED") | string;
169
+ /** @description Filter by deployment strategy. Can be single value or comma-separated list */
170
+ strategy?: ("SIMPLE" | "SIMPLE-EXTEND" | "SCHEDULED" | "INFINITE") | string;
171
+ /** @description Filter by exact deployment ID */
172
+ id?: string;
173
+ /** @description Filter by vault public key */
174
+ vault?: string;
175
+ /** @description Filter deployments created after this date (ISO 8601 format) */
176
+ created_after?: string;
177
+ /** @description Filter deployments created before this date (ISO 8601 format) */
178
+ created_before?: string;
179
+ };
181
180
  header: {
182
181
  /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
183
182
  "x-user-id"?: string;
@@ -192,13 +191,23 @@ export interface paths {
192
191
  };
193
192
  requestBody?: never;
194
193
  responses: {
195
- /** @description List of deployments. */
194
+ /** @description List of deployments with pagination. */
196
195
  200: {
197
196
  headers: {
198
197
  [name: string]: unknown;
199
198
  };
200
199
  content: {
201
- "application/json": components["schemas"]["Deployments"];
200
+ "application/json": {
201
+ deployments: components["schemas"]["Deployment"][];
202
+ pagination: {
203
+ /** @description Cursor for next page, null if no more pages */
204
+ cursor_next: string | null;
205
+ /** @description Cursor for previous page, null if on first page */
206
+ cursor_prev: string | null;
207
+ /** @description Total number of items in collection */
208
+ total_items: number;
209
+ };
210
+ };
202
211
  };
203
212
  };
204
213
  /** @description Unauthorized. Invalid or missing authentication. */
@@ -369,7 +378,20 @@ export interface paths {
369
378
  /** @description Get scheduled tasks for a specific deployment. */
370
379
  get: {
371
380
  parameters: {
372
- query?: never;
381
+ query?: {
382
+ /** @description Base64-encoded cursor for keyset pagination */
383
+ cursor?: string;
384
+ /** @description Number of items per page (10, 20, 50, or 100) */
385
+ limit?: 10 | 20 | 50 | 100 | "10" | "20" | "50" | "100";
386
+ /** @description Sort order: 'asc' (oldest first) or 'desc' (newest first) */
387
+ sort_order?: "asc" | "desc";
388
+ /** @description Filter by task type. Can be single value or comma-separated list */
389
+ task?: ("LIST" | "EXTEND" | "STOP") | string;
390
+ /** @description Filter tasks due after this date (ISO 8601 format) */
391
+ due_after?: string;
392
+ /** @description Filter tasks due before this date (ISO 8601 format) */
393
+ due_before?: string;
394
+ };
373
395
  header: {
374
396
  /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
375
397
  "x-user-id"?: string;
@@ -386,13 +408,23 @@ export interface paths {
386
408
  };
387
409
  requestBody?: never;
388
410
  responses: {
389
- /** @description List of scheduled tasks for the deployment. */
411
+ /** @description List of scheduled tasks for the deployment with pagination. */
390
412
  200: {
391
413
  headers: {
392
414
  [name: string]: unknown;
393
415
  };
394
416
  content: {
395
- "application/json": components["schemas"]["Task"][];
417
+ "application/json": {
418
+ tasks: components["schemas"]["Task"][];
419
+ pagination: {
420
+ /** @description Cursor for next page, null if no more pages */
421
+ cursor_next: string | null;
422
+ /** @description Cursor for previous page, null if on first page */
423
+ cursor_prev: string | null;
424
+ /** @description Total number of items in collection */
425
+ total_items: number;
426
+ };
427
+ };
396
428
  };
397
429
  };
398
430
  /** @description Unauthorized. Invalid or missing authentication. */
@@ -603,7 +635,24 @@ export interface paths {
603
635
  /** @description Get jobs for a specific deployment. */
604
636
  get: {
605
637
  parameters: {
606
- query?: never;
638
+ query?: {
639
+ /** @description Base64-encoded cursor for keyset pagination */
640
+ cursor?: string;
641
+ /** @description Number of items per page (10, 20, 50, or 100) */
642
+ limit?: 10 | 20 | 50 | 100 | "10" | "20" | "50" | "100";
643
+ /** @description Sort order: 'asc' (oldest first) or 'desc' (newest first) */
644
+ sort_order?: "asc" | "desc";
645
+ /** @description Filter by job state. Can be single value or comma-separated list (e.g., 'RUNNING,COMPLETED') */
646
+ state?: ("QUEUED" | "RUNNING" | "COMPLETED" | "STOPPED") | string;
647
+ /** @description Filter by exact job ID */
648
+ job?: string;
649
+ /** @description Filter by deployment revision number */
650
+ revision?: number;
651
+ /** @description Filter jobs created after this date (ISO 8601 format) */
652
+ created_after?: string;
653
+ /** @description Filter jobs created before this date (ISO 8601 format) */
654
+ created_before?: string;
655
+ };
607
656
  header: {
608
657
  /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
609
658
  "x-user-id"?: string;
@@ -620,13 +669,23 @@ export interface paths {
620
669
  };
621
670
  requestBody?: never;
622
671
  responses: {
623
- /** @description List of jobs for the deployment. */
672
+ /** @description List of jobs for the deployment with pagination. */
624
673
  200: {
625
674
  headers: {
626
675
  [name: string]: unknown;
627
676
  };
628
677
  content: {
629
- "application/json": components["schemas"]["Job"][];
678
+ "application/json": {
679
+ jobs: components["schemas"]["Job"][];
680
+ pagination: {
681
+ /** @description Cursor for next page, null if no more pages */
682
+ cursor_next: string | null;
683
+ /** @description Cursor for previous page, null if on first page */
684
+ cursor_prev: string | null;
685
+ /** @description Total number of items in collection */
686
+ total_items: number;
687
+ };
688
+ };
630
689
  };
631
690
  };
632
691
  /** @description Unauthorized. Invalid or missing authentication. */
@@ -676,7 +735,20 @@ export interface paths {
676
735
  /** @description Get revisions for a specific deployment. */
677
736
  get: {
678
737
  parameters: {
679
- query?: never;
738
+ query?: {
739
+ /** @description Base64-encoded cursor for keyset pagination */
740
+ cursor?: string;
741
+ /** @description Number of items per page (10, 20, 50, or 100) */
742
+ limit?: 10 | 20 | 50 | 100 | "10" | "20" | "50" | "100";
743
+ /** @description Sort order: 'asc' (oldest first) or 'desc' (newest first) */
744
+ sort_order?: "asc" | "desc";
745
+ /** @description Filter by exact revision number */
746
+ revision?: number;
747
+ /** @description Filter revisions created after this date (ISO 8601 format) */
748
+ created_after?: string;
749
+ /** @description Filter revisions created before this date (ISO 8601 format) */
750
+ created_before?: string;
751
+ };
680
752
  header: {
681
753
  /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
682
754
  "x-user-id"?: string;
@@ -693,13 +765,23 @@ export interface paths {
693
765
  };
694
766
  requestBody?: never;
695
767
  responses: {
696
- /** @description List of revisions for the deployment. */
768
+ /** @description List of revisions for the deployment with pagination. */
697
769
  200: {
698
770
  headers: {
699
771
  [name: string]: unknown;
700
772
  };
701
773
  content: {
702
- "application/json": components["schemas"]["Revision"][];
774
+ "application/json": {
775
+ revisions: components["schemas"]["Revision"][];
776
+ pagination: {
777
+ /** @description Cursor for next page, null if no more pages */
778
+ cursor_next: string | null;
779
+ /** @description Cursor for previous page, null if on first page */
780
+ cursor_prev: string | null;
781
+ /** @description Total number of items in collection */
782
+ total_items: number;
783
+ };
784
+ };
703
785
  };
704
786
  };
705
787
  /** @description Unauthorized. Invalid or missing authentication. */
@@ -749,7 +831,22 @@ export interface paths {
749
831
  /** @description Get events for a specific deployment. */
750
832
  get: {
751
833
  parameters: {
752
- query?: never;
834
+ query?: {
835
+ /** @description Base64-encoded cursor for keyset pagination */
836
+ cursor?: string;
837
+ /** @description Number of items per page (10, 20, 50, or 100) */
838
+ limit?: 10 | 20 | 50 | 100 | "10" | "20" | "50" | "100";
839
+ /** @description Sort order: 'asc' (oldest first) or 'desc' (newest first) */
840
+ sort_order?: "asc" | "desc";
841
+ /** @description Filter by event category: 'Deployment' or 'Event'. Can be comma-separated list */
842
+ category?: ("Deployment" | "Event") | string;
843
+ /** @description Filter by event type. Can be single value or comma-separated list */
844
+ type?: string;
845
+ /** @description Filter events created after this date (ISO 8601 format) */
846
+ created_after?: string;
847
+ /** @description Filter events created before this date (ISO 8601 format) */
848
+ created_before?: string;
849
+ };
753
850
  header: {
754
851
  /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
755
852
  "x-user-id"?: string;
@@ -766,13 +863,23 @@ export interface paths {
766
863
  };
767
864
  requestBody?: never;
768
865
  responses: {
769
- /** @description List of events for the deployment. */
866
+ /** @description List of events for the deployment with pagination. */
770
867
  200: {
771
868
  headers: {
772
869
  [name: string]: unknown;
773
870
  };
774
871
  content: {
775
- "application/json": components["schemas"]["Event"][];
872
+ "application/json": {
873
+ events: components["schemas"]["Event"][];
874
+ pagination: {
875
+ /** @description Cursor for next page, null if no more pages */
876
+ cursor_next: string | null;
877
+ /** @description Cursor for previous page, null if on first page */
878
+ cursor_prev: string | null;
879
+ /** @description Total number of items in collection */
880
+ total_items: number;
881
+ };
882
+ };
776
883
  };
777
884
  };
778
885
  /** @description Unauthorized. Invalid or missing authentication. */
@@ -2353,9 +2460,9 @@ export interface operations {
2353
2460
  postApiJobsList: {
2354
2461
  parameters: {
2355
2462
  query?: never;
2356
- header: {
2463
+ header?: {
2357
2464
  /** @description Authorization header: Bearer <jwt> or Bearer <key> */
2358
- authorization: string;
2465
+ authorization?: string;
2359
2466
  };
2360
2467
  path?: never;
2361
2468
  cookie?: never;
@@ -2428,9 +2535,9 @@ export interface operations {
2428
2535
  postApiJobsByAddressExtend: {
2429
2536
  parameters: {
2430
2537
  query?: never;
2431
- header: {
2538
+ header?: {
2432
2539
  /** @description Authorization header: Bearer <jwt> or Bearer <key> */
2433
- authorization: string;
2540
+ authorization?: string;
2434
2541
  };
2435
2542
  path: {
2436
2543
  address: string;
@@ -2490,9 +2597,9 @@ export interface operations {
2490
2597
  postApiJobsByAddressStop: {
2491
2598
  parameters: {
2492
2599
  query?: never;
2493
- header: {
2600
+ header?: {
2494
2601
  /** @description Authorization header: Bearer <jwt> or Bearer <key> */
2495
- authorization: string;
2602
+ authorization?: string;
2496
2603
  };
2497
2604
  path: {
2498
2605
  address: string;
@@ -3007,110 +3114,12 @@ export interface operations {
3007
3114
  };
3008
3115
  };
3009
3116
  };
3010
- "postApiAuthSign-messageExternal": {
3011
- parameters: {
3012
- query?: never;
3013
- header: {
3014
- /** @description JWT token (with or without Bearer prefix) */
3015
- authorization: string;
3016
- };
3017
- path?: never;
3018
- cookie?: never;
3019
- };
3020
- requestBody: {
3021
- content: {
3022
- "application/json": {
3023
- /** @description The message to be signed with the user's private key */
3024
- message: string;
3025
- };
3026
- "multipart/form-data": {
3027
- /** @description The message to be signed with the user's private key */
3028
- message: string;
3029
- };
3030
- "text/plain": {
3031
- /** @description The message to be signed with the user's private key */
3032
- message: string;
3033
- };
3034
- };
3035
- };
3036
- responses: {
3037
- 200: {
3038
- headers: {
3039
- [name: string]: unknown;
3040
- };
3041
- content: {
3042
- "application/json": {
3043
- /** @description The signed message in base58 format */
3044
- signature: string;
3045
- /** @description The original message that was signed */
3046
- message: string;
3047
- /** @description The address of the user whose private key should be used for signing */
3048
- userAddress: string;
3049
- };
3050
- "multipart/form-data": {
3051
- /** @description The signed message in base58 format */
3052
- signature: string;
3053
- /** @description The original message that was signed */
3054
- message: string;
3055
- /** @description The address of the user whose private key should be used for signing */
3056
- userAddress: string;
3057
- };
3058
- "text/plain": {
3059
- /** @description The signed message in base58 format */
3060
- signature: string;
3061
- /** @description The original message that was signed */
3062
- message: string;
3063
- /** @description The address of the user whose private key should be used for signing */
3064
- userAddress: string;
3065
- };
3066
- };
3067
- };
3068
- 401: {
3069
- headers: {
3070
- [name: string]: unknown;
3071
- };
3072
- content: {
3073
- "application/json": {
3074
- name: string;
3075
- message: string;
3076
- };
3077
- "multipart/form-data": {
3078
- name: string;
3079
- message: string;
3080
- };
3081
- "text/plain": {
3082
- name: string;
3083
- message: string;
3084
- };
3085
- };
3086
- };
3087
- 500: {
3088
- headers: {
3089
- [name: string]: unknown;
3090
- };
3091
- content: {
3092
- "application/json": {
3093
- name: string;
3094
- message: string;
3095
- };
3096
- "multipart/form-data": {
3097
- name: string;
3098
- message: string;
3099
- };
3100
- "text/plain": {
3101
- name: string;
3102
- message: string;
3103
- };
3104
- };
3105
- };
3106
- };
3107
- };
3108
3117
  getApiCreditsBalance: {
3109
3118
  parameters: {
3110
3119
  query?: never;
3111
- header: {
3120
+ header?: {
3112
3121
  /** @description Authorization header: Bearer <jwt> or Bearer <key> */
3113
- authorization: string;
3122
+ authorization?: string;
3114
3123
  };
3115
3124
  path?: never;
3116
3125
  cookie?: never;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type NosanaJobsApi, type NosanaCreditsApi, type NosanaMarketsApi, type DeploymentsApi, type ApiDeploymentsApi } from './routes/index.js';
2
- import type { ApiKeyAuth, CreateNosanaApiOptions, SignerAuth, NosanaNetwork as NosanaNetworkType } from './types.js';
2
+ import type { ApiKeyAuth, CreateNosanaApiOptions, SignerAuth, NosanaNetwork as NosanaNetworkType, IncludeCookiesAuth } from './types.js';
3
3
  export interface NosanaApi {
4
4
  jobs: NosanaJobsApi;
5
5
  credits: NosanaCreditsApi;
@@ -15,6 +15,7 @@ export interface NosanaApiWithApiKey {
15
15
  export declare function createNosanaApi(environment: NosanaNetworkType, noAuth: undefined, options?: CreateNosanaApiOptions): NosanaApi;
16
16
  export declare function createNosanaApi(environment: NosanaNetworkType, signerAuth: SignerAuth, options?: CreateNosanaApiOptions): NosanaApi;
17
17
  export declare function createNosanaApi(environment: NosanaNetworkType, apiKeyAuth: ApiKeyAuth, options?: CreateNosanaApiOptions): NosanaApiWithApiKey;
18
+ export declare function createNosanaApi(environment: NosanaNetworkType, includeCookies: IncludeCookiesAuth, options?: CreateNosanaApiOptions): NosanaApi;
18
19
  export * from './types.js';
19
20
  export type { ApiConfig } from './client/index.js';
20
21
  export type * from './routes/jobs/types.js';
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { createNosanaClient } from './client/index.js';
2
2
  import { createNosanaJobsApi, createNosanaCreditsApi, createNosanaMarketsApi, createDeploymentsApi } from './routes/index.js';
3
3
  import { NosanaNetwork } from './types.js';
4
- export function createNosanaApi(environment = NosanaNetwork.MAINNET, signerOrApiKey, options) {
5
- const client = createNosanaClient(environment, signerOrApiKey, options);
6
- const hasApiKey = typeof signerOrApiKey === 'string';
4
+ export function createNosanaApi(environment = NosanaNetwork.MAINNET, signerApiKeyOrIncludeCookies, options) {
5
+ const client = createNosanaClient(environment, signerApiKeyOrIncludeCookies, options);
6
+ const hasApiKey = typeof signerApiKeyOrIncludeCookies === 'string';
7
7
  return {
8
8
  jobs: createNosanaJobsApi(client),
9
9
  credits: createNosanaCreditsApi(client),
10
10
  markets: createNosanaMarketsApi(client),
11
- deployments: !hasApiKey && signerOrApiKey
12
- ? createDeploymentsApi({ client, solana: signerOrApiKey.solana }, false)
11
+ deployments: !hasApiKey && signerApiKeyOrIncludeCookies
12
+ ? createDeploymentsApi({ client, solana: signerApiKeyOrIncludeCookies.solana }, false)
13
13
  : createDeploymentsApi({ client }, true)
14
14
  };
15
15
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAsB3C,MAAM,UAAU,eAAe,CAC7B,cAAiC,aAAa,CAAC,OAAO,EACtD,cAAmD,EACnD,OAAgC;IAEhC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,OAAO,cAAc,KAAK,QAAQ,CAAC;IAErD,OAAO;QACL,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;QACjC,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACvC,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACvC,WAAW,EAAE,CAAC,SAAS,IAAI,cAAc;YACvC,CAAC,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC;YACxE,CAAC,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC;KAC3C,CAAC;AACJ,CAAC;AAED,eAAe;AACf,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAuB3C,MAAM,UAAU,eAAe,CAC7B,cAAiC,aAAa,CAAC,OAAO,EACtD,4BAAsF,EACtF,OAAgC;IAEhC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,EAAE,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACtF,MAAM,SAAS,GAAG,OAAO,4BAA4B,KAAK,QAAQ,CAAC;IAEnE,OAAO;QACL,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;QACjC,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACvC,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACvC,WAAW,EAAE,CAAC,SAAS,IAAI,4BAA4B;YACrD,CAAC,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,4BAA4B,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC;YACtF,CAAC,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC;KAC3C,CAAC;AACJ,CAAC;AAED,eAAe;AACf,cAAc,YAAY,CAAC"}
@@ -1,13 +1,11 @@
1
1
  import type { QueryClient } from '../../../../client/index.js';
2
- import type { paths } from '@nosana/types';
3
- import type { DeploymentState } from '../../types.js';
4
- export type DeploymentEvents = paths['/api/deployments/{deployment}/events']['get']['responses']['200']['content']['application/json'];
2
+ import type { DeploymentState, PaginationParams, EventListResult } from '../../types.js';
5
3
  /**
6
- * @returns Promise<DeploymentEvents>
4
+ * @returns Promise<EventListResult>
7
5
  * @throws Error if there is an error fetching the events
8
6
  * @throws Error if the deployment is not found
9
7
  * @description Fetches the events for the deployment.
10
8
  * This will return all events associated with the deployment.
11
9
  * It is useful for monitoring deployment activity and debugging.
12
10
  */
13
- export declare function deploymentGetEvents(client: QueryClient, state: DeploymentState): Promise<DeploymentEvents>;
11
+ export declare function deploymentGetEvents(client: QueryClient, state: DeploymentState, params?: PaginationParams): Promise<EventListResult>;
@@ -1,19 +1,37 @@
1
1
  import { errorFormatter } from '../../../../utils/errorFormatter.js';
2
2
  /**
3
- * @returns Promise<DeploymentEvents>
3
+ * @returns Promise<EventListResult>
4
4
  * @throws Error if there is an error fetching the events
5
5
  * @throws Error if the deployment is not found
6
6
  * @description Fetches the events for the deployment.
7
7
  * This will return all events associated with the deployment.
8
8
  * It is useful for monitoring deployment activity and debugging.
9
9
  */
10
- export async function deploymentGetEvents(client, state) {
10
+ export async function deploymentGetEvents(client, state, params) {
11
11
  const { data, error } = await client.GET('/api/deployments/{deployment}/events', {
12
- params: { path: { deployment: state.id } },
12
+ params: {
13
+ path: { deployment: state.id },
14
+ query: {
15
+ cursor: params?.cursor,
16
+ limit: params?.limit,
17
+ sort_order: params?.sort_order,
18
+ },
19
+ },
13
20
  });
14
21
  if (error || !data) {
15
22
  throw errorFormatter('Error getting deployment events', error);
16
23
  }
17
- return data;
24
+ const nextPage = data.pagination.cursor_next
25
+ ? async () => deploymentGetEvents(client, state, { ...params, cursor: data.pagination.cursor_next })
26
+ : null;
27
+ const previousPage = data.pagination.cursor_prev
28
+ ? async () => deploymentGetEvents(client, state, { ...params, cursor: data.pagination.cursor_prev })
29
+ : null;
30
+ return {
31
+ items: data.events,
32
+ total_items: data.pagination.total_items,
33
+ nextPage,
34
+ previousPage,
35
+ };
18
36
  }
19
37
  //# sourceMappingURL=deploymentGetEvents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploymentGetEvents.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAQrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAmB,EACnB,KAAsB;IAEtB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CACtC,sCAAsC,EACtC;QACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE;KAC3C,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"deploymentGetEvents.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAKrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAmB,EACnB,KAAsB,EACtB,MAAyB;IAEzB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CACtC,sCAAsC,EACtC;QACE,MAAM,EAAE;YACN,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9B,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM,EAAE,MAAM;gBACtB,KAAK,EAAE,MAAM,EAAE,KAAK;gBACpB,UAAU,EAAE,MAAM,EAAE,UAAU;aAC/B;SACF;KACF,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QAC1C,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAY,EAAE,CAAC;QACrG,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QAC9C,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAY,EAAE,CAAC;QACrG,CAAC,CAAC,IAAI,CAAC;IAET,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;QACxC,QAAQ;QACR,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -1,13 +1,11 @@
1
1
  import type { QueryClient } from '../../../../client/index.js';
2
- import type { paths } from '@nosana/types';
3
- import type { DeploymentState } from '../../types.js';
4
- export type DeploymentJobs = paths['/api/deployments/{deployment}/jobs']['get']['responses']['200']['content']['application/json'];
2
+ import type { DeploymentState, PaginationParams, JobListResult } from '../../types.js';
5
3
  /**
6
- * @returns Promise<DeploymentJobs>
4
+ * @returns Promise<JobListResult>
7
5
  * @throws Error if there is an error fetching the jobs
8
6
  * @throws Error if the deployment is not found
9
7
  * @description Fetches the jobs for the deployment.
10
8
  * This will return the current jobs associated with the deployment.
11
9
  * It is useful for monitoring the deployment's job status.
12
10
  */
13
- export declare function deploymentGetJobs(client: QueryClient, state: DeploymentState): Promise<DeploymentJobs>;
11
+ export declare function deploymentGetJobs(client: QueryClient, state: DeploymentState, params?: PaginationParams): Promise<JobListResult>;
@@ -1,19 +1,37 @@
1
1
  import { errorFormatter } from '../../../../utils/errorFormatter.js';
2
2
  /**
3
- * @returns Promise<DeploymentJobs>
3
+ * @returns Promise<JobListResult>
4
4
  * @throws Error if there is an error fetching the jobs
5
5
  * @throws Error if the deployment is not found
6
6
  * @description Fetches the jobs for the deployment.
7
7
  * This will return the current jobs associated with the deployment.
8
8
  * It is useful for monitoring the deployment's job status.
9
9
  */
10
- export async function deploymentGetJobs(client, state) {
10
+ export async function deploymentGetJobs(client, state, params) {
11
11
  const { data, error } = await client.GET('/api/deployments/{deployment}/jobs', {
12
- params: { path: { deployment: state.id } },
12
+ params: {
13
+ path: { deployment: state.id },
14
+ query: {
15
+ cursor: params?.cursor,
16
+ limit: params?.limit,
17
+ sort_order: params?.sort_order,
18
+ },
19
+ },
13
20
  });
14
21
  if (error || !data) {
15
22
  throw errorFormatter('Error getting deployment jobs', error);
16
23
  }
17
- return data;
24
+ const nextPage = data.pagination.cursor_next
25
+ ? async () => deploymentGetJobs(client, state, { ...params, cursor: data.pagination.cursor_next })
26
+ : null;
27
+ const previousPage = data.pagination.cursor_prev
28
+ ? async () => deploymentGetJobs(client, state, { ...params, cursor: data.pagination.cursor_prev })
29
+ : null;
30
+ return {
31
+ items: data.jobs,
32
+ total_items: data.pagination.total_items,
33
+ nextPage,
34
+ previousPage,
35
+ };
18
36
  }
19
37
  //# sourceMappingURL=deploymentGetJobs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploymentGetJobs.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetJobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAQrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAmB,EACnB,KAAsB;IAEtB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CACtC,oCAAoC,EACpC;QACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE;KAC3C,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"deploymentGetJobs.js","sourceRoot":"","sources":["../../../../../src/routes/deploy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,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -1,13 +1,11 @@
1
1
  import type { QueryClient } from '../../../../client/index.js';
2
- import type { paths } from '@nosana/types';
3
- import type { DeploymentState } from '../../types.js';
4
- export type DeploymentRevisions = paths['/api/deployments/{deployment}/revisions']['get']['responses']['200']['content']['application/json'];
2
+ import type { DeploymentState, PaginationParams, RevisionListResult } from '../../types.js';
5
3
  /**
6
- * @returns Promise<DeploymentRevisions>
4
+ * @returns Promise<RevisionListResult>
7
5
  * @throws Error if there is an error fetching the revisions
8
6
  * @throws Error if the deployment is not found
9
7
  * @description Fetches the revisions for the deployment.
10
8
  * This will return all revisions associated with the deployment.
11
9
  * It is useful for viewing the deployment history.
12
10
  */
13
- export declare function deploymentGetRevisions(client: QueryClient, state: DeploymentState): Promise<DeploymentRevisions>;
11
+ export declare function deploymentGetRevisions(client: QueryClient, state: DeploymentState, params?: PaginationParams): Promise<RevisionListResult>;
@@ -1,19 +1,37 @@
1
1
  import { errorFormatter } from '../../../../utils/errorFormatter.js';
2
2
  /**
3
- * @returns Promise<DeploymentRevisions>
3
+ * @returns Promise<RevisionListResult>
4
4
  * @throws Error if there is an error fetching the revisions
5
5
  * @throws Error if the deployment is not found
6
6
  * @description Fetches the revisions for the deployment.
7
7
  * This will return all revisions associated with the deployment.
8
8
  * It is useful for viewing the deployment history.
9
9
  */
10
- export async function deploymentGetRevisions(client, state) {
10
+ export async function deploymentGetRevisions(client, state, params) {
11
11
  const { data, error } = await client.GET('/api/deployments/{deployment}/revisions', {
12
- params: { path: { deployment: state.id } },
12
+ params: {
13
+ path: { deployment: state.id },
14
+ query: {
15
+ cursor: params?.cursor,
16
+ limit: params?.limit,
17
+ sort_order: params?.sort_order,
18
+ },
19
+ },
13
20
  });
14
21
  if (error || !data) {
15
22
  throw errorFormatter('Error getting deployment revisions', error);
16
23
  }
17
- return data;
24
+ const nextPage = data.pagination.cursor_next
25
+ ? async () => deploymentGetRevisions(client, state, { ...params, cursor: data.pagination.cursor_next })
26
+ : null;
27
+ const previousPage = data.pagination.cursor_prev
28
+ ? async () => deploymentGetRevisions(client, state, { ...params, cursor: data.pagination.cursor_prev })
29
+ : null;
30
+ return {
31
+ items: data.revisions,
32
+ total_items: data.pagination.total_items,
33
+ nextPage,
34
+ previousPage,
35
+ };
18
36
  }
19
37
  //# sourceMappingURL=deploymentGetRevisions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploymentGetRevisions.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetRevisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAQrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAmB,EACnB,KAAsB;IAEtB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CACtC,yCAAyC,EACzC;QACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE;KAC3C,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"deploymentGetRevisions.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetRevisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAKrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAmB,EACnB,KAAsB,EACtB,MAAyB;IAEzB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,MAAM,CAAC,GAAG,CACrC,yCAAyC,EACzC;QACE,MAAM,EAAE;YACN,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9B,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM,EAAE,MAAM;gBACtB,KAAK,EAAE,MAAM,EAAE,KAAK;gBACpB,UAAU,EAAE,MAAM,EAAE,UAAU;aAC/B;SACF;KACF,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QAC1C,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAY,EAAE,CAAC;QACxG,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QAC9C,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAY,EAAE,CAAC;QACxG,CAAC,CAAC,IAAI,CAAC;IAET,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,SAAS;QACrB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;QACxC,QAAQ;QACR,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import type { QueryClient } from '../../../../client/index.js';
2
- import type { Task } from '@nosana/types';
3
- import type { DeploymentState } from '../../types.js';
2
+ import type { DeploymentState, PaginationParams, TaskListResult } from '../../types.js';
4
3
  /**
5
- * @returns Promise<Task[]>
4
+ * @returns Promise<TaskListResult>
6
5
  * @throws Error if there is an error fetching the tasks
7
6
  * @throws Error if the deployment is not found
8
7
  * @description Fetches the tasks for the deployment.
9
8
  * This will return the current tasks associated with the deployment.
10
9
  * It is useful for monitoring the deployment's progress and status.
11
10
  */
12
- export declare function deploymentGetTasks(client: QueryClient, state: DeploymentState): Promise<Task[]>;
11
+ export declare function deploymentGetTasks(client: QueryClient, state: DeploymentState, params?: PaginationParams): Promise<TaskListResult>;
@@ -1,19 +1,37 @@
1
1
  import { errorFormatter } from '../../../../utils/errorFormatter.js';
2
2
  /**
3
- * @returns Promise<Task[]>
3
+ * @returns Promise<TaskListResult>
4
4
  * @throws Error if there is an error fetching the tasks
5
5
  * @throws Error if the deployment is not found
6
6
  * @description Fetches the tasks for the deployment.
7
7
  * This will return the current tasks associated with the deployment.
8
8
  * It is useful for monitoring the deployment's progress and status.
9
9
  */
10
- export async function deploymentGetTasks(client, state) {
10
+ export async function deploymentGetTasks(client, state, params) {
11
11
  const { data, error } = await client.GET('/api/deployments/{deployment}/tasks', {
12
- params: { path: { deployment: state.id } },
12
+ params: {
13
+ path: { deployment: state.id },
14
+ query: {
15
+ cursor: params?.cursor,
16
+ limit: params?.limit,
17
+ sort_order: params?.sort_order,
18
+ },
19
+ },
13
20
  });
14
21
  if (error || !data) {
15
22
  throw errorFormatter('Error getting deployment tasks', error);
16
23
  }
17
- return data;
24
+ const nextPage = data.pagination.cursor_next
25
+ ? async () => deploymentGetTasks(client, state, { ...params, cursor: data.pagination.cursor_next })
26
+ : null;
27
+ const previousPage = data.pagination.cursor_prev
28
+ ? async () => deploymentGetTasks(client, state, { ...params, cursor: data.pagination.cursor_prev })
29
+ : null;
30
+ return {
31
+ items: data.tasks,
32
+ total_items: data.pagination.total_items,
33
+ nextPage,
34
+ previousPage,
35
+ };
18
36
  }
19
37
  //# sourceMappingURL=deploymentGetTasks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploymentGetTasks.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetTasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAMrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAmB,EACnB,KAAsB;IAEtB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CACtC,qCAAqC,EACrC;QACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE;KAC3C,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"deploymentGetTasks.js","sourceRoot":"","sources":["../../../../../src/routes/deployments/deployment/actions/deploymentGetTasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAKrE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAmB,EACnB,KAAsB,EACtB,MAAyB;IAEzB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CACtC,qCAAqC,EACrC;QACE,MAAM,EAAE;YACN,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9B,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM,EAAE,MAAM;gBACtB,KAAK,EAAE,MAAM,EAAE,KAAK;gBACpB,UAAU,EAAE,MAAM,EAAE,UAAU;aAC/B;SACF;KACF,CACF,CAAC;IAEF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,cAAc,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QAC1C,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAY,EAAE,CAAC;QACpG,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QAC9C,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAY,EAAE,CAAC;QACpG,CAAC,CAAC,IAAI,CAAC;IAET,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;QACxC,QAAQ;QACR,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -38,15 +38,16 @@ export function createDeployment(deployment, options, hasApiKey) {
38
38
  await deploymentArchive(options.client, state);
39
39
  };
40
40
  /**
41
- * @returns Promise<Task[]>
41
+ * @param params Pagination parameters (optional: cursor, limit, sort_order)
42
+ * @returns Promise<TaskListResult>
42
43
  * @throws Error if there is an error fetching the tasks
43
44
  * @throws Error if the deployment is not found
44
45
  * @description Fetches the tasks for the deployment.
45
46
  * This will return the current tasks associated with the deployment.
46
47
  * It is useful for monitoring the deployment's progress and status.
47
48
  */
48
- const getTasks = async () => {
49
- return await deploymentGetTasks(options.client, state);
49
+ const getTasks = async (params) => {
50
+ return await deploymentGetTasks(options.client, state, params);
50
51
  };
51
52
  /**
52
53
  * @param jobDefinition Job definition for the new revision
@@ -114,37 +115,40 @@ export function createDeployment(deployment, options, hasApiKey) {
114
115
  return await deploymentGetJob(options.client, state.id, job);
115
116
  };
116
117
  /**
117
- * @returns Promise<DeploymentJobs>
118
+ * @param params Pagination parameters (optional: cursor, limit, sort_order)
119
+ * @returns Promise<JobListResult>
118
120
  * @throws Error if there is an error fetching the jobs
119
121
  * @throws Error if the deployment is not found
120
122
  * @description Fetches all jobs for the deployment.
121
123
  * This will return the current jobs associated with the deployment.
122
124
  * It is useful for monitoring the deployment's job status.
123
125
  */
124
- const getJobs = async () => {
125
- return await deploymentGetJobs(options.client, state);
126
+ const getJobs = async (params) => {
127
+ return await deploymentGetJobs(options.client, state, params);
126
128
  };
127
129
  /**
128
- * @returns Promise<DeploymentRevisions>
130
+ * @param params Pagination parameters (optional: cursor, limit, sort_order)
131
+ * @returns Promise<RevisionListResult>
129
132
  * @throws Error if there is an error fetching the revisions
130
133
  * @throws Error if the deployment is not found
131
134
  * @description Fetches all revisions for the deployment.
132
135
  * This will return all revisions associated with the deployment.
133
136
  * It is useful for viewing the deployment history.
134
137
  */
135
- const getRevisions = async () => {
136
- return await deploymentGetRevisions(options.client, state);
138
+ const getRevisions = async (params) => {
139
+ return await deploymentGetRevisions(options.client, state, params);
137
140
  };
138
141
  /**
139
- * @returns Promise<DeploymentEvents>
142
+ * @param params Pagination parameters (optional: cursor, limit, sort_order)
143
+ * @returns Promise<EventListResult>
140
144
  * @throws Error if there is an error fetching the events
141
145
  * @throws Error if the deployment is not found
142
146
  * @description Fetches all events for the deployment.
143
147
  * This will return all events associated with the deployment.
144
148
  * It is useful for monitoring deployment activity and debugging.
145
149
  */
146
- const getEvents = async () => {
147
- return await deploymentGetEvents(options.client, state);
150
+ const getEvents = async (params) => {
151
+ return await deploymentGetEvents(options.client, state, params);
148
152
  };
149
153
  /**
150
154
  * @throws Error if the deployment is not stopped
@@ -1 +1 @@
1
- {"version":3,"file":"createDeployment.js","sourceRoot":"","sources":["../../../../src/routes/deployments/deployment/createDeployment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EACjB,MAAM,oBAA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+B,EAAE;QACtD,OAAO,MAAM,mBAAmB,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC,CAAC;IAEF;;;;;;;;;QASI;IACJ,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;QAClC,OAAO,MAAM,gBAAgB,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;YACxD,kEAAkE;YAClE,KAAK,GAAG,SAAS,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QAC1B,GAAG,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC;YACtC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;SAC3D,CAAC,CAAC,CAAC,EAAE,CAAC;QACP,KAAK;QACL,IAAI;QACJ,OAAO;QACP,MAAM,EAAE,gBAAgB;QACxB,QAAQ;QACR,MAAM;QACN,OAAO;QACP,YAAY;QACZ,SAAS;QACT,kBAAkB;QAClB,cAAc;QACd,kBAAkB;QAClB,oBAAoB;QACpB,aAAa;QACb,cAAc;KACf,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"createDeployment.js","sourceRoot":"","sources":["../../../../src/routes/deployments/deployment/createDeployment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAqB/C,MAAM,UAAU,gBAAgB,CAC9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,EAAE;QAC9E,OAAO,MAAM,mBAAmB,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF;;;;;;;;;QASI;IACJ,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;QAClC,OAAO,MAAM,gBAAgB,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;YACxD,kEAAkE;YAClE,KAAK,GAAG,SAAS,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QAC1B,GAAG,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC;YACtC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;SAC3D,CAAC,CAAC,CAAC,EAAE,CAAC;QACP,KAAK;QACL,IAAI;QACJ,OAAO;QACP,MAAM,EAAE,gBAAgB;QACxB,QAAQ;QACR,MAAM;QACN,OAAO;QACP,YAAY;QACZ,SAAS;QACT,kBAAkB;QAClB,cAAc;QACd,kBAAkB;QAClB,oBAAoB;QACpB,aAAa;QACb,cAAc;KACf,CAAC,CAAC;AACL,CAAC"}
@@ -27,12 +27,31 @@ export function createDeploymentsApi(options, hasApiKey) {
27
27
  }
28
28
  return createDeployment(data);
29
29
  };
30
- const list = async () => {
31
- const { data, error } = await options.client.GET('/api/deployments', {});
30
+ const list = async (params) => {
31
+ const { data, error } = await options.client.GET('/api/deployments', {
32
+ params: {
33
+ query: {
34
+ cursor: params?.cursor,
35
+ limit: params?.limit,
36
+ sort_order: params?.sort_order,
37
+ },
38
+ },
39
+ });
32
40
  if (error || !data) {
33
41
  throw errorFormatter('Error listing deployments', error);
34
42
  }
35
- return data.map((deployment) => createDeployment(deployment));
43
+ const nextPage = data.pagination.cursor_next
44
+ ? async () => list({ ...params, cursor: data.pagination.cursor_next })
45
+ : null;
46
+ const previousPage = data.pagination.cursor_prev
47
+ ? async () => list({ ...params, cursor: data.pagination.cursor_prev })
48
+ : null;
49
+ return {
50
+ items: data.deployments.map((deployment) => createDeployment(deployment)),
51
+ total_items: data.pagination.total_items,
52
+ nextPage,
53
+ previousPage,
54
+ };
36
55
  };
37
56
  const pipe = async (deploymentIDorCreateObject, ...actions) => {
38
57
  let deployment;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/routes/deployments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAa1F,MAAM,UAAU,oBAAoB,CAAC,OAA8C,EAAE,SAAuB;IAC1G,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,OAAO;QACpF,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC;QAC1C,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,KAAK,EAAE,cAAgC,EAAE,EAAE;QACxD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAC3E,IAAI,EAAE,cAAsC;SAC7C,CAAC,CAAC;QAEH,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,cAAc,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,GAAG,GA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,CAAC,QAAQ,IAAI,OAAO,CAAC,EAAE,CAAC;YACxC,MAAM,cAAc,CAAC,iDAAiD,CAAC,CAAC;QAC1E,CAAC;QAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;QAEhF,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,cAAc,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;QACtD,CAAC;QAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,aAAa,CACtD,KAAK,EACL,OAAO,EACP,IAAI,IAAI,CAAC,UAAU,CAAC,CACrB,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,GAAG;QACH,IAAI;QACJ,IAAI;QACJ,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,EAAE;gBACN,MAAM,EAAE,WAAW;gBACnB,IAAI,EAAE,UAAU;aACjB;SACF,CAAC,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { JobDefinition, Task, components, paths } from '@nosana/types';
2
- export type { JobDefinition, Task } from '@nosana/types';
1
+ import type { JobDefinition, components, paths } from '@nosana/types';
2
+ export type { JobDefinition } from '@nosana/types';
3
3
  export type DeploymentState = Omit<components['schemas']['Deployment'], "updated_at" | "created_at"> & {
4
4
  updated_at: Date;
5
5
  created_at: Date;
@@ -8,9 +8,32 @@ export type DeploymentCreateBody = components['schemas']['DeploymentCreateBody']
8
8
  export type CreateDeployment = Omit<DeploymentCreateBody, 'job_definition'> & {
9
9
  job_definition: JobDefinition;
10
10
  };
11
+ export type PaginationMeta = {
12
+ cursor_next: string | null;
13
+ cursor_prev: string | null;
14
+ total_items: number;
15
+ };
16
+ export interface PaginatedResult<T> {
17
+ items: T[];
18
+ total_items: number;
19
+ nextPage: (() => Promise<PaginatedResult<T>>) | null;
20
+ previousPage: (() => Promise<PaginatedResult<T>>) | null;
21
+ }
22
+ export type DeploymentListResult = PaginatedResult<Deployment>;
23
+ export type ApiDeploymentListResult = PaginatedResult<ApiDeployment>;
24
+ export type JobListResult = PaginatedResult<DeploymentJobItem>;
25
+ export type EventListResult = PaginatedResult<DeploymentEventItem>;
26
+ export type RevisionListResult = PaginatedResult<DeploymentRevisionItem>;
27
+ export type TaskListResult = PaginatedResult<DeploymentTaskItem>;
28
+ export type PaginationParams = {
29
+ cursor?: string;
30
+ limit?: 10 | 20 | 50 | 100;
31
+ sort_order?: 'asc' | 'desc';
32
+ };
11
33
  export type DeploymentJobs = paths['/api/deployments/{deployment}/jobs']['get']['responses']['200']['content']['application/json'];
12
34
  export type DeploymentRevisions = paths['/api/deployments/{deployment}/revisions']['get']['responses']['200']['content']['application/json'];
13
35
  export type DeploymentEvents = paths['/api/deployments/{deployment}/events']['get']['responses']['200']['content']['application/json'];
36
+ export type DeploymentTasks = paths['/api/deployments/{deployment}/tasks']['get']['responses']['200']['content']['application/json'];
14
37
  export interface TopupVaultOptions {
15
38
  SOL?: number;
16
39
  NOS?: number;
@@ -31,16 +54,20 @@ export interface Vault {
31
54
  withdraw: () => Promise<void>;
32
55
  }
33
56
  export type DeploymentJob = paths['/api/deployments/{deployment}/jobs/{job}']['get']['responses']['200']['content']['application/json'];
57
+ export type DeploymentJobItem = DeploymentJobs['jobs'][number];
58
+ export type DeploymentRevisionItem = DeploymentRevisions['revisions'][number];
59
+ export type DeploymentEventItem = DeploymentEvents['events'][number];
60
+ export type DeploymentTaskItem = DeploymentTasks['tasks'][number];
34
61
  export type ApiDeployment = DeploymentState & {
35
62
  start: () => Promise<void>;
36
63
  stop: () => Promise<void>;
37
64
  archive: () => Promise<void>;
38
65
  delete: () => Promise<void>;
39
- getTasks: () => Promise<Task[]>;
66
+ getTasks: (params?: PaginationParams) => Promise<TaskListResult>;
40
67
  getJob: (job: string) => Promise<DeploymentJob>;
41
- getJobs: () => Promise<DeploymentJobs>;
42
- getRevisions: () => Promise<DeploymentRevisions>;
43
- getEvents: () => Promise<DeploymentEvents>;
68
+ getJobs: (params?: PaginationParams) => Promise<JobListResult>;
69
+ getRevisions: (params?: PaginationParams) => Promise<RevisionListResult>;
70
+ getEvents: (params?: PaginationParams) => Promise<EventListResult>;
44
71
  generateAuthHeader: () => Promise<string>;
45
72
  createRevision: (jobDefinition: JobDefinition) => Promise<void>;
46
73
  updateActiveRevision: (revision: number) => Promise<void>;
@@ -54,7 +81,7 @@ export type Deployment = ApiDeployment & {
54
81
  export interface DeploymentsApi {
55
82
  create: (deploymentBody: CreateDeployment) => Promise<Deployment>;
56
83
  get: (deployment: string) => Promise<Deployment>;
57
- list: () => Promise<Deployment[]>;
84
+ list: (params?: PaginationParams) => Promise<DeploymentListResult>;
58
85
  pipe: (deploymentIDorCreateObject: string | CreateDeployment, ...actions: Array<(deployment: Deployment) => Promise<void> | void>) => Promise<Deployment>;
59
86
  vaults: {
60
87
  create: () => Promise<Vault>;
@@ -64,6 +91,6 @@ export interface DeploymentsApi {
64
91
  export interface ApiDeploymentsApi {
65
92
  create: (deploymentBody: CreateDeployment) => Promise<ApiDeployment>;
66
93
  get: (deployment: string) => Promise<ApiDeployment>;
67
- list: () => Promise<ApiDeployment[]>;
94
+ list: (params?: PaginationParams) => Promise<ApiDeploymentListResult>;
68
95
  pipe: (deploymentIDorCreateObject: string | CreateDeployment, ...actions: Array<(deployment: ApiDeployment) => Promise<void> | void>) => Promise<ApiDeployment>;
69
96
  }
package/dist/types.d.ts CHANGED
@@ -6,6 +6,7 @@ export interface SolanaConfig {
6
6
  network: string;
7
7
  }
8
8
  export type ApiKeyAuth = string;
9
+ export type IncludeCookiesAuth = 'include';
9
10
  /**
10
11
  * SignerAuth provides identifier and generate function for API authentication.
11
12
  * Used by nosana-kit which converts Wallet → SignerAuth via @nosana/authorization.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/api",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Nosana API module",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "vitest": "^4.0.3"
39
39
  },
40
40
  "dependencies": {
41
- "@nosana/types": "^0.1.24",
41
+ "@nosana/types": "^0.1.25",
42
42
  "openapi-fetch": "^0.14.0"
43
43
  }
44
44
  }