@deliverart/sdk-js-webhook 2.2.4 → 2.2.6

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.cjs CHANGED
@@ -11288,7 +11288,10 @@ var webhookLogListItemSchema = webhookLogSchema.omit({
11288
11288
  });
11289
11289
  var webhookLogsQuerySchema = external_exports.object({
11290
11290
  entityClass: external_exports.string().optional(),
11291
+ externalEntityId: external_exports.string().optional(),
11292
+ "exists[completedAt]": external_exports.coerce.boolean().optional(),
11291
11293
  events: external_exports.union([webhookEventSchema, external_exports.array(webhookEventSchema)]).optional(),
11294
+ status: external_exports.union([webhookLogStatusSchema, external_exports.array(webhookLogStatusSchema)]).optional(),
11292
11295
  "order[createdAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
11293
11296
  "order[completedAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
11294
11297
  page: external_exports.coerce.number().optional()
@@ -11516,7 +11519,7 @@ var getWebhookLogsFromWebhookConfigurationQuerySchema = webhookLogsQuerySchema;
11516
11519
  var getWebhookLogsFromWebhookConfigurationInputSchema = external_exports.undefined();
11517
11520
  var getWebhookLogsFromWebhookConfigurationResponseSchema = (0, import_sdk_js_global_types5.createPaginatedSchema)(webhookLogListItemSchema);
11518
11521
  var GetWebhookLogsFromWebhookConfiguration = class extends import_sdk_js_core9.AbstractApiRequest {
11519
- constructor(pointOfSaleId, options) {
11522
+ constructor(webhookConfigurationId, options) {
11520
11523
  super(void 0, options);
11521
11524
  this.method = "GET";
11522
11525
  this.contentType = "application/json";
@@ -11525,10 +11528,10 @@ var GetWebhookLogsFromWebhookConfiguration = class extends import_sdk_js_core9.A
11525
11528
  this.outputSchema = getWebhookLogsFromWebhookConfigurationResponseSchema;
11526
11529
  this.querySchema = getWebhookLogsFromWebhookConfigurationQuerySchema;
11527
11530
  this.headersSchema = void 0;
11528
- this.pointOfSaleId = pointOfSaleId;
11531
+ this.webhookConfigurationId = webhookConfigurationId;
11529
11532
  }
11530
11533
  getPath() {
11531
- return `/point_of_sales/${this.pointOfSaleId}/webhooks/logs`;
11534
+ return `/webhooks/configurations/${this.webhookConfigurationId}/logs`;
11532
11535
  }
11533
11536
  parseResponse(data, rawResponse) {
11534
11537
  const webhookLogs = external_exports.array(webhookLogSchema).parse(data);
package/dist/index.d.cts CHANGED
@@ -143,6 +143,8 @@ declare const webhookLogListItemSchema: z.ZodObject<{
143
143
  type WebhookLogListItem = z.infer<typeof webhookLogListItemSchema>;
144
144
  declare const webhookLogsQuerySchema: z.ZodObject<{
145
145
  entityClass: z.ZodOptional<z.ZodString>;
146
+ externalEntityId: z.ZodOptional<z.ZodString>;
147
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
146
148
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
147
149
  create: "create";
148
150
  update: "update";
@@ -152,6 +154,17 @@ declare const webhookLogsQuerySchema: z.ZodObject<{
152
154
  update: "update";
153
155
  delete: "delete";
154
156
  }>>]>>;
157
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
158
+ pending: "pending";
159
+ success: "success";
160
+ failed: "failed";
161
+ timeout: "timeout";
162
+ }>, z.ZodArray<z.ZodEnum<{
163
+ pending: "pending";
164
+ success: "success";
165
+ failed: "failed";
166
+ timeout: "timeout";
167
+ }>>]>>;
155
168
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
156
169
  asc: "asc";
157
170
  desc: "desc";
@@ -827,6 +840,8 @@ declare class GetWebhookLogDetails extends AbstractApiRequest<typeof getWebhookL
827
840
 
828
841
  declare const getWebhookLogsQuerySchema: z.ZodObject<{
829
842
  entityClass: z.ZodOptional<z.ZodString>;
843
+ externalEntityId: z.ZodOptional<z.ZodString>;
844
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
830
845
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
831
846
  create: "create";
832
847
  update: "update";
@@ -836,6 +851,17 @@ declare const getWebhookLogsQuerySchema: z.ZodObject<{
836
851
  update: "update";
837
852
  delete: "delete";
838
853
  }>>]>>;
854
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
855
+ pending: "pending";
856
+ success: "success";
857
+ failed: "failed";
858
+ timeout: "timeout";
859
+ }>, z.ZodArray<z.ZodEnum<{
860
+ pending: "pending";
861
+ success: "success";
862
+ failed: "failed";
863
+ timeout: "timeout";
864
+ }>>]>>;
839
865
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
840
866
  asc: "asc";
841
867
  desc: "desc";
@@ -935,6 +961,8 @@ declare class GetWebhookLogs extends AbstractApiRequest<typeof getWebhookLogsInp
935
961
  }, z.core.$strip>;
936
962
  readonly querySchema: z.ZodObject<{
937
963
  entityClass: z.ZodOptional<z.ZodString>;
964
+ externalEntityId: z.ZodOptional<z.ZodString>;
965
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
938
966
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
939
967
  create: "create";
940
968
  update: "update";
@@ -944,6 +972,17 @@ declare class GetWebhookLogs extends AbstractApiRequest<typeof getWebhookLogsInp
944
972
  update: "update";
945
973
  delete: "delete";
946
974
  }>>]>>;
