@lokalise/maestro-expert-tenant-lib 3.2.0 → 3.2.2

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.ts CHANGED
@@ -10,12 +10,12 @@ declare const API_ERROR: z.ZodObject<{
10
10
  errorCode: z.ZodString;
11
11
  details: z.ZodOptional<z.ZodAny>;
12
12
  }, "strip", z.ZodTypeAny, {
13
- errorCode: string;
14
13
  message: string;
14
+ errorCode: string;
15
15
  details?: any;
16
16
  }, {
17
- errorCode: string;
18
17
  message: string;
18
+ errorCode: string;
19
19
  details?: any;
20
20
  }>;
21
21
  declare const WORKFLOW_PARAMS: z.ZodObject<{
@@ -59,12 +59,12 @@ declare const WORKFLOW: z.ZodObject<{
59
59
  errorCode: z.ZodString;
60
60
  details: z.ZodOptional<z.ZodAny>;
61
61
  }, "strip", z.ZodTypeAny, {
62
- errorCode: string;
63
62
  message: string;
63
+ errorCode: string;
64
64
  details?: any;
65
65
  }, {
66
- errorCode: string;
67
66
  message: string;
67
+ errorCode: string;
68
68
  details?: any;
69
69
  }>>>;
70
70
  createdAt: z.ZodString;
@@ -81,8 +81,8 @@ declare const WORKFLOW: z.ZodObject<{
81
81
  createdAt: string;
82
82
  targetLanguageIds?: string[] | null | undefined;
83
83
  error?: {
84
- errorCode: string;
85
84
  message: string;
85
+ errorCode: string;
86
86
  details?: any;
87
87
  } | null | undefined;
88
88
  updatedAt?: string | null | undefined;
@@ -98,8 +98,8 @@ declare const WORKFLOW: z.ZodObject<{
98
98
  createdAt: string;
99
99
  targetLanguageIds?: string[] | null | undefined;
100
100
  error?: {
101
- errorCode: string;
102
101
  message: string;
102
+ errorCode: string;
103
103
  details?: any;
104
104
  } | null | undefined;
105
105
  updatedAt?: string | null | undefined;
@@ -3049,12 +3049,12 @@ declare const WORKFLOW_EXTENDED: z.ZodObject<{
3049
3049
  errorCode: z.ZodString;
3050
3050
  details: z.ZodOptional<z.ZodAny>;
3051
3051
  }, "strip", z.ZodTypeAny, {
3052
- errorCode: string;
3053
3052
  message: string;
3053
+ errorCode: string;
3054
3054
  details?: any;
3055
3055
  }, {
3056
- errorCode: string;
3057
3056
  message: string;
3057
+ errorCode: string;
3058
3058
  details?: any;
3059
3059
  }>>>;
3060
3060
  createdAt: z.ZodString;
@@ -3170,8 +3170,8 @@ declare const WORKFLOW_EXTENDED: z.ZodObject<{
3170
3170
  id: string;
3171
3171
  })[];
3172
3172
  error?: {
3173
- errorCode: string;
3174
3173
  message: string;
3174
+ errorCode: string;
3175
3175
  details?: any;
3176
3176
  } | null | undefined;
3177
3177
  updatedAt?: string | undefined;
@@ -3286,8 +3286,8 @@ declare const WORKFLOW_EXTENDED: z.ZodObject<{
3286
3286
  id: string;
3287
3287
  })[];
3288
3288
  error?: {
3289
- errorCode: string;
3290
3289
  message: string;
3290
+ errorCode: string;
3291
3291
  details?: any;
3292
3292
  } | null | undefined;
3293
3293
  updatedAt?: string | undefined;
@@ -3343,12 +3343,12 @@ declare const WORKFLOW_EXTENDED_SIMPLIFIED: z.ZodObject<{
3343
3343
  errorCode: z.ZodString;
3344
3344
  details: z.ZodOptional<z.ZodAny>;
3345
3345
  }, "strip", z.ZodTypeAny, {
3346
- errorCode: string;
3347
3346
  message: string;
3347
+ errorCode: string;
3348
3348
  details?: any;
3349
3349
  }, {
3350
- errorCode: string;
3351
3350
  message: string;
3351
+ errorCode: string;
3352
3352
  details?: any;
3353
3353
  }>>>;
3354
3354
  createdAt: z.ZodString;
@@ -3370,8 +3370,8 @@ declare const WORKFLOW_EXTENDED_SIMPLIFIED: z.ZodObject<{
3370
3370
  taskType?: "translation" | "review" | undefined;
3371
3371
  }[];
3372
3372
  error?: {
3373
- errorCode: string;
3374
3373
  message: string;
3374
+ errorCode: string;
3375
3375
  details?: any;
3376
3376
  } | null | undefined;
3377
3377
  updatedAt?: string | undefined;
@@ -3392,8 +3392,8 @@ declare const WORKFLOW_EXTENDED_SIMPLIFIED: z.ZodObject<{
3392
3392
  taskType?: "translation" | "review" | undefined;
3393
3393
  }[];
3394
3394
  error?: {
3395
- errorCode: string;
3396
3395
  message: string;
3396
+ errorCode: string;
3397
3397
  details?: any;
3398
3398
  } | null | undefined;
3399
3399
  updatedAt?: string | undefined;
@@ -4412,12 +4412,12 @@ declare const GET_WORKFLOW_RESPONSE: z.ZodObject<{
4412
4412
  errorCode: z.ZodString;
4413
4413
  details: z.ZodOptional<z.ZodAny>;
4414
4414
  }, "strip", z.ZodTypeAny, {
4415
- errorCode: string;
4416
4415
  message: string;
4416
+ errorCode: string;
4417
4417
  details?: any;
4418
4418
  }, {
4419
- errorCode: string;
4420
4419
  message: string;
4420
+ errorCode: string;
4421
4421
  details?: any;
4422
4422
  }>>>;
4423
4423
  createdAt: z.ZodString;
@@ -4533,8 +4533,8 @@ declare const GET_WORKFLOW_RESPONSE: z.ZodObject<{
4533
4533
  id: string;
4534
4534
  })[];
