@compassdigital/sdk.typescript 3.0.0-rc.1 → 3.0.0-rc.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/src/index.ts CHANGED
@@ -154,6 +154,8 @@ import {
154
154
  PatchLocationCompanyResponse,
155
155
  GetLocationBrandExternalQuery,
156
156
  GetLocationBrandExternalResponse,
157
+ DeleteLocationRecordQuery,
158
+ DeleteLocationRecordResponse,
157
159
  } from "./interface/location";
158
160
 
159
161
  import {
@@ -396,6 +398,9 @@ import {
396
398
  PostUserSendEmailVerificationResponse,
397
399
  PutUserVerifyUserEmailBody,
398
400
  PutUserVerifyUserEmailResponse,
401
+ PostUserVerificationPhoneQuery,
402
+ PostUserVerificationPhoneBody,
403
+ PostUserVerificationPhoneResponse,
399
404
  PutUserVerificationPhoneBody,
400
405
  PutUserVerificationPhoneResponse,
401
406
  } from "./interface/user";
@@ -475,7 +480,12 @@ import {
475
480
  GetVoteIdfaResponse,
476
481
  } from "./interface/vote";
477
482
 
478
- import { PostFileBody, PostFileResponse } from "./interface/file";
483
+ import {
484
+ PostFileBody,
485
+ PostFileResponse,
486
+ DeleteFileBody,
487
+ DeleteFileResponse,
488
+ } from "./interface/file";
479
489
 
480
490
  import { PostMessageBody, PostMessageResponse, GetMessageResponse } from "./interface/message";
481
491
 
@@ -2069,6 +2079,28 @@ export class ServiceClient extends BaseServiceClient {
2069
2079
  );
2070
2080
  }
2071
2081
 