975
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
976
+ pending: "pending";
977
+ success: "success";
978
+ failed: "failed";
979
+ timeout: "timeout";
980
+ }>, z.ZodArray<z.ZodEnum<{
981
+ pending: "pending";
982
+ success: "success";
983
+ failed: "failed";
984
+ timeout: "timeout";
985
+ }>>]>>;
947
986
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
948
987
  asc: "asc";
949
988
  desc: "desc";
@@ -972,6 +1011,8 @@ declare class GetWebhookLogs extends AbstractApiRequest<typeof getWebhookLogsInp
972
1011
 
973
1012
  declare const getWebhookLogsFromWebhookConfigurationQuerySchema: z.ZodObject<{
974
1013
  entityClass: z.ZodOptional<z.ZodString>;
1014
+ externalEntityId: z.ZodOptional<z.ZodString>;
1015
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
975
1016
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
976
1017
  create: "create";
977
1018
  update: "update";
@@ -981,6 +1022,17 @@ declare const getWebhookLogsFromWebhookConfigurationQuerySchema: z.ZodObject<{
981
1022
  update: "update";
982
1023
  delete: "delete";
983
1024
  }>>]>>;
1025
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1026
+ pending: "pending";
1027
+ success: "success";
1028
+ failed: "failed";
1029
+ timeout: "timeout";
1030
+ }>, z.ZodArray<z.ZodEnum<{
1031
+ pending: "pending";
1032
+ success: "success";
1033
+ failed: "failed";
1034
+ timeout: "timeout";
1035
+ }>>]>>;
984
1036
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
985
1037
  asc: "asc";
986
1038
  desc: "desc";
@@ -1080,6 +1132,8 @@ declare class GetWebhookLogsFromWebhookConfiguration extends AbstractApiRequest<
1080
1132
  }, z.core.$strip>;
1081
1133
  readonly querySchema: z.ZodObject<{
1082
1134
  entityClass: z.ZodOptional<z.ZodString>;
1135
+ externalEntityId: z.ZodOptional<z.ZodString>;
1136
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
1083
1137
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1084
1138
  create: "create";
1085
1139
  update: "update";
@@ -1089,6 +1143,17 @@ declare class GetWebhookLogsFromWebhookConfiguration extends AbstractApiRequest<
1089
1143
  update: "update";
1090
1144
  delete: "delete";
1091
1145
  }>>]>>;
1146
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1147
+ pending: "pending";
1148
+ success: "success";
1149
+ failed: "failed";
1150
+ timeout: "timeout";
1151
+ }>, z.ZodArray<z.ZodEnum<{
1152
+ pending: "pending";
1153
+ success: "success";
1154
+ failed: "failed";
1155
+ timeout: "timeout";
1156
+ }>>]>>;
1092
1157
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
1093
1158
  asc: "asc";
1094
1159
  desc: "desc";
@@ -1108,8 +1173,8 @@ declare class GetWebhookLogsFromWebhookConfiguration extends AbstractApiRequest<
1108
1173
  'completedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1109
1174
  }, z.core.$strip>;
1110
1175
  readonly headersSchema: undefined;