4535
4535
  error?: {
4536
- errorCode: string;
4537
4536
  message: string;
4537
+ errorCode: string;
4538
4538
  details?: any;
4539
4539
  } | null | undefined;
4540
4540
  updatedAt?: string | undefined;
@@ -4649,8 +4649,8 @@ declare const GET_WORKFLOW_RESPONSE: z.ZodObject<{
4649
4649
  id: string;
4650
4650
  })[];
4651
4651
  error?: {
4652
- errorCode: string;
4653
4652
  message: string;
4653
+ errorCode: string;
4654
4654
  details?: any;
4655
4655
  } | null | undefined;
4656
4656
  updatedAt?: string | undefined;
@@ -4767,8 +4767,8 @@ declare const GET_WORKFLOW_RESPONSE: z.ZodObject<{
4767
4767
  id: string;
4768
4768
  })[];
4769
4769
  error?: {
4770
- errorCode: string;
4771
4770
  message: string;
4771
+ errorCode: string;
4772
4772
  details?: any;
4773
4773
  } | null | undefined;
4774
4774
  updatedAt?: string | undefined;
@@ -4885,8 +4885,8 @@ declare const GET_WORKFLOW_RESPONSE: z.ZodObject<{
4885
4885
  id: string;
4886
4886
  })[];
4887
4887
  error?: {
4888
- errorCode: string;
4889
4888
  message: string;
4889
+ errorCode: string;
4890
4890
  details?: any;
4891
4891
  } | null | undefined;
4892
4892
  updatedAt?: string | undefined;
@@ -4925,12 +4925,12 @@ declare const GET_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
4925
4925
  errorCode: z.ZodString;
4926
4926
  details: z.ZodOptional<z.ZodAny>;
4927
4927
  }, "strip", z.ZodTypeAny, {
4928
- errorCode: string;
4929
4928
  message: string;
4929
+ errorCode: string;
4930
4930
  details?: any;
4931
4931
  }, {
4932
- errorCode: string;
4933
4932
  message: string;
4933
+ errorCode: string;
4934
4934
  details?: any;
4935
4935
  }>>>;