2082
+ /**
2083
+ * DELETE /location/record/{id} - Delete a Brand, Location, Group, or MultiGroup
2084
+ *
2085
+ * @param id - brand, location, group, or multigroup id
2086
+ * @param options - additional request options
2087
+ */
2088
+ delete_location_record(
2089
+ id: string,
2090
+ options?: {
2091
+ query?: DeleteLocationRecordQuery;
2092
+ } & RequestOptions
2093
+ ): ResponsePromise<DeleteLocationRecordResponse> {
2094
+ return this.request(
2095
+ "location",
2096
+ "delete_location_record",
2097
+ "delete",
2098
+ `/location/record/${id}`,
2099
+ null,
2100
+ options
2101
+ );
2102
+ }
2103
+
2072
2104
  /**
2073
2105
  * POST /shoppingcart/ - Create a new ShoppingCart
2074
2106
  *
@@ -4232,7 +4264,31 @@ export class ServiceClient extends BaseServiceClient {
4232
4264
  }
4233
4265
 
4234
4266
  /**
4235
- * PUT /user/{id}/verification/phone - Send phone verification to user
4267
+ * POST /user/{id}/verification/phone - Send phone verification to user
4268
+ *
4269
+ * @param id - realm
4270
+ * @param body - User phone number to be verified
4271
+ * @param options - additional request options
4272
+ */
4273
+ post_user_verification_phone(
4274
+ id: string,
4275
+ body: PostUserVerificationPhoneBody,
4276
+ options?: {
4277
+ query?: PostUserVerificationPhoneQuery;
4278
+ } & RequestOptions
4279
+ ): ResponsePromise<PostUserVerificationPhoneResponse> {
4280
+ return this.request(
4281
+ "user",
4282
+ "post_user_verification_phone",
4283
+ "post",
4284
+ `/user/${id}/verification/phone`,
4285
+ body,
4286
+ options
4287
+ );
4288
+ }
4289
+
4290
+ /**
4291
+ * PUT /user/{id}/verification/phone - Attempt phone verification for user
4236
4292
  *
4237
4293
  * @param id - realm
4238
4294
  * @param body
@@ -4960,6 +5016,16 @@ export class ServiceClient extends BaseServiceClient {
4960
5016
  return this.request("file", "post_file", "post", `/file`, body, options);
4961
5017
  }
4962
5018
 
5019
+ /**
5020
+ * DELETE /file - Delete a file from CDL S3
5021
+ *
5022
+ * @param body
5023
+ * @param options - additional request options
5024
+ */
5025
+ delete_file(body: DeleteFileBody, options?: RequestOptions): ResponsePromise<DeleteFileResponse> {
5026
+ return this.request("file", "delete_file", "delete", `/file`, body, options);
5027
+ }
5028
+
4963
5029
  /**
4964
5030
  * POST /message - Create a Message
4965
5031
  *
@@ -25,3 +25,20 @@ export type PostFileResponse = File;
25
25
  export interface PostFileRequest {
26
26
  body: PostFileBody;
27
27
  }
28
+
29
+ // DELETE /file - Delete a file from CDL S3
30
+
31
+ export interface DeleteFileBody {
32
+ // Specify the bucket name
33
+ bucket_name: string;
34
+ // Specify the full S3 file path
35
+ file_path: string;
36
+ }
37
+
38
+ export interface DeleteFileResponse {
39
+ success?: boolean;
40
+ }
41
+
42
+ export interface DeleteFileRequest {
43
+ body: DeleteFileBody;
44
+ }
@@ -333,7 +333,7 @@ export interface Groups {
333
333
  groups?: Group[];
334
334
  }
335
335
 
336
- export interface PostOrPatchDeliveryDestination {
336
+ export interface PostDeliveryDestination {
337
337
  // Name of the delivery destination
338
338
  name: string;
339
339
  // Boolean to indicate whether the delivery destination is a foodlocker or not
@@ -345,7 +345,7 @@ export interface PostOrPatchDeliveryDestination {
345
345
 
346
346
  export interface DeliveryDestination {
347
347
  // delivery_destination
348
- id?: string;
348
+ id: string;
349
349
  // Name of the delivery destination
350
350
  name: string;
351
351
  // Boolean to indicate whether the delivery destination is a foodlocker or not
@@ -753,7 +753,7 @@ export interface PostLocationGroupDeliverydestinationPath {
753
753
  id: string;
754
754
  }
755
755
 
756
- export type PostLocationGroupDeliverydestinationBody = PostOrPatchDeliveryDestination;
756
+ export type PostLocationGroupDeliverydestinationBody = PostDeliveryDestination;
757
757
 
758
758
  export type PostLocationGroupDeliverydestinationResponse = DeliveryDestination;
759
759
 
@@ -770,11 +770,11 @@ export interface PatchLocationGroupDeliverydestinationPath {
770
770
  }
771
771
 
772
772
  export interface PatchLocationGroupDeliverydestinationBody {
773
- delivery_destinations?: PostOrPatchDeliveryDestination;
773
+ delivery_destinations: DeliveryDestination[];
774
774
  }
775
775
 
776
776
  export interface PatchLocationGroupDeliverydestinationResponse {
777
- delivery_destinations?: DeliveryDestination;
777
+ delivery_destinations: DeliveryDestination[];
778
778
  }
779
779
 
780
780
  export interface PatchLocationGroupDeliverydestinationRequest
@@ -790,11 +790,11 @@ export interface DeleteLocationGroupDeliverydestinationPath {
790
790
  }
791
791
 
792
792
  export interface DeleteLocationGroupDeliverydestinationBody {
793
- delivery_destination_ids?: string[];
793
+ delivery_destination_ids: string[];
794
794
  }
795
795
 
796
796
  export interface DeleteLocationGroupDeliverydestinationResponse {
797
- deleted_delivery_destinations?: DeliveryDestination;
797
+ deleted_delivery_destinations: DeliveryDestination[];
798
798
  }
799
799
 
800
800
  export interface DeleteLocationGroupDeliverydestinationRequest
@@ -1235,3 +1235,21 @@ export type GetLocationBrandExternalResponse = Location;
1235
1235
  export interface GetLocationBrandExternalRequest
1236
1236
  extends GetLocationBrandExternalQuery,
1237
1237
  GetLocationBrandExternalPath {}
1238
+
1239
+ // DELETE /location/record/{id} - Delete a Brand, Location, Group, or MultiGroup
1240
+
1241
+ export interface DeleteLocationRecordPath {
1242
+ // brand, location, group, or multigroup id
1243
+ id: string;
1244
+ }
1245
+
1246
+ export interface DeleteLocationRecordQuery {
1247
+ // Don't delete the record
1248
+ dryrun?: boolean;
1249
+ }
1250
+
1251
+ export type DeleteLocationRecordResponse = any;
1252
+
1253
+ export interface DeleteLocationRecordRequest
1254
+ extends DeleteLocationRecordQuery,
1255
+ DeleteLocationRecordPath {}
@@ -98,14 +98,17 @@ export interface Order {
98
98
  ready?: boolean;
99
99
  out_for_delivery?: boolean;
100
100
  delivered?: boolean;
101
+ checkin_order?: boolean;
101
102
  };
102
103
  date?: {
104
+ accepted?: string;
103
105
  created?: string;
104
106
  modified?: string;
105
107
  should_start?: string;
106
108
  completion_warning?: string;
107
109
  ready?: string;
108
110
  started?: string;
111
+ show_as_active_until?: string;
109
112
  };
110
113
  pickup?: string;
111
114
  pickup_name?: string;
@@ -19,6 +19,7 @@ export interface User {
19
19
  };
20
20
  birthday?: string;
21
21
  password?: string;
22
+ // User phone number
22
23
  phone?: number;
23
24
  // realm
24
25
  realm?: string;
@@ -596,7 +597,31 @@ export interface PutUserVerifyUserEmailRequest extends PutUserVerifyUserEmailPat
596
597
  body: PutUserVerifyUserEmailBody;
597
598
  }
598
599
 
599
- // PUT /user/{id}/verification/phone - Send phone verification to user
600
+ // POST /user/{id}/verification/phone - Send phone verification to user
601
+
602
+ export interface PostUserVerificationPhonePath {
603
+ // realm
604
+ id: string;
605
+ }
606
+
607
+ export interface PostUserVerificationPhoneQuery {
608
+ // The language of the sms, currently en, fr supported.
609
+ lang?: string;
610
+ }
611
+
612
+ export interface PostUserVerificationPhoneBody {
613
+ phone: string;
614
+ }
615
+
616
+ export type PostUserVerificationPhoneResponse = success;
617
+
618
+ export interface PostUserVerificationPhoneRequest
619
+ extends PostUserVerificationPhoneQuery,
620
+ PostUserVerificationPhonePath {
621
+ body: PostUserVerificationPhoneBody;
622
+ }
623
+
624
+ // PUT /user/{id}/verification/phone - Attempt phone verification for user
600
625
 
601
626
  export interface PutUserVerificationPhonePath {
602
627
  // realm
@@ -604,8 +629,8 @@ export interface PutUserVerificationPhonePath {
604
629
  }
605
630
 
606
631
  export interface PutUserVerificationPhoneBody {
607
- // User phone number to be verified
608
- phone: string;
632
+ // Phone verification code
633
+ verification_code: string;
609
634
  }
610
635
 
611
636
  export type PutUserVerificationPhoneResponse = success;