@wasto/sdk 1.0.4 → 1.0.5

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
@@ -273,7 +273,9 @@ declare enum DashboardAppSlug {
273
273
  MAPSO = "MAPSO",
274
274
  IAGO = "IAGO",
275
275
  PEDAGO = "PEDAGO",
276
- MARKETO = "MARKETO"
276
+ MARKETO = "MARKETO",
277
+ /** Connect'O — API agents / MCP (hors free self-serve) */
278
+ CONNECTO = "CONNECTO"
277
279
  }
278
280
  type DashboardAppDefinition = {
279
281
  slug: DashboardAppSlug;
@@ -572,7 +574,8 @@ interface CreateWasteCollectionDayRequest {
572
574
  wasteTypeId: string;
573
575
  name: string;
574
576
  description?: string;
575
- biweekly?: boolean;
577
+ /** Fréquence en semaines (1 = hebdo, 2 = toutes les 2 semaines, …). */
578
+ everyWeeks?: number;
576
579
  startDate?: string;
577
580
  }
578
581
  interface CreateWasteCollectionExceptionRequest {
@@ -2443,6 +2446,42 @@ declare function createWastoClient(config: WastoClientConfig): {
2443
2446
  unlinkCity: (wasteTypeId: string, cityId: string) => Promise<void>;
2444
2447
  };
2445
2448
  };
2449
+ surveys: {
2450
+ findAll: (params?: {
2451
+ page?: number;
2452
+ pageSize?: number;
2453
+ cityId?: string;
2454
+ cityGroupId?: string;
2455
+ status?: string;
2456
+ light?: boolean;
2457
+ }) => Promise<PaginatedResponse<unknown>>;
2458
+ getById: (id: string) => Promise<unknown>;
2459
+ getStats: (id: string) => Promise<unknown>;
2460
+ getTerrainOverview: (params?: {
2461
+ cityId?: string;
2462
+ cityGroupId?: string;
2463
+ }) => Promise<unknown>;
2464
+ };
2465
+ fieldReports: {
2466
+ findAllForms: (params?: {
2467
+ page?: number;
2468
+ pageSize?: number;
2469
+ cityId?: string;
2470
+ cityGroupId?: string;
2471
+ status?: string;
2472
+ light?: boolean;
2473
+ }) => Promise<PaginatedResponse<unknown>>;
2474
+ getForm: (id: string) => Promise<unknown>;
2475
+ findAllReports: (params?: {
2476
+ page?: number;
2477
+ pageSize?: number;
2478
+ cityId?: string;
2479
+ cityGroupId?: string;
2480
+ status?: string;
2481
+ formId?: string;
2482
+ }) => Promise<PaginatedResponse<unknown>>;
2483
+ getReport: (id: string) => Promise<unknown>;
2484
+ };
2446
2485
  public: {
2447
2486
  cities: {
2448
2487
  findAll: (params?: {
@@ -2559,6 +2598,8 @@ declare function createWastoClient(config: WastoClientConfig): {
2559
2598
  devices: {
2560
2599
  registerPushToken: (deviceId: string, body: {
2561
2600
  token: string;
2601
+ cityId?: string | null;
2602
+ wasteCollectionPlaceId?: string | null;
2562
2603
  }) => Promise<void>;
2563
2604
  };
2564
2605
  analytics: {
package/dist/index.d.ts CHANGED
@@ -273,7 +273,9 @@ declare enum DashboardAppSlug {
273
273
  MAPSO = "MAPSO",
274
274
  IAGO = "IAGO",
275
275
  PEDAGO = "PEDAGO",
276
- MARKETO = "MARKETO"
276
+ MARKETO = "MARKETO",
277
+ /** Connect'O — API agents / MCP (hors free self-serve) */
278
+ CONNECTO = "CONNECTO"
277
279
  }
278
280
  type DashboardAppDefinition = {
279
281
  slug: DashboardAppSlug;
@@ -572,7 +574,8 @@ interface CreateWasteCollectionDayRequest {
572
574
  wasteTypeId: string;
573
575
  name: string;
574
576
  description?: string;
575
- biweekly?: boolean;
577
+ /** Fréquence en semaines (1 = hebdo, 2 = toutes les 2 semaines, …). */
578
+ everyWeeks?: number;
576
579
  startDate?: string;
577
580
  }
578
581
  interface CreateWasteCollectionExceptionRequest {
@@ -2443,6 +2446,42 @@ declare function createWastoClient(config: WastoClientConfig): {
2443
2446
  unlinkCity: (wasteTypeId: string, cityId: string) => Promise<void>;
2444
2447
  };
2445
2448
  };
2449
+ surveys: {
2450
+ findAll: (params?: {
2451
+ page?: number;
2452
+ pageSize?: number;
2453
+ cityId?: string;
2454
+ cityGroupId?: string;
2455
+ status?: string;
2456
+ light?: boolean;
2457
+ }) => Promise<PaginatedResponse<unknown>>;
2458
+ getById: (id: string) => Promise<unknown>;
2459
+ getStats: (id: string) => Promise<unknown>;
2460
+ getTerrainOverview: (params?: {
2461
+ cityId?: string;
2462
+ cityGroupId?: string;
2463
+ }) => Promise<unknown>;
2464
+ };
2465
+ fieldReports: {
2466
+ findAllForms: (params?: {
2467
+ page?: number;
2468
+ pageSize?: number;
2469
+ cityId?: string;
2470
+ cityGroupId?: string;
2471
+ status?: string;
2472
+ light?: boolean;
2473
+ }) => Promise<PaginatedResponse<unknown>>;
2474
+ getForm: (id: string) => Promise<unknown>;
2475
+ findAllReports: (params?: {
2476
+ page?: number;
2477
+ pageSize?: number;
2478
+ cityId?: string;
2479
+ cityGroupId?: string;
2480
+ status?: string;
2481
+ formId?: string;
2482
+ }) => Promise<PaginatedResponse<unknown>>;
2483
+ getReport: (id: string) => Promise<unknown>;
2484
+ };
2446
2485
  public: {
2447
2486
  cities: {
2448
2487
  findAll: (params?: {
@@ -2559,6 +2598,8 @@ declare function createWastoClient(config: WastoClientConfig): {
2559
2598
  devices: {
2560
2599
  registerPushToken: (deviceId: string, body: {
2561
2600
  token: string;
2601
+ cityId?: string | null;
2602
+ wasteCollectionPlaceId?: string | null;
2562
2603
  }) => Promise<void>;
2563
2604
  };
2564
2605
  analytics: {
package/dist/index.js CHANGED
@@ -467,6 +467,7 @@ var DashboardAppSlug = /* @__PURE__ */ ((DashboardAppSlug2) => {
467
467
  DashboardAppSlug2["IAGO"] = "IAGO";
468
468
  DashboardAppSlug2["PEDAGO"] = "PEDAGO";
469
469
  DashboardAppSlug2["MARKETO"] = "MARKETO";
470
+ DashboardAppSlug2["CONNECTO"] = "CONNECTO";
470
471
  return DashboardAppSlug2;
471
472
  })(DashboardAppSlug || {});
472
473
  var WASTO_SECTIONS = [
@@ -541,6 +542,14 @@ var WASTO_SECTIONS = [
541
542
  label: "ASSIST'O",
542
543
  sectionLabel: "Support",
543
544
  dashboardPath: "/support"
545
+ },
546
+ {
547
+ slug: "CONNECTO" /* CONNECTO */,
548
+ key: "connecto",
549
+ label: "CONNECT'O",
550
+ sectionLabel: "API & agents",
551
+ dashboardPath: "/integrations",
552
+ isDevOnly: true
544
553
  }
545
554
  ];
546
555
  var DASHBOARD_APPS = [
@@ -612,6 +621,13 @@ var DASHBOARD_APPS = [
612
621
  label: "MARKET'O",
613
622
  dashboardPath: "/analyses",
614
623
  isDevOnly: true
624
+ },
625
+ {
626
+ slug: "CONNECTO" /* CONNECTO */,
627
+ key: "connecto",
628
+ label: "CONNECT'O",
629
+ dashboardPath: "/integrations",
630
+ isDevOnly: true
615
631
  }
616
632
  ];
617
633
  var WASTO_SECTION_BY_KEY = Object.fromEntries(
@@ -2236,6 +2252,62 @@ function createWastoClient(config) {
2236
2252
  )
2237
2253
  })
2238
2254
  },
2255
+ surveys: {
2256
+ findAll: (params) => {
2257
+ const q = new URLSearchParams();
2258
+ if (params?.page != null) q.set("page", String(params.page));
2259
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2260
+ if (params?.cityId) q.set("cityId", params.cityId);
2261
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2262
+ if (params?.status) q.set("status", params.status);
2263
+ if (params?.light) q.set("light", "1");
2264
+ const query = q.toString();
2265
+ return request(
2266
+ `/surveys${query ? `?${query}` : ""}`
2267
+ );
2268
+ },
2269
+ getById: (id) => request(`/surveys/${id}`),
2270
+ getStats: (id) => request(`/surveys/${id}/stats`),
2271
+ getTerrainOverview: (params) => {
2272
+ const q = new URLSearchParams();
2273
+ if (params?.cityId) q.set("cityId", params.cityId);
2274
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2275
+ const query = q.toString();
2276
+ return request(
2277
+ `/surveys/terrain/overview${query ? `?${query}` : ""}`
2278
+ );
2279
+ }
2280
+ },
2281
+ fieldReports: {
2282
+ findAllForms: (params) => {
2283
+ const q = new URLSearchParams();
2284
+ if (params?.page != null) q.set("page", String(params.page));
2285
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2286
+ if (params?.cityId) q.set("cityId", params.cityId);
2287
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2288
+ if (params?.status) q.set("status", params.status);
2289
+ if (params?.light) q.set("light", "1");
2290
+ const query = q.toString();
2291
+ return request(
2292
+ `/field-reports/forms${query ? `?${query}` : ""}`
2293
+ );
2294
+ },
2295
+ getForm: (id) => request(`/field-reports/forms/${id}`),
2296
+ findAllReports: (params) => {
2297
+ const q = new URLSearchParams();
2298
+ if (params?.page != null) q.set("page", String(params.page));
2299
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2300
+ if (params?.cityId) q.set("cityId", params.cityId);
2301
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2302
+ if (params?.status) q.set("status", params.status);
2303
+ if (params?.formId) q.set("formId", params.formId);
2304
+ const query = q.toString();
2305
+ return request(
2306
+ `/field-reports${query ? `?${query}` : ""}`
2307
+ );
2308
+ },
2309
+ getReport: (id) => request(`/field-reports/${id}`)
2310
+ },
2239
2311
  public: {
2240
2312
  cities: {
2241
2313
  findAll: (params) => {
package/dist/index.mjs CHANGED
@@ -307,6 +307,7 @@ var DashboardAppSlug = /* @__PURE__ */ ((DashboardAppSlug2) => {
307
307
  DashboardAppSlug2["IAGO"] = "IAGO";
308
308
  DashboardAppSlug2["PEDAGO"] = "PEDAGO";
309
309
  DashboardAppSlug2["MARKETO"] = "MARKETO";
310
+ DashboardAppSlug2["CONNECTO"] = "CONNECTO";
310
311
  return DashboardAppSlug2;
311
312
  })(DashboardAppSlug || {});
312
313
  var WASTO_SECTIONS = [
@@ -381,6 +382,14 @@ var WASTO_SECTIONS = [
381
382
  label: "ASSIST'O",
382
383
  sectionLabel: "Support",
383
384
  dashboardPath: "/support"
385
+ },
386
+ {
387
+ slug: "CONNECTO" /* CONNECTO */,
388
+ key: "connecto",
389
+ label: "CONNECT'O",
390
+ sectionLabel: "API & agents",
391
+ dashboardPath: "/integrations",
392
+ isDevOnly: true
384
393
  }
385
394
  ];
386
395
  var DASHBOARD_APPS = [
@@ -452,6 +461,13 @@ var DASHBOARD_APPS = [
452
461
  label: "MARKET'O",
453
462
  dashboardPath: "/analyses",
454
463
  isDevOnly: true
464
+ },
465
+ {
466
+ slug: "CONNECTO" /* CONNECTO */,
467
+ key: "connecto",
468
+ label: "CONNECT'O",
469
+ dashboardPath: "/integrations",
470
+ isDevOnly: true
455
471
  }
456
472
  ];
457
473
  var WASTO_SECTION_BY_KEY = Object.fromEntries(
@@ -2076,6 +2092,62 @@ function createWastoClient(config) {
2076
2092
  )
2077
2093
  })
2078
2094
  },
2095
+ surveys: {
2096
+ findAll: (params) => {
2097
+ const q = new URLSearchParams();
2098
+ if (params?.page != null) q.set("page", String(params.page));
2099
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2100
+ if (params?.cityId) q.set("cityId", params.cityId);
2101
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2102
+ if (params?.status) q.set("status", params.status);
2103
+ if (params?.light) q.set("light", "1");
2104
+ const query = q.toString();
2105
+ return request(
2106
+ `/surveys${query ? `?${query}` : ""}`
2107
+ );
2108
+ },
2109
+ getById: (id) => request(`/surveys/${id}`),
2110
+ getStats: (id) => request(`/surveys/${id}/stats`),
2111
+ getTerrainOverview: (params) => {
2112
+ const q = new URLSearchParams();
2113
+ if (params?.cityId) q.set("cityId", params.cityId);
2114
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2115
+ const query = q.toString();
2116
+ return request(
2117
+ `/surveys/terrain/overview${query ? `?${query}` : ""}`
2118
+ );
2119
+ }
2120
+ },
2121
+ fieldReports: {
2122
+ findAllForms: (params) => {
2123
+ const q = new URLSearchParams();
2124
+ if (params?.page != null) q.set("page", String(params.page));
2125
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2126
+ if (params?.cityId) q.set("cityId", params.cityId);
2127
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2128
+ if (params?.status) q.set("status", params.status);
2129
+ if (params?.light) q.set("light", "1");
2130
+ const query = q.toString();
2131
+ return request(
2132
+ `/field-reports/forms${query ? `?${query}` : ""}`
2133
+ );
2134
+ },
2135
+ getForm: (id) => request(`/field-reports/forms/${id}`),
2136
+ findAllReports: (params) => {
2137
+ const q = new URLSearchParams();
2138
+ if (params?.page != null) q.set("page", String(params.page));
2139
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2140
+ if (params?.cityId) q.set("cityId", params.cityId);
2141
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2142
+ if (params?.status) q.set("status", params.status);
2143
+ if (params?.formId) q.set("formId", params.formId);
2144
+ const query = q.toString();
2145
+ return request(
2146
+ `/field-reports${query ? `?${query}` : ""}`
2147
+ );
2148
+ },
2149
+ getReport: (id) => request(`/field-reports/${id}`)
2150
+ },
2079
2151
  public: {
2080
2152
  cities: {
2081
2153
  findAll: (params) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wasto/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "DTOs, types and HTTP client for Wasto API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/client.ts CHANGED
@@ -452,6 +452,89 @@ export function createWastoClient(config: WastoClientConfig) {
452
452
  }),
453
453
  },
454
454
 
455
+ surveys: {
456
+ findAll: (params?: {
457
+ page?: number;
458
+ pageSize?: number;
459
+ cityId?: string;
460
+ cityGroupId?: string;
461
+ status?: string;
462
+ light?: boolean;
463
+ }) => {
464
+ const q = new URLSearchParams();
465
+ if (params?.page != null) q.set('page', String(params.page));
466
+ if (params?.pageSize != null) q.set('pageSize', String(params.pageSize));
467
+ if (params?.cityId) q.set('cityId', params.cityId);
468
+ if (params?.cityGroupId) q.set('cityGroupId', params.cityGroupId);
469
+ if (params?.status) q.set('status', params.status);
470
+ if (params?.light) q.set('light', '1');
471
+ const query = q.toString();
472
+ return request<PaginatedResponse<unknown>>(
473
+ `/surveys${query ? `?${query}` : ''}`,
474
+ );
475
+ },
476
+ getById: (id: string) => request<unknown>(`/surveys/${id}`),
477
+ getStats: (id: string) => request<unknown>(`/surveys/${id}/stats`),
478
+ getTerrainOverview: (params?: {
479
+ cityId?: string;
480
+ cityGroupId?: string;
481
+ }) => {
482
+ const q = new URLSearchParams();
483
+ if (params?.cityId) q.set('cityId', params.cityId);
484
+ if (params?.cityGroupId) q.set('cityGroupId', params.cityGroupId);
485
+ const query = q.toString();
486
+ return request<unknown>(
487
+ `/surveys/terrain/overview${query ? `?${query}` : ''}`,
488
+ );
489
+ },
490
+ },
491
+
492
+ fieldReports: {
493
+ findAllForms: (params?: {
494
+ page?: number;
495
+ pageSize?: number;
496
+ cityId?: string;
497
+ cityGroupId?: string;
498
+ status?: string;
499
+ light?: boolean;
500
+ }) => {
501
+ const q = new URLSearchParams();
502
+ if (params?.page != null) q.set('page', String(params.page));
503
+ if (params?.pageSize != null) q.set('pageSize', String(params.pageSize));
504
+ if (params?.cityId) q.set('cityId', params.cityId);
505
+ if (params?.cityGroupId) q.set('cityGroupId', params.cityGroupId);
506
+ if (params?.status) q.set('status', params.status);
507
+ if (params?.light) q.set('light', '1');
508
+ const query = q.toString();
509
+ return request<PaginatedResponse<unknown>>(
510
+ `/field-reports/forms${query ? `?${query}` : ''}`,
511
+ );
512
+ },
513
+ getForm: (id: string) =>
514
+ request<unknown>(`/field-reports/forms/${id}`),
515
+ findAllReports: (params?: {
516
+ page?: number;
517
+ pageSize?: number;
518
+ cityId?: string;
519
+ cityGroupId?: string;
520
+ status?: string;
521
+ formId?: string;
522
+ }) => {
523
+ const q = new URLSearchParams();
524
+ if (params?.page != null) q.set('page', String(params.page));
525
+ if (params?.pageSize != null) q.set('pageSize', String(params.pageSize));
526
+ if (params?.cityId) q.set('cityId', params.cityId);
527
+ if (params?.cityGroupId) q.set('cityGroupId', params.cityGroupId);
528
+ if (params?.status) q.set('status', params.status);
529
+ if (params?.formId) q.set('formId', params.formId);
530
+ const query = q.toString();
531
+ return request<PaginatedResponse<unknown>>(
532
+ `/field-reports${query ? `?${query}` : ''}`,
533
+ );
534
+ },
535
+ getReport: (id: string) => request<unknown>(`/field-reports/${id}`),
536
+ },
537
+
455
538
  public: {
456
539
  cities: {
457
540
  findAll: (params?: { page?: number; pageSize?: number }) => {
@@ -665,7 +748,14 @@ export function createWastoClient(config: WastoClientConfig) {
665
748
  }),
666
749
  },
667
750
  devices: {
668
- registerPushToken: (deviceId: string, body: { token: string }) =>
751
+ registerPushToken: (
752
+ deviceId: string,
753
+ body: {
754
+ token: string;
755
+ cityId?: string | null;
756
+ wasteCollectionPlaceId?: string | null;
757
+ },
758
+ ) =>
669
759
  requestPublic<void>(`/public/devices/${encodeURIComponent(deviceId)}/push-token`, {
670
760
  method: 'POST',
671
761
  body: JSON.stringify(body),
@@ -14,6 +14,8 @@ export enum DashboardAppSlug {
14
14
  IAGO = 'IAGO',
15
15
  PEDAGO = 'PEDAGO',
16
16
  MARKETO = 'MARKETO',
17
+ /** Connect'O — API agents / MCP (hors free self-serve) */
18
+ CONNECTO = 'CONNECTO',
17
19
  }
18
20
 
19
21
  export type DashboardAppDefinition = {
@@ -107,6 +109,14 @@ export const WASTO_SECTIONS: WastoSectionDefinition[] = [
107
109
  sectionLabel: 'Support',
108
110
  dashboardPath: '/support',
109
111
  },
112
+ {
113
+ slug: DashboardAppSlug.CONNECTO,
114
+ key: 'connecto',
115
+ label: "CONNECT'O",
116
+ sectionLabel: 'API & agents',
117
+ dashboardPath: '/integrations',
118
+ isDevOnly: true,
119
+ },
110
120
  ];
111
121
 
112
122
  export const DASHBOARD_APPS: DashboardAppDefinition[] = [
@@ -179,6 +189,13 @@ export const DASHBOARD_APPS: DashboardAppDefinition[] = [
179
189
  dashboardPath: '/analyses',
180
190
  isDevOnly: true,
181
191
  },
192
+ {
193
+ slug: DashboardAppSlug.CONNECTO,
194
+ key: 'connecto',
195
+ label: "CONNECT'O",
196
+ dashboardPath: '/integrations',
197
+ isDevOnly: true,
198
+ },
182
199
  ];
183
200
 
184
201
  export const WASTO_SECTION_BY_KEY = Object.fromEntries(
@@ -11,7 +11,8 @@ export interface CreateWasteCollectionDayRequest {
11
11
  wasteTypeId: string;
12
12
  name: string;
13
13
  description?: string;
14
- biweekly?: boolean;
14
+ /** Fréquence en semaines (1 = hebdo, 2 = toutes les 2 semaines, …). */
15
+ everyWeeks?: number;
15
16
  startDate?: string;
16
17
  }
17
18