4936
4936
  createdAt: z.ZodString;
@@ -4952,8 +4952,8 @@ declare const GET_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
4952
4952
  taskType?: "translation" | "review" | undefined;
4953
4953
  }[];
4954
4954
  error?: {
4955
- errorCode: string;
4956
4955
  message: string;
4956
+ errorCode: string;
4957
4957
  details?: any;
4958
4958
  } | null | undefined;
4959
4959
  updatedAt?: string | undefined;
@@ -4974,8 +4974,8 @@ declare const GET_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
4974
4974
  taskType?: "translation" | "review" | undefined;
4975
4975
  }[];
4976
4976
  error?: {
4977
- errorCode: string;
4978
4977
  message: string;
4978
+ errorCode: string;
4979
4979
  details?: any;
4980
4980
  } | null | undefined;
4981
4981
  updatedAt?: string | undefined;
@@ -4998,8 +4998,8 @@ declare const GET_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
4998
4998
  taskType?: "translation" | "review" | undefined;
4999
4999
  }[];
5000
5000
  error?: {
5001
- errorCode: string;
5002
5001
  message: string;
5002
+ errorCode: string;
5003
5003
  details?: any;
5004
5004
  } | null | undefined;
5005
5005
  updatedAt?: string | undefined;
@@ -5022,8 +5022,8 @@ declare const GET_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
5022
5022
  taskType?: "translation" | "review" | undefined;
5023
5023
  }[];
5024
5024
  error?: {
5025
- errorCode: string;
5026
5025
  message: string;
5026
+ errorCode: string;
5027
5027
  details?: any;
5028
5028
  } | null | undefined;
5029
5029
  updatedAt?: string | undefined;
@@ -5053,12 +5053,12 @@ declare const GET_WORKFLOW_LIST_RESPONSE: z.ZodObject<{
5053
5053
  errorCode: z.ZodString;
5054
5054
  details: z.ZodOptional<z.ZodAny>;
5055
5055
  }, "strip", z.ZodTypeAny, {
5056
- errorCode: string;
5057
5056
  message: string;
5057
+ errorCode: string;
5058
5058
  details?: any;
5059
5059
  }, {
5060
- errorCode: string;
5061
5060
  message: string;
5061
+ errorCode: string;
5062
5062
  details?: any;
5063
5063
  }>>>;
5064
5064
  createdAt: z.ZodString;