1111
- private readonly pointOfSaleId;
1112
- constructor(pointOfSaleId: string, options?: {
1176
+ private readonly webhookConfigurationId;
1177
+ constructor(webhookConfigurationId: string, options?: {
1113
1178
  query?: GetWebhookLogsFromWebhookConfigurationQueryParams;
1114
1179
  });
1115
1180
  getPath(): string;
package/dist/index.d.ts CHANGED
@@ -143,6 +143,8 @@ declare const webhookLogListItemSchema: z.ZodObject<{
143
143
  type WebhookLogListItem = z.infer<typeof webhookLogListItemSchema>;
144
144
  declare const webhookLogsQuerySchema: z.ZodObject<{
145
145
  entityClass: z.ZodOptional<z.ZodString>;
146
+ externalEntityId: z.ZodOptional<z.ZodString>;
147
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
146
148
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
147
149
  create: "create";
148
150
  update: "update";
@@ -152,6 +154,17 @@ declare const webhookLogsQuerySchema: z.ZodObject<{
152
154
  update: "update";
153
155
  delete: "delete";
154
156
  }>>]>>;
157
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
158
+ pending: "pending";
159
+ success: "success";
160
+ failed: "failed";
161
+ timeout: "timeout";
162
+ }>, z.ZodArray<z.ZodEnum<{
163
+ pending: "pending";
164
+ success: "success";
165
+ failed: "failed";
166
+ timeout: "timeout";
167
+ }>>]>>;
155
168
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
156
169
  asc: "asc";
157
170
  desc: "desc";
@@ -827,6 +840,8 @@ declare class GetWebhookLogDetails extends AbstractApiRequest<typeof getWebhookL
827
840
 
828
841
  declare const getWebhookLogsQuerySchema: z.ZodObject<{
829
842
  entityClass: z.ZodOptional<z.ZodString>;
843
+ externalEntityId: z.ZodOptional<z.ZodString>;
844
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
830
845
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
831
846
  create: "create";
832
847
  update: "update";
@@ -836,6 +851,17 @@ declare const getWebhookLogsQuerySchema: z.ZodObject<{
836
851
  update: "update";
837
852
  delete: "delete";
838
853
  }>>]>>;
854
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
855
+ pending: "pending";
856
+ success: "success";
857
+ failed: "failed";
858
+ timeout: "timeout";
859
+ }>, z.ZodArray<z.ZodEnum<{
860
+ pending: "pending";
861
+ success: "success";
862
+ failed: "failed";
863
+ timeout: "timeout";
864
+ }>>]>>;
839
865
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
840
866
  asc: "asc";
841
867
  desc: "desc";
@@ -935,6 +961,8 @@ declare class GetWebhookLogs extends AbstractApiRequest<typeof getWebhookLogsInp
935
961
  }, z.core.$strip>;
936
962
  readonly querySchema: z.ZodObject<{
937
963
  entityClass: z.ZodOptional<z.ZodString>;
964
+ externalEntityId: z.ZodOptional<z.ZodString>;
965
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
938
966
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
939
967
  create: "create";
940
968
  update: "update";
@@ -944,6 +972,17 @@ declare class GetWebhookLogs extends AbstractApiRequest<typeof getWebhookLogsInp
944
972
  update: "update";
945
973
  delete: "delete";
946
974
  }>>]>>;
975
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
976
+ pending: "pending";
977
+ success: "success";
978
+ failed: "failed";
979
+ timeout: "timeout";
980
+ }>, z.ZodArray<z.ZodEnum<{
981
+ pending: "pending";
982
+ success: "success";
983
+ failed: "failed";
984
+ timeout: "timeout";
985
+ }>>]>>;
947
986
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
948
987
  asc: "asc";
949
988
  desc: "desc";
@@ -972,6 +1011,8 @@ declare class GetWebhookLogs extends AbstractApiRequest<typeof getWebhookLogsInp
972
1011
 
973
1012
  declare const getWebhookLogsFromWebhookConfigurationQuerySchema: z.ZodObject<{
974
1013
  entityClass: z.ZodOptional<z.ZodString>;
1014
+ externalEntityId: z.ZodOptional<z.ZodString>;
1015
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
975
1016
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
976
1017
  create: "create";
977
1018
  update: "update";
@@ -981,6 +1022,17 @@ declare const getWebhookLogsFromWebhookConfigurationQuerySchema: z.ZodObject<{
981
1022
  update: "update";
982
1023
  delete: "delete";
983
1024
  }>>]>>;
1025
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1026
+ pending: "pending";
1027
+ success: "success";
1028
+ failed: "failed";
1029
+ timeout: "timeout";
1030
+ }>, z.ZodArray<z.ZodEnum<{
1031
+ pending: "pending";
1032
+ success: "success";
1033
+ failed: "failed";
1034
+ timeout: "timeout";
1035
+ }>>]>>;
984
1036
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
985
1037
  asc: "asc";
986
1038
  desc: "desc";
@@ -1080,6 +1132,8 @@ declare class GetWebhookLogsFromWebhookConfiguration extends AbstractApiRequest<
1080
1132
  }, z.core.$strip>;