@@ -5075,8 +5075,8 @@ declare const GET_WORKFLOW_LIST_RESPONSE: z.ZodObject<{
5075
5075
  createdAt: string;
5076
5076
  targetLanguageIds?: string[] | null | undefined;
5077
5077
  error?: {
5078
- errorCode: string;
5079
5078
  message: string;
5079
+ errorCode: string;
5080
5080
  details?: any;
5081
5081
  } | null | undefined;
5082
5082
  updatedAt?: string | null | undefined;
@@ -5092,8 +5092,8 @@ declare const GET_WORKFLOW_LIST_RESPONSE: z.ZodObject<{
5092
5092
  createdAt: string;
5093
5093
  targetLanguageIds?: string[] | null | undefined;
5094
5094
  error?: {
5095
- errorCode: string;
5096
5095
  message: string;
5096
+ errorCode: string;
5097
5097
  details?: any;
5098
5098
  } | null | undefined;
5099
5099
  updatedAt?: string | null | undefined;
@@ -5111,8 +5111,8 @@ declare const GET_WORKFLOW_LIST_RESPONSE: z.ZodObject<{
5111
5111
  createdAt: string;
5112
5112
  targetLanguageIds?: string[] | null | undefined;
5113
5113
  error?: {
5114
- errorCode: string;
5115
5114
  message: string;
5115
+ errorCode: string;
5116
5116
  details?: any;
5117
5117
  } | null | undefined;
5118
5118
  updatedAt?: string | null | undefined;
@@ -5130,8 +5130,8 @@ declare const GET_WORKFLOW_LIST_RESPONSE: z.ZodObject<{
5130
5130
  createdAt: string;
5131
5131
  targetLanguageIds?: string[] | null | undefined;
5132
5132
  error?: {
5133
- errorCode: string;
5134
5133
  message: string;
5134
+ errorCode: string;
5135
5135
  details?: any;
5136
5136
  } | null | undefined;
5137
5137
  updatedAt?: string | null | undefined;
@@ -6175,12 +6175,12 @@ declare const POST_DUPLICATE_WORKFLOW_RESPONSE: z.ZodObject<{
6175
6175
  errorCode: z.ZodString;
6176
6176
  details: z.ZodOptional<z.ZodAny>;
6177
6177
  }, "strip", z.ZodTypeAny, {
6178
- errorCode: string;
6179
6178
  message: string;
6179
+ errorCode: string;
6180
6180
  details?: any;
6181
6181
  }, {
6182
- errorCode: string;
6183
6182
  message: string;
6183
+ errorCode: string;
6184
6184
  details?: any;
6185
6185
  }>>>;
6186
6186
  createdAt: z.ZodString;
@@ -6296,8 +6296,8 @@ declare const POST_DUPLICATE_WORKFLOW_RESPONSE: z.ZodObject<{
6296
6296
  id: string;
6297
6297
  })[];
6298
6298
  error?: {
6299
- errorCode: string;
6300
6299
  message: string;
6300
+ errorCode: string;
6301
6301
  details?: any;
6302
6302
  } | null | undefined;
6303
6303
  updatedAt?: string | undefined;
@@ -6412,8 +6412,8 @@ declare const POST_DUPLICATE_WORKFLOW_RESPONSE: z.ZodObject<{
6412
6412
  id: string;
6413
6413
  })[];
6414
6414
  error?: {
6415
- errorCode: string;
6416
6415
  message: string;
6416
+ errorCode: string;
6417
6417
  details?: any;
6418
6418
  } | null | undefined;
6419
6419
  updatedAt?: string | undefined;
@@ -6530,8 +6530,8 @@ declare const POST_DUPLICATE_WORKFLOW_RESPONSE: z.ZodObject<{
6530
6530
  id: string;
6531
6531
  })[];
6532
6532
  error?: {
6533
- errorCode: string;
6534
6533
  message: string;
6534
+ errorCode: string;
6535
6535
  details?: any;
6536
6536
  } | null | undefined;
6537
6537
  updatedAt?: string | undefined;
@@ -6648,8 +6648,8 @@ declare const POST_DUPLICATE_WORKFLOW_RESPONSE: z.ZodObject<{
6648
6648
  id: string;
6649
6649
  })[];
6650
6650
  error?: {
6651
- errorCode: string;
6652
6651
  message: string;
6652
+ errorCode: string;
6653
6653
  details?: any;
6654
6654
  } | null | undefined;
6655
6655
  updatedAt?: string | undefined;
@@ -7673,12 +7673,12 @@ declare const POST_WORKFLOW_RESPONSE: z.ZodObject<{
7673
7673
  errorCode: z.ZodString;
7674
7674
  details: z.ZodOptional<z.ZodAny>;
7675
7675
  }, "strip", z.ZodTypeAny, {
7676
- errorCode: string;
7677
7676
  message: string;
7677
+ errorCode: string;
7678
7678
  details?: any;
7679
7679
  }, {
7680
- errorCode: string;
7681
7680
  message: string;
7681
+ errorCode: string;
7682
7682
  details?: any;
7683
7683
  }>>>;
7684
7684
  createdAt: z.ZodString;
@@ -7794,8 +7794,8 @@ declare const POST_WORKFLOW_RESPONSE: z.ZodObject<{
7794
7794
  id: string;
7795
7795
  })[];
7796
7796
  error?: {
7797
- errorCode: string;
7798
7797
  message: string;
7798
+ errorCode: string;
7799
7799
  details?: any;
7800
7800
  } | null | undefined;
7801
7801
  updatedAt?: string | undefined;
@@ -7910,8 +7910,8 @@ declare const POST_WORKFLOW_RESPONSE: z.ZodObject<{
7910
7910
  id: string;
7911
7911
  })[];
7912
7912
  error?: {
7913
- errorCode: string;
7914
7913
  message: string;
7914
+ errorCode: string;
7915
7915
  details?: any;
7916
7916
  } | null | undefined;
7917
7917
  updatedAt?: string | undefined;
@@ -8028,8 +8028,8 @@ declare const POST_WORKFLOW_RESPONSE: z.ZodObject<{
8028
8028
  id: string;
8029
8029
  })[];
8030
8030
  error?: {
8031
- errorCode: string;
8032
8031
  message: string;
8032
+ errorCode: string;
8033
8033
  details?: any;
8034
8034
  } | null | undefined;
8035
8035
  updatedAt?: string | undefined;
@@ -8146,8 +8146,8 @@ declare const POST_WORKFLOW_RESPONSE: z.ZodObject<{
8146
8146
  id: string;
8147
8147
  })[];
8148
8148
  error?: {
8149
- errorCode: string;
8150
8149
  message: string;
8150
+ errorCode: string;
8151
8151
  details?: any;
8152
8152
  } | null | undefined;
8153
8153
  updatedAt?: string | undefined;
@@ -8186,12 +8186,12 @@ declare const POST_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
8186
8186
  errorCode: z.ZodString;
8187
8187
  details: z.ZodOptional<z.ZodAny>;
8188
8188
  }, "strip", z.ZodTypeAny, {
8189
- errorCode: string;
8190
8189
  message: string;
8190
+ errorCode: string;
8191
8191
  details?: any;
8192
8192
  }, {
8193
- errorCode: string;
8194
8193
  message: string;
8194
+ errorCode: string;
8195
8195
  details?: any;
8196
8196
  }>>>;
8197
8197
  createdAt: z.ZodString;
@@ -8213,8 +8213,8 @@ declare const POST_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
8213
8213
  taskType?: "translation" | "review" | undefined;
8214
8214
  }[];
8215
8215
  error?: {
8216
- errorCode: string;
8217
8216
  message: string;
8217
+ errorCode: string;
8218
8218
  details?: any;
8219
8219
  } | null | undefined;
8220
8220
  updatedAt?: string | undefined;
@@ -8235,8 +8235,8 @@ declare const POST_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
8235
8235
  taskType?: "translation" | "review" | undefined;
8236
8236
  }[];
8237
8237
  error?: {
8238
- errorCode: string;
8239
8238
  message: string;
8239
+ errorCode: string;
8240
8240
  details?: any;
8241
8241
  } | null | undefined;
8242
8242
  updatedAt?: string | undefined;
@@ -8259,8 +8259,8 @@ declare const POST_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
8259
8259
  taskType?: "translation" | "review" | undefined;
8260
8260
  }[];
8261
8261
  error?: {
8262
- errorCode: string;
8263
8262
  message: string;
8263
+ errorCode: string;
8264
8264
  details?: any;
8265
8265
  } | null | undefined;
8266
8266
  updatedAt?: string | undefined;
@@ -8283,8 +8283,8 @@ declare const POST_WORKFLOW_SIMPLIFIED_RESPONSE: z.ZodObject<{
8283
8283
  taskType?: "translation" | "review" | undefined;
8284
8284
  }[];
8285
8285
  error?: {
8286
- errorCode: string;
8287
8286
  message: string;
8287
+ errorCode: string;
8288
8288
  details?: any;
8289
8289
  } | null | undefined;
8290
8290
  updatedAt?: string | undefined;
@@ -10788,12 +10788,12 @@ declare const GET_LIVE_WORKFLOWS_BY_TENANT_ID_RESPONSE: z.ZodObject<{
10788
10788
  errorCode: z.ZodString;
10789
10789
  details: z.ZodOptional<z.ZodAny>;
10790
10790
  }, "strip", z.ZodTypeAny, {
10791
- errorCode: string;
10792
10791
  message: string;
10792
+ errorCode: string;
10793
10793
  details?: any;
10794
10794
  }, {
10795
- errorCode: string;
10796
10795
  message: string;
10796
+ errorCode: string;
10797
10797
  details?: any;
10798
10798
  }>>>;
10799
10799
  createdAt: z.ZodString;
@@ -10810,8 +10810,8 @@ declare const GET_LIVE_WORKFLOWS_BY_TENANT_ID_RESPONSE: z.ZodObject<{
10810
10810
  createdAt: string;
10811
10811
  targetLanguageIds?: string[] | null | undefined;
10812
10812
  error?: {
10813
- errorCode: string;
10814
10813
  message: string;
10814
+ errorCode: string;
10815
10815
  details?: any;
10816
10816
  } | null | undefined;
10817
10817
  updatedAt?: string | null | undefined;
@@ -10827,8 +10827,8 @@ declare const GET_LIVE_WORKFLOWS_BY_TENANT_ID_RESPONSE: z.ZodObject<{
10827
10827
  createdAt: string;
10828
10828
  targetLanguageIds?: string[] | null | undefined;
10829
10829
  error?: {
10830
- errorCode: string;
10831
10830
  message: string;
10831
+ errorCode: string;
10832
10832
  details?: any;
10833
10833
  } | null | undefined;
10834
10834
  updatedAt?: string | null | undefined;
@@ -10846,8 +10846,8 @@ declare const GET_LIVE_WORKFLOWS_BY_TENANT_ID_RESPONSE: z.ZodObject<{
10846
10846
  createdAt: string;
10847
10847
  targetLanguageIds?: string[] | null | undefined;
10848
10848
  error?: {
10849
- errorCode: string;
10850
10849
  message: string;
10850
+ errorCode: string;
10851
10851
  details?: any;
10852
10852
  } | null | undefined;
10853
10853
  updatedAt?: string | null | undefined;
@@ -10865,8 +10865,8 @@ declare const GET_LIVE_WORKFLOWS_BY_TENANT_ID_RESPONSE: z.ZodObject<{
10865
10865
  createdAt: string;
10866
10866
  targetLanguageIds?: string[] | null | undefined;
10867
10867
  error?: {
10868
- errorCode: string;
10869
10868
  message: string;
10869
+ errorCode: string;
10870
10870
  details?: any;
10871
10871
  } | null | undefined;
10872
10872
  updatedAt?: string | null | undefined;
@@ -12472,6 +12472,7 @@ type LayoutTranslatorInterface = {
12472
12472
  translateTemplateToFrontendLayout(template: any): any;
12473
12473
  getTriggerSchedulerExpression(settings: WorkflowLayoutStepSettingsList): string | undefined;
12474
12474
  getTriggerSchedulerStartDate(settings: WorkflowLayoutStepSettingsList): string | undefined;
12475
+ getTemplateGateLevel(schema: any): number | undefined;
12475
12476
  };
12476
12477
 
12477
12478
  declare class LayoutTranslator implements LayoutTranslatorInterface {
@@ -12482,6 +12483,7 @@ declare class LayoutTranslator implements LayoutTranslatorInterface {
12482
12483
  buildWorkflowMetadata({ settings, }: Pick<InternalTemplate<string>, 'settings'>): WorkflowMetadata;
12483
12484
  getTriggerSchedulerExpression(settings: WorkflowLayoutStepSettingsList): string | undefined;
12484
12485
  getTriggerSchedulerStartDate(settings: WorkflowLayoutStepSettingsList): string | undefined;
12486
+ getTemplateGateLevel<StateName extends string>(frontendLayout: FrontendLayout<StateName>): number | undefined;
12485
12487
  buildLayoutSettings<StateName extends string>(frontendLayout: FrontendLayout<StateName>): StrictWorkflowLayoutSettings<StateName>;
12486
12488
  findTemplate<StateName extends string>(frontendLayout: FrontendLayout<StateName>): Template<StateName> | undefined;
12487
12489
  }
package/dist/index.mjs CHANGED
@@ -92,6 +92,13 @@ var LayoutTranslator = class {
92
92
  }
93
93
  return void 0;
94
94
  }
95
+ getTemplateGateLevel(frontendLayout) {
96
+ const template = this.findTemplate(frontendLayout);
97
+ if (!template) {
98
+ return void 0;
99
+ }
100
+ return template.gateLevel;
101
+ }
95
102
  buildLayoutSettings(frontendLayout) {
96
103
  return frontendLayout.reduce(
97
104
  (acc, frontendStep) => {