1081
1133
  readonly querySchema: z.ZodObject<{
1082
1134
  entityClass: z.ZodOptional<z.ZodString>;
1135
+ externalEntityId: z.ZodOptional<z.ZodString>;
1136
+ 'exists[completedAt]': z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
1083
1137
  events: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1084
1138
  create: "create";
1085
1139
  update: "update";
@@ -1089,6 +1143,17 @@ declare class GetWebhookLogsFromWebhookConfiguration extends AbstractApiRequest<
1089
1143
  update: "update";
1090
1144
  delete: "delete";
1091
1145
  }>>]>>;
1146
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1147
+ pending: "pending";
1148
+ success: "success";
1149
+ failed: "failed";
1150
+ timeout: "timeout";
1151
+ }>, z.ZodArray<z.ZodEnum<{
1152
+ pending: "pending";
1153
+ success: "success";
1154
+ failed: "failed";
1155
+ timeout: "timeout";
1156
+ }>>]>>;
1092
1157
  'order[createdAt]': z.ZodOptional<z.ZodEnum<{
1093
1158
  asc: "asc";
1094
1159
  desc: "desc";
@@ -1108,8 +1173,8 @@ declare class GetWebhookLogsFromWebhookConfiguration extends AbstractApiRequest<
1108
1173
  'completedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1109
1174
  }, z.core.$strip>;
1110
1175
  readonly headersSchema: undefined;
1111
- private readonly pointOfSaleId;
1112
- constructor(pointOfSaleId: string, options?: {
1176
+ private readonly webhookConfigurationId;
1177
+ constructor(webhookConfigurationId: string, options?: {
1113
1178
  query?: GetWebhookLogsFromWebhookConfigurationQueryParams;
1114
1179
  });
1115
1180
  getPath(): string;
package/dist/index.js CHANGED
@@ -11226,7 +11226,10 @@ var webhookLogListItemSchema = webhookLogSchema.omit({
11226
11226
  });
11227
11227
  var webhookLogsQuerySchema = external_exports.object({
11228
11228
  entityClass: external_exports.string().optional(),
11229
+ externalEntityId: external_exports.string().optional(),
11230
+ "exists[completedAt]": external_exports.coerce.boolean().optional(),
11229
11231
  events: external_exports.union([webhookEventSchema, external_exports.array(webhookEventSchema)]).optional(),
11232
+ status: external_exports.union([webhookLogStatusSchema, external_exports.array(webhookLogStatusSchema)]).optional(),
11230
11233
  "order[createdAt]": sortDirSchema.optional(),
11231
11234
  "order[completedAt]": sortDirSchema.optional(),
11232
11235
  page: external_exports.coerce.number().optional()
@@ -11463,7 +11466,7 @@ var getWebhookLogsFromWebhookConfigurationQuerySchema = webhookLogsQuerySchema;
11463
11466
  var getWebhookLogsFromWebhookConfigurationInputSchema = external_exports.undefined();
11464
11467
  var getWebhookLogsFromWebhookConfigurationResponseSchema = createPaginatedSchema3(webhookLogListItemSchema);
11465
11468
  var GetWebhookLogsFromWebhookConfiguration = class extends AbstractApiRequest9 {
11466
- constructor(pointOfSaleId, options) {
11469
+ constructor(webhookConfigurationId, options) {
11467
11470
  super(void 0, options);
11468
11471
  this.method = "GET";
11469
11472
  this.contentType = "application/json";
@@ -11472,10 +11475,10 @@ var GetWebhookLogsFromWebhookConfiguration = class extends AbstractApiRequest9 {
11472
11475
  this.outputSchema = getWebhookLogsFromWebhookConfigurationResponseSchema;
11473
11476
  this.querySchema = getWebhookLogsFromWebhookConfigurationQuerySchema;
11474
11477
  this.headersSchema = void 0;
11475
- this.pointOfSaleId = pointOfSaleId;
11478
+ this.webhookConfigurationId = webhookConfigurationId;
11476
11479
  }
11477
11480
  getPath() {
11478
- return `/point_of_sales/${this.pointOfSaleId}/webhooks/logs`;
11481
+ return `/webhooks/configurations/${this.webhookConfigurationId}/logs`;
11479
11482
  }
11480
11483
  parseResponse(data, rawResponse) {
11481
11484
  const webhookLogs = external_exports.array(webhookLogSchema).parse(data);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-webhook",
3
3
  "description": "Deliverart JavaScript SDK for Webhook Management",
4
- "version": "2.2.4",
4
+ "version": "2.2.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@deliverart/sdk-js-core": "2.1.57",
22
- "@deliverart/sdk-js-global-types": "2.1.57",
23
- "@deliverart/sdk-js-point-of-sale": "2.1.57"
22
+ "@deliverart/sdk-js-point-of-sale": "2.1.57",
23
+ "@deliverart/sdk-js-global-types": "2.1.57"